ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportTwo Database connection from Java Compute Node

Post new topicReply to topic
Two Database connection from Java Compute Node View previous topic :: View next topic
Author Message
ashishkpandey
PostPosted: Wed May 13, 2015 7:05 am Post subject: Two Database connection from Java Compute Node Reply with quote

Newbie

Joined: 13 May 2015
Posts: 5

Hi,

I am trying to connect the JDBC configurable service from Java compute node.

Connection conn1 = getJDBCType4Connection(DSN1, JDBC_TransactionType.MB_TRANSACTION_AUTO);
Connection conn2 = getJDBCType4Connection(DSN2, JDBC_TransactionType.MB_TRANSACTION_AUTO);


First connection is working fine but at the time of second connection it's giving following error:

2015-05-13 15:07:13.174 178 <com.ibm.broker.plugin.MbRecoverableException class:com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandlerErrors@797a6d68 method:JDBCType4SinglePhaseTrxnHandler::getConnection with labels source:BIPmsgs key:6233 >
2015-05-13 15:07:13.176 178 at com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandlerErrors.throwException(JDBCType4SinglePhaseTrxnHandlerErrors.java:217)
2015-05-13 15:07:13.178 178 at com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:338)
2015-05-13 15:07:13.180 178 at com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:154)
2015-05-13 15:07:13.181 178 at com.ibm.broker.jdbctype4.connfact.JDBCType4ConnectionFactory.getConnection(JDBCType4ConnectionFactory.java:163)
2015-05-13 15:07:13.182 178 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2015-05-13 15:07:13.184 178 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
2015-05-13 15:07:13.185 178 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2015-05-13 15:07:13.186 178 at java.lang.reflect.Method.invoke(Method.java:607)
2015-05-13 15:07:13.188 178 at com.ibm.broker.plugin.MbNode.getJDBCType4Connection(MbNode.java:1564)

type4DatasourceClassName='oracle.jdbc.xa.client.OracleXADataSource'
type4DriverClassName='oracle.jdbc.OracleDriver'
Driver Version: 11.2.0.2.0
Is two database connection possible from java compute node?

Cheers,
Ashish
Back to top
View user's profile Send private message
Gaya3
PostPosted: Wed May 13, 2015 7:09 am Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

whats the broker full version.
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
ashishkpandey
PostPosted: Wed May 13, 2015 7:18 am Post subject: Reply with quote

Newbie

Joined: 13 May 2015
Posts: 5

9.0.0.1-20131122-1731
Back to top
View user's profile Send private message
Gaya3
PostPosted: Wed May 13, 2015 7:23 am Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

there is an old post here - (Jeff your help highly required here )


http://www.mqseries.net/phpBB2/viewtopic.php?t=57337&view=next&sid=d4b73d7a60fe98b5966e1d694f53c766
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
ashishkpandey
PostPosted: Wed May 13, 2015 7:37 am Post subject: Reply with quote

Newbie

Joined: 13 May 2015
Posts: 5

Thanks Gayathri ,

Sorry above error was coming after implementing "Configuring a JDBC type 4 connection for globally coordinated transactions" mentioned in

http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ah61330_.htm?lang=en

Before globally coordinated transactions implementation following error was coming.

<com.ibm.broker.plugin.MbRecoverableException class:com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandlerErrors@768114db method:JDBCType4SinglePhaseTrxnTable::addTrxnBranch source:BIPmsgs key:6268 >
2015-05-12 15:49:38.895 670 at com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandlerErrors.throwException(JDBCType4SinglePhaseTrxnHandlerErrors.java:217)
2015-05-12 15:49:38.895 670 at com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnTable.addTrxnBranch(JDBCType4SinglePhaseTrxnTable.java:539)
-------------
BIP6268E: A connection error has occurred for JDBC provider 'DBWRITERORACLESERVICE'. The broker will attempt to reconnect to the JDBC provider. Exception details:

The JDBC connection to the JDBC provider has ended for the reasons given by the exception details.

Contact your IBM Integration Bus administrator. : Broken Connection found at transaction start for new trxn branch.

Both connections are working fine individually or if used first.
Problem arises at the time of getting second database connection.

Cheers,
Ashish
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 13, 2015 8:37 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17448

The first error indicates BIP 6233, the second indicates 6268.

There isn't otherwise enough information to tell. I'm guessing there are more error messages that haven't been mentioned.

You could do a very simple thing and check if moving the second connection to a second JCN fixes anything. Particularly with Globally Coordinated transactions, it shouldn't be an issue to ensure commits or rollbacks for both.

Otherwise, the usual caveat about making sure that the connection url parameter is actually a pattern and does not include hardcoded values.
Back to top
View user's profile Send private message
ashishkpandey
PostPosted: Thu May 14, 2015 5:42 am Post subject: Reply with quote

Newbie

Joined: 13 May 2015
Posts: 5

Hi mqjeff,
Both connections are working fine separately.

If any connection called second time in same JCN, problem is occurring. I am attaching the full log.

2015-05-14 14:37:41.792 149 <com.ibm.broker.plugin.MbRecoverableException class:com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandlerErrors@adc0cead method:JDBCType4SinglePhaseTrxnTable::addTrxnBranch source:BIPmsgs key:6268 >
2015-05-14 14:37:41.792 149 at com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandlerErrors.throwException(JDBCType4SinglePhaseTrxnHandlerErrors.java:217)
2015-05-14 14:37:41.792 149 at com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnTable.addTrxnBranch(JDBCType4SinglePhaseTrxnTable.java:539)
2015-05-14 14:37:41.793 149 at com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnTable.accessThreadToTransactionTable(JDBCType4SinglePhaseTrxnTable.java:241)
2015-05-14 14:37:41.793 149 at com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:381)
2015-05-14 14:37:41.793 149 at com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:154)
2015-05-14 14:37:41.794 149 at com.ibm.broker.jdbctype4.connfact.JDBCType4ConnectionFactory.getConnection(JDBCType4ConnectionFactory.java:163)
2015-05-14 14:37:41.794 149 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2015-05-14 14:37:41.794 149 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
2015-05-14 14:37:41.795 149 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2015-05-14 14:37:41.795 149 at java.lang.reflect.Method.invoke(Method.java:607)
2015-05-14 14:37:41.795 149 at com.ibm.broker.plugin.MbNode.getJDBCType4Connection(MbNode.java:1564)
2015-05-14 14:37:41.795 149 at com.comp.xxxx.flow.impl.xxxx_ARCHIVE_JavaCompute.getPersistDataConnection(xxxx_ARCHIVE_JavaCompute.java:521)
2015-05-14 14:37:41.796 149 at com.comp.xxxx.flow.impl.xxxx_ARCHIVE_JavaCompute.getUserTablePartitions(xxxx_ARCHIVE_JavaCompute.java:462)
2015-05-14 14:37:41.796 149 at com.comp.xxxx.flow.impl.xxxx_ARCHIVE_JavaCompute.getMainTablePartitions(xxxx_ARCHIVE_JavaCompute.java:282)
2015-05-14 14:37:41.796 149 at com.comp.xxxx.flow.impl.xxxx_ARCHIVE_JavaCompute.evaluate(xxxx_ARCHIVE_JavaCompute.java:57)
2015-05-14 14:37:41.797 149 at com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.evaluate(MbRuntimeJavaComputeNode.java:281)
2015-05-14 14:37:41.797 149 at com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1480)
LX1020_ERR97 : While getting the persist database connection problem occurs an exception is [BIPmsgs:6268]BIP6268E: A connection error has occurred for JDBC provider 'XXXXXORACLESERVICE'. The broker will attempt to reconnect to the JDBC provider. Exception details:

The JDBC connection to the JDBC provider has ended for the reasons given by the exception details.

Contact your IBM Integration Bus administrator. : Broken Connection found at transaction start for new trxn branch.
2015-05-14 14:37:41.966 149 <com.ibm.broker.plugin.MbRecoverableException class:MbService method:getLogMessages source:BIPmsgs key:4376 >
2015-05-14 14:37:41.967 149 at com.ibm.broker.plugin.MbService.getLogMessages(MbService.java:469)
2015-05-14 14:37:41.967 149 at com.ibm.broker.plugin.MbService.log(MbService.java:143)
2015-05-14 14:37:41.967 149 at com.ibm.broker.plugin.MbService.log(MbService.java:294)
2015-05-14 14:37:41.967 149 at com.ibm.broker.plugin.MbService.logError(MbService.java:328)
2015-05-14 14:37:41.968 149 at com.comp.xxxx.flow.impl.xxxx_ARCHIVE_JavaCompute.logErrorGenerateException(xxxx_ARCHIVE_JavaCompute.java:545)
2015-05-14 14:37:41.968 149 at com.comp.xxxx.flow.impl.xxxx_ARCHIVE_JavaCompute.evaluate(xxxx_ARCHIVE_JavaCompute.java:97)
2015-05-14 14:37:41.968 149 at com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.evaluate(MbRuntimeJavaComputeNode.java:281)
2015-05-14 14:37:41.969 149 at com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1480)
Back to top
View user's profile Send private message
Gaya3
PostPosted: Thu May 14, 2015 6:29 am Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

9.0.0.1-20131122-1731 - did you raise any PMR for this?


or will it be good to apply the fix pack and jump to 9.0.0.3 -
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
ashishkpandey
PostPosted: Fri May 15, 2015 4:22 am Post subject: Reply with quote

Newbie

Joined: 13 May 2015
Posts: 5

Tried in 9.0.0.2 also same problem is coming.

Even second connection moved to a second JCN and
From first JCN calling Second JCN in loop. Same problem is coming.
Back to top
View user's profile Send private message
gappodi
PostPosted: Sun Oct 08, 2017 9:51 pm Post subject: Reply with quote

Apprentice

Joined: 05 Sep 2014
Posts: 43

I have a message flow that is a mix of JCNs, Compute nodes and lot other IIB built in nodes. I too see this problem as reported by 'ashishkpandey' intermittently (say 1 out of 10 times). But I observed that it occurs ONLY IF my application runs in multi threaded mode. The application runs smoothly for hours or days with out this problem if run in a single threaded mode.

I was just wondering is there a way where I need to handle some thing in my application in order to avoid this problem from occurring in a multi-threaded mode ?

My Integration bus is v9.0.0.1..

Please provide some help here..

Regards,
Maneesh Sharma
Back to top
View user's profile Send private message
zpat
PostPosted: Sun Oct 08, 2017 11:46 pm Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5577
Location: UK

Don't run versions of IIB that have not been patched in years!
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportTwo Database connection from Java Compute Node
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.