Adapter instances which are configured through Eclipse UI (comes with TIBCO ActiveMatrix Adapter Framework 1.1.2, 1.2.0) cannot be started when JNDI is selected as the connection type.

Adapter instances which are configured through Eclipse UI (comes with TIBCO ActiveMatrix Adapter Framework 1.1.2, 1.2.0) cannot be started when JNDI is selected as the connection type.

book

Article ID: KB0093281

calendar_today

Updated On:

Products Versions
TIBCO Adapter SDK -
TIBCO ActiveMatrix BusinessWorks Plug-in for SAP Solutions -
TIBCO ActiveMatrix BusinessWorks Plug-in for Files for Unix and Windows -

Description

Description:
Adapter instances which are configured through Eclipse UI (comes with TIBCO ActiveMatrix Adapter Framework 1.1.2, 1.2.0)  cannot be started when JNDI is selected as the connection type.


Symptoms:
Exceptions will be thrown toward the connection factory specified on the JMS session. For example, if the connection factory type is selected as QueueConnectionFactory, the following exception will be thrown during startup of the SAP adapter.

com.tibco.sdk.MNestedException: "JMS error: "Cannot instantiate class: QueueConnectionFactory
    at com.tibco.sdk.jms.Util.createInitialContext(Util.java:34)
    at com.tibco.sdk.serializer.config.MDeploymentDeserializer.readJmsSession(MDeploymentDeserializer.java:743)
    at com.tibco.sdk.serializer.config.MDeploymentDeserializer.readAnySupportedType(MDeploymentDeserializer.java:277)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAny(MPropertyBasedDeserializer.java:231)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.internalRead(MPropertyBasedDeserializer.java:187)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAllOfFrom(MPropertyBasedDeserializer.java:215)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAllOfFrom(MPropertyBasedDeserializer.java:201)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAllOf(MPropertyBasedDeserializer.java:195)
    at com.tibco.sdk.serializer.config.MDeploymentDeserializer.readMessaging(MDeploymentDeserializer.java:386)
    at com.tibco.sdk.serializer.config.MDeploymentDeserializer.readAnySupportedType(MDeploymentDeserializer.java:265)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAny(MPropertyBasedDeserializer.java:231)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.internalRead(MPropertyBasedDeserializer.java:187)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAllOfFrom(MPropertyBasedDeserializer.java:215)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAllOfFrom(MPropertyBasedDeserializer.java:201)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAllOf(MPropertyBasedDeserializer.java:195)
    at com.tibco.sdk.serializer.config.MDeploymentDeserializer.readSessions(MDeploymentDeserializer.java:1201)
    at com.tibco.sdk.serializer.config.MDeploymentDeserializer.readAnySupportedType(MDeploymentDeserializer.java:263)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAny(MPropertyBasedDeserializer.java:231)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.internalRead(MPropertyBasedDeserializer.java:187)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAllOfFrom(MPropertyBasedDeserializer.java:215)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAllOfFrom(MPropertyBasedDeserializer.java:201)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAllOf(MPropertyBasedDeserializer.java:195)
    at com.tibco.sdk.serializer.config.MDeploymentDeserializer.readDeployment(MDeploymentDeserializer.java:369)
    at com.tibco.sdk.serializer.config.MDeploymentDeserializer.readAnySupportedType(MDeploymentDeserializer.java:331)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAny(MPropertyBasedDeserializer.java:231)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.deserialize(MPropertyBasedDeserializer.java:32)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAny(MPropertyBasedDeserializer.java:228)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.internalRead(MPropertyBasedDeserializer.java:187)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readOptional(MPropertyBasedDeserializer.java:264)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readOptional(MPropertyBasedDeserializer.java:255)
    at com.tibco.sdk.serializer.MConfigDeserializer.readConfig(MConfigDeserializer.java:83)
    at com.tibco.sdk.serializer.MConfigDeserializer.readAnySupportedType(MConfigDeserializer.java:54)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.readAny(MPropertyBasedDeserializer.java:231)
    at com.tibco.sdk.serializer.MPropertyBasedDeserializer.deserialize(MPropertyBasedDeserializer.java:32)
    at com.tibco.sdk.MAppImpl.onConfigDeserialize(MAppImpl.java:339)
    at com.tibco.sdk.MDefaultAppImpl.start(MDefaultAppImpl.java:120)
    at com.tibco.sdk.MApp.start(MApp.java:225)
    at com.tibco.sap.adapter.SAPAdapter.main(Unknown Source)

Cause:
The issue is a defect of TIBCO ActiveMatrix Adapter Framework on versions 1.1.2 and 1.2.0. JIRA ticket ADF-3012 had been logged for tracking the defect.

Issue/Introduction

Adapter instances which are configured through Eclipse UI (comes with TIBCO ActiveMatrix Adapter Framework 1.1.2, 1.2.0) cannot be started when JNDI is selected as the connection type.

Resolution

Manually change the value of "providerCtxFactory" element in the dat file from the connection factory name (i.e., QueueConnectionFactory) to the initial context factory (com.tibco.tibjms.naming.TibjmsInitialContextFactory).


Example:


= = = 

Changing <string name="providerCtxFactory" value="QueueConnectionFactory"/> to <string name="providerCtxFactory" value="com.tibco.tibjms.naming.TibjmsInitialContextFactory"/>

= = = 


Note that the issue cannot be overcome during Design time on BusinessStudio because the Adapter Launcher would generate and use the new dat file each time when the adapter instance is started. The dat file can be found under <TIBCO_HOME>\afx\domains\<Domain_Name>\adapterspaces\<AppSpace_Name>\apps\<App_Name>\<Version>\config . The workaround mentioned above is not recommended for scenarios where large number of EAR files need to be updated. This is used for internal reference only.

Additional Information

ADF-3012