Is there a <classpath/> element in your xbean.xml ?
If yes, I would suggest to remove it to let the component
create the correct class loader for the SU.

On 4/17/07, Owen Thomas <[EMAIL PROTECTED]> wrote:

Hi Gillaume

When I deploy (by copying my Service Assembly to the deploy directory),
I get the NoClassDefFoundError shown below. This happens when the return
value of my web method, defined in a JSR-181 based Service Unit, is a
class that is defined in a jar included within the SU.

I won't be able to view my POJO at run time because it never gets
deployed.

However, when I remove the jar from the SU, and instead, define the
classes in the SU project itself, the error disappears. It is apparent
to me that the SA deploys in this circumstance.

It seems as though the class definition is buried too deeply when within
a jar, within the SU, within the SA to be reached when the schema is
being generated.

I believe this behaviour is inflexible. I think the class should be
reachable. Currently, I can't just reuse the class that defines this web
method return value. It appears as if I have to define a new class for
this return value in any other web service implementations that might
use it.

If I am correct, would you agree?

  Owen.

-----Original Message-----
From: Guillaume Nodet [mailto:[EMAIL PROTECTED]
Sent: Monday, April 16, 2007 5:14 PM
To: [email protected]
Subject: Re: Maven archetype for jsr181 component.

I'm not sure what you mean exactly.
Do you mean generating the schema at build time or at runtime ?
The component should generate it at runtime and expose a WSDL
for your POJO.  You should be able to access it from a JMX console.

On 4/16/07, Owen Thomas <[EMAIL PROTECTED]> wrote:
>
> Correction.
>
> The service assembly (including the SU) apparently deploys.
>
> Ie, everything deploys...
>
> It is apparent that SM does not like to generate schemas from source
> code that is buried away in an SU's jar.
>
> Would be nice to do this,
>
>   Owen.
>
> -----Original Message-----
> From: Owen Thomas [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 16, 2007 1:55 PM
> To: [email protected]
> Subject: RE: Maven archetype for jsr181 component.
>
> Just as I thought. The service unit apparently deploys...
>
> Does anyone want a JIRA or somesuch raised?
>
>   Owen.
>
> -----Original Message-----
> From: Owen Thomas [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 16, 2007 1:36 PM
> To: [email protected]
> Subject: RE: Maven archetype for jsr181 component.
>
> I know what I'll do... I'll forget the jar, and put all the classes in
> the SU.
>
> -----Original Message-----
> From: Owen Thomas [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 16, 2007 11:44 AM
> To: [email protected]
> Subject: RE: Maven archetype for jsr181 component.
>
> Hi again.
>
> I have installed and started a copy of SM 3.1.1. I am following your
> (Bruce Snyder's) instructions below to deploy the SA. There was no
> apparent need to rebuild the SA, so I had not done this prior to
> deployment.
>
> To deploy my SA, I follow the instructions below:
>
> Bruce said:
> > 4) In the ServiceMix distribution, copy the
> > servicemix-jsr181-3.1-incubating-installer.zip and the
> > servicemix-shared-3.1-incubating-installer.zip to the
> > install directory
>
> > 5) Copy the SA created in step number 3 above to the
> > ServiceMix deploy directory
>
> Lo and behold, I get the same error concerning a class (inside a jar
> that is included with the JSR-181 SU) that is not found:
>
> *
> ******** Start of output
> ERROR - AutoDeploymentService          - Failed to update Service
> Assembly: JVMHostServiceAssembly
> java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
> <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message";
> version="1.0">
> <jbi-task-result>
> <frmwk-task-result>
> <frmwk-task-result-details>
> <task-result-details>
> <task-id>deploy</task-id>
> <task-result>FAILED</task-result>
> <message-type>ERROR</message-type>
> </task-result-details>
> </frmwk-task-result-details>
> </frmwk-task-result>
> <component-task-result
> xmlns="http://java.sun.com/xml/ns/jbi/management-message";>
>         <component-name>servicemix-jsr181</component-name>
>         <component-task-result-details>
>                 <task-result-details>
>                         <task-id>deploy</task-id>
>                         <task-result>FAILED</task-result>
>                         <message-type>ERROR</message-type>
>                         <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Could not deploy xbean service unit</loc-message>
> </msg-loc-info>
> </task-status-msg>
>                         <exception-info>
>                                 <nesting-level>1</nesting-level>
>                                 <msg-loc-info>
>                                         <loc-token/>
>
> <loc-message>au/net/wcg/jvmhost/CommandReturn</loc-message>
>
> <stack-trace><![CDATA[java.lang.NoClassDefFoundError:
> au/net/wcg/jvmhost/CommandReturn
>         at java.lang.Class.getDeclaredMethods0(Native Method)
> ******** End of output.
> *
>
> I'm pretty sure that I'm not being a stick in the mud. I have no idea
> how to correct this, and would just like to get the thing working. I
> didn't think what I was asking to do was all that difficult initially.
>
> Maybe the simplicity of what I was trying to do has been crushed under
> the collective weight of a million misunderstandings.
>
> I'm getting philosophical.
>
>   Owen.
>



--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/




--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/

Reply via email to