JDBC Driver OCI

Hello,

I am working on IS 6.0.1 on SP3. The JDBC adapter version is 6.0.3.I have set up IS and JDBC locally and am trying to access DB (ORACLE 9i).The entire system is on VPN .

I am trying to access DB using OCI driver and I am getting this error

[ART.118.5042] Adapter Runtime (Connection): Unable to enable connection resource Test:TestDBConnection.
[ART.118.5036] Adapter Runtime (Connection): Unable to configure connection manager.
[ADA.1.204] Cannot connect to the database with DataSource class “oracle.jdbc.pool.OracleDataSource”.
Invalid Oracle URL specified: OracleDataSource.makeURL

If I change the driverType=thin , the connection goes through without any error.

I have placed the classes12.zip in the IS/lib/jars folder as well as in \IntegrationServer\packages\WmJDBCAdapter\code\jars\static too.

I went through the advantage sit too and some solution lists the possibility of trailing spaces in the parameters.I have checked that too.

Any solution would be most helpful.

Thanks in advance
Rajeeve

Rajeeve,

Can you give the actual parameters you defined .

Connection Type JDBC Adapter Connection
Package Name Default
Connection Properties
Transaction Type NO_TRANSACTION
DataSource Class oracle.jdbc.pool.OracleDataSource
serverName testServer
user username
password password
databaseName testDB
portNumber 1521
networkProtocol tcp
Other Properties driverType=oci
Connection Management Properties
Enable Connection Pooling true
Minimum Pool Size 1
Maximum Pool Size 10
Pool Increment Size 1
Block Timeout (msec) 1000
Expire Timeout (msec) 1000

These are the parameters…

Thanks.

Rajeeve,
The oracle oci driver requires the use of the oracle client as well. Do you have it installed on the system with the IS server? There are some libraries that must be present that the Oracle client provides, as well as some path settings you must set. The classes12.zip is just the actual driver which is okay if your are going type 4 but since you are using OCI, you must have the client as well.

P.S. Don’t put your connections in the default package.

markg
http://darth.homelinux.net

Mark u mentioned not to put the connection in default package cuz i just created my jdbc adapter in default package and default folder, is there any drawback of that.
Plz let me know.
Thanks.

Hi Taz,
I believe it’s generally a best practice to leave the default package unused. I would create a Common Database Services package and place all of my connections there.

You could run into issues with naming conventions/conflicts, separate project specific stuff, and possibly even upgrade issues. I think it best to define your own packages so you can better maintain: security, source control, and naming separation.

My two cents, others may chime in with their thoughts on using the default package.

markg
http://darth.homelinux.net

Thanks for the update Mark

I have one more question when u install Trading Network server, you have to create some tables in the Database u r using for the jdbc pool.
and to create those tables you have to run some query or script right?

where can i get that script?

and one more thing when i was installing TN server it didn’t ask me create the jdbc pool during installation instead it gave some errors.

Thanks in advance.

TN_6.1_oracle.sql
create_idr_6-1_Oracle.sql (1.2 k)

Hi Taz ,
The scripts can be found on the following loc :
webmethods6\common\db\script\create

just run it with TOAD, it will create tables for you.
Hope the attachment works…

Leon

Thanks Mark for the update.

I do have Oracle Client installed in the machine where IS is running.As for the path Mark,

c:\appl\oracle\ora81\bin;C:\Program Files\Oracle\jre\1.1.7\bin.

This is the path that I got from the Environment Variable. Does something else needs to be added to this PATH variable?And if so what else needs to be added?

Thanks in advance,
Rajeeve.

Just an addition.I am running this in XP environment.

-rajeeve

Rajeeve,
Looks like you are missing, $ORACLE_HOME/lib32 and $ORACLE_HOME/jdbc/lib. Those are both LIB paths to set. In addition, I would add $ORACLE_HOME/lib32 to the regular path. These paths represent the libraries that OCI driver uses.

markg
http://darth.homelinux.net

Mark,

My calss path variable reads as follows

C:\appl\oracle\ora81\lib;C:\appl\oracle\ora81\jdbc\lib;C:\appl\oracle\ora81\jdbc\lib\classes12.zip;C:\appl\oracle\ora81\oci\lib;

Also $ORACLE_HOME/lib32 I guess has do do with UNIX.I did not find lib32 folder in Oracle for windows.

But still the error remains the same.

-Rajeeve

Rajeeve,

  What platform are you and your OCI client working on ?  

Leon

Finally it did work. Some strange environment path problems.I did add the path in the server.bat file and it went in fine.

Thanks a lot for your help.

-Rajeeve

Rajeev could you please tell us what did you do to solve that problem cuz i m having the same problem i.e when i put other properties to thin it works fine but when i put oci it gives me the same error which you were having.
Cannot connect to the database with DataSource class "oracle.jdbc.pool.OracleDataSource

Any help will be appreciated.

There are three critical steps to getting the JDBC Adapter (6.0.3) to work with Oracle RAC with Transparent Application Failover (TAF) using the OCI dirvers:

  • Install the Oracle client on the IS server and install a copy of tnsnames.ora in its /network/admin folder. Use the Oracle-provided tnsping utlity to verify that the Oracle client can reach the service name for the RAC instance.
  • You must define an environment variable to point to the OCI drivers library files. This varies by operating system. See page 57 in the JDBC Adapter User’s Guide for details
  • You must provide an additional property in the “Other Properties” area of the JDBC Adapter Connection to point to the entry in the Oracle TNSNames.ora file

[INDENT]

[/INDENT][INDENT]Where RAC_Service_Name is the service name defined in tnsnames.ora for the RAC instance. For example, the RAC_Service_Name would be “abc” in the following tnsnames entry:

[/INDENT]See this article in the Advantage Knowledge Base for additional details.

Mark