• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jars on axis classpath from within service?

 
Dudley Dawson
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic