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.

Reply via email to