|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JDBCType4Connection |
« View previous topic :: View next topic » |
Author |
Message
|
paustin_ours |
Posted: Fri Mar 14, 2014 11:07 am Post subject: JDBCType4Connection |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
i followed a sample on the infocenter and i have a JCN with the following code
Code: |
Connection conn = getJDBCType4Connection("MYDB", JDBC_TransactionType.MB_TRANSACTION_AUTO); |
it is failing right at that first statement.
Error in stdout
Quote: |
2014-03-14 14:18:42.004 22 <com.ibm.broker.plugin.MbRecoverableException class:com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4DatabaseManager@bf00bf0 method:JDBCDatabaseManager::constructor source:BIPmsgs key:6253 > |
its not very informative
I have the JDBC configurable set up for MYDB
Code: |
mqsicreateconfigurableservice LOCALBROKER -c JDBCProviders -o JDBCOracleDBConnector -n connectionUrlFormat,connectionUrlFormatAttr1,connectionUrlFormatAttr2,connectionUrlFormatAttr3,connectionUrlFormatAttr4,connectionUrlFormatAttr5,databaseName,databaseType,databaseVersion,description,environmentParms,jarsURL,jdbcProviderXASupport,maxConnectionPoolSize,portNumber,securityIdentity,serverName,type4DatasourceClassName,type4DriverClassName -v jdbc:oracle:thin:[user]/[password]@[serverName]:[portNumber]:[connectionUrlFormatAttr1],MYDB,,,,,MYDB,Oracle,11.2,"Oracle DEV",default_none,"C:\temp\jars",false,0,5001,USR@dev72,dev72.hdd.com,oracle.jdbc.xa.client.OracleXADataSource,oracle.jdbc.OracleDriver |
|
|
Back to top |
|
 |
paustin_ours |
Posted: Fri Mar 14, 2014 12:35 pm Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
Quote: |
Error in node: 'Java Compute'. Could not locate JDBC Provider entry ''MYDB'' in the broker registry, which was given for the data source name property for this node.
The node can not establish a connection with a database if the provided JDBC data source definition is not present as an entry in the registry associated with the broker. |
i see the above error in the logs. I do have a JDBC configurable service for MYDB and also ran the mqsisetdbparms for MYDB
Any thoughts? |
|
Back to top |
|
 |
sknrt1 |
Posted: Fri Mar 14, 2014 1:32 pm Post subject: |
|
|
Apprentice
Joined: 22 Jan 2003 Posts: 39 Location: USA
|
Hope, you were able to figure out the error by now, if not.....
Looking at the info given, name of the configurable service defined is not the same as the one being called in the code
mqsicreateconfigurableservice LOCALBROKER -c JDBCProviders -o JDBCOracleDBConnector -n
Connection conn = getJDBCType4Connection("MYDB", JDBC_TransactionType.MB_TRANSACTION_AUTO);
so, make sure, name of the Configurable Service matches with the one being called from getJDBCType4Connection, parameter-1.
here is a (working) sample one with name "ORCL", for a Database (Oracle SID - ORCL), with a security identifier (ORCL_sec) which will be set using
mqsisetdbparams IIBV9 -n jdbc::ORCL_sec -u user -p pwd
C:\>mqsireportproperties IIBV9 -c JDBCProviders -o ORCL -r
JDBCProviders
ORCL
connectionUrlFormat='jdbc:oracle:thin:[user]/[password]@[serverName]:[portNumber]:[connectionUrlFormatAttr1]'
connectionUrlFormatAttr1='ORCL'
connectionUrlFormatAttr2=''
connectionUrlFormatAttr3=''
connectionUrlFormatAttr4=''
connectionUrlFormatAttr5=''
databaseName='default_Database_Name'
databaseSchemaNames='useProvidedSchemaNames'
databaseType='Oracle'
databaseVersion='default_Database_Version'
description='default_Description'
environmentParms='default_none'
jarsURL='C:\Oracle\product\11.2.0\client_1\jdbc\lib'
jdbcProviderXASupport='false'
maxConnectionPoolSize='0'
portNumber='1521'
securityIdentity='ORCL_sec'
serverName='localhost'
type4DatasourceClassName='oracle.jdbc.xa.client.OracleXADataSource'
type4DriverClassName='oracle.jdbc.OracleDriver'
[/u][/b] _________________ ------------------------------------------
sk
MQ User since 2001
Message Broker User since 2001
IBM Certified
Solution Designer - WebSphere MQ
Solution Developer - Message Broker |
|
Back to top |
|
 |
paustin_ours |
Posted: Fri Mar 14, 2014 2:52 pm Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
Sry but i dont see what i have wrong. The code is calling MYDB and the parameter is MYDB as well. It is the same as your example right? |
|
Back to top |
|
 |
paustin_ours |
Posted: Sat Mar 15, 2014 4:59 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
Oh jeez. Thanks. I see what you mean. |
|
Back to top |
|
 |
Michael Dag |
Posted: Mon Mar 17, 2014 12:12 pm Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
paustin_ours wrote: |
Oh jeez. Thanks. I see what you mean. |
i may be blind for the obvious as well, so would you mind sharing your "Oh jeez" insight and show the error that you fixed to make it work? Thanks _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
paustin_ours |
Posted: Mon Mar 17, 2014 12:40 pm Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
mqsicreateconfigurableservice LOCALBROKER -c JDBCProviders -o JDBCOracleDBConnector -n
i changed the JDBCOracleDBConnector to "MYDB" and it worked. i figured thats what i had wrong. |
|
Back to top |
|
 |
Michael Dag |
Posted: Mon Mar 17, 2014 1:19 pm Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|