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
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
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
Ajay Kerwell wrote:
Your URL for the thin driver is not exactly correct. It should have a ':' after the 'thin'.
Joe
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..
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