Use in Websphere Liberty to connect to Tibco EMS

558 views
Skip to first unread message

Mediocaballero MidKnight

unread,
Sep 28, 2017, 1:18:28 PM9/28/17
to Generic JMS JCA Resource Adapter for JBoss AS
Hi!

Has anyone had any luck with this combination? Could you share your modifications on the .rar (if any) and the configuration lines in server.xml?

I'm trying to set it up, but can't get it to work...

Using docs from here:
and here:

I'm trying with a snippet like this one:
  <resourceAdapter id="GenericRA"
                   location="/git/generic-jms-ra/generic-jms-ra-rar/target/generic-jms-ra-2.0.1.Final.rar" autoStart="true">
 <properties.GenericRA JndiProperties="java.naming.provider.url=tibjmsnaming://xxx:7222, java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory,java.naming.factory.url.pkgs=com.tibco.tibjms.naming,java.naming.security.principal=pass,java.naming.security.credentials=pass" LogLevel="FINER" ProviderIntegrationMode="jndi" SupportsXA="true"/>
    </resourceAdapter>
  
    <jmsConnectionFactory  jndiName="jms/xxx_qcf">
        <properties.GenericRA UserName="jmsUser" Password="jmsPassword"    ConnectionFactoryJndiName ="jms/xxx_qcf"/>
    </jmsConnectionFactory>


But I get errors saying those properties are not found in the implementation:
[WARNING ] J2CA8501E: Property JndiProperties of configuration element properties.GenericRA cannot be set because it is not found on the class org.jboss.resource.adapter.jms.JmsResourceAdapter.
[WARNING ] J2CA8501E: Property SupportsXA of configuration element properties.GenericRA cannot be set because it is not found on the class org.jboss.resource.adapter.jms.JmsResourceAdapter.
[WARNING ] J2CA8501E: Property ProviderIntegrationMode of configuration element properties.GenericRA cannot be set because it is not found on the class org.jboss.resource.adapter.jms.JmsResourceAdapter.
[WARNING ] J2CA8501E: Property LogLevel of configuration element properties.GenericRA cannot be set because it is not found on the class org.jboss.resource.adapter.jms.JmsResourceAdapter.

Thanks!!!

Justin Bertram

unread,
Sep 28, 2017, 8:17:55 PM9/28/17
to Generic JMS JCA Resource Adapter for JBoss AS
Couple of things:
  1. I've not ever seen anybody integrate the JBoss AS generic JMS JCA RA into an application server other than JBoss AS/EAP or Wildfly.  That said, I don't see why you couldn't do it as it's a standards compliant adapter.
  2. The reason you're getting the errors like, "Property <propertyName> of configuration element properties.GenericRA cannot be set because it is not found on the class org.jboss.resource.adapter.jms.JmsResourceAdapter," is because (as the error message indicates) you're attempting to set properties which don't exist on the JBoss AS generic JMS JCA RA.  Have you tried not setting those properties and seeing how it works?
  3. It looks to me like the instructions you linked reference Sun's generic JMS JCA RA which was written mainly for use in Glassfish.  This forum is for the JBoss AS generic JMS JCA RA.

Mediocaballero MidKnight

unread,
Sep 29, 2017, 6:52:25 AM9/29/17
to Generic JMS JCA Resource Adapter for JBoss AS
Thanks for the feedback!

I tried moving the properties to the ConnectionFactory and I don't get the warning at startup, but in the end I get the same error when trying to locate the connection factory via JNDI:

------- Previous exception stack trace -------
javax
.naming.NameNotFoundException: jms/xxx_qcf
 at com
.ibm.ws.jndi.internal.ContextNode.lookup(ContextNode.java:218)
 at com
.ibm.ws.jndi.internal.WSContext.lookup(WSContext.java:297)
 at com
.ibm.ws.jndi.WSContextBase.lookup(WSContextBase.java:62)
 at org
.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
 at javax
.naming.InitialContext.lookup(InitialContext.java:428)
 at ourinnerclasses
.JMSToolsImpl.getConnectionFactory(JMSToolsImpl.java:1208)


Sorry, I'm quite a newbie using JCA, but what I understand is that I need to publish a connection factory in the Liberty JNDI service that then will use the RA and ask for the objects to the Tibco JNDI service... Is that right?

That's why I'm configuring the JndiProperties="..." in the resource adapter with the Tibco naming service information...

Does this approach sound right?

Justin Bertram

unread,
Sep 29, 2017, 8:57:15 AM9/29/17
to Generic JMS JCA Resource Adapter for JBoss AS
If I understand correctly, this is really a question about how to configure the RA in WebSphere Liberty, and I can't really answer that question since I have never used that application server.

David

unread,
Oct 9, 2017, 12:50:39 PM10/9/17
to Generic JMS JCA Resource Adapter for JBoss AS
Thanks for the feedback. You are right, this is more about Liberty than the RA itself, though I wasn't clear which properties it had and where did they belong...

I'm gonna repost here what I've got so far and what I asked in the IBM forums, just in case someone gets here with a similar problem and can save some time.

---

I need to configure an outbound connection from my Liberty (16.0.0.2) instance to a topic inside a Tibco EMS server.
I've tried to set up a JMS JCA Generic Resource adapter (from https://github.com/jms-ra/generic-jms-ra) without success.

I've had moderate success in creating the connection factory from the resource adapter. But I've had to use the '' tag in my server.xml. Neither the  or the more precise  tags seem to work with the JCA connector, they both fail to publish the JNDI object and my code throws an javax.naming.NameNotFoundException when looking for the factory.

With this code in my server.xml I've managed to create the connection factory:

 <!-- Tibco EMS Resource Adapter (Generic) -->
 
<resourceAdapter id="GenericRA"
               
location="${server.config.dir}/lib/tibco/generic-jms-ra-2.0.1.Final.rar" autoStart="true">
 
</resourceAdapter>


 
<connectionFactory jndiName="jms/TopicConnectionFactory">
 
<properties.GenericRA
 
JndiParameters="java.naming.provider.url=tcp://tibcoserver1:port1,tcp://tibcoserver2.port2, java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory,java.naming.factory.url.pkgs=com.tibco.tibjms.naming,java.naming.security.principal=pass,java.naming.security.credentials=pass"
 
ConnectionFactory="MyTibcoTopicConnectionFactory" LogLevel="FINER" ProviderIntegrationMode="jndi" SupportsXA="true"/>
 
</connectionFactory>

But after that, my code tries to do a JNDI lookup for the destination (topic) object and fails to find it (again with a NameNotFoundException). I've tried configuration along these lines:


 <adminObject jndiName="jms/My_Topic" id="My_Topic">
 
<properties.GenericRA DestinationJndiName="T.My_TibcoTopic"/>
 
</adminObject>

I've tried the tags adminObject or the JMS-specific 'jmsDestination' and 'jmsTopic', but no matter what I choose, when I try to do a lookup on the JNDI address, nothing's there (except for the connectionFactory above).

These are the features I've enabled on my server.xml file:

        <!-- Enable features -->
   
<featureManager>
       
<feature>jdbc-4.1</feature>
       
<feature>ssl-1.0</feature>
       
<feature>ejbHome-3.2</feature>
   
<feature>servlet-3.1</feature>
   
<feature>jsp-2.3</feature>
   
<feature>localConnector-1.0</feature>
       
<feature>adminCenter-1.0</feature>
   
<feature>jca-1.7</feature>
   
<feature>wmqJmsClient-2.0</feature>
   
<feature>mdb-3.2</feature>
   
<feature>jms-2.0</feature>
       
</featureManager>


Any ideas about what I might be missing?

Justin Bertram

unread,
Oct 11, 2017, 10:23:44 AM10/11/17
to Generic JMS JCA Resource Adapter for JBoss AS
The JBoss Generic JMS JCA RA doesn't support JCA admin objects.  You'll need to do the remote JNDI lookup in your application code or just use the JMS API to instantiate the destination.

David

unread,
Oct 11, 2017, 12:07:27 PM10/11/17
to Generic JMS JCA Resource Adapter for JBoss AS
Thanks for the help Justin!

I found that information in the adapter docs, and have made some tests. As suggested, I've changed our code to do a lookup of the factory in Liberty, but then use that factory to get to the Tibco EMS topic (instead of trying to do the same kind of lookup for the topic).

Still, I'm getting an error.

This is a sample ot the code I'm using:

// Get the Factory defined for the alias via JDNI.
aliasFactory = aliasObj.getFactory(); // This gets the (Liberty) JNDI path for the connectionFactory
// Get the QueueConnectionFactory
TopicConnectionFactory tFactory = (TopicConnectionFactory)getConnectionFactory(null,aliasFactory); //  <-- This part is working and we get a factory via JNDI lookup to the WAS Liberty

// Define the reply Topic and text for the message to be sent.
// Create the TopicConnection and start it.
con = tFactory.createTopicConnection(); //<-- This seems to work and goes on
con.start(); //<-- Same as above
// Create the Session and Publisher 
TopicSession tSession = con.createTopicSession(false,Session.AUTO_ACKNOWLEDGE); //<-- This (createTopicSession) is what throws an exception.
[Some code to prepare the message goes here]

theTopic = tSession.createTopic(aliasObj.getDestination()); // <-- This is the new code we would use to get the topic, but we don't reach this far

The exception that the connector is throwing is 
javax.jms.JMSException: Could not create a session: javax.resource.spi.ResourceAllocationException: Unable to setup connection
at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.allocateConnection(JmsSessionFactoryImpl.java:435)
at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createTopicSession(JmsSessionFactoryImpl.java:178)
at xxx.JMSToolsImpl.sendTopicAsync(JMSToolsImpl.java:278) <-- This line is the one marked on the code above

Debugging I've been able to see that the connector code is catching a 
javax.naming.NameNotFoundException: StaffwareTopicConnectionFactory

That name is defined in the Tibco EMS JNDI namespace, I've had it checked. It's using it from my connection factory configuration in Liberty.

<!-- Tibco EMS Resource Adapter (Generic) -->
<resourceAdapter id="GenericRA"
                   location="${server.config.dir}/lib/tibco/generic-jms-ra-2.0.1.Final.rar" autoStart="true">
</resourceAdapter>
<connectionManager id="tibcoCM"></connectionManager>
  
<connectionFactory connectionManagerRef="tibcoCM" jndiName="jms/TopicConnectionFactory">
<properties.GenericRA 
JndiParameters="java.naming.provider.url=tcp://tibco.server.address:7222,java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory,java.naming.factory.url.pkgs=com.tibco.tibjms.naming" 
ConnectionFactory="StaffwareTopicConnectionFactory" LogLevel="FINER" ProviderIntegrationMode="jndi" SupportsXA="true"/>
</connectionFactory>

 And I've also checked that an anonymous user should be able to locate and write in that factory and topic.

Any idea what can be wrong?

Justin Bertram

unread,
Oct 11, 2017, 12:47:43 PM10/11/17
to Generic JMS JCA Resource Adapter for JBoss AS
Couple of things...
  1. You shouldn't need to be debugging to see the NameNotFoundException in this case.  It should be logged at ERROR level by the org.jboss.resource.adapter.jms.JmsSessionFactoryImpl logger.  Furthermore, the code is setting the underlying exception (i.e. NameNotFoundException in this case) as the "linked" exception on a JMSException and rethrowing it to the application code.
  2. If you look at the full stack-trace of the NameNotFoundException you should see that it's coming from Tibco code.  There's not much the JCA RA can do about that.  My guess is this is a configuration issue.  
  3. Are you able to use all those same JNDI properties (i.e. java.naming.provider.url=tcp://tibco.server.address:7222,java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory,java.naming.factory.url.pkgs=com.tibco.tibjms.naming) to lookup "StaffwareTopicConnectionFactory" from a standard, remote JMS client?  That would be a good sanity check for your configuration since it would remove the RA from the equation.

David

unread,
Oct 11, 2017, 1:19:25 PM10/11/17
to Generic JMS JCA Resource Adapter for JBoss AS
The one I posted is the full stacktrace I see in the logs (until our own classes get mentioned). I think that as the exception is getting set as 'linked' and not as 'cause' it does not appear on a standard stacktrace... could be?

Anyway, as per the other post, I changed the properties from comma to semicolon and was able to get a bit further. It complained about a Tibco class not found, so I checked and, indeed, I had not associated the tibco tibjms-4.2.0.jar to the resource adapter. Now I have:

<!-- Tibco EMS Resource Adapter (Generic) -->
<library id="Tibco_Lib">
     <fileset dir="${server.config.dir}/lib/tibco" includes="*.jar"/>
  </library>
<!-- Tibco EMS Resource Adapter (Generic) -->
<resourceAdapter id="GenericRA"
                   location="${server.config.dir}/lib/tibco/generic-jms-ra-2.0.1.Final.rar" autoStart="true">
                   <classloader commonLibraryRef="Tibco_Lib"/>
</resourceAdapter>
<connectionManager id="tibcoCM"></connectionManager>
  
<connectionFactory connectionManagerRef="tibcoCM" jndiName="jms/TopicConnectionFactory">
<properties.GenericRA 
JndiParameters="java.naming.provider.url=tibjmsnaming://server:port;java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory;java.naming.factory.url.pkgs=com.tibco.tibjms.naming;java.naming.security.principal=anonymous;java.naming.security.credentials=" 
ConnectionFactory="StaffwareTopicConnectionFactory" LogLevel="FINER" ProviderIntegrationMode="jndi" SupportsXA="false" UserName="anonymous" Password=""/>
</connectionFactory>

And it didn't complain about the Tibco class, so I guess it worked.

Now I'm getting a different exception albeit at the same point:

[INFO    ] FFDC1015I: An FFDC Incident has been created: "javax.resource.ResourceException: java.lang.AbstractMethodError: javax/jms/ConnectionFactory.createContext(Ljava/lang/String;Ljava/lang/String;)Ljavax/jms/JMSContext; com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper 199" at ffdc_17.10.11_19.06.18.0.log
[ERROR   ] could not create session
java.lang.AbstractMethodError: javax/jms/ConnectionFactory.createContext(Ljava/lang/String;Ljava/lang/String;)Ljavax/jms/JMSContext;
[err] 2017-10-11 19:06:19.085 ERROR [, 295862000CAF6617, -, true] 0 --- [cutor-thread-54] .MessagingService.JMSMessagingSubsystem [BKSE04023000548] : Class 'jmsTools': An error occurred in the sendTopicAsync method. Alias = 'WIBCAP_eventLog_Def_Request_JMS' using TopicFactory 'jms/TopicConnectionFactory' and Topic 'T.WIBCAP_RequestTopic'
javax.jms.JMSException: Could not create a session: javax.resource.spi.ResourceAllocationException: java.lang.AbstractMethodError: javax/jms/ConnectionFactory.createContext(Ljava/lang/String;Ljava/lang/String;)Ljavax/jms/JMSContext;
at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.allocateConnection(JmsSessionFactoryImpl.java:435)
at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createTopicSession(JmsSessionFactoryImpl.java:178)
at XXX.JMSToolsImpl.sendTopicAsync(JMSToolsImpl.java:278)

Seems like a j2ee JMS method not implemented... Maybe I am missing some other .jar from Tibco? :-m

Simultaneously, I'm installing Hermes JMS to try the JNDI settings as you suggested...

Justin Bertram

unread,
Oct 11, 2017, 1:48:16 PM10/11/17
to Generic JMS JCA Resource Adapter for JBoss AS
I believe the issue is that your Tibco JMS client implementation doesn't support JMS 2.0 which the JCA RA is attempting to use to create the JMS connection.  You'd have to check with Tibco to see if they have a JMS 2.0 client.  JMS 2.0 was released over 4 years ago now so I'd expect Tibco to have a 2.0 compliant client implementation.  However, if they do not you could try using an earlier version of the RA which was still based on JMS 1.1 (e.g. 1.0.8.Final).

Justin Bertram

unread,
Oct 11, 2017, 1:59:19 PM10/11/17
to Generic JMS JCA Resource Adapter for JBoss AS
Also, regarding the exception logging...

Section 7.2 of the JMS 1.1 states:

JMS defines JMSException as the root class for exceptions thrown by JMS methods. JMSException is a checked exception and catching it provides a generic way of handling all JMS related exceptions. JMSException provides the following information: 
• A provider-specific string describing the error - This string is the standard Java exception message, and is available via getMessage().
• A provider-specific string error code 
• A reference to another exception - Often a JMS exception will be the result of a lower level problem. If appropriate, this lower level exception can be linked to the JMS exception.

(section 10.2 of the JMS 2.0 states essentially the same thing)

Therefore, when dealing with JMSExceptions it's always a good idea to checked the linked exception for the root issue.  I don't believe logging the JMSException itself will log the linked exception (unless maybe the logging framework had a special handler for JMSException or something like that).

David

unread,
Oct 13, 2017, 1:00:04 PM10/13/17
to Generic JMS JCA Resource Adapter for JBoss AS
Just as you suggested, I tried connecting via JNDI with Hermes and I was able to send and read messages from the topic with just three properties: the url, the factory name for binding and the initial context factory class.

I'm going to try the latest drivers as it seems that JMS 2.0 was added on one of the latest versions of EMS... Else, I'll try falling back to 1.0.8 of the connector.

Thanks also for the info on linked exceptions, will reflect it in my logging code.

Thanks!


David

unread,
Oct 16, 2017, 5:31:00 AM10/16/17
to Generic JMS JCA Resource Adapter for JBoss AS
I'm almost there...

After updating the tibjms.jar library, I'm past that error, but now I'm getting another one complaining about the clientID in Tibco code:

Caused by: javax.jms.InvalidClientIDException: clientId already exists
at com.tibco.tibjms.Tibjmsx.buildException(Tibjmsx.java:739)
at com.tibco.tibjms.TibjmsConnection._setClientIDEx(TibjmsConnection.java:4616)
at com.tibco.tibjms.TibjmsConnection.setClientID(TibjmsConnection.java:4552)
at org.jboss.resource.adapter.jms.JmsManagedConnection.setup(JmsManagedConnection.java:668)
... 64 more
<=================================>Next Linked Exception:
<=================================>Exception Message -> clientId already exists
javax.jms.InvalidClientIDException: clientId already exists
at com.tibco.tibjms.Tibjmsx.buildException(Tibjmsx.java:739)
at com.tibco.tibjms.TibjmsConnection._setClientIDEx(TibjmsConnection.java:4616)
at com.tibco.tibjms.TibjmsConnection.setClientID(TibjmsConnection.java:4552)
at org.jboss.resource.adapter.jms.JmsManagedConnection.setup(JmsManagedConnection.java:668)
at org.jboss.resource.adapter.jms.JmsManagedConnection.<init>(JmsManagedConnection.java:189)
at org.jboss.resource.adapter.jms.JmsManagedConnectionFactory.createManagedConnection(JmsManagedConnectionFactory.java:109)
at com.ibm.ejs.j2c.PoolManager.createParkedConnection(PoolManager.java:6293)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3248)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2335)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1121)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:688)
at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.allocateConnection(JmsSessionFactoryImpl.java:412)
at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createTopicSession(JmsSessionFactoryImpl.java:178)
at com.xxx.JMSToolsImpl.sendTopicAsync(JMSToolsImpl.java:278)

It's a bit weid, as I think client Id should only be mandatory for subscription to a durable topic, and I'm trying only to send messages :-m

I've tried providing one in the generic JCA adapter, but the error doesn't change... :-m

Justin Bertram

unread,
Oct 16, 2017, 10:58:33 AM10/16/17
to Generic JMS JCA Resource Adapter for JBoss AS
Are you actually setting the client ID anywhere in your code or configuration?  The bit of code which calls javax.jms.Connection#setClientID should only be called if something has changed the client ID (i.e. something other than null).

David

unread,
Oct 16, 2017, 11:15:10 AM10/16/17
to Generic JMS JCA Resource Adapter for JBoss AS
Not that I know of...

My code just makes a lookup of the connectionFactory via JNDI, and calls 'createTopicConnection'

// Get the QueueConnectionFactory
TopicConnectionFactory tFactory = (TopicConnectionFactory)getConnectionFactory(null,aliasFactory);

// Define the reply Topic and text for the message to be sent.
// Create the TopicConnection and start it.
con = tFactory.createTopicConnection();
con.start();
// Create the Session and Publisher
TopicSession tSession = con.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);

That 'createTopicConnection' is what ends up throwing the exception...

Also I've tried both setting the RA property 'ClientID' and not including it, but the result is the same:

   <!-- Tibco EMS Sample connection factory -->
<connectionFactory jndiName="jms/TopicConnectionFactory">
<!-- <connectionManager maxPoolSize="50" minPoolSize="1" connectionTimeout="30s" /> -->
<properties.GenericRA 
JndiParameters="java.naming.provider.url=tibjmsnaming://server:port;java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory;java.naming.factory.url.pkgs=com.tibco.tibjms.naming;java.naming.security.principal=anonymous;java.naming.security.credentials=" 
ConnectionFactory="StaffwareTopicConnectionFactory"
ClientID="WLPEMSTest"
SessionDefaultType="javax.jms.Topic" />
</connectionFactory>


Justin Bertram

unread,
Oct 16, 2017, 11:58:24 AM10/16/17
to Generic JMS JCA Resource Adapter for JBoss AS
Can you turn on TRACE logging for "org.jboss.resource.adapter", reproduce the error, and provide the log here?  The object where the client ID is set is logged at TRACE level although unfortunately it doesn't have a toString().  Maybe there's some other logging that could give a clue what's happening.  If the logging doesn't provide any help then I think you'll either need to run it through a debugger or augment the logging code yourself and rebuild the RA.  I don't have a way to reproduce the failure here unfortunately.

David

unread,
Oct 16, 2017, 12:22:11 PM10/16/17
to Generic JMS JCA Resource Adapter for JBoss AS
I had to debug it to be sure. It seems that my config has a problem with these lines at org.jboss.resource.adapter.jms.JmsManagedConnection.setup(JmsManagedConnection.java:668) 

            con = createConnection(factory, user, pwd);
            if (info.getClientID() != null && !info.getClientID().equals(con.getClientID())) {
                con.setClientID(info.getClientID());
            }

On my app, these calls are executed many times. If I set a clientId, it tries to call con.setClientID and tibco classes work the first time but complains the second time that the id is already used.

If I omit the ClientID property, it's coming as an empty string "", whereas the con.getClientId() returns a null, so the if blocks executes and I get the same problem, the id "" is being set multiple times...

Justin Bertram

unread,
Oct 16, 2017, 12:37:30 PM10/16/17
to Generic JMS JCA Resource Adapter for JBoss AS
I would modify the if statement to be:

if (info.getClientID() != null && info.getClientID().length() > 0 && !info.getClientID().equals(con.getClientID()))

Try that out and let me know if that fixes the issue.  My guess is that the application server code is calling setClientID with an empty String for some reason.

David

unread,
Oct 16, 2017, 1:13:13 PM10/16/17
to Generic JMS JCA Resource Adapter for JBoss AS
Hi!

You are right, I though of a simmilar modification and was already testing it:
!"".equals(info.getClientID())

Made a local build of the .rar and tested it. This got it past that point.

Still, doesn't work :-(

I got to a new exception here:

@JmsConnectionFactoryImpl.java:163

    // --- TopicConnectionFactory

    public TopicConnection createTopicConnection() throws JMSException {
        TopicConnection tc = new JmsSessionFactoryImpl(mcf, cm, TOPIC);

        if (log.isTraceEnabled()) {
            log.trace("Created topic connection: " + tc);
        }

        return tc;
    }

The tc assignment is throwing a (weird) type mismatch that I didn't have when modifying the files...

Caused by: java.lang.Error: Unresolved compilation problem: 
Type mismatch: cannot convert from JmsSessionFactoryImpl to TopicConnection

at org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl.createTopicConnection(JmsConnectionFactoryImpl.java:163)
at com.xxxxxx.JMSToolsImpl.sendTopicAsync(JMSToolsImpl.java:275)


I guess I got a classloading problem... Do you thing this could be some JMS 1.1 vs JMS 2.0 mix?

This is gonna be tough to check :-m

Justin Bertram

unread,
Oct 16, 2017, 3:43:01 PM10/16/17
to Generic JMS JCA Resource Adapter for JBoss AS
Yes, I suspect this is a classloading issue given that org.jboss.resource.adapter.jms.JmsSessionFactoryImpl implements org.jboss.resource.adapter.jms.JmsSessionFactory which extends javax.jms.TopicConnection.  The assignment should work.  

My guess is that you've got a JMS 2.0 spec jar from Tibco that is being used for the 1.1 classes in some cases and then the 1.1 spec jar that's shipped with the application server is being used in others (since the RA is managed by the app server).

David

unread,
Oct 17, 2017, 6:34:09 AM10/17/17
to Generic JMS JCA Resource Adapter for JBoss AS
I activated the classloader verbose information to try checking this. There are many javax.jms classes being loaded, but they all belong to the IBM JMS 2.0 jar file included with the app server, there's nothing that indicates some JMS 1.1 classes loading anywhere... :-m

Could be an incompatibility for using the IBM JVM?


Search "class load: javax.jms" (27 hits in 1 file)
  C
:\Users\xIS02028\git\generic-jms-ra\logs.txt (27 hits)
 
Line 4751: class load: javax.jms.JMSException from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 4752: class load: javax.jms.MessageListener from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 4753: class load: javax.jms.Message from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 4760: class load: javax.jms.IllegalStateException from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 4777: class load: javax.jms.Connection from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 4778: class load: javax.jms.XAConnection from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 4863: class load: javax.jms.ConnectionFactory from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 4872: class load: javax.jms.QueueConnection from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 4875: class load: javax.jms.TopicConnection from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 4880: class load: javax.jms.XAQueueConnection from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 4883: class load: javax.jms.XATopicConnection from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 6121: class load: javax.jms.JMSConnectionFactoryDefinition from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 6125: class load: javax.jms.JMSDestinationDefinition from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 7405: class load: javax.jms.ConnectionMetaData from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 7425: class load: javax.jms.JMSConnectionFactoryDefinitions from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 7429: class load: javax.jms.JMSDestinationDefinitions from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 7440: class load: javax.jms.TopicConnectionFactory from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 7441: class load: javax.jms.QueueConnectionFactory from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 11349: class load: javax.jms.Session from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 11350: class load: javax.jms.Destination from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 11351: class load: javax.jms.MessageProducer from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 15477: class load: javax.jms.ExceptionListener from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 15480: class load: javax.jms.Queue from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 15481: class load: javax.jms.Topic from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 15632: class load: javax.jms.JMSContext from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 15633: class load: javax.jms.JMSRuntimeException from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar
 
Line 15634: class load: javax.jms.JMSSecurityRuntimeException from: file:/opt/ibm/wlp/dev/api/spec/com.ibm.ws.javaee.jms.2.0_1.0.13.jar



Justin Bertram

unread,
Oct 17, 2017, 2:04:37 PM10/17/17
to Generic JMS JCA Resource Adapter for JBoss AS
I'm not really sure what to tell you at this point as the issue here doesn't appear to be with the RA itself but rather the runtime environment.
Reply all
Reply to author
Forward
0 new messages