Hi

What do you mean you do not use Spring? That xml file is a spring xml file.

Are you not using that xml file to configure JMS?

How do you create CamelContext?
Its often easier to define it once in the XML file, or if not then
make sure to use CamelContext from camel-spring, as that is needed to
integrate Camel with spring so it can lookup in that XML file.


On Sat, Sep 27, 2014 at 10:47 AM, Anjenson <hotsmileb...@gmail.com> wrote:
> Hi, everyone.
>
> I am working on a project where we decided to add some interaction using jms
> and hornetq as provider.
> I am quite new to Camel so I ran into a problem some if you may refer as
> trivial.
> The goal was to initialize connection factory and add the jms component.
> However, as I understand it can't be done directly in the route builder. So
> I created camel-config.xml and placed it to the resources/ directory.
> I filled it in the following way:
>
> <beans xmlns="http://www.springframework.org/schema/beans";
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>        xmlns:camel="http://camel.apache.org/schema/spring";
>        xsi:schemaLocation="
>           http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
>           http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd";>
>
>     <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
>         <property name="environment">
>             <props>
>                 <prop
> key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
>                 <prop
> key="java.naming.provider.url">jnp://localhost:1099</prop>
>                 <prop
> key="java.naming.factory.url.pkgs">org.jnp.interfaces:org.jboss.naming</prop>
>             </props>
>         </property>
>     </bean>
>
>     <bean id="jmsQueueConnectionFactory"
>           class="org.springframework.jndi.JndiObjectFactoryBean">
>         <property name="jndiTemplate">
>             <ref bean="jndiTemplate"/>
>         </property>
>         <property name="jndiName">
>             <value>ConnectionFactory</value>
>         </property>
>     </bean>
>
>     <bean name="jms" class="org.apache.camel.component.jms.JmsComponent">
>         <property name="connectionFactory" ref="jmsQueueConnectionFactory"/>
>     </bean>
>
> </beans>
>
> The project doesn't use Spring so it was the only example of the xml I have
> found that doesn't make use of Spring.
> In the route builder I use from("jms:queue:top");
> However, when I start the project it throws FailedToCreateEndpointException
> and states "No component found with schema: jms".
> I suppose that the xml file is simply not used but I just can't understand
> how to point to it.
> Looking forward to hearing any advice.
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/No-component-found-with-schema-jms-tp5757069.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to