JDBC Adapter Informix

I am trying to create a jdbc adapter connection to an Informix database and am getting the following error when trying to enable the connection:

[ART.118.5042] Adapter Runtime (Connection): Unable to enable connection resource TrainingBJH:testIfxJDBC.
[ART.118.5036] Adapter Runtime (Connection): Unable to configure connection manager.
[ADA.1.204] Cannot connect to the database with DataSource class “com.informix.jdbcx.IfxDataSource”.
System or internal error javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.naming.java.javaURLContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.naming.java.javaURLContextFactory.class not found]

I am running Integration Server 6.0.1 on a Unix HP 11 environment, JDBC Adapter 6.0.3, trying to connect to an Informix version 9.3.0 HC4 database.

My connection properties are as follows:

Transaction Type LOCAL_TRANSACTION
DataSource Class com.informix.jdbcx.IfxDataSource
serverName servername
user user
password ******
databaseName databasename
portNumber 1541
networkProtocol
Other Properties ifxIFXHOST=hostname

Thanks in advance for any assistance.

Brad

Brad,

Please bare with me and do this testing,

Initially copy the ifxjdbc.jar in IntegrationServer/lib/jars and also under WmJDBCAdapter\code\jars\static folder and restart the IS.

Try with these settings:

Transaction Type : LOCAL_TRANSACTION
DataSource Class : com.informix.jdbc.IfxDriver
serverName:use server physical name or IPAddress
user : userName
password :*********
databaseName : databaseName
portNumber : 1541
networkProtocol: TCP (you can try removing this param also)
Other Properties : driverType=oci

Finally try to enabling the connection.let c how it works.

HTH,
RMG

Also ensure that the driver jars are in the server classpath.

I tried using the settings from your post, but am now getting the following message:

Error encountered
[ART.118.5042] Adapter Runtime (Connection): Unable to enable connection resource TrainingBJH:testIfxJDBC.
[ART.118.5036] Adapter Runtime (Connection): Unable to configure connection manager.
com.informix.jdbc.IfxDriver

I think for the Informix version I am using (2.21 type 4), I need to use the source class com.informix.jdbcx.ifxdatasource.

I do have the informix jar files in both IS/lib/jars and in IS/packages/WmJDBCAdapter/code/jars/static. One problem might be that I have all the jars that are in the install folder from the driver installation, and maybe there is some conflict there. I notice that the only jar file that contains reference to Apache (see error above) are in xerces.jar (which I am removing to try).

OK, I am making progress, I think. I now have the correct driver jar files in both locations (I did not have the jdbcx jar file in the IS/lib/jars file previously). The adapter appears to be working, as I get errors if I have the wrong user id and password or if I put in the wrong server name. However, when I have everything correct, I get the following very useful error message:

Error encountered
[ART.118.5042] Adapter Runtime (Connection): Unable to enable connection resource TrainingBJH:testIfxJDBC.
[ART.118.5036] Adapter Runtime (Connection): Unable to configure connection manager.
null

Any ideas?

Brad,

This error indicates still the Adapter connection is not able to connect Informix DB.

Specify the IPAddress in the ServerName param instead of physical serverName.

Thanks,

RMG,

I am using a 6.1 IS, and I tried connecting to an Informix 7.24 DB with the settings specified in the WmJDBCAdapter document, but I get the following error message:

Cannot connect to the database with DataSource class “com.informix.jdbcx.IfxDataSource”.
com.informix.asf.IfxASFException: Attempt to connect to database server (bnsndv05) failed.

My settings are as follows:

Transaction Type: LOCAL_TRANSACTION
DataSource Class: com.informix.jdbcx.IfxDataSource
serverName: bnsndv05 (Also tried using the IP address)
user: ifxuser
password: ******
databaseName: bill02
portNumber: 10365
networkProtocol: (Tried TCP, but it didn’t help)
Other Properties: IfxIFXHOST=bnsndv05

Some of the other things I tried -
Changed the server name to the IP address, added driverType=oci in the “Other properties” field, toggled between jvm 1.3 and 1.4.

I have tried using JDBC3.0 as well as JDBC2.2(JC4)drivers.

There are a few enterprise adapters that are able to successfully connect to the same DB. Also, the WmDB package is able to connect to this DB. It is just the WmJDBC in 6.1 IS that is unable to do so. So it doesn’t seem to be a problem with the drivers.

Any suggestions?

RMG,

I am using a 6.1 IS, and I tried connecting to an Informix 7.24 DB with the settings specified in the WmJDBCAdapter document, but I get the following error message:

Cannot connect to the database with DataSource class “com.informix.jdbcx.IfxDataSource”.
com.informix.asf.IfxASFException: Attempt to connect to database server (bnsndv05) failed.

My settings are as follows:

Transaction Type: LOCAL_TRANSACTION
DataSource Class: com.informix.jdbcx.IfxDataSource
serverName: bnsndv05 (Also tried using the IP address)
user: ifxuser
password: ******
databaseName: bill02
portNumber: 10365
networkProtocol: (Tried TCP, but it didn’t help)
Other Properties: IfxIFXHOST=bnsndv05

Some of the other things I tried -
Changed the server name to the IP address, added driverType=oci in the “Other properties” field, toggled between jvm 1.3 and 1.4.

I have tried using JDBC3.0 as well as JDBC2.2(JC4)drivers.

There are a few enterprise adapters that are able to successfully connect to the same DB. Also, the WmDB package is able to connect to this DB. It is just the WmJDBC in 6.1 IS that is unable to do so. So it doesn’t seem to be a problem with the drivers.

Any suggestions?

Transaction Type LOCAL_TRANSACTION
DataSource Class com.informix.jdbcx.IfxDataSource
serverName
user
password
databaseName
portNumber
networkProtocol
Other Properties IfxIFXHOST=<physical machine name/ip>

This worked for me.