You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Mr. Nassos A. Michas" <na...@eurodyn.com> on 2006/03/20 14:53:37 UTC
POJO + Spring configuration: ClassNotFoundException
Hello all,
I'm trying the basic example on http://www.itarchitect.co.uk/articles/display.asp?id=222 and I've modified the vsjmix.xml provided on the page (I left in just the basics at the moment...) as:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0">
<sm:container id="jbi" useMBeanServer="true"
createMBeanServer="true" dumpStats="true" statsInterval="10">
<sm:activationSpecs>
<sm:activationSpec componentName="mailSender" service="my:mailSender">
<sm:component>
<bean class="MyMailer"/>
</sm:component>
</sm:activationSpec>
<sm:activationSpec componentName="receiver" service="my:receiver" destinationService="my:mailSender">
<sm:component>
<bean class="MyReceiver"/>
</sm:component>
</sm:activationSpec>
</sm:activationSpecs>
</sm:container>
</beans>
I'm running SM ("..\..\bin\servicemix vsjmix.xml") from %SM_HOME%/examples/vsjmix. My xml as well as the (two) class files are also there. The problem I'm facing is that no matter where I place the class files I keep getting a:
java.lang.ClassNotFoundException: MyMailer
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
I'm very new to SM so I know I should be missing something, but what? :-)
I use the latest binary snapshot (18/3) of SM, java 1.5.0-b64 and I'm on win2k.
Thanks!
Nassos
Re: POJO + Spring configuration: ClassNotFoundException
Posted by Jamie McCrindle <ja...@gmail.com>.
I believe that one way would be to put them in a jar file and put that
into your %SM_HOME%\lib directory.
On 3/20/06, Mr. Nassos A. Michas <na...@eurodyn.com> wrote:
> Hello all,
>
> I'm trying the basic example on http://www.itarchitect.co.uk/articles/display.asp?id=222 and I've modified the vsjmix.xml provided on the page (I left in just the basics at the moment...) as:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0">
> <sm:container id="jbi" useMBeanServer="true"
> createMBeanServer="true" dumpStats="true" statsInterval="10">
> <sm:activationSpecs>
> <sm:activationSpec componentName="mailSender" service="my:mailSender">
> <sm:component>
> <bean class="MyMailer"/>
> </sm:component>
> </sm:activationSpec>
>
> <sm:activationSpec componentName="receiver" service="my:receiver" destinationService="my:mailSender">
> <sm:component>
> <bean class="MyReceiver"/>
> </sm:component>
> </sm:activationSpec>
> </sm:activationSpecs>
> </sm:container>
> </beans>
>
> I'm running SM ("..\..\bin\servicemix vsjmix.xml") from %SM_HOME%/examples/vsjmix. My xml as well as the (two) class files are also there. The problem I'm facing is that no matter where I place the class files I keep getting a:
> java.lang.ClassNotFoundException: MyMailer
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
>
> I'm very new to SM so I know I should be missing something, but what? :-)
>
> I use the latest binary snapshot (18/3) of SM, java 1.5.0-b64 and I'm on win2k.
>
>
> Thanks!
>
> Nassos
>
>