2017-04-27 5 views
1

I,connexion Apache ServiceMix à tout le monde IBM Websphere-8,0

Je suis en train de migrer notre interface MQ d'IBM Websphere 7.0.0.5 à la version 8.0.0.6. En tant que conteneur EJB, nous utilisons Apache Servicemix 7.0.0. Lors du passage aux 8.0.0.6 bibliothèques que je reçois la pile d'erreur suivant:

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 

La ligne suivante est étrange pour moi, et je n'ai aucune conclusion pour elle:

Impossible de convertir la valeur de la propriété de type 'com.ibm.mq.jms.MQQueueConnectionFactory' au type requis 'javax.jms.ConnectionFactory' pour la propriété 'connectionFactory'; l'exception imbriquée est java.lang.IllegalStateException: Impossible de convertir la valeur de type [com.ibm.mq.jms.MQQueueConnectionFactory] en type requis [javax.jms.ConnectionFactory] pour la propriété 'connectionFactory': aucun éditeur correspondant ou stratégie de conversion trouvée

Pour installer les fonctionnalités, j'ai utilisé le fichier xml fonctionnalités suivantes:

<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> 

l'exemple itinéraire ressemble suivi:

<?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> 

comme décrit précédemment, en utilisant f manger: ibm-mq-75 tout est wokring, en changeant cela à ibm-mq-80 affiche l'erreur. Quelqu'un peut-il aider?

Merci, Jörg

+0

Il semble que le problème est causé par le mélange des versions JMS: ServiceMix utilise JMS 1.1 avec geronimo-mémoire descriptif 1.1.1 lib IBM MQ utilise JMS 2.0 qui est fourni/exporté dans la bibliothèque: com.ibm.msg.client.osgi.jms.prereq_8.0.0.6.jar La création d'un test de modèle sans utilisation d'ASM fonctionne comme prévu. Alors, comment puis-je dire au groupe d'interface d'utiliser la version IBM-jms à la place? – jjansen

Répondre

1

Effectuer les étapes suivantes semblent résoudre mon problème:

  1. commutation mq-paquet à dos de chameau jms à chameau sjms
  2. forçant ServiceMix à nettoyer le cache chaque démarrage.