Hello.

I've finally managed to follow the instructions Bruce gave me on 15
March (I had some other work to do in the meantime) but stopped after
step 5 because when I try to deploy the service assembly, ServiceMix
complained that it couldn't find a class in the service unit even though
it compiled under maven fine. The class that it is complaining about is
called by the implementation, so it does not directly service requests.

The error was copious, so I've pruned only the first 35 or so lines, and
attached it below.

Thanks for your help,

  Owen.

*
******** 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)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getDeclaredMethods(Unknown Source)
        at
org.apache.commons.attributes.DefaultCachedRepository.<init>(DefaultCach
edRepository.java:88)
<cut/>
******** End of output.
*

-----Original Message-----
From: Bruce Snyder [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 17, 2007 5:35 AM
To: [email protected]
Subject: Re: Maven archetype for jsr181 component.

On 3/15/07, Owen Thomas <[EMAIL PROTECTED]> wrote:
> Good day to you all.
>
>
>
> If I'm going to use Maven to develop a component that will fit in to a
> servicemix-jsr181 container, will I need a web-service archetype of
some
> description? What archetype do people recommend my using? I would also
> like to know why.

If you want to deploy your project to the servicemix-jsr181 component,
you want to use either the servicemix-jsr181-annotated-service-unit
Maven archetype or the servicemix-jsr181-wsdl-first-service-unit Maven
Maven archetype to create the JBI service unit (SU) for your project.
This will create a Maven project skeleton for you. Then you'll need to
wrap the SU in a JBI service assembly (SA) for deployment to
ServiceMix. If you're familiar with J2EE development at all, think of
the SU as being equivalent to a WAR file and the SA as being
equivalent to an EAR file. Below are the steps to doing this:

1) Create your project skeleton using either the
servicemix-jsr181-annotated-service-unit Maven archetype or the
servicemix-jsr181-wsdl-first-service-unit Maven Maven archetype:

mvn archetype:create \
-DarchetypeGroupId=org.apache.servicemix.tooling \
-DarchetypeArtifactId=<insert-archetype-name-here> \
-DarchetypeVersion=3.1-incubating \
-DgroupId=<insert-java-package-name-here> \
-DartifactId=<insert-project-name-here> \
-DremoteRepositories=http://people.apache.org/repo/m2-incubating-reposit
ory

2) Fill in the skeleton with your project specific artifacts, i.e.,
populate the src/main/resources/xbean.xml configuration file add Java
classes, add dependencies to the pom.xml, etc.

3) Create a SA using the servicemix-service-assembly Maven archetype
to wrap the SU:

mvn archetype:create \
-DarchetypeGroupId=org.apache.servicemix.tooling \
-DarchetypeArtifactId=servicemix-service-assembly \
-DarchetypeVersion=3.1-incubating \
-DgroupId=<insert-java-package-name-here> \
-DartifactId=<insert-project-name-here> \
-DremoteRepositories=http://people.apache.org/repo/m2-incubating-reposit
ory

You'll need to add a dependency in the pom.xml for the SU created in
step number 1 above.

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

6) Test your SU, possibly by sending messages to it using SoapUI
(http://soapui.org/)

You should now have your application deployed and ready to test or use.

I hope I didn't leave out anything major. If you have any questions,
please let us know.

Bruce
-- 
perl -e 'print
unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/

Reply via email to