0

My Axis 1.4 project runs correctly on the target machine when compiled in Netbeans. However, if I compile the project using my own Ant build script (which completes successfully), the application freezes on the source line:

Call call = (Call) service.createCall();

The verbose output of the Ant javac task indicates that the Call.class from the jaxrpc.jar is loaded, rather that the Call.class from axis.jar, when compiling the class for my java source file.

I have ensured that axis.jar is listed before jaxrpc.jar in the compile classpath.

This appears to be a dependency problem which is not correctly resolved in my version of the compilation...What am I doing wrong?

tshepang
  • 12,111
  • 21
  • 91
  • 136
JoseHeitor
  • 61
  • 1
  • 7
  • Can you post your ant script? How do you know what the class loader is doing with respect to the order in which jars are getting loaded? – David Jan 17 '14 at 14:40

1 Answers1

1

[SOLVED] - Sorry for wasting everybody's time! I have just found my problem and it is actually related to the Classpath on the app-launch script on the target machines. And because the JAR built on Netbeans contains a Classpath setting - this JAR works! Whereas the one created by my Ant script, does not specify a classpath, and relies instead on having an accurate Classpath definition in the java launch command...

BTW, the reason that I thought that the wrong class was being referenced, is because: 1.-There was no ClassNotFound error thrown at runtime, and 2.-The verbose output of the javac task in my Ant script lists the jaxrpc Call.class being 'loaded' during compilation of my class-file that uses an instance of this Call object, instead of the imported (and expected) axis implementation of the Call.class (the implementation of the jaxrpc interface).

JoseHeitor
  • 61
  • 1
  • 7