| Author | 
		  Message
		 | 
		
		  | Mickie1127 | 
		  
		    
			  
				 Posted: Thu Aug 08, 2013 3:51 am    Post subject: JDBC connection to DB2 database | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 08 Aug 2013 Posts: 4
  
  | 
		  
		    
			  
				Hi All,
 
 
I am new to message broker and trying to connect to DB2 database through JDBC connection.
 
 
I created configurable service also for that:
 
JDBCProviders
 
  XYZ
 
    connectionUrlFormat='jdbc:db2://[serverName]:[portNumber]/[databaseName]:use
 
r=[user];password=[password];'
 
    connectionUrlFormatAttr1=''
 
    connectionUrlFormatAttr2=''
 
    connectionUrlFormatAttr3=''
 
    connectionUrlFormatAttr4=''
 
    connectionUrlFormatAttr5=''
 
    databaseName='10.XX.XXX.XX'
 
    databaseSchemaNames='useProvidedSchemaNames'
 
    databaseType='default_Database_Type'
 
    databaseVersion='default_Database_Version'
 
    description='default Database'
 
    environmentParms='default_none'
 
    jarsURL='C:\Program Files (x86)\IBM\IMShared\plugins\com.ibm.datatools.db2_2
 
.1.110.v20121008_1514\driver'
 
    jdbcProviderXASupport='jdbcProviderXASupport'
 
    maxConnectionPoolSize='0'
 
    portNumber='50000'
 
    securityIdentity='mySecurityIdentity'
 
    serverName='10.XX.XXX.XX'
 
    type4DatasourceClassName='com.ibm.db2.jcc.DB2DataSource'
 
    type4DriverClassName='com.ibm.db2.jcc.DB2Driver'
 
 
and while using the mapping node in my flow i am getting the below issue:
 
ExceptionList
 
	RecoverableException
 
			File:CHARACTER:F:\build\slot1\S000_P\src\DataFlowEngine\MessageServices\ImbDataFlowNode.cpp
 
			Line:INTEGER:1153
 
			Function:CHARACTER:ImbDataFlowNode::createExceptionList
 
			Type:CHARACTER:ComIbmMQInputNode
 
			Name:CHARACTER:TestMsgFlow#FCMComposite_1_11
 
			Label:CHARACTER:TestMsgFlow.MQ Input
 
			Catalog:CHARACTER:BIPmsgs
 
			Severity:INTEGER:3
 
			Number:INTEGER:2230
 
			Text:CHARACTER:Node throwing exception
 
			RecoverableException
 
					File:CHARACTER:F:\build\slot1\S000_P\src\DataFlowEngine\PluginInterface\ImbJniNode.cpp
 
					Line:INTEGER:1304
 
					Function:CHARACTER:ImbJniNode::evaluate
 
					Type:CHARACTER:ComIbmMSLMappingNode
 
					Name:CHARACTER:TestMsgFlow#FCMComposite_1_5
 
					Label:CHARACTER:TestMsgFlow.Mapping
 
					Catalog:CHARACTER:BIPmsgs
 
					Severity:INTEGER:3
 
					Number:INTEGER:2230
 
					Text:CHARACTER:Caught exception and rethrowing
 
					RecoverableException
 
							File:CHARACTER:MbErrorHandler.java
 
							Line:INTEGER:154
 
							Function:CHARACTER:evaluate
 
							Type:CHARACTER:
 
							Name:CHARACTER:
 
							Label:CHARACTER:
 
							Catalog:CHARACTER:BIPmsgs
 
							Severity:INTEGER:3
 
							Number:INTEGER:3947
 
							Text:CHARACTER:Caught BrokerXCIDynamicException
 
							Insert
 
									Type:INTEGER:5
 
									Text:CHARACTER:{default}:TestMsgFlow_Mapping
 
							Insert
 
									Type:INTEGER:5
 
									Text:CHARACTER:Static namespace declarations: let $dbselect := jdbc:select('10.XX.XXX.XX', 'select EWMSDEV.ESB_TEMP.EMP_ID, EWMSDEV.ESB_TEMP.EMP_NM, EWMSDEV.ESB_TEMP.AGE from EWMSDEV.ESB_TEMP where 1=1', (), xs:int('0'), false(),'', xs:int('0') )
 
							RecoverableException
 
									File:CHARACTER:MbErrorHandler.java
 
									Line:INTEGER:281
 
									Function:CHARACTER:throwableToMbException
 
									Type:CHARACTER:
 
									Name:CHARACTER:
 
									Label:CHARACTER:
 
									Catalog:CHARACTER:BIPmsgs
 
									Severity:INTEGER:3
 
									Number:INTEGER:3949
 
									Text:CHARACTER:Caught BrokerXCIDynamicException
 
									Insert
 
											Type:INTEGER:5
 
											Text:CHARACTER:com.ibm.broker.xci.BrokerXCIException: <com.ibm.broker.plugin.MbRecoverableException class:com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4DatabaseManager@9eacdc1f method:JDBCDatabaseManager::constructor source:BIPmsgs key:6253 >
 
<com.ibm.broker.plugin.MbRecoverableException class:com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4DatabaseManager@9eacdc1f method:JDBCDatabaseManager::constructor source:BIPmsgs key:6253 >
 
 
									RecoverableException
 
											File:CHARACTER:JDBCCommon.java
 
											Line:INTEGER:535
 
											Function:CHARACTER:JDBCDatabaseManager::constructor
 
											Type:CHARACTER:
 
											Name:CHARACTER:
 
											Label:CHARACTER:
 
											Catalog:CHARACTER:BIPmsgs
 
											Severity:INTEGER:3
 
											Number:INTEGER:6253
 
											Text:CHARACTER:Unable to locate details for JDBCProvider registry entry: 10.XX.XXX.XX, in JDBCDatabaseManager constructor
 
											Insert
 
													Type:INTEGER:5
 
													Text:CHARACTER:Broker 'TestBroker'; Execution Group 'TestEg'; Message Flow 'TestMsgFlow'; Node 'Mapping'; Node Type 'Mapping
 
											Insert
 
													Type:INTEGER:5
 
													Text:CHARACTER:10.XX.XXX.XX
 
 
Can anybody guide me to resolve this issue? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | marko.pitkanen | 
		  
		    
			  
				 Posted: Thu Aug 08, 2013 4:12 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Chevalier
 
 Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	| databaseName='10.XX.XXX.XX'  | 
   
 
 
I wonder is this real name for the database?
 
 
--
 
Marko | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Mickie1127 | 
		  
		    
			  
				 Posted: Thu Aug 08, 2013 4:21 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 08 Aug 2013 Posts: 4
  
  | 
		  
		    
			  
				| Yeah as i connect through the data source in toolkit i am seeing the same name. Should i try using some other database? or is there any problem with my configurable service? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | marko.pitkanen | 
		  
		    
			  
				 Posted: Thu Aug 08, 2013 5:17 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Chevalier
 
 Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland 
  | 
		  
		    
			  
				Have you configured he security id correctly with mqsisetdbparms?
  Last edited by marko.pitkanen on Thu Aug 08, 2013 12:41 pm; edited 1 time in total | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Mickie1127 | 
		  
		    
			  
				 Posted: Thu Aug 08, 2013 5:51 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 08 Aug 2013 Posts: 4
  
  | 
		  
		    
			  
				yeah i have done that using following commands:
 
 
mqsisetdbparms TestBroker -n jdbc::mySecurityIdentity -u ABCDE -p password
 
mqsichangeproperties TestBroker -c JDBCProviders -o XXX -n securityIdentity -v mySecurityIdentity | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Thu Aug 08, 2013 7:02 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				You've managed to avoid the usual first mistake with JDBCProviders, where you attempt to update the connectionURLFormat to include real values.
 
 
I guarantee that your database name is NOT actually an IPv4 address.  I guarantee that it's a character string.
 
 
I don't believe that DB2 lets you create a database name with periods in it, and even if it did, I believe that all DBAs would shoot themselves in the head before letting anyone do this to their DMBSes.
 
 
The error in particular seems to be saying that you're trying to use the databaseName on your node properties, or in the message flow code otherwise, instead of using the name of the JDBCProvider configurable service.
 
 
DO NOT USE AN IP ADDRESS AS THE NAME OF A CONFIGURABLE SERVICE.  You will make an internet's worth of kittens sad if you do this, and generations of broker admins following you will curse your name unto the tenth generation.
 
 
Again, there are three names you are dealing with here. - the name of the jdbcprovider configurable service
 - the hostname of the system containing the db2 instance
 - the name of the database within the db2 instance
  
 
 
You really shouldn't be using an IPV4 address for any of these, you should really be using logical names, like a real hostname. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Mickie1127 | 
		  
		    
			  
				 Posted: Mon Aug 12, 2013 9:33 pm    Post subject: DB2 Error | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 08 Aug 2013 Posts: 4
  
  | 
		  
		    
			  
				I forget to mention that the DB2 is on AS400 iSeries server.. So i can't determine the database name. 
 
Somehow i am able to connect to the database( using JCN) but my problem remains the same with mapping node. 
 
In mapping node when i try to do the select query it opens up a window for adding database. And when i add the details its showing me the host address as my database. and hence i am getting the same error. 
 
Currently i am using MB7 version. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | muthu_tek | 
		  
		    
			  
				 Posted: Thu Oct 03, 2013 3:22 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 21 Jan 2010 Posts: 36 Location: Coimbatore,India 
  | 
		  
		    
			  
				Hi,
 
 
   
	| Quote: | 
   
  
	| type4DatasourceClassName='com.ibm.db2.jcc.DB2DataSource'  | 
   
 
 
You have to change XA DataSource Name in type4DatasourceClassName
 
 
Try as below:
 
 
type4DatasourceClassName='com.ibm.db2.jcc.DB2XADataSource' 
 
 
 
Thanks,
 
   _________________ Thanks and Yours,
 
 
Marimuthu Udayakumar | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |