File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ClassCastException for SOAP message

 
Vinod Awar
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hii i have a java client which connects to our webservices.when i run this i get a ClassCastException here is the stack trace.



i have new saaj.jar,saaj-api.jar, and saaj-impl.jar in path. And iam using jre 1.6.

Any ideas on how to resolve this ?

Thanks,

Vinod
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have new saaj.jar,saaj-api.jar, and saaj-impl.jar in path.

This sounds fishy. First of all, I'm assuming you have those in the classpath, not the path (where they wouldn't do any good). Secondly, I think Java 1.6 comes with SAAJ, so if you want to use a different version than the one built in, just adding them to the classpath will cause confusion.

You need to put these classes in the bootclasspath; this is discussed in more detail here.
 
Vinod Awar
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the confusion. I put those jars in \Java\jre1.6.0_01\lib\ext folder.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I put those jars in \Java\jre1.6.0_01\lib\ext folder.


That won't do. They need to be in the bootclasspath.
 
Vinod Awar
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried -bootclasspath. but its not working

 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try c:\progra~1\etc rather than "Program Files", the space will cause you issues.
 
Vinod Awar
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf and David, i replaced the older saaj-api.jar and saaj-impl.jar with new jars. And this solved the issue.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm glad you got it working, and thanks for taking the time to update us!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic