You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2009/06/23 10:09:44 UTC
Re: Simple Camel example top copy messages from one JMS queue to
another
Hi
You spring config file is not visible/present in the mail?
Are you sure you use the correct namespace for Camel 1.x?
http://activemq.apache.org/camel/schema/spring
As Camel 2.0 uses a new namespace then you might have picked the wrong one.
On Tue, Jun 23, 2009 at 9:58 AM, Serge Merzliakov <sm...@epistatic.net>wrote:
>
> I have tried to get the samples to work without success. Using:
> * Camel 1.5 jars
> * Activemq 5.2
> * Spring 2.5.6
>
> I want to write a Spring xml based file to copy messages from one jms queue
> to another - as a proof of concept.
>
> Here is my spring config file:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> the error I get when I try to run this from java:
>
> public static void main(String[] args)
> {
> ClassPathXmlApplicationContext ctx = new
> ClassPathXmlApplicationContext("camel-config.xml");
> ctx.start();
> ctx.stop();
> }
>
> is :
> Configuration problem: Cannot locate BeanDefinitionParser for element
> [route]
> Offending resource: class path resource [camel-config.xml]
>
>
> my classpath contains all activemq jars and camel-core, camel-jms,
> camel-spring.
>
> Any suggestions or location of complete working samples not in /examples (i
> do not use maven)
>
>
> Serge
>
> --
> View this message in context:
> http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24161577.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: camel xsd path - a clarification
Posted by Willem Jiang <wi...@gmail.com>.
I didn't see any stack trace in the mail.
What's you problem?
If you got the schema validate error , this FAQ[1] may help you out.
[1]
http://cwiki.apache.org/CAMEL/how-to-validate-the-camel-1x-context-xml-from-apache-camel-web-site.html
Willem
Serge Merzliakov wrote:
> Also,
> note that schemaLocation defined schema location at camel-spring.xsd and
> not full namespace. Because Im using classpath app context in spring this
> seems to be the thing to do.
>
> Serge
>
>
>
>
> Serge Merzliakov wrote:
>> Sorry about that. I made sure to use camel 1.5 version of xsd in jar file
>> here it is:
>> <html>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:camel="http://activemq.apache.org/camel/schema/spring"
>> xsi:schemaLocation="
>> http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>> http://activemq.apache.org/camel/schema/spring camel-spring.xsd">
>>
>> <!-- Camel JMSProducer to be able to send messages to a remote Active
>> MQ server -->
>> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>> <property name="connectionFactory">
>> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>> <property name="brokerURL" value="tcp://localhost:61616"/>
>> </bean>
>> </property>
>> </bean>
>>
>> <camel:route>
>> <camel:from uri="jms:queue:input"/>
>> <camel:to uri="jms:queue:output"/>
>> </camel:route>
>>
>> </beans>
>>
>>
>>
>>
>> Claus Ibsen-2 wrote:
>>> Hi
>>> You spring config file is not visible/present in the mail?
>>>
>>> Are you sure you use the correct namespace for Camel 1.x?
>>>
>>>
>>> http://activemq.apache.org/camel/schema/spring
>>>
>>>
>>> As Camel 2.0 uses a new namespace then you might have picked the wrong
>>> one.
>>>
>>>
>>> On Tue, Jun 23, 2009 at 9:58 AM, Serge Merzliakov
>>> <sm...@epistatic.net>wrote:
>>>
>>>> I have tried to get the samples to work without success. Using:
>>>> * Camel 1.5 jars
>>>> * Activemq 5.2
>>>> * Spring 2.5.6
>>>>
>>>> I want to write a Spring xml based file to copy messages from one jms
>>>> queue
>>>> to another - as a proof of concept.
>>>>
>>>> Here is my spring config file:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> the error I get when I try to run this from java:
>>>>
>>>> public static void main(String[] args)
>>>> {
>>>> ClassPathXmlApplicationContext ctx = new
>>>> ClassPathXmlApplicationContext("camel-config.xml");
>>>> ctx.start();
>>>> ctx.stop();
>>>> }
>>>>
>>>> is :
>>>> Configuration problem: Cannot locate BeanDefinitionParser for element
>>>> [route]
>>>> Offending resource: class path resource [camel-config.xml]
>>>>
>>>>
>>>> my classpath contains all activemq jars and camel-core, camel-jms,
>>>> camel-spring.
>>>>
>>>> Any suggestions or location of complete working samples not in /examples
>>>> (i
>>>> do not use maven)
>>>>
>>>>
>>>> Serge
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24161577.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>>
>
camel xsd path - a clarification
Posted by Serge Merzliakov <sm...@epistatic.net>.
Also,
note that schemaLocation defined schema location at camel-spring.xsd and
not full namespace. Because Im using classpath app context in spring this
seems to be the thing to do.
Serge
Serge Merzliakov wrote:
>
> Sorry about that. I made sure to use camel 1.5 version of xsd in jar file
> here it is:
> <html>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://activemq.apache.org/camel/schema/spring"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
> http://activemq.apache.org/camel/schema/spring camel-spring.xsd">
>
> <!-- Camel JMSProducer to be able to send messages to a remote Active
> MQ server -->
> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
> <property name="connectionFactory">
> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL" value="tcp://localhost:61616"/>
> </bean>
> </property>
> </bean>
>
> <camel:route>
> <camel:from uri="jms:queue:input"/>
> <camel:to uri="jms:queue:output"/>
> </camel:route>
>
> </beans>
>
>
>
>
> Claus Ibsen-2 wrote:
>>
>> Hi
>> You spring config file is not visible/present in the mail?
>>
>> Are you sure you use the correct namespace for Camel 1.x?
>>
>>
>> http://activemq.apache.org/camel/schema/spring
>>
>>
>> As Camel 2.0 uses a new namespace then you might have picked the wrong
>> one.
>>
>>
>> On Tue, Jun 23, 2009 at 9:58 AM, Serge Merzliakov
>> <sm...@epistatic.net>wrote:
>>
>>>
>>> I have tried to get the samples to work without success. Using:
>>> * Camel 1.5 jars
>>> * Activemq 5.2
>>> * Spring 2.5.6
>>>
>>> I want to write a Spring xml based file to copy messages from one jms
>>> queue
>>> to another - as a proof of concept.
>>>
>>> Here is my spring config file:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> the error I get when I try to run this from java:
>>>
>>> public static void main(String[] args)
>>> {
>>> ClassPathXmlApplicationContext ctx = new
>>> ClassPathXmlApplicationContext("camel-config.xml");
>>> ctx.start();
>>> ctx.stop();
>>> }
>>>
>>> is :
>>> Configuration problem: Cannot locate BeanDefinitionParser for element
>>> [route]
>>> Offending resource: class path resource [camel-config.xml]
>>>
>>>
>>> my classpath contains all activemq jars and camel-core, camel-jms,
>>> camel-spring.
>>>
>>> Any suggestions or location of complete working samples not in /examples
>>> (i
>>> do not use maven)
>>>
>>>
>>> Serge
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24161577.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24162878.html
Sent from the Camel - Users mailing list archive at Nabble.com.
A Complete Camel sample spring config - JMS queue copy
Posted by Serge Merzliakov <sm...@epistatic.net>.
Claus,
That solved the problem - thankyou. For future reference here is an
entire spring config file which listens copies messages from 'input' queue
to 'output' queue:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://activemq.apache.org/camel/schema/spring"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
<!-- Camel JMSProducer to be able to send messages to a remote Active MQ
server -->
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>
</property>
</bean>
<!-- copy from input to output. No transformations or filters -->
<camel:camelContext>
<camel:route>
<camel:from uri="jms:queue:input"/>
<camel:to uri="jms:queue:output"/>
</camel:route>
</camel:camelContext>
</beans>
Claus Ibsen-2 wrote:
>
> Hi
> You need the <camel:camelContext> around the route tag.
>
> <camel:camelContext>
> ... insert the camel route here
> </camel:camelContext>
>
>
>
> On Tue, Jun 23, 2009 at 11:40 AM, Serge Merzliakov
> <sm...@epistatic.net>wrote:
>
>>
>> Sorry about that. I made sure to use camel 1.5 version of xsd in jar file
>> here it is:
>> <html>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:camel="http://activemq.apache.org/camel/schema/spring"
>> xsi:schemaLocation="
>> http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>> http://activemq.apache.org/camel/schema/spring camel-spring.xsd">
>>
>> <!-- Camel JMSProducer to be able to send messages to a remote Active
>> MQ
>> server -->
>> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>> <property name="connectionFactory">
>> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>> <property name="brokerURL" value="tcp://localhost:61616"/>
>> </bean>
>> </property>
>> </bean>
>>
>> <camel:route>
>> <camel:from uri="jms:queue:input"/>
>> <camel:to uri="jms:queue:output"/>
>> </camel:route>
>>
>> </beans>
>>
>>
>>
>>
>> Claus Ibsen-2 wrote:
>> >
>> > Hi
>> > You spring config file is not visible/present in the mail?
>> >
>> > Are you sure you use the correct namespace for Camel 1.x?
>> >
>> >
>> > http://activemq.apache.org/camel/schema/spring
>> >
>> >
>> > As Camel 2.0 uses a new namespace then you might have picked the wrong
>> > one.
>> >
>> >
>> > On Tue, Jun 23, 2009 at 9:58 AM, Serge Merzliakov
>> > <sm...@epistatic.net>wrote:
>> >
>> >>
>> >> I have tried to get the samples to work without success. Using:
>> >> * Camel 1.5 jars
>> >> * Activemq 5.2
>> >> * Spring 2.5.6
>> >>
>> >> I want to write a Spring xml based file to copy messages from one jms
>> >> queue
>> >> to another - as a proof of concept.
>> >>
>> >> Here is my spring config file:
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> the error I get when I try to run this from java:
>> >>
>> >> public static void main(String[] args)
>> >> {
>> >> ClassPathXmlApplicationContext ctx = new
>> >> ClassPathXmlApplicationContext("camel-config.xml");
>> >> ctx.start();
>> >> ctx.stop();
>> >> }
>> >>
>> >> is :
>> >> Configuration problem: Cannot locate BeanDefinitionParser for element
>> >> [route]
>> >> Offending resource: class path resource [camel-config.xml]
>> >>
>> >>
>> >> my classpath contains all activemq jars and camel-core, camel-jms,
>> >> camel-spring.
>> >>
>> >> Any suggestions or location of complete working samples not in
>> /examples
>> >> (i
>> >> do not use maven)
>> >>
>> >>
>> >> Serge
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24161577.html
>> >> Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>
>> >
>> >
>> >
>> > --
>> > Claus Ibsen
>> > Apache Camel Committer
>> >
>> > Open Source Integration: http://fusesource.com
>> > Blog: http://davsclaus.blogspot.com/
>> > Twitter: http://twitter.com/davsclaus
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24162830.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>
--
View this message in context: http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24177050.html
Sent from the Camel - Users mailing list archive at Nabble.com.
A working camel spring config - JMS copy
Posted by Serge Merzliakov <sm...@epistatic.net>.
Claus Ibsen-2 wrote:
>
> Hi
> You need the <camel:camelContext> around the route tag.
>
> <camel:camelContext>
> ... insert the camel route here
> </camel:camelContext>
>
>
>
> On Tue, Jun 23, 2009 at 11:40 AM, Serge Merzliakov
> <sm...@epistatic.net>wrote:
> Claus,
> Embedding the route inside camelContext worked - thanks. For the
> record here is full spring config for copying messages from 1 queue to
> another.
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://activemq.apache.org/camel/schema/spring"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
> http://activemq.apache.org/camel/schema/spring
> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>
> <!-- Camel JMSProducer to be able to send messages to a remote Active
> MQ server -->
> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
> <property name="connectionFactory">
> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL" value="tcp://localhost:61616"/>
> </bean>
> </property>
> </bean>
>
> <camel:camelContext>
> <camel:route>
> <camel:from uri="jms:queue:input"/>
> <camel:to uri="jms:queue:output"/>
> </camel:route>
> </camel:camelContext>
>
> </beans>
>
>>
>> Sorry about that. I made sure to use camel 1.5 version of xsd in jar file
>> here it is:
>> <html>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:camel="http://activemq.apache.org/camel/schema/spring"
>> xsi:schemaLocation="
>> http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>> http://activemq.apache.org/camel/schema/spring camel-spring.xsd">
>>
>> <!-- Camel JMSProducer to be able to send messages to a remote Active
>> MQ
>> server -->
>> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>> <property name="connectionFactory">
>> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>> <property name="brokerURL" value="tcp://localhost:61616"/>
>> </bean>
>> </property>
>> </bean>
>>
>> <camel:route>
>> <camel:from uri="jms:queue:input"/>
>> <camel:to uri="jms:queue:output"/>
>> </camel:route>
>>
>> </beans>
>>
>>
>>
>>
>> Claus Ibsen-2 wrote:
>> >
>> > Hi
>> > You spring config file is not visible/present in the mail?
>> >
>> > Are you sure you use the correct namespace for Camel 1.x?
>> >
>> >
>> > http://activemq.apache.org/camel/schema/spring
>> >
>> >
>> > As Camel 2.0 uses a new namespace then you might have picked the wrong
>> > one.
>> >
>> >
>> > On Tue, Jun 23, 2009 at 9:58 AM, Serge Merzliakov
>> > <sm...@epistatic.net>wrote:
>> >
>> >>
>> >> I have tried to get the samples to work without success. Using:
>> >> * Camel 1.5 jars
>> >> * Activemq 5.2
>> >> * Spring 2.5.6
>> >>
>> >> I want to write a Spring xml based file to copy messages from one jms
>> >> queue
>> >> to another - as a proof of concept.
>> >>
>> >> Here is my spring config file:
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> the error I get when I try to run this from java:
>> >>
>> >> public static void main(String[] args)
>> >> {
>> >> ClassPathXmlApplicationContext ctx = new
>> >> ClassPathXmlApplicationContext("camel-config.xml");
>> >> ctx.start();
>> >> ctx.stop();
>> >> }
>> >>
>> >> is :
>> >> Configuration problem: Cannot locate BeanDefinitionParser for element
>> >> [route]
>> >> Offending resource: class path resource [camel-config.xml]
>> >>
>> >>
>> >> my classpath contains all activemq jars and camel-core, camel-jms,
>> >> camel-spring.
>> >>
>> >> Any suggestions or location of complete working samples not in
>> /examples
>> >> (i
>> >> do not use maven)
>> >>
>> >>
>> >> Serge
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24161577.html
>> >> Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>
>> >
>> >
>> >
>> > --
>> > Claus Ibsen
>> > Apache Camel Committer
>> >
>> > Open Source Integration: http://fusesource.com
>> > Blog: http://davsclaus.blogspot.com/
>> > Twitter: http://twitter.com/davsclaus
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24162830.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>
--
View this message in context: http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24177097.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Simple Camel example top copy messages from one JMS queue to
another
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
You need the <camel:camelContext> around the route tag.
<camel:camelContext>
... insert the camel route here
</camel:camelContext>
On Tue, Jun 23, 2009 at 11:40 AM, Serge Merzliakov <sm...@epistatic.net>wrote:
>
> Sorry about that. I made sure to use camel 1.5 version of xsd in jar file
> here it is:
> <html>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://activemq.apache.org/camel/schema/spring"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
> http://activemq.apache.org/camel/schema/spring camel-spring.xsd">
>
> <!-- Camel JMSProducer to be able to send messages to a remote Active MQ
> server -->
> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
> <property name="connectionFactory">
> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL" value="tcp://localhost:61616"/>
> </bean>
> </property>
> </bean>
>
> <camel:route>
> <camel:from uri="jms:queue:input"/>
> <camel:to uri="jms:queue:output"/>
> </camel:route>
>
> </beans>
>
>
>
>
> Claus Ibsen-2 wrote:
> >
> > Hi
> > You spring config file is not visible/present in the mail?
> >
> > Are you sure you use the correct namespace for Camel 1.x?
> >
> >
> > http://activemq.apache.org/camel/schema/spring
> >
> >
> > As Camel 2.0 uses a new namespace then you might have picked the wrong
> > one.
> >
> >
> > On Tue, Jun 23, 2009 at 9:58 AM, Serge Merzliakov
> > <sm...@epistatic.net>wrote:
> >
> >>
> >> I have tried to get the samples to work without success. Using:
> >> * Camel 1.5 jars
> >> * Activemq 5.2
> >> * Spring 2.5.6
> >>
> >> I want to write a Spring xml based file to copy messages from one jms
> >> queue
> >> to another - as a proof of concept.
> >>
> >> Here is my spring config file:
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> the error I get when I try to run this from java:
> >>
> >> public static void main(String[] args)
> >> {
> >> ClassPathXmlApplicationContext ctx = new
> >> ClassPathXmlApplicationContext("camel-config.xml");
> >> ctx.start();
> >> ctx.stop();
> >> }
> >>
> >> is :
> >> Configuration problem: Cannot locate BeanDefinitionParser for element
> >> [route]
> >> Offending resource: class path resource [camel-config.xml]
> >>
> >>
> >> my classpath contains all activemq jars and camel-core, camel-jms,
> >> camel-spring.
> >>
> >> Any suggestions or location of complete working samples not in /examples
> >> (i
> >> do not use maven)
> >>
> >>
> >> Serge
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24161577.html
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >
> >
> >
> > --
> > Claus Ibsen
> > Apache Camel Committer
> >
> > Open Source Integration: http://fusesource.com
> > Blog: http://davsclaus.blogspot.com/
> > Twitter: http://twitter.com/davsclaus
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24162830.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Simple Camel example top copy messages from one JMS queue to
another
Posted by Serge Merzliakov <sm...@epistatic.net>.
Sorry about that. I made sure to use camel 1.5 version of xsd in jar file
here it is:
<html>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://activemq.apache.org/camel/schema/spring"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://activemq.apache.org/camel/schema/spring camel-spring.xsd">
<!-- Camel JMSProducer to be able to send messages to a remote Active MQ
server -->
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>
</property>
</bean>
<camel:route>
<camel:from uri="jms:queue:input"/>
<camel:to uri="jms:queue:output"/>
</camel:route>
</beans>
Claus Ibsen-2 wrote:
>
> Hi
> You spring config file is not visible/present in the mail?
>
> Are you sure you use the correct namespace for Camel 1.x?
>
>
> http://activemq.apache.org/camel/schema/spring
>
>
> As Camel 2.0 uses a new namespace then you might have picked the wrong
> one.
>
>
> On Tue, Jun 23, 2009 at 9:58 AM, Serge Merzliakov
> <sm...@epistatic.net>wrote:
>
>>
>> I have tried to get the samples to work without success. Using:
>> * Camel 1.5 jars
>> * Activemq 5.2
>> * Spring 2.5.6
>>
>> I want to write a Spring xml based file to copy messages from one jms
>> queue
>> to another - as a proof of concept.
>>
>> Here is my spring config file:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> the error I get when I try to run this from java:
>>
>> public static void main(String[] args)
>> {
>> ClassPathXmlApplicationContext ctx = new
>> ClassPathXmlApplicationContext("camel-config.xml");
>> ctx.start();
>> ctx.stop();
>> }
>>
>> is :
>> Configuration problem: Cannot locate BeanDefinitionParser for element
>> [route]
>> Offending resource: class path resource [camel-config.xml]
>>
>>
>> my classpath contains all activemq jars and camel-core, camel-jms,
>> camel-spring.
>>
>> Any suggestions or location of complete working samples not in /examples
>> (i
>> do not use maven)
>>
>>
>> Serge
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24161577.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>
--
View this message in context: http://www.nabble.com/Simple-Camel-example-top-copy-messages-from-one-JMS-queue-to-another-tp24161577p24162830.html
Sent from the Camel - Users mailing list archive at Nabble.com.