Problem connecting to IBM MQ 7.5 from Fabric container.

Latest response

Hello I created a blueprint with IBM MQ Connection details. when I try to start the Child Container I am getting. I installed all the IBM MQ OSGI jars and also verified that these are listed in my Child Container.

here is the list of all the IBM OSGI bundles that were added to my Child Container profile. I pasted blue print contents at the end of this message.

[ 207] [Active ] [ ] [ ] [ 60] DirectIP Plug-in (7.5.0.2)
[ 208] [Active ] [ ] [ ] [ 60] Common Services J2SE Plug-in (7.5.0.2)
[ 209] [Active ] [ ] [ ] [ 60] JMS client Plug-in (7.5.0.2)
[ 210] [Active ] [ ] [ ] [ 60] NLS Plug-in (7.5.0.2), Fragments: 226
[ 211] [Active ] [ ] [ ] [ 60] WMQ prereq Plug-in (7.5.0.2)
[ 212] [Active ] [ ] [ ] [ 60] WMQ provider Plug-in (7.5.0.2)
[ 225] [Active ] [ ] [ ] [ 60] JMS prereq Plug-in (7.5.0.2)
[ 226] [Resolved ] [ ] [ ] [ 60] WMQ NLS Plug-in (7.5.0.2), Hosts: 210

-------------------------------------------------- LOG -----------------------------------------------------------------------------
Exception:
nable to start blueprint container for bundle esb-mtsmemopost-service
org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean websphereConnectionFactory of class class com.ibm.mq.jms.MQConnectionFactory
at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:333)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_71]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:676)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:374)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:261)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:270)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:233)[9:org.apache.aries.blueprint.core:1.0.1.redhat-611423]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[11:org.apache.aries.util:1.0.1.redhat-611423]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[11:org.apache.aries.util:1.0.1.redhat-611423]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[11:org.apache.aries.util:1.0.1.redhat-611423]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[11:org.apache.aries.util:1.0.1.redhat-611423]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[11:org.apache.aries.util:1.0.1.redhat-611423]
at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:696)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:484)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4650)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at org.apache.felix.framework.Felix$4.run(Felix.java:2123)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at org.apache.felix.framework.Felix.runInContext(Felix.java:2147)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2121)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1317)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_71]
Caused by: java.lang.NullPointerException
at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:174)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.setProviderFactory(JmsConnectionFactoryImpl.java:168)
at com.ibm.mq.jms.MQConnectionFactory.(MQConnectionFactory.java:293)


Blueprint.xml


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:cxf="http://cxf.apache.org/blueprint/core" xmlns:camel-cxf="http://camel.apache.org/schema/blueprint/cxf"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
http://camel.apache.org/schema/blueprint/cxf http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd">

<cm:property-placeholder persistent-id="com.frostbank.mts.svcsx"
    update-strategy="reload">
    <cm:default-properties>
        <cm:property name="activemq.username" value="ra08814" />
        <cm:property name="activemq.password" value="XXXXX" />
        <cm:property name="activemq.brokerUrl" value="tcp://lnx-amq-sita1:61616" />
        <cm:property value="aix-wiremqt1" name="ibm.mq.host" />
    </cm:default-properties>

</cm:property-placeholder>
<camel-cxf:cxfEndpoint id="ivoryMtsMemoPostServiceEndpoint"
    address="http://sysb.fnb.cfbi.local:2913/soap/Inquire_Add_Wire_IM"
    serviceClass="com.frostbank.gtivory.mtsmemopost.InquireAddWireIMPort" />
<cxf:bus>
    <cxf:features>
        <cxf:logging />
    </cxf:features>
</cxf:bus>

<bean id="setSoapHeadersForIvoryService" class="com.frostbank.esb.services.mts.MtsMemoPostProcessor" />
<bean id="mtsMemoPostTransformer" class="com.frostbank.esb.services.mts.MtsMemoPostTransformer" />

<bean id="activemqPooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"
    init-method="start" destroy-method="stop">
    <property name="maxConnections" value="1" />
    <property name="connectionFactory" ref="activemqConnectionFactory" />
</bean>

<bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="userName" value="${activemq.username}" />
    <property name="password" value="${activemq.password}" />
    <property name="brokerURL" value="${activemq.brokerUrl}" />

</bean>

<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
    <property name="configuration" ref="activemqConfig" />
</bean>

<bean id="activemqConfig" class="org.apache.camel.component.jms.JmsConfiguration">
    <property name="connectionFactory" ref="activemqPooledConnectionFactory" />
    <property name="transacted" value="false" />
</bean>

<bean class="com.ibm.mq.jms.MQConnectionFactory" id="websphereConnectionFactory">
    <property value="1" name="transportType" />
    <property value="${ibm.mq.host}" name="hostName" />
    <property value="8510" name="port" />
    <property value="MTS_TEST" name="queueManager" />

</bean>
<bean class="org.apache.camel.component.jms.JmsConfiguration" id="websphereConfig">
    <property name="connectionFactory" ref="websphereConnectionFactory" />
    <property value="10" name="concurrentConsumers" />
</bean>
<bean class="org.apache.camel.component.jms.JmsComponent" id="websphere">
    <property name="configuration" ref="websphereConfig" />
</bean>

<bean id="saveAmqHeaders"
    class="com.frostbank.esb.services.mts.CreateMemoPostAggregateStrategy" />
<camelContext trace="false" id="mts-svcs-context"
    xmlns="http://camel.apache.org/schema/blueprint">
    <route id="mtsMainRoute">
        <from uri="websphere:queue:LQ.TEST" />
        <log message=">>>>Message received from IBM MQ:${body}" />

        <setHeader headerName="USERNAME">
            <constant>svc.ivory.userid</constant>
        </setHeader>
        <setHeader headerName="PASSWORD">
            <constant>svc.ivory.password</constant>
        </setHeader>
        <enrich uri="direct-vm:GetCachedUserAndPass" strategyRef="saveAmqHeaders" />
        <bean ref="mtsMemoPostTransformer" method="convertMtsMemoPostRequestToIvoryRequest" />
        <to uri="direct:setSoaHeadersForIvoryService" />
        <to uri="direct:invokeIvoryMtsService" />
        <bean ref="mtsMemoPostTransformer" method="convertWireResponseToResponseData" />
        <log message="**********Converted Body: ${body}" />
        <to uri="websphere:queue:LQ.TEST" />
    </route>
    <route id="setSoaHeadersForIvoryService">
        <from uri="direct:setSoaHeadersForIvoryService" />
        <log message="**********inside invokeMtsMemoPost" />
        <process ref="setSoapHeadersForIvoryService" />
    </route>
    <route id="invokeIvoryMtsService">
        <from uri="direct:invokeIvoryMtsService" />
        <setHeader headerName="operationNamespace">
            <constant>urn:Inquire_Add_Wire_IMTNS</constant>
        </setHeader>
        <setHeader headerName="operationName">
            <constant>Inquire_Add_Wire_IM</constant>
        </setHeader>
        <log message="*******invoking webservice: ${body}" />
        <to uri="cxf:bean:ivoryMtsMemoPostServiceEndpoint" />
    </route>
</camelContext>

Responses