My camel.xml

<beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xmlns:cxf="http://camel.apache.org/schema/cxf";
        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://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd";>

        <bean id="bankconnectRoutes"
class="dk.bankconnect.hub.controller.CentralRouter" />
        
        
        <bean id="activemq" 
class="org.apache.camel.component.jms.JmsComponent">  
          <property name="connectionFactory">
        <bean class="com.ibm.mq.jms.MQConnectionFactory">  
                 <property name="transportType" value="1"/>
                         <property name="hostName" value="bdaix416.bdunet.dk"/> 
    
                         <property name="port" value="1414"/>
                         <property name="queueManager" value="HUB_T_416"/>
                     <property name="channel" value="SYSTEM.DEF.SVRCONN"/> 
            </bean> 
          </property>
         </bean>
        

        <cxf:cxfEndpoint id="hubws" address="/CorporateService"
                xmlns="http://service.bankconnect.dk"; 
wsdlURL="WEB-INF/bankconnect.wsdl"
/>  
        <camelContext xmlns="http://camel.apache.org/schema/spring"; >
                <propertyPlaceholder id="props" 
location="hubrouting.properties" />
                <routeBuilder ref="bankconnectRoutes" />
                
                <endpoint id="becws" uri="{{bec.url}}" />
                <endpoint id="bdws" uri="{{bd.url}}" />
                <endpoint id="sdcws" uri="{{sdc.url}}" />
        </camelContext>
</beans>


Using this jars gives me the problem:

Camel-jms-2.12.jar
Spring-jms-3.0.7.RELEASE.jar


com.ibm.mq.commonservice.jar
com.ibm.mq.headers.jar
com.ibm.mq.mq.jar
com.ibm.mq.jmqi.jar
com.ibm.mq.pcf.jar





I got this error:

E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated
SRVE0283E: Exception caught while initializing context: {0}
                                
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'activemq' defined in class path resource [camel.xml]: 

Initialization of bean failed; nested exception is
org.springframework.beans.ConversionNotSupportedException: Failed to convert
property value of type 'com.ibm.mq.jms.MQConnectionFactory' 

to required type 'javax.jms.ConnectionFactory' for property
'connectionFactory'; nested exception is java.lang.IllegalStateException:
Cannot convert value of type 

[com.ibm.mq.jms.MQConnectionFactory] to required type
[javax.jms.ConnectionFactory] for property 'connectionFactory': no matching
editors or conversion strategy found

That typically means you have multiple copies of the javax,jms classes on 
the classpath (e.g. from both IBM MQ and geronimo). 





If i remove the spring-jms i got this Error:
 
 E com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0100E: Uncaught
init() exception created by servlet CXFServlet in application
BankConnectHub_war: 

org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'activemq' defined in class path resource [camel.xml]:
Initialization of bean failed; nested 

exception is java.lang.NoClassDefFoundError:
org.springframework.jms.support.converter.MessageConverter



If i remove  Camel-jms-2.12.jar

E com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0100E: Uncaught
init() exception created by servlet CXFServlet in application
BankConnectHub_war: 

org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'camel-1': Invocation of init method failed; nested exception is 

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.apache.camel.component.jms.JmsComponent] for bean with name
'activemq' defined in class path 

resource [camel.xml]; nested exception is java.lang.ClassNotFoundException:
org.apache.camel.component.jms.JmsComponent


So any good idea, how to find out to setup the correct camel.xml ? 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Classpath-problem-any-good-ideas-tp5753335p5754124.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to