0

I hope someone will be able to help me figure this out.

I was requested to migrate apache axis 1.4 from a server with Tomcat 6 to a more recent server with Tomcat 9.

OS is RedHat Enterprise 5.9 on older server, RedHat Enterprise 8.4 on newer server.

The older Tomcat 6 uses JRE 1.6, and it runs without issues, while the Tomcat 9 uses JDK 1.8

What I did was simply take the folder under CATALINA_HOME\webapps\axis and copy it under the same folder on the new Tomcat 9.

Everything seemed fine until I changed a custom .jws file. When I tryed reloading axis, visiting page https://IP/axis/FILE_NAME.jws?wsdl I get the following error:

Sorry, something seems to have gone wrong... here are the details:

Fault - ; nested exception is: 
java.lang.RuntimeException: No compiler found in your classpath!  (you may need to add 'tools.jar')

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.RuntimeException: No compiler found in your classpath!  (you may need to add 'tools.jar')
 faultActor: 
 faultNode: 
 faultDetail: 
         {http://xml.apache.org/axis/}hostname:client.localdomain

I checked for tools.jar on the JDK installed and found it under /usr/lib/jvm/java-1.8.0-openjdk/lib/

I also looked online and, as most posts said, I tried copying the tools.jar under CATALINA_HOME\webapps\axis\WEB_INF\lib, but I still get the same error.

I tried a bunch of stuff like adding the AXISCLASSPATH=CATALINA_HOME\webapps\axis\WEB_INF\lib to my tomcat setenv.sh, or copying the tools.jar under the CATALINA_HOME\lib folder, but nothing seems to work.

Could you please help me understand what the issue may be?

Leo
  • 241
  • 2
  • 3
  • 12
  • Does this answer your question? [tools.jar missing - but only on the very first call (Tomcat 8/Java 8/ Axis)](https://stackoverflow.com/questions/27965823/tools-jar-missing-but-only-on-the-very-first-call-tomcat-8-java-8-axis) – Piotr P. Karwasz Nov 26 '21 at 21:39
  • Unfortunately it does not, because path \components\compiler\Javac.java does not exist in the axis webapp I found in the Tomcat – Leo Nov 28 '21 at 15:44
  • That file is in Axis sources. Basically if you want to use a 15-years old Axis 1.4 with a modern JRE, you should probably compile it from source. Even better, you should consider migrating to Axis 2. – Piotr P. Karwasz Nov 28 '21 at 17:35
  • Hello. I have noticed that if I create a .java file with the same content as .jws file, and I compile it using javac command from commandline, the .class gets created correctly and the service works. Now I wonder why java can compile the .java but not the .jws, and the class workds by calling the .jws file by URL – Leo Nov 29 '21 at 10:01
  • Axis does not call `javac`, but the internal compiler API. This API changed in Java 8, hence you need to patch Axis 1.4, upgrade it or downgrade Java (to Java 7). – Piotr P. Karwasz Nov 29 '21 at 14:13
  • To patch Axis 1.4, do you know what steps are needed? – Leo Dec 06 '21 at 11:41
  • You need to download and compile the source code of Axis 1.4 (cf. [github](https://github.com/apache/axis-axis1-java)). Many commits where done in these last 15 years, maybe one fixes your problem. Otherwise you need to correct the compilation errors. – Piotr P. Karwasz Dec 08 '21 at 13:36

0 Answers0