aspose file tools*
The moose likes Web Services and the fly likes ClassCastException 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 "ClassCastException" Watch "ClassCastException" New topic
Author

ClassCastException

Abdul Basit Munda
Greenhorn

Joined: Sep 07, 2005
Posts: 10
Hi i m trying to use one of the webservices, for some odd reason it is giving me problem, i know for sure that login service which i m trying to use is perfectly fine because i used it somewhere else and it works. here is the error i get



and my code to use this service is

Eric Dubuis
Greenhorn

Joined: Jun 02, 2006
Posts: 1
Hi,

I had the same problem when using JWSDP 2.0 with JDK 1.5 and Tomcat 5.0.
(I was using Tomcat 5.0 since it is recommended by JWSDP 2.0.)

The problem was that the following classes that were loaded came from
a different location. For example (read everythind between [] on one
line, and substitute <tomcat.home> by the actual Tomcat installation
directory):

[Loaded com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl from
file:C:<tomcat.home>/common/endorsed/saaj-impl.jar]
[Loaded com.sun.xml.messaging.saaj.soap.MessageImpl from
file:/C:<tomcat.home>/webapps/webclient/WEB-INF/lib/saaj-impl.jar]

After having redeployed the web client WITHOUT saaj-impl.jar in its
WEB-INF/lib directory, the class loading was:

[Loaded com.sun.xml.messaging.saaj.soap.MessageImpl from
file:C:<tomcat.home>/common/endorsed/saaj-impl.jar]
[Loaded com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl from
file:C:<tomcat.home>/common/endorsed/saaj-impl.jar]

And it worked!

Regards,
Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassCastException