Axis Web Service exception: No compiler found in your classpath! (you may need to add ‘tools.jar’)


If you get an exception like the following one

No compiler found in your classpath! (you may need to add ‘tools.jar’)

when you run the following url

http://localhost:8080/axis/EchoHeaders.jws?method=list

for testing Axis Default application

You need to put tools.jar(%JAVA_HOME%\lib\tools.jar) file inside %CATALINA_HOME(Apache Tomcat Home Location)%\common\lib folder

and restart the Tomcat Application Server

and you will get a result such as the following;

  <?xml version=”1.0″ encoding=”UTF-8″ ?>
 <soapenv:Body>
<listResponse soapenv:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/“>
 <listReturn soapenc:arrayType=”soapenc:string[8]” xsi:type=”soapenc:Array” xmlns:soapenc=”http://schemas.xmlsoap.org/soap/encoding/“>
  <listReturn xsi:type=”soapenc:string“>accept:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */*</listReturn>
  <listReturn xsi:type=”soapenc:string“>accept-language:en-us</listReturn>
  <listReturn xsi:type=”soapenc:string“>ua-cpu:x86</listReturn>
  <listReturn xsi:type=”soapenc:string“>accept-encoding:gzip, deflate</listReturn>
  <listReturn xsi:type=”soapenc:string“>user-agent:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)</listReturn>
  <listReturn xsi:type=”soapenc:string“>host:……</listReturn>
  <listReturn xsi:type=”soapenc:string“>connection:Keep-Alive</listReturn>
  <listReturn xsi:type=”soapenc:string“>cookie:JSESSIONID=…….</listReturn>
  </listReturn>
  </listResponse>
  </soapenv:Body>
  </soapenv:Envelope>