|   | 
	 
  
    | 
RSS Feed - WebSphere MQ Support
 | 
RSS Feed - Message Broker Support
 |   
 
  
	     | 
	 | 
   
 
  
	|  Error in Java Compute Node While Connecting to JDBC | 
	« View previous topic :: View next topic »  | 
   
  
  	
	  
		
		
		  | Author | 
		  Message
		 |  
		
		  | PullMeOut | 
		  
		    
			  
				 Posted: Mon Aug 30, 2010 5:24 am    Post subject: Error in Java Compute Node While Connecting to JDBC | 
				     | 
			   
			 
		   | 
		 
		
		   Novice
 
 Joined: 03 Apr 2007 Posts: 11 Location: India 
  | 
		  
		    
			  
				Hello All,
 
 
              i am having issues while connecting to oracle uisng java comput node ( uisng jdbc drivers)
 
 
        This is my code 
 
 
import com.ibm.broker.javacompute.MbJavaComputeNode;
 
import java.sql.*; 
 
import com.ibm.broker.plugin.*; 
 
 
 public class HRM_PrepareClarityXOG_MF_JavaCompute extends MbJavaComputeNode {
 
	
 
 
       	   	
 
			    public void evaluate(MbMessageAssembly contact admin) throws MbException {
 
			      MbOutputTerminal out = getOutputTerminal("out");
 
			      MbMessage inMessage = contact admin.getMessage();
 
 
			      // create new message
 
			      MbMessage outMessage = new MbMessage(inMessage);
 
			      MbMessageAssembly outAssembly = new MbMessageAssembly(contact admin,outMessage);
 
 
			      try {
 
			        // Obtain a java.sql.Connection using a JDBC Type4 datasource 
 
			         
 
			        Connection conn = getJDBCType4Connection("Oracle",
 
			                     JDBC_TransactionType.MB_TRANSACTION_AUTO);
 
 
			        // Example of using the Connection to create a java.sql.Statement  
 
			        Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
 
			                     ResultSet.CONCUR_READ_ONLY);
 
			        ResultSet srs0 = stmt.executeQuery("SELECT * FROM Database.SYSADM.PS_E_EMPL_EIL_VW AS PS WHERE PS.DIV = 'KA01'");    
 
              
 
			        
 
 
 
			      } catch (SQLException sqx ){
 
			        sqx.printStackTrace();
 
			      } finally {
 
			        // clear the outMessage
 
			        outMessage.clearMessage();
 
			      }     
 
 
			    }  
 
	   
 
	}
 
 
 
MY Configuration Properties are :
 
 
this is the list of values used in Oracle  connection : 
 
C:\Program Files\IBM\MQSI\6.1\bin>mqsireportproperties WBRK61_DEFAULT_QUEUE_MANAGER -c JDBCProviders 
 
-o oracle -r 
 
 
JDBCProviders 
 
Oracle 
 
connectionUrlFormat='jdbc:oracle:thin:[username]/[password]@[serverName]:[portNumber]:[:[connectionUrlFormatAttr1]' 
 
 
connectionUrlFormatAttr1='HRZ8' 
 
connectionUrlFormatAttr2='' 
 
connectionUrlFormatAttr3='' 
 
connectionUrlFormatAttr4='' 
 
connectionUrlFormatAttr5='' 
 
databaseName='SETURISG' 
 
databaseType='Oracle' 
 
databaseVersion='10.2.0.4.0' 
 
description='default_Description' 
 
jarsURL='C:\oracle\product\10.2.0\cl\jdbc\lib'
 
portNumber='1521' 
 
securityIdentity='Ora_HRZ8' 
 
serverName='tstdbr2'
 
type4DatasourceClassName='oracle.jdbc.xa.client.OracleXADataSource' 
 
type4DriverClassName='oracle.jdbc.OracleDriver'
 
 
 
Exception :
 
 
 
ExceptionList
 
	RecoverableException
 
			File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbDataFlowNode.cpp
 
			Line:INTEGER:957
 
			Function:CHARACTER:ImbDataFlowNode::createExceptionList
 
			Type:CHARACTER:ComIbmMQInputNode
 
			Name:CHARACTER:HRM_PrepareClarityXOG_MF#FCMComposite_1_1
 
			Label:CHARACTER:HRM_PrepareClarityXOG_MF.MQInput
 
			Catalog:CHARACTER:BIPv610
 
			Severity:INTEGER:3
 
			Number:INTEGER:2230
 
			Text:CHARACTER:Node throwing exception
 
			RecoverableException
 
					File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\PluginInterface\ImbJniNode.cpp
 
					Line:INTEGER:1028
 
					Function:CHARACTER:ImbJniNode::evaluate
 
					Type:CHARACTER:ComIbmJavaComputeNode
 
					Name:CHARACTER:HRM_PrepareClarityXOG_MF#FCMComposite_1_12
 
					Label:CHARACTER:HRM_PrepareClarityXOG_MF.JavaCompute
 
					Catalog:CHARACTER:BIPv610
 
					Severity:INTEGER:3
 
					Number:INTEGER:2230
 
					Text:CHARACTER:Caught exception and rethrowing
 
					RecoverableException
 
							File:CHARACTER:MbNode.java
 
							Line:INTEGER:1569
 
							Function:CHARACTER:getJDBCType4Connection
 
							Type:CHARACTER:
 
							Name:CHARACTER:
 
							Label:CHARACTER:
 
							Catalog:CHARACTER:BIPv610
 
							Severity:INTEGER:3
 
							Number:INTEGER:6233
 
							Text:CHARACTER:Failed to obtain JDBC Connection
 
							Insert
 
									Type:INTEGER:5
 
									Text:CHARACTER:JavaCompute
 
							Insert
 
									Type:INTEGER:5
 
									Text:CHARACTER:Oracle
 
							Insert
 
									Type:INTEGER:5
 
									Text:CHARACTER:java.lang.reflect.InvocationTargetException
 
							Insert
 
									Type:INTEGER:5
 
									Text:CHARACTER:No Details
 
 
 
It would be a great help if someone Could help me in solveing the issue.
 
 
Thanks
 
Raju | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Mon Aug 30, 2010 5:53 am    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				This much doesn't look correct. 
   
	| Quote: | 
   
  
	| connectionUrlFormat='jdbc:oracle:thin:[username]/[password]@[serverName]:[portNumber]:[:[connectionUrlFormatAttr1]'  | 
   
 
 
There appears to be an extra [ in there.
 
 
Maybe this is a copy/paste error from making your post, but if not it's likely the cause of the issue. | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | PullMeOut | 
		  
		    
			  
				 Posted: Mon Aug 30, 2010 6:35 am    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Novice
 
 Joined: 03 Apr 2007 Posts: 11 Location: India 
  | 
		  
		    
			  
				Hi Jeff
 
 
          I change my properties to 
 
 
 
C:\Program Files\IBM\MQSI\6.1\bin>mqsireportproperties WBRK61_DEFAULT_QUEUE_MANAGER -c JDBCProviders 
 
-o OraConnect -r 
 
 
JDBCProviders 
 
OraConnect
 
connectionUrlFormat='jdbc:oracle:thin:EIL_USER/id0ntcare@tstdbr2:1521:HRZ8'
 
connectionUrlFormatAttr1='HRZ8' 
 
connectionUrlFormatAttr2='' 
 
connectionUrlFormatAttr3='' 
 
connectionUrlFormatAttr4='' 
 
connectionUrlFormatAttr5='' 
 
databaseName='HRZ8' 
 
databaseType='Oracle' 
 
databaseVersion='10.2.0.4.0' 
 
description='default_Description' 
 
jarsURL='C:\oracle\product\10.2.0\cl\jdbc\lib' 
 
portNumber='1521' 
 
securityIdentity='Ora_HRZ8' 
 
serverName='tstdbr2' 
 
type4DatasourceClassName='oracle.jdbc.xa.client.OracleXADataSource' 
 
type4DriverClassName='oracle.jdbc.OracleDriver' 
 
 
 
still the same issue . | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Mon Aug 30, 2010 6:42 am    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				I didn't say to do that.
 
 
I said you had a typo in your connectionURLFormat.
 
 
Restore the connectionURLFormat to the exact text, including all of the bracketed words AS IS, as listed for an Oracle DSN in the InfoCenter. | 
			   
			 
		   | 
		 
		
		  | 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
  | 
  		 
	   
	 | 
   
 
  	 | 
	  |