• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

jars on axis classpath from within service?

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic