Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Configuring multiple drivers

0 views
Skip to first unread message

Ajay Kerwell

unread,
Jul 7, 2003, 1:26:06 PM7/7/03
to

Hi,

I was wondering how to configure multiple types of drivers for different databases
- one for Oracle, one for MSSQL and one for Pointbase. Our application needs data
from all these databases and the Weblogic server needs to have all these drivers
in the classpath.

However when configuring the server with the connection pools, it complains that
no suitable driver found.

How should we configure the db_settings.properties file / set-environment.bat
/ etc. so that the settings accomodate more than one driver?

Thank you,

Ajay

Joseph Weinstein

unread,
Jul 7, 2003, 2:08:18 PM7/7/03
to Ajay Kerwell

Ajay Kerwell wrote:

Weblogic is run with multiple drivers to multiple DBMSes all the time.
Each pool definition needs it's own driver class named, and the correct URL for
that driver. Show me your config.xml definitions of the pools, and the contents
of the jdbc.log file when the server boots with jdbc logging turned on.
Joe

>
>
> Thank you,
>
> Ajay

Ajay Kerwell

unread,
Jul 7, 2003, 3:08:40 PM7/7/03
to
From: "Ajay Kerwell" <ajay_k...@yahoo.com>
Sender: "Ajay Kerwell" <ajay_k...@yahoo.com>
Reply-To: "Ajay Kerwell" <ajay_k...@yahoo.com>
Subject: Re: Configuring multiple drivers
Newsgroups: weblogic.developer.interest.jdbc
X-User-Info: 134.217.237.30
References: <3f09ad2e$1...@newsgroups.bea.com> <3F09B712...@bea.com.remove_this>
NNTP-Posting-Host: 134.217.237.30
X-Original-NNTP-Posting-Host: 134.217.237.30
Message-ID: <3f09c538$1...@newsgroups.bea.com>
Date: 7 Jul 2003 12:08:40 -0700
X-Trace: newsgroups.bea.com 1057604920 134.217.237.30 (7 Jul 2003 12:08:40 -0700)
X-Original-Trace: 7 Jul 2003 12:08:40 -0700, 134.217.237.30
Organization: BEA NEWS SITE
Lines: 74
XPident: Unknown
Path: newsgroups.bea.com!not-for-mail
Xref: newsgroups.bea.com weblogic.developer.interest.jdbc:17230


This is the config.xml snippet.

--------------------------------------------------------------------------------------------

<JDBCConnectionPool CapacityIncrement="1"
DriverName="com.pointbase.jdbc.jdbcUniversalDriver"
InitialCapacity="20" MaxCapacity="20" Name="commercePool"
Password="{3DES}OpfDlOZR8E+XdqRLDGaPfQ=="
Properties="user=WEBLOGIC;password=WEBLOGIC;server=jdbc:pointbase:server://localhost:9092/wlportal"
RefreshMinutes="0" ShrinkingEnabled="false"
Targets="portalServer" TestConnectionsOnReserve="false"
TestTableName="WEBLOGIC_IS_ALIVE" URL="jdbc:pointbase:server://localhost:9092/wlportal"/>
<JDBCConnectionPool CapacityIncrement="1"
DriverName="com.pointbase.jdbc.jdbcUniversalDriver"
InitialCapacity="1" MaxCapacity="5" Name="dataSyncPool"
Password="{3DES}OpfDlOZR8E+XdqRLDGaPfQ=="
Properties="user=WEBLOGIC;password=WEBLOGIC;server=jdbc:pointbase:server://localhost:9092/wlportal"
RefreshMinutes="0" ShrinkingEnabled="false"
Targets="portalServer" TestConnectionsOnReserve="false"
TestTableName="WEBLOGIC_IS_ALIVE" URL="jdbc:pointbase:server://localhost:9092/wlportal"/>
<JDBCConnectionPool ACLName="someName"
DriverName="oracle.jdbc.driver.OracleDriver" Name="oracleApps"
URL="jdbc:oracle:thin@someUrl:somePort:someSID" XAPassword="{3DES}cf4iOEijmwM="/>
--------------------------------------------------------------------------------------------

As you can see, the Oracle "someName" JDBC pool is not targetted to any server
- the reason being that targetting it results in an exception :

--------------------------------------------------------------------------------------------

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:244)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(ConnectionEnvFactory.java:98)

--------------------------------------------------------------------------------------------

The server cmd window has the following :

<Jul 7, 2003 11:59:53 AM PDT> <Error> <JDBC> <001060> <Cannot startup connection
pool
"oracleApps" java.sql.SQLException: No suitable driver>

--------------------------------------------------------------------------------------------

The classpath has the following :

SET CLASSPATH=%CLASSPATH%;%P13N_DIR%\lib\commerce_system.jar;%P13N_DIR%\lib\campaign_system.jar;C:\bea\weblogic700\server\lib\classes12.zip

--------------------------------------------------------------------------------------------

The dbping utility connects to the Oracle database fine - with the env settings
being set by running the set-environment.bat script.

Can we uncomment out two or more sections in the db_settings.properties file for
different databases? Or point to multiple databases in the start scritps where
it says SET DATABASE=POINTBASE? Or these settings :

REM ----------- Specify which Database Driver to use -----------
REM Valid values are: POINTBASE, ORACLE_THIN, MSSQL, SYBASE_JCONNECT,
REM DB2_TYPE2
IF "%DATABASE%" == "" SET DATABASE=POINTBASE

Please let us know how to configure these drivers so that they can get picked
up by the server. We need Pointbase, Oracle and MSSQL drivers..

Thank you,

Ajay

Joseph Weinstein

unread,
Jul 7, 2003, 4:13:45 PM7/7/03
to Ajay Kerwell

Ajay Kerwell wrote:

Your URL for the thin driver is not exactly correct. It should have a ':' after the 'thin'.
Joe

Ajay Kerwell

unread,
Jul 7, 2003, 6:18:50 PM7/7/03
to

Thank you for pointing that out.

However, even after fixing the URL, we were getting the following exception :

--------------------------------------------------------------------------------------------------

weblogic.common.ResourceException: weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: invalid arguments in call
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:183)
at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:346)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:201)

--------------------------------------------------------------------------------------------------

Eventually we had to put in the Properties for the driver the username , password,
dll and protocol, so the config.xml now looks like this :

<JDBCConnectionPool ACLName="someName"
DriverName="oracle.jdbc.driver.OracleDriver"

Name="MyJDBC Connection Pool" Password="{3DES}cf4iOEijmwM="
Properties="user=someUser;password=somePassword;dll=ocijdbc9;protocol=thin"
Targets="portalServer" URL="jdbc:oracle:thin:@someServer:somePort:someSID"/>

That seemed to have made it work.. Wonder why we need all those properties listed..
seems redundant..

Joseph Weinstein

unread,
Jul 8, 2003, 1:39:30 AM7/8/03
to Ajay Kerwell

Ajay Kerwell wrote:

I believe that you could have probably left the password encrypted, but we don't
have much say in what properties oracle's driver needs. It's good you're running now.
Joe

0 new messages