aspose file tools*
The moose likes Web Services and the fly likes jars on axis classpath from within service? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "jars on axis classpath from within service?" Watch "jars on axis classpath from within service?" New topic
Author

jars on axis classpath from within service?

Dudley Dawson
Ranch Hand

Joined: Dec 14, 2004
Posts: 57
Hi-
I have created a web service that uses some classes in another jar. What is the correct way to deploy this on axis? I have placed that jar in the WEB-INF/lib folder of the axis war, but when i deploy on weblogic 9.2, it throws a ClassNotFoundException on the class I call from that jar.
Ugender Rekulampally
Ranch Hand

Joined: Nov 14, 2005
Posts: 130
Dudley Dawson,
which version of Axis are you using? I use AXIS 1.4 with weblogic 8.1 and I had to remove some .classes in the jar files that came with Axis/lib directory.

basically I removed Log.class from commons-logging-1.0.4.jar and some other class from jaxrpc.jar. ( I stripped the jar files, removed the classes and re-jared them).

I was too having all these problems when I started but if you search on the google, you come to know that some of the classes which come with commons-logging-1.0.4.jar and jaxrpc.jar are already exist in the weblogic.jar (I am talking about version weblogic8.1). so removing those classes fixed my problems.


show us what is the exception you are getting.


Thanks,
Ugender
Dudley Dawson
Ranch Hand

Joined: Dec 14, 2004
Posts: 57
Hi Ugender. I am using Axis2. The problem is with one of my custom classes


I get:


I believe the error is occurring when Axis loads the service class and the static block is executed. ie - <clinit>.

MyClass lives in a packaged jar - say myjar.jar. How do I get myjar.jar on the runtime classpath of MyService?

Thanks!
[ May 16, 2007: Message edited by: Dudley Dawson ]
Ugender Rekulampally
Ranch Hand

Joined: Nov 14, 2005
Posts: 130
Dudley Dawson,
So you are having a packaging issues. If I understand correct, your MyClass in Myjar.jar and your service class in a different jar(lets say service.jar). and you are referring myclass which is in myjar.jar from service.jar.

did you try making one *.ear ( having both jars inside)? try making one .ear file and deploy. See what happens.

Thanks,
Ugender
Dudley Dawson
Ranch Hand

Joined: Dec 14, 2004
Posts: 57
Yes, it appears to be a packaging issue. I was able to get it to work by specifying the jars with the <lib> tag of the <war> task in ant.
 
wood burning stoves
 
subject: jars on axis classpath from within service?