• Post Reply Bookmark Topic Watch Topic
  • New Topic

Class not found at runtime  RSS feed

 
sonia pandit
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have deployed a project on Axis2. I get ClassNotFoundException when I point my browser to the service and invoke it:

http://localhost:8080/RunService?wsdl

that works

But not this one at Runtime I get the exception

http://localhost:8080/RunService/getString?s="test"

The jar files for that source it is complaining about is in the aar package that I deployed to Axis 2.

Thanks in advance for any help,

Sonia

 
Henry Zhi Lin
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I personally found this problem as well. I was able to pass a SOAP call to the server, but when I try to see the wsdl file in browser, I see same error message "ClassNotFoundException". If you are carefully reading the whole error message you may found that message will pointed out which class is missing in your path. I have found out that my colleague add a class import path in one of the build class, but the actual class is not in the path.

I guess this maybe that java SOAP client does not need to use wsdl to parse your method SOAP request. I am not sure on this so I am happy if anyone can point out I am wrong and correct me. I also have another example, which I have import java.sql.Connection as one of my SOAP server's method parameter. I can still see the wsdl file and pass in any SOAP call, but when other platform user use it to generate client from it, it simply does not work. Because java.sql.Connection is not a java bean class, it require serialization and deserialization. Once Axis does not recognize its type, it add an anytype and http://java.sql namespace in your wsdl. This caused my wsdl did not work for other platform.

So from my examples, I can feel that when java client calling java server by using SOAP, it seems can figure out a way to parse your soap xml message and does not neccesarily use wsdl. Hope this may help you!
 
sonia pandit
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like the wsdl is fine. In my case there is an import for the class that it complains about.

Thanks,

Sonia
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!