Hi
The jar file was missing in my classpath location..
Got that solved.
But facing another issue...
Am sending a msg to inputQueue from a stand alone client.
and have written a jms consumer which on reception of this message hits the
RouterBean method "route" which is given below
public class RouterBean{
@RecipientList
public String[] route(String msg) throws Exception {
logger.info(msg);
return new String[]{"activemq:outputQueue"};
}
}
It hits the route method but the message is not sent to outputQueue.
My RouterBuilder has the following line of code which hits the above
specified RouterBean from(inputEndPoint).beanRef("myRecipientListBean",
"route")
myRecipientListBean is configured to the RouterBean in my camel-context.xml,
it is as follows
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
<camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
<package>esb.chapter5.camel.router</package>
</camelContext>
<bean id="myRecipientListBean" class="esb.chapter5.camel.router.RouterBean"
/>
<bean id="activemq" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="vm://localhost?broker.persistent=false" />
</bean>
</property>
</bean>
</beans>
On reception of the message in the inputQueue am calling the inputendpoint,
which hits the RouterBean's route method..
But the oputput is not sent to the outputQueue.
I feel am missing some configuration or doing something incorrectly
What is wrong here and what configuration am i missing?
Thanks and Regards
Nivi
On Wed, Jan 28, 2009 at 7:24 PM, Jean-Baptiste Onofré <[email protected]>wrote:
> Hi,
>
> Do you have the camel component in your SU's pom.xml dependencies ?
>
> Regards
> JB
> --
> Jean-Baptiste Onofré
> [email protected]
> BuildProcess/AutoDeploy Project Leader
> http://buildprocess.sourceforge.net
>
> On Wed 28/01/09 14:12, "Nivetha Shri" [email protected] wrote:
> > When using camel component to dynamically route the messages getting a
> > java.lang.NoClassDefFoundError:
> > org/apache/camel/component/jms/JmsComponent
> >
> > Configuring the connection factory is follows throws the error
> >
> > camelContext.addComponent("activemq",
> > activeMQComponent("vm://localhost?broker.persistent=false [1]"));
> >
> > Caused by: java.lang.NoClassDefFoundError:
> > org/apache/camel/component/jms/JmsComponent
> >
> > at java.lang.ClassLoader.defineClass1(Native Method)
> > at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> > at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> > at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
> > at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> > 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)at
> >
> org.codehaus.classworlds.DefaultClassRealm.loadClassDirect(DefaultClassReal
> > m.java:412)at
> >
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java
> > :376)at
> >
> org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:2
> > 14)at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> > at
> >
> org.apache.xbean.classloader.MultiParentClassLoader.loadClass(MultiParentCl
> > assLoader.java:184)at
> java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> > at
> >
> org.apache.xbean.classloader.MultiParentClassLoader.loadClass(MultiParentCl
> > assLoader.java:184)at
> java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> > at
> >
> org.apache.xbean.classloader.MultiParentClassLoader.loadClass(MultiParentCl
> > assLoader.java:184)at
> java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> >
> > Kindly help me to resolve the issue
> >
> > Regards
> >
> > Nivi
> >
> >
> >
> > Links:
> > ------
> > [1]
> >
> http://webmail.nanthrax.net/parse.php?redirect=vm%3A%2F%2Flocalhost%3Fbroke
> > r.persistent%3Dfalse
> >
>
>
>