WebLogic installation support - NotSerializableException:oracle.jdbc.driver.T4CConnection - When using ArrayDescriptor

This is Interesting: Free IT Magazines  
Home > Archive > WebLogic installation support > May 2005 > NotSerializableException:oracle.jdbc.driver.T4CConnection - When using ArrayDescriptor





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author NotSerializableException:oracle.jdbc.driver.T4CConnection - When using ArrayDescriptor
Balamurugan N V

2005-04-02, 5:54 pm

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(BasicOutboundRequest.java:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:137)
at weblogic.jdbc.rmi.internal. ConnectionImpl_weblogic_jdbc_wrapper_Poo
lConnection_oracle_jdbc_driver_T4CConnec
tion_813_WLStub.physicalConnectionWithin(Unknown
Source)
BYE - Closed the Connection
at weblogic.jdbc.rmi. SerialConnection_weblogic_jdbc_rmi_inter
nal_ConnectionImpl_weblogic_jdbc_wrapper
_PoolConnection_oracle_jdbc_driver_T4CCo
nnection_813_WLStub.physicalConnectionWithin(Unknown
Source)
at oracle.sql.TypeDescriptor.setPhysicalConnectionOf(TypeDescriptor.java:264)
at oracle.sql.TypeDescriptor.<init>(TypeDescriptor.java:100)
at oracle.sql.ArrayDescriptor.<init>(ArrayDescriptor.java:153)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:113)
at aero.sita.wtr.dataaccess.StationDataAccess.createStationPage(StationDataAccess.java:90)
at aero.sita.wtr.service.FFService.processCST(FFService.java:190)
at aero.sita.wtr.service.FFService.execute(FFService.java:55)
at aero.sita.wtr.service.FFServiceTest.main(FFServiceTest.java:58)
Caused by: java.io.NotSerializableException:
oracle.jdbc.driver.T4CConnection
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:120)
at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:93)
at weblogic.jdbc.rmi.internal. ConnectionImpl_weblogic_jdbc_wrapper_Poo
lConnection_oracle_jdbc_driver_T4CConnec
tion_WLSkel.internalInvoke1(Unknown
Source)
at weblogic.jdbc.rmi.internal. ConnectionImpl_weblogic_jdbc_wrapper_Poo
lConnection_oracle_jdbc_driver_T4CConnec
tion_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.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(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java: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_Poo
lConnection_oracle_jdbc_driver_T4CConnec
tion_813_WLStub.physicalConnectionWithin(Unknown
Source)
at weblogic.jdbc.rmi. SerialConnection_weblogic_jdbc_rmi_inter
nal_ConnectionImpl_weblogic_jdbc_wrapper
_PoolConnection_oracle_jdbc_driver_T4CCo
nnection_813_WLStub.physicalConnectionWithin(Unknown
Source)
at oracle.sql.TypeDescriptor.setPhysicalConnectionOf(TypeDescriptor.java:264)
at oracle.sql.TypeDescriptor.<init>(TypeDescriptor.java:100)
at oracle.sql.ArrayDescriptor.<init>(ArrayDescriptor.java:153)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:113)
at aero.sita.wtr.dataaccess.StationDataAccess.createStationPage(StationDataAccess.java:90)
at aero.sita.wtr.service.FFService.processCST(FFService.java:190)
at aero.sita.wtr.service.FFService.execute(FFService.java:55)
at aero.sita.wtr.service.FFServiceTest.main(FFServiceTest.java:58)
vivek.bansal

2005-05-26, 5:58 am

Hi,

I am facing the similar error. Please let me know if some one has the solution to this issue.

Many Thanks,
Vivek
I am using the following code

SQL Code
--------------
CREATE TYPE QUOTE_ADJUSTMENT_DESC_ARRAY AS VARRAY(100) OF VARCHAR2(100);

Java Code
-----------------
ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("QUOTE_ADJUSTMENT_DESC_ARRAY", con);

logger.debug(" arrayDesc : " + arrayDesc);

//once we have the sql type we create a SQL array
//from the collection(convert it to Java array first).
// quoteAdjustmentDescList is of type ArrayList
ARRAY array = new ARRAY (arrayDesc, con, quoteAdjustmentDescList.toArray());

Exception is
-----------------
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
at com.gm.swb.service. CustomerOfferFacadeEJB_ic09ul_EOImpl_814
_WLStub.createCustomerQuote(Unknown Source)
at test.gm.swb.service.customeroffer.PricingWorksheetTest. testCreateCustomerQuote(PricingWorksheet
Test.java:217)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Caused by: java.lang.AbstractMethodError: weblogic.jdbc.wrapper. PoolConnection_oracle_jdbc_driver_Oracle
Connection.unwrap()Loracle/jdbc/OracleConnection;
at oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.java:5093)
at oracle.jdbc.driver.OracleConnection. physicalConnectionWithin(OracleConnectio
n.java:5142)
at oracle.sql.TypeDescriptor.setPhysicalConnectionOf(TypeDescriptor.java:494)
at oracle.sql.TypeDescriptor.(TypeDescriptor.java:147)
at oracle.sql.ArrayDescriptor.(ArrayDescriptor.java:186)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:118)
at com.gm.swb.dataaccess.customeroffer.CustomerOfferDAO.createCustomerQuote(CustomerOfferDAO.java:1740)
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com