Bug 778797 (SOA-1247) - REGRESSION: JCA related failure deploying jBPM quickstarts on system using IBM MQ for JMS provider
Summary: REGRESSION: JCA related failure deploying jBPM quickstarts on system using IB...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-1247
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: JBossESB, JBPM - within SOA, Examples
Version: 4.3 CP01
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.3 CP01
Assignee: Kevin Conner
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On: SOA-1261 SOA-1262
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-24 02:08 UTC by Len DiMaggio
Modified: 2009-04-20 16:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
4.3 CP01 CR5
Last Closed: 2009-04-20 16:00:10 UTC
Type: Bug


Attachments (Terms of Use)
bpm_orchestration1.tar (160.00 KB, application/x-tar)
2009-03-24 02:09 UTC, Len DiMaggio
no flags Details
server.log.gz (13.77 KB, application/x-gzip)
2009-03-24 02:09 UTC, Len DiMaggio
no flags Details
queue-service.xml (3.34 KB, text/xml)
2009-03-25 09:22 UTC, Jiri Pechanec
no flags Details
bpmo1-wsmq-second-approach.tar (100.00 KB, application/x-tar)
2009-03-25 09:23 UTC, Jiri Pechanec
no flags Details
wsmq-jms-ds.xml (591 bytes, text/xml)
2009-03-25 09:27 UTC, Jiri Pechanec
no flags Details
helloworld_wmq.zip (182.06 KB, application/zip)
2009-03-25 10:34 UTC, Tom Fennelly
no flags Details
April1_SOA-1247.tar (450.00 KB, application/x-tar)
2009-04-02 03:13 UTC, Len DiMaggio
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 778818 0 high CLOSED Fix JMSEpr address encoding 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker SOA-1247 0 Major Closed REGRESSION: JCA related failure deploying jBPM quickstarts on system using IBM MQ for JMS provider 2013-08-10 11:53:05 UTC

Internal Links: 778818

Description Len DiMaggio 2009-03-24 02:08:34 UTC
Date of First Response: 2009-03-25 05:00:24
project_key: SOA

Seeing this problem with 4.3 CP01 CR5 - deploying a jBPM quickstart modified to use IBM MQ - the problem is not being seen with the 4.3 GA bits.

A stand alone test (bpm_orchestration1 in a tar file is attached. To recreate the error, deploy the quickstart archive to a SOA_P server. 

The salient part of the jboss-esb.xml file is:

<jms-jca-provider name="Custom MQ"
	jndi-URL="localhost:1414/SYSTEM.DEF.SVRCONN"
        jndi-context-factory="com.ibm.mq.jms.context.WMQInitialContextFactory"
        jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces"
        providerAdapterJNDI="java:/WSMQProvider"  
        connection-factory="ConnectionFactory" >

server.log is attached - the JMSException is raised when the archive is deployed:

-----------------

2009-03-23 21:30:56,128 INFO  [org.jboss.soa.esb.services.jbpm.actions.BpmProcessor] initialise() invoked - config=<action action="start_new_process_instance" actor="FrankSinatra" class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor" command="StartProcessInstanceCommand" process-definition-name="processDefinition2">
                        <mapping bpm="counter" esb="eVar1" value="45"/>
                        <mapping bpm="theBody" esb="BODY_CONTENT"/>
                    </action>
2009-03-23 21:30:57,939 WARN  [org.jboss.resource.adapter.jms.inflow.JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@77d67cee(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@571cb4a6 destination=queue/pt_bpmo1_result destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/WSMQProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'localhost:ConnectionFactory'
        at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:586)
        at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2301)
        at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1703)
        at com.ibm.mq.jms.MQQueueConnection.createQueueSession(MQQueueConnection.java:405)
        at com.ibm.mq.jms.MQQueueConnection.createQueueSession(MQQueueConnection.java:242)
        at com.ibm.mq.jms.MQQueueConnection.createSession(MQQueueConnection.java:589)
        at org.jboss.resource.adapter.jms.inflow.JmsServerSession.setup(JmsServerSession.java:115)
        at org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool.setupSessions(JmsServerSessionPool.java:197)
        at org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool.start(JmsServerSessionPool.java:88)
        at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupSessionPool(JmsActivation.java:621)
        at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:335)
        at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:671)
        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
        at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
        at java.lang.Thread.run(Thread.java:595)

-----------------

Comment 3 Len DiMaggio 2009-03-24 02:09:33 UTC
Attachment: Added: bpm_orchestration1.tar


Comment 4 Len DiMaggio 2009-03-24 02:09:54 UTC
Attachment: Added: server.log.gz


Comment 6 Len DiMaggio 2009-03-24 19:21:25 UTC
Trying a diff approach to configuring this...

http://www.jboss.org/community/docs/DOC-12535



Comment 7 Jiri Pechanec 2009-03-25 09:00:24 UTC
The second (the recommended approach) for integration does not work as the deployment fails with the given exception

2009-03-25 04:54:36,573 DEBUG [org.jboss.soa.esb.listeners.message.MessageAwareListener] Courier Exception
org.jboss.soa.esb.couriers.CourierException: Unable to create Message Consumer
        at org.jboss.internal.soa.esb.couriers.JmsCourier.pickupPayload(JmsCourier.java:419)
        at org.jboss.internal.soa.esb.couriers.JmsCourier.pickup(JmsCourier.java:399)
        at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:228)
        at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:204)
        at org.jboss.soa.esb.listeners.message.MessageAwareListener.waitForEventAndProcess(MessageAwareListener.java:294)
        at org.jboss.soa.esb.listeners.message.MessageAwareListener.doRun(MessageAwareListener.java:250)
        at org.jboss.soa.esb.listeners.lifecycle.AbstractThreadedManagedLifecycle.run(AbstractThreadedManagedLifecycle.java:115)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.soa.esb.couriers.CourierServiceBindException: Failed to get JMS Session from pool.
        at org.jboss.internal.soa.esb.couriers.JmsCourier.getJmsSession(JmsCourier.java:162)
        at org.jboss.internal.soa.esb.couriers.JmsCourier.createMessageConsumer(JmsCourier.java:497)
        at org.jboss.internal.soa.esb.couriers.JmsCourier.pickupPayload(JmsCourier.java:411)
        ... 7 more
Caused by: javax.jms.JMSException: MQJCA1018:Only one session per connection allowed.
        at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:113)
        at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:78)
        at com.ibm.mq.connector.outbound.ConnectionWrapper.createSession(ConnectionWrapper.java:96)
        at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool$1.call(JmsConnectionPool.java:172)
        at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool$1.call(JmsConnectionPool.java:165)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        ... 1 more
Thus if the older approach does not work on CP and the new one does not work too we cannot integrate SOA-P with WSMQ at all now

Comment 9 Jiri Pechanec 2009-03-25 09:22:59 UTC
Attachment: Added: queue-service.xml


Comment 10 Jiri Pechanec 2009-03-25 09:23:15 UTC
Attachment: Added: bpmo1-wsmq-second-approach.tar


Comment 11 Jiri Pechanec 2009-03-25 09:27:14 UTC
Attachment: Added: wsmq-jms-ds.xml


Comment 12 Tom Fennelly 2009-03-25 10:34:24 UTC
I was involved with a WMQ related support request some time back: https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=245535&gid=1369&view_type=lifo50

It was a bit of a pain in the head to sort out, but we eventually got it working for them.  As part of that, we had to write some WMQ specific code.  I bundled all of this in a quickstart, which is attached here and on the case (helloworld_wmq.zip).

Here were the comments I added, with the attachment, to the case (see Event posted 01-27-2009 10:05pm GMT by tfennell):

--------------------------------------------------------------------------------------------------------------------------------

Hi guys.

Here's another "installement" on this.  It contains the JCA inflow changes.  Everything in this QS is now using WMQ.

Before building, please make sure the follow jars are in the lib folder:
   1. dhbcore.jar
   2. com.ibm.mqjms.jar
   3. com.ibm.mq.jar

Run "ant jarwrapper".  It creates a jar containing the wrapper code.  You need to copy this into the server lib (e.g. server/default/lib) and restart the server.

This QS needs a few queues to be confgured on WMW: "WMQGATEWAY", "WMQESBAWARE" and "ACTION_REQUEST_2".

Hope it helps.

T. 

Comment 13 Tom Fennelly 2009-03-25 10:34:24 UTC
Attachment: Added: helloworld_wmq.zip


Comment 14 Len DiMaggio 2009-03-25 11:18:04 UTC
Thanks Tm - That's interesting - the wiki page here: 
http://www.jboss.org/community/docs/DOC-12535 

Explicitly said to remove these jars from the server/lib dir - to avoid class collisions...

   1. dhbcore.jar
   2. com.ibm.mqjms.jar
   3. com.ibm.mq.jar 

Comment 15 Tom Fennelly 2009-03-25 13:18:29 UTC
Right, but before that, and related to it, it said "If migrating from an existing IBM WebSphere MQ installation on JBoss" ;)

I think that comment is specific to those using the JCA adapter only... I think in our cause, we were also using WMQ through the JMS API (via the JMSRouter).  So yes... you may not need them if you're using WMQ via JCA only.

Comment 18 Dana Mison 2009-03-26 09:29:19 UTC
I've added this as a "known issue" to the release notes and referred people to http://www.jboss.org/community/docs/DOC-13455 as per the last comment

Comment 19 Tom Fennelly 2009-03-26 11:19:13 UTC
Guys... did we try the quickstart I attached?

I don't exactly remember why, but I know I had to add those jars to the server/lib.  I think they were required there si as to use the JMSRouter (non-JCA).  So as I said above, you may not need them *if you're using WMQ via JCA only*.  Otherwise, I think they are needed.

Comment 22 Tom Fennelly 2009-03-31 09:27:35 UTC
I second what Kev says there... what I provided there was just a quick fix to get the current codebase working with WMQ for that customer.

I think that in order to support WMQ properly, we really need to go back over what I did there and break out a list of formal tasks re handling this properly, in a released version of the ESB.  I had to do quite a bit of messing about to get it working.  There's probably more than just the WMQInitialContextFactory.  One or two issues I discovered, at the time, have since been fixed in the codebase, but there may be others in there that we need to loop back on.

Comment 23 Mark Little 2009-03-31 13:13:10 UTC
Link: Added: This issue depends SOA-1261


Comment 24 Mark Little 2009-03-31 13:13:39 UTC
Link: Added: This issue depends SOA-1262


Comment 26 Kevin Conner 2009-04-01 09:11:05 UTC
The issue you are seeing is a consequence of an assumption made in JMSEpr, that the destination name is the full path embedded within the URI.

The destination being taken from that URI is, therefore, SYSTEM.DEF.SVRCONN/queue/pt_bpmo1_start_esb rather than queue/pt_bpmo1_start_esb.

I will add this to the list of tasks needing to be done for MQ integration.



Comment 27 Len DiMaggio 2009-04-01 13:55:51 UTC
Link: Added: This issue related SOA-1268


Comment 30 Len DiMaggio 2009-04-02 03:13:05 UTC
Attachment: Added: April1_SOA-1247.tar


Comment 32 Kevin Conner 2009-04-02 08:21:38 UTC
The bug we are currently seeing is the setting of maxMessages based on the thread count.

The reason this used to work was because of a bug in the app server codebase which has since been fixed, setting maxMessages used to set maxSession :(

The app server bug is JBPAPP-1045.

We need to change our mappers to use maxSession instead of maxMessages.


Comment 33 Kevin Conner 2009-04-02 09:59:24 UTC
Link: Added: This issue depends JBESB-2510


Comment 34 Kevin Conner 2009-04-02 10:11:02 UTC
JBESB-2510 covers the fix for this release.

Comment 35 Len DiMaggio 2009-04-02 16:55:33 UTC
Link: Added: This issue depends JBPAPP-1045


Comment 36 Len DiMaggio 2009-04-02 18:26:05 UTC
Verified fixed in 4.3 CP01 CR6 - the quickstart now deploys - identically - with 4.3 GA and 4.3 CP01



Comment 37 Len DiMaggio 2009-04-02 18:26:42 UTC
In 4.3 CP01 CR6

Comment 38 Len DiMaggio 2009-04-05 00:09:45 UTC
Verified fixed in 4.3 CP01 CR6

Comment 39 Len DiMaggio 2009-04-09 12:27:52 UTC
Setting new "Affects Testing, Regression, Blocks Testing Fields"

Comment 40 Len DiMaggio 2009-04-09 12:28:15 UTC
Setting new "Affects Testing, Regression, Blocks Testing Fields"

Comment 41 Len DiMaggio 2009-04-09 12:28:15 UTC
Blocked Tests: Added: Testing with IBM MQ
Affects Testing?: Added: [Regression?, Blocks Testing?]


Comment 42 Len DiMaggio 2009-04-09 12:28:32 UTC
Re-closing after setting new "Affects Testing, Regression, Blocks Testing Fields"

Comment 43 Len DiMaggio 2009-04-20 15:59:44 UTC
Edited to match changes in 'affects testing' fields  (? character removed from field names for easier querying)

Comment 44 Len DiMaggio 2009-04-20 16:00:01 UTC
Affects Testing: Removed: [Blocks Testing?, Regression?] Added: [Regression, Blocks Testing]



Note You need to log in before you can comment on or make changes to this bug.