Hi,

I am using inbuilt connection pooling of weblogic8.1 and trying to
execute Stored Procs from java for DB manipulations.

While trying to use table type as input from java code
(ArrayDescriptor aDesc =
ArrayDescriptor.createDescriptor("FF_TEXT_TBL", conn);
), I am getting an exception java.io.NotSerializableException:
oracle.jdbc.driver.T4CConnection.

Oracle driver located at C:\bea\weblogic81\server\lib is used here.

I doubt why weblogic should serialize the connection when
createDescriptor is being called. And, strange thing is that I did
not get this exception if I used simple connection instead of pooled
connection!

Please let me know if anyone knows solution for this.
----------------------------------------------------------------------------
Code snippet:
...
strQuery = "CALL
pk_station.p_update_stn_free_form_text(?,?,?,?)";
cStmt = (OracleCallableStatement) conn.prepareCall(strQuery);
cStmt.setString(1, strUserCode);
cStmt.setString(2, strModuleCode);
cStmt.setString(3, strStationCode);
Object[] objFreeFormText = new Object[strPageNo.length];
//Build table type object
Object[] objFFText = new Object[2];
objFFText[0] = strFFText;
objFFText[1] = strPageNo[0];
objFreeFormText[0] = objFFText;
ArrayDescriptor aDesc =
ArrayDescriptor.createDescriptor("FF_TEXT_TBL", conn);
ARRAY arTest = new ARRAY(aDesc, conn, objFreeFormText);
cStmt.setARRAY(4, arTest);
cStmt.execute();
cStmt.close();
...

----------------------------------------------------------------------------
Exception:

java.rmi.MarshalException: error marshalling return; nested exception
is:
java.io.NotSerializableException:
oracle.jdbc.driver.T4CConnection
at weblogic.rjvm.BasicOutboundRequest.sendReceive(Bas icOutboundRequest.java:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicR emoteRef.java:137)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic _jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4 CConnection_813_WLStub.physicalConnectionWithin(Un known
Source)
BYE - Closed the Connection
at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_r mi_internal_ConnectionImpl_weblogic_jdbc_wrapper_P oolConnection_oracle_jdbc_driver_T4CConnection_813 _WLStub.physicalConnectionWithin(Unknown
Source)
at oracle.sql.TypeDescriptor.setPhysicalConnectionOf( TypeDescriptor.java:264)
at oracle.sql.TypeDescriptor.(TypeDescriptor.java:100)
at oracle.sql.ArrayDescriptor.(ArrayDescriptor.java:153)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayD escriptor.java:113)
at aero.sita.wtr.dataaccess.StationDataAccess.createS tationPage(StationDataAccess.java:90)
at aero.sita.wtr.service.FFService.processCST(FFServi ce.java:190)
at aero.sita.wtr.service.FFService.execute(FFService. java:55)
at aero.sita.wtr.service.FFServiceTest.main(FFService Test.java:58)
Caused by: java.io.NotSerializableException:
oracle.jdbc.driver.T4CConnection
at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1054)
at java.io.ObjectOutputStream.writeObject(ObjectOutpu tStream.java:278)
at weblogic.common.internal.ChunkedObjectOutputStream .writeObject(ChunkedObjectOutputStream.java:120)
at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(Ms gAbbrevOutputStream.java:93)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic _jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4 CConnection_WLSkel.internalInvoke1(Unknown
Source)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic _jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4 CConnection_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicS erverRef.java:477)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicSe rverRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:144)
at weblogic.rmi.internal.BasicServerRef.handleRequest (BasicServerRef.java:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute( BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)

--------------- nested within: ------------------
weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception -
with nested exception:
[java.rmi.MarshalException: error marshalling return; nested exception
is:
java.io.NotSerializableException:
oracle.jdbc.driver.T4CConnection]
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic _jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4 CConnection_813_WLStub.physicalConnectionWithin(Un known
Source)
at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_r mi_internal_ConnectionImpl_weblogic_jdbc_wrapper_P oolConnection_oracle_jdbc_driver_T4CConnection_813 _WLStub.physicalConnectionWithin(Unknown
Source)
at oracle.sql.TypeDescriptor.setPhysicalConnectionOf( TypeDescriptor.java:264)
at oracle.sql.TypeDescriptor.(TypeDescriptor.java:100)
at oracle.sql.ArrayDescriptor.(ArrayDescriptor.java:153)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayD escriptor.java:113)
at aero.sita.wtr.dataaccess.StationDataAccess.createS tationPage(StationDataAccess.java:90)
at aero.sita.wtr.service.FFService.processCST(FFServi ce.java:190)
at aero.sita.wtr.service.FFService.execute(FFService. java:55)
at aero.sita.wtr.service.FFServiceTest.main(FFService Test.java:58)