Hi team,
I am trying to connect to postreSQL V12 db by placing postgresql-42.7.4.jar in /var/mqsi/shared-classes and I am using JDBC policy file.
<?xml version="1.0" encoding="UTF-8"?>
<policies>
<policy policyType="JDBCProviders" policyName="policy" policyTemplate="DB2_91_Linux">
<databaseName>DB name</databaseName>
<databaseType>PostgreSQL</databaseType>
<databaseVersion></databaseVersion>
<type4DriverClassName>org.postgresql.Driver</type4DriverClassName>
<type4DatasourceClassName>org.postgresql.ds.PGSimpleDataSource</type4DatasourceClassName>
<connectionUrlFormat>jdbc:postgresql://[user]:[password]@[serverName]:[portNumber]/[databaseName]</connectionUrlFormat>
<connectionUrlFormatAttr1></connectionUrlFormatAttr1>
<connectionUrlFormatAttr2></connectionUrlFormatAttr2>
<connectionUrlFormatAttr3></connectionUrlFormatAttr3>
<connectionUrlFormatAttr4></connectionUrlFormatAttr4>
<connectionUrlFormatAttr5></connectionUrlFormatAttr5>
<serverName>us6sdlx00113.corpnet2.com</serverName>
<portNumber>5432</portNumber>
<jarsURL></jarsURL>
<databaseSchemaNames></databaseSchemaNames>
<description>CERPS_CARS_Informal_database</description>
<maxConnectionPoolSize>0</maxConnectionPoolSize>
<securityIdentity>us6devflex01</securityIdentity>
<environmentParms></environmentParms>
<jdbcProviderXASupport>false</jdbcProviderXASupport>
<useDeployedJars></useDeployedJars>
</policy>
</policies>
and I am getting as
UserTrace BIP4360I: Java node information: [com.gsk.mwi.gia.dbreceiver.GIADBReceiverMessageCatalog:10125]Could not locate message with key [10125] in resourceBundle[com.gsk.mwi.gia.dbreceiver.GIADBReceiverMessageCatalog] inserts("us6devflex01","Broker was unable to create JDBC Connection : jdbcConfigService = us6devflex01
, Reason = [BIPmsgs:6233]BIP6233E: An error occurred in node: Broker 'ADC1B04'; Execution Group 'NapCerpsGIAIntSvr_01'; Message Flow 'com.gsk.mwi.gia.dbreceiver.GIADBReceiver_v1_0'; Node 'Create_DBRecord'; Node Type 'GIADBReceiver There was a problem establishing a connection to the given database URL: jdbc:postgresql://carsdtp:xxxxxxxx@us6sdlx00113.corpnet2.com:5432/us6devflex01 Exception details: error message: The connection attempt failed., SQLState value: 08001, stack trace: [org.postgresql.Driver$ConnectThread.getResult(Driver.java:397)
org.postgresql.Driver.connect(Driver.java:305)
java.sql.DriverManager.getConnection(DriverManager.java:675)
java.sql.DriverManager.getConnection(DriverManager.java:258)
org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:104)
org.postgresql.xa.PGXADataSource.getXAConnection(PGXADataSource.java:52)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.createXAConnection(JDBCType4Connection.java:248)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.getT4NodeConnection(JDBCType4Connection.java:1215)
com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:279)
com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:150)
com.ibm.broker.jdbctype4.connfact.JDBCType4ConnectionFactory.getConnection(JDBCType4ConnectionFactory.java:146)
sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
java.lang.reflect.Method.invoke(Method.java:508)
com.ibm.broker.plugin.MbNode.getJDBCType4Connection(MbNode.java:2245)
com.gsk.mwi.gia.dbreceiver.AbstractGIADBReceiverJCN.getJDBCConnection(AbstractGIADBReceiverJCN.java:194)
com.gsk.mwi.gia.dbreceiver.AbstractGIADBReceiverJCN.reconnect(AbstractGIADBReceiverJCN.java:214)
com.gsk.mwi.gia.dbreceiver.GIADBReceiver.createDBRecord(GIADBReceiver.java:143)
com.gsk.mwi.gia.dbreceiver.GIADBReceiver.evaluate(GIADBReceiver.java:68)
com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.evaluate(MbRuntimeJavaComputeNode.java:809)
com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:2138)]
The node was unable to establish a connection to the given database URL.
can you please help me.
Thanks and Regards
Rajyalakshmi
------------------------------
Rajyalakshmi Sareddy
------------------------------