Hi,

At first glance, it seems like your jar file which contains the Message
class, is not visible to the Class Loader of your Web service. Please place
your jar file in one of the following places.

If you are using stand-alone Axis2 instance, try placing your jar file in
the $AXIS2_HOME/lib/ folder.

If you are embedding Axis2 in a Application server, try placing your jar
file WEB-INF/lib folder.




On Tue, Jan 20, 2009 at 5:21 PM, Toriacht <[email protected]> wrote:

>
> Hi,
>
> I am developing a simple webservice. Client / webservice communication is
> fine. When I receive the message at my web service I try and process it. I
> take in a number of parameters, strings etc and construct into a Message
> using .class file in a jar on the build path. The jar is in the build path,
> there are no compile errors etc and the function works fine as a POJO/
> simple java app.
>
> However, when I attempt to construct the message either in my web service
> class or by passing it to a new class in the same java resource folder i
> get
> an axis error telling me no class definition found. I've pasted an
> abbreviated version of the error below.
>
> All help gratefully received....
>
> Thanks,
> Tori
>
> org.apache.axis2.AxisFault: com/sdk/path/within/jarfile/Message
>        at
>
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
>        at
>
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
>        at
>
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
> ....
> ...
> ..
> [ERROR] com/path/path/within/jarfile/Message
> java.lang.reflect.InvocationTargetException
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> ...
> ...
> ...
>
> Caused by: java.lang.NoClassDefFoundError:
> com/path/path/within/jarfile/Message
>        at
> com.youpark.server.BuildMessage.constructMessage(BuildMessage.java:22)
>        at
>
> com.youpark.webservice.AccountEventHandlerSoap.MessageReceived(AccountEventHandlerSoap.java:46)
>        ... 25 more
> --
> View this message in context:
> http://www.nabble.com/org.apache.axis2.AxisFault%3A--No-class-definition-when-it-is-there-tp21561675p21561675.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Sameera Jayasoma
Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://tech.jayasoma.org

Reply via email to