0

When I try to execute the code java -cp testThermalMap.jar ActivemqPackage.ActiveMqConsumer in command prompt I keep getting this error

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Config uration problem: Unable to locate Spring NamespaceHandler for XML schema namespa ce [http://camel.apache.org/schema/spring]

As this link says I checked my jar files but I see camel-spring-2.10.3.jar is there. can anyone tell me what are the other possible ways for this error?

Note: The same code working fine in eclipse.

EDIT: Content of mytest.xml is

<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.xsd
      http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
      http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd
      http://camel.apache.org/schema/spring"
    >
<!-- setup JMS connection factory -->
<bean id="poolConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start" destroy-method="stop">
    <property name="maxConnections" value="8"/>
    <property name="connectionFactory" ref="jmsConnectionFactory"/>
</bean>

<bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=1" />
</bean>

<!-- setup spring jms TX manager -->
<bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
        <property name="connectionFactory" ref="poolConnectionFactory"/>
</bean>

<camelContext id="activeContext" xmlns="http://camel.apache.org/schema/spring">
    <routeBuilder ref="activeMQRouter" />
</camelContext>

<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
    <property name="connectionFactory" ref="poolConnectionFactory"/>
    <property name="transacted" value="true"/>
    <property name="transactionManager" ref="jmsTransactionManager"/>
</bean>

<bean id="activeMQRouter" class="ActivemqPackage.ActiveMQRouterBuilder"/>

<bean id="activemqProcessor" class="ActivemqPackage.ActiveMQProcessor"/>

Community
  • 1
  • 1
niren
  • 2,693
  • 8
  • 34
  • 58
  • Can you post your complete command? I don't see other jars on classpath. Are you including them. – Jaydeep Patel Sep 23 '13 at 06:58
  • @JaydeepPatel I used eclipse to develop my application. In eclipse I have added external jars, when I try to export app I used `Runnable JAR file` and I did checkout `Extract required libraries into generated JAR`. So I guess the required jar files would be added to `testThermalMap.jar ` file. – niren Sep 23 '13 at 07:05
  • @JaydeepPatel I never add any command in command prompt apart from one line that I have given above. – niren Sep 23 '13 at 07:17

0 Answers0