You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jcamus <jc...@parkeon.com> on 2008/08/06 17:19:19 UTC

own class in a service assembly: classpath problem?

I am trying to do manually my own SA (without maven). 
My zip SA file contains :
- zip files of su (one zip for each su)
- a directory META_INF containing the jbi.xml file
- a lib directory containing my class (with correct sub directory for the
package : com/test/MyParser.class)

A define the class in the lw su with :

<sm:activationSpec componentName="parserTest" service="foo:parserTest">
		    <sm:component>
		      <bean class="com.test.MyParser" />
		    </sm:component>
		  </sm:activationSpec>

But when a deploy a have the following message :
nested exception is java.lang.ClassNotFoundException: com.test.MyParser in
classloader 

Where am i wrong?


-- 
View this message in context: http://www.nabble.com/own-class-in-a-service-assembly%3A-classpath-problem--tp18853500p18853500.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Own java class in a service assembly: classpath problem!

Posted by Gert Vanthienen <ge...@skynet.be>.
L.S.,

The classes should go in the root of the ZIP file.  You can use the /lib 
folder to package additional dependencies (other JAR files needed) for 
your classes.

Regards,

Gert

jcamus wrote:
> I am trying to do manually my own SA (without maven). 
> My zip SA file contains :
> - zip files of su (one zip for each su)
> - a directory META_INF containing the jbi.xml file
> - a lib directory containing my class (with correct sub directory for the
> package : com/test/MyParser.class)
>
> A define the class in the lw su with :
>
> <sm:activationSpec componentName="parserTest" service="foo:parserTest">
> 		    <sm:component>
> 		      <bean class="com.test.MyParser" />
> 		    </sm:component>
> 		  </sm:activationSpec>
>
> But when a deploy a have the following message :
> nested exception is java.lang.ClassNotFoundException: com.test.MyParser in
> classloader 
>
> Where am i wrong?
>
>
>