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

ds.getConnection() fails

8 views
Skip to first unread message

Vinay Jain

unread,
May 14, 2004, 3:10:34 PM5/14/04
to
I get the following exception when I try to get a connection using a datasource object. Can anyone help me identify the error?
FYI: The connection pool is correctly setup and tested against. I am using ojdbc14.jar at both the server and the client. The ds object (datasource object) is properly created (I think) and is of type: weblogic.jdbc.common.internal.RmiDataSource_812_WLStub. BTW, I am using Oracle 9.2.0.3.0.
----
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed to generate class for weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_812_WLStub ] - with nested exception:
[java.lang.reflect.InvocationTargetException - with target exception:
[java.lang.ArrayIndexOutOfBoundsException: 159]]
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:807)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:790)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:237)
at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)
at...

Joe Weinstein

unread,
May 14, 2004, 3:37:20 PM5/14/04
to Vinay Jain

Vinay Jain wrote:

> I get the following exception when I try to get a connection using a datasource object. Can anyone help me identify the error?
> FYI: The connection pool is correctly setup and tested against. I am using ojdbc14.jar at both the server and the client. The ds object (datasource object) is properly created (I think) and is of type: weblogic.jdbc.common.internal.RmiDataSource_812_WLStub. BTW, I am using Oracle 9.2.0.3.0.
> ----
> weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed to generate class for weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_812_WLStub ] - with nested exception:
> [java.lang.reflect.InvocationTargetException - with target exception:
> [java.lang.ArrayIndexOutOfBoundsException: 159]]
> at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:807)
> at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:790)

Hi. The first thing I'd verify (if the console shows the pool has connections)
is to check the classpath of the client. I suspect it may have different versions
of some of the classes that the server is trying to serialize. I would suspect
a different version of the oracle driver, and also different weblogic classes.
Joe

Jerry Chiu

unread,
Jun 1, 2004, 10:06:04 PM6/1/04
to

I am getting the same error and the suggestion below does not fix my problem.


Code snippet is:
...
context = getInitialContext("t3://127.0.0.1:7001/");
dataSource = (DataSource) context.lookup("orclds");
return dataSource.getConnection();
...


My command line is:
D:\sw\java\j2sdk1.4.2_02\bin\java.exe -classpath "D:\sw\java\j2sdk1.4.2_02\jre\lib\charsets.jar;D:\sw\java\j2sdk1.4.2_02\jre\lib\jce.jar;D:\sw\java\j2sdk1.4.2_02\jre\lib\jsse.jar;D:\sw\java\j2sdk1.4.2_02\jre\lib\plugin.jar;D:\sw\java\j2sdk1.4.2_02\jre\lib\rt.jar;D:\sw\java\j2sdk1.4.2_02\jre\lib\sunrsasign.jar;D:\sw\java\j2sdk1.4.2_02\jre\lib\ext\dnsns.jar;D:\sw\java\j2sdk1.4.2_02\jre\lib\ext\ldapsec.jar;D:\sw\java\j2sdk1.4.2_02\jre\lib\ext\localedata.jar;D:\sw\java\j2sdk1.4.2_02\jre\lib\ext\sunjce_provider.jar;D:\develop\Profiling\classes;D:\oracle\ora9i\jdbc\lib\classes12.jar;D:\sw\jakarta\log4j-1.2.7\dist\lib\log4j-1.2.7.jar;D:\sw\java\j2sdkee1.3.1\lib\j2ee.jar;D:\sw\sourceforge\junit3.8.1\junit.jar;D:\sw\bea\weblogic81\server\lib\weblogic.jar;C:\Program
Files\IntelliJ-IDEA-4.0\lib\idea_rt.jar" com.samples.JDBCDataSource

Please help.
thanks

Joe Weinstein

unread,
Jun 2, 2004, 1:35:33 AM6/2/04
to Jerry Chiu

Jerry Chiu wrote:

> I am getting the same error and the suggestion below does not fix my problem.
>
>
> Code snippet is:
> ...
> context = getInitialContext("t3://127.0.0.1:7001/");
> dataSource = (DataSource) context.lookup("orclds");
> return dataSource.getConnection();

Hi. When you look at the weblogic console, do you see the pool? Does it have connections?
Show me the pool definition and the DataSource definition. These are in the server's
config.xml file.
Joe

Jerry Chiu

unread,
Jun 2, 2004, 2:40:33 AM6/2/04
to

I did the Test Pool and got a 'Connection Successful on AdminServer". However,
Monitoring gives:AdminServer Running 0 0 0

This is my config.xml snippet.

<JDBCConnectionPool ConnLeakProfilingEnabled="true"
DriverName="oracle.jdbc.driver.OracleDriver"
InitSQL="SQL SELECT 1 FROM EMP" InitialCapacity="5"
Name="OrclConnectionPool" Password="{3DES}wf3DQDxvvW4="
Properties="user=scott" RemoveInfectedConnectionsEnabled="false"
Targets="AdminServer" TestConnectionsOnCreate="true"
TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
TestTableName="SQL SELECT 1 FROM EMP" URL="jdbc:oracle:thin:@localhost:1521:orcl"/>
<JDBCTxDataSource JNDIName="orclds" Name="OrclDataSource"
PoolName="OrclConnectionPool" Targets="AdminServer"/>

Joe Weinstein

unread,
Jun 2, 2004, 11:54:10 AM6/2/04
to Jerry Chiu

Jerry Chiu wrote:

> I did the Test Pool and got a 'Connection Successful on AdminServer". However,
> Monitoring gives:AdminServer Running 0 0 0
>
> This is my config.xml snippet.
>
> <JDBCConnectionPool ConnLeakProfilingEnabled="true"
> DriverName="oracle.jdbc.driver.OracleDriver"
> InitSQL="SQL SELECT 1 FROM EMP" InitialCapacity="5"
> Name="OrclConnectionPool" Password="{3DES}wf3DQDxvvW4="
> Properties="user=scott" RemoveInfectedConnectionsEnabled="false"
> Targets="AdminServer" TestConnectionsOnCreate="true"
> TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
> TestTableName="SQL SELECT 1 FROM EMP" URL="jdbc:oracle:thin:@localhost:1521:orcl"/>
> <JDBCTxDataSource JNDIName="orclds" Name="OrclDataSource"
> PoolName="OrclConnectionPool" Targets="AdminServer"/>

I suggest changing the test table to DUAL, not EMP. Unset initSQL because it doesn't
do anything for you. Unset TestConnectionsOnRelease. That doesn't help (ever). Lastly,
please remove the oracle driver from the client classpath, or make sure the *same*
ojdbc14.jar is at the front of the weblogic server classpath as is in the client
classpath.
Joe

0 new messages