2017-04-27 7 views
1

ich alle,Apache ServiceMix Verbindung mit IBM-Websphere-8.0

Ich versuche, unsere MQ-Schnittstelle von IBM-Websphere 7.0.0.5 auf Version 8.0.0.6 zu migrieren. Als EJB-Container verwenden wir Apache Servicemix 7.0.0. Beim Umschalten auf die 8.0.0.6 Bibliotheken ich folgende Fehlerstack erhalten:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ibmmq' defined in URL [bundle://231.0:0/META-INF/spring/mq-test.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.ibm.mq.jms.MQQueueConnectionFactory' to required type 'javax.jms.ConnectionFactory' for property 'connectionFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.ibm.mq.jms.MQQueueConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:938)[150:org.apache.servicemix.bundles.spring-context:3.2.17.RELEASE_1] 
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[217:org.springframework.osgi.core:1.2.1] 
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[217:org.springframework.osgi.core:1.2.1] 
    at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[217:org.springframework.osgi.core:1.2.1] 
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[217:org.springframework.osgi.core:1.2.1] 
    at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[218:org.springframework.osgi.extender:1.2.1] 
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_102] 
Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.ibm.mq.jms.MQQueueConnectionFactory' to required type 'javax.jms.ConnectionFactory' for property 'connectionFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.ibm.mq.jms.MQQueueConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found 
    at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:464)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:495)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:489)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1465)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1424)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    ... 13 more 
Caused by: java.lang.IllegalStateException: Cannot convert value of type [com.ibm.mq.jms.MQQueueConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found 
    at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:267)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:449)[149:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] 
    ... 19 more 

Die folgende Zeile für mich seltsam, und ich habe keinen Abschluss für sie:

fehlgeschlagen Eigenschaft Wert konvertieren vom Typ 'com.ibm.mq.jms.MQQueueConnectionFactory' in den erforderlichen Typ 'javax.jms.ConnectionFactory' für die Eigenschaft 'connectionFactory'; Die geschachtelte Ausnahme ist java.lang.IllegalStateException: Wert des Typs [com.ibm.mq.jms.MQQueueConnectionFactory] kann nicht in den erforderlichen Typ [javax.jms.ConnectionFactory] für die Eigenschaft 'connectionFactory' konvertiert werden: keine übereinstimmenden Editoren oder Konvertierungsstrategien gefunden

die Funktionen zu installieren, habe ich die folgenden Features-xml-Datei:

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns:osgix="http://www.springframework.org/schema/osgi-compendium" 
     xmlns:context="http://www.springframework.org/schema/context" 
     xmlns:util="http://www.springframework.org/schema/util" xmlns:camel="http://camel.apache.org/schema/spring" 
     xmlns:p="http://www.springframework.org/schema/p" 
     xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd"> 

    <!--bean id="conFactoryFactory" class="com.ibm.mq.jms.MQConnectionFactoryFactory" /--> 

    <bean id="conFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory" > 
    <property name="transportType"> 
     <util:constant static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" /> 
    </property> 
    <property name="hostName" value="gs3-mqsrv-lnx" /> 
    <property name="port" value="1414" /> 
    <property name="queueManager" value="qm.gb30.realtime" /> 
    <property name="channel" value="ch.realtime" /> 
    <property name="useConnectionPooling" value="true" /> 
    </bean>    

    <bean id="ibmmq" class="org.apache.camel.component.jms.JmsComponent"> 
    <property name="connectionFactory" ref="conFactory" /> 
    </bean> 

    <camel:camelContext id="ibm-mq-test"> 

    <!-- Uplink from file -> mq --> 
    <camel:route id="mq-uplink"> 
     <camel:from uri="file:mq/in" /> 
     <camel:transacted /> 
     <camel:to uri="ibmmq:lq.gslisa.src1" /> 
     <camel:log message="Put message into mq!" /> 
    </camel:route> 

    <!-- Downlink from mq -> file --> 
    <camel:route id="mq-downlink"> 
     <camel:from uri="ibmmq:lq.gslisa.src1" /> 
     <camel:transacted /> 
     <camel:to uri="file:mq/out" /> 
     <camel:log message="Read message from mq!" /> 
    </camel:route> 

    </camel:camelContext> 

</beans> 

wie zuvor beschrieben, f mit:

<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0"> 
    <feature name='ibm-mq-75' version='7.5.0.0'> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 75/java/lib/OSGi/com.ibm.mq.osgi.directip_7.5.0.0.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 75/java/lib/OSGi/com.ibm.mq.osgi.java_7.5.0.0.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 75/java/lib/OSGi/com.ibm.msg.client.osgi.commonservices.j2se_7.5.0.0.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 75/java/lib/OSGi/com.ibm.msg.client.osgi.jms_7.5.0.0.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 75/java/lib/OSGi/com.ibm.msg.client.osgi.nls_7.5.0.0.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 75/java/lib/OSGi/com.ibm.msg.client.osgi.wmq.nls_7.5.0.0.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 75/java/lib/OSGi/com.ibm.msg.client.osgi.wmq.prereq_7.5.0.0.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 75/java/lib/OSGi/com.ibm.msg.client.osgi.wmq_7.5.0.0.jar</bundle> 
    </feature> 

    <feature name='ibm-mq-80' version='8.0.0.6'> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 80/java/lib/OSGi/com.ibm.mq.osgi.java_8.0.0.6.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 80/java/lib/OSGi/com.ibm.msg.client.osgi.commonservices.j2se_8.0.0.6.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 80/java/lib/OSGi/com.ibm.msg.client.osgi.jms.prereq_8.0.0.6.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 80/java/lib/OSGi/com.ibm.msg.client.osgi.jms_8.0.0.6.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 80/java/lib/OSGi/com.ibm.msg.client.osgi.nls_8.0.0.6.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 80/java/lib/OSGi/com.ibm.msg.client.osgi.wmq.nls_8.0.0.6.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 80/java/lib/OSGi/com.ibm.msg.client.osgi.wmq.prereq_8.0.0.6.jar</bundle> 
    <bundle start-level='85'>file:o:/tools/IBM/Websphere MQ 80/java/lib/OSGi/com.ibm.msg.client.osgi.wmq_8.0.0.6.jar</bundle> 
    </feature> 
</features> 

Das Beispiel Route sieht wie folgt Eature: ibm-mq-75 alles funktioniert, ändern dies zu ibm-mq-80 zeigt den Fehler an. Kann jemand helfen?

Danke, Jörg

+0

Es scheint, dass das Problem durch Mischen der JMS-Versionen verursacht: ServiceMix nutzt 1.1 JMS mit geronimo-spezifikations 1.1.1 IBM-MQ lib verwendet JMS 2.0, die vorgesehen ist/exportierte in der Bibliothek: com.ibm.msg.client.osgi.jms.prereq_8.0.0.6.jar Das Erstellen eines Blueprint-Testcases ohne Verwendung von ASM funktioniert wie erwartet. Also wie kann ich dem Interface-Bundle mitteilen, stattdessen die IBM-Jms-Version zu verwenden? – jjansen

Antwort

1

die folgenden Schritte durchführen scheinen mein Problem zu lösen:

  1. mq-Paket von Kamel-jms
  2. zwingt ServiceMix den Cache zu reinigen Kamel sjms Einschalten jedes Starten.
Verwandte Themen