Author |
Message
|
wisemind |
Posted: Mon Jun 21, 2010 5:46 am Post subject: error connecting DB2 JDBC provider with Message Broker 7 |
|
|
Apprentice
Joined: 16 Jun 2010 Posts: 29
|
Hii,
I am getting problem while configuring JDBC provider for DB2. I am currently using DB2 v 8.1.7.445 and Message Broker Toolkit V 7.
All commands related to mqsicreateconfigurableservice, mqsireportproperties and mqsichangeproperties works fine in Command Console. But getting error in Java Component while connecting to JDBC.
Here is my jova code:
Connection conn=this.getJDBCType4Connection("SIMPLERROUTEDB", JDBC_TransactionType.MB_TRANSACTION_AUTO);
Statement st=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet rs = st.executeQuery("SELECT NAME FROM MyUser.CUSTOMER");
while(rs.next()){
String s= rs.getString("NAME");
System.out.println("Data from Customer Table: " + s);
}
This is the exception that i am getting in console:
<com.ibm.broker.plugin.MbRecoverableException class:MbNode method:getJDBCType4Connection source:BIPmsgs key:6233 >
at com.ibm.broker.plugin.MbNode.getJDBCType4Connection(MbNode.java:1527)
at TotalPurchaseOrderFlow_JavaCompute.evaluate(TotalPurchaseOrderFlow_JavaCompute.java:21)
at com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.evaluate(MbRuntimeJavaComputeNode.java:233)
at com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1434) |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 21, 2010 6:07 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You shouldn't be looking at the console, you should be looking at the syslog or the user trace.
BIP6233 has some inserts that are missing from the information you have posted, that would actully tell you why there was a problem establishing a connection to the given database URL. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 21, 2010 6:09 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Also, one the most common errors out there with JDBC connections occurs when people make changes to the ConnectionUrlFormat property.
LEAVE THIS ALONE. DO NOT PUT SPECIFIC VALUES IN IT. |
|
Back to top |
|
 |
wisemind |
Posted: Mon Jun 21, 2010 11:58 am Post subject: |
|
|
Apprentice
Joined: 16 Jun 2010 Posts: 29
|
Its giving error on the following java code line.
Connection conn=this.getJDBCType4Connection("SIMPLERROUTEDB", JDBC_TransactionType.MB_TRANSACTION_AUTO);
specifically to getJDBCType4Connection method. How to view syslog or the user trace. Actually i have enabled System.out statement for logging. Well All Commands in Command Console working fine and were successful.
Thanks |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 21, 2010 12:05 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
|