Recently, I participated in the Java development project. The development environment is myeclipse + weblogic.
I also posted several posts to introduce some of the technologies used.
How to use struct in a Java program to input multiple data records to Oracle at a time.
How to Use collection variables as data sources to insert data into a data table or update data.
How to modify collection type variables in Oracle.
How to insert data to collection-type variables one by one in Oracle.
However, the following code cannot pass during ut.
Structdescriptor ST = new structdescriptor ("department_type", dbconn );
The error is:
Caused by: Java. RMI. marshalexception: Error marshalling return; Nested exception is:
Java. Io. notserializableexception: Oracle. JDBC. Driver. t4cconnection
At weblogic. rjvm. responseimpl. unmarshalreturn (responseimpl. Java: 195)
This problem occurs because objects are not serialized. We have this problem: the program cannot run during ut, but there is no problem in calling from the JSP page. Therefore, the analysis result is that the UT part in the project architecture we write does not inherit serialization or the struct itself does not inherit serialization.
Refer:
Http://forums.bea.com/thread.jspa? Messageid = 600034901 & tstart = 0
Http://forums.bea.com/thread.jspa? Messageid = 400006195
Http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1043705
Http://e-docs.bea.com/wls/docs81/jdbc/programming.html#1054307
//************************************** **************************************** ************
To obtain a connection for a JDBC client, use a Java Naming and Directory Interface (jdni) lookup to locate the datasource object, as shown in the following code fragment.
Note: When using a JDBC connection in a client-side application, the exact same JDBC driver classes must be in the classpath on both the server and the client. if the driver classes do not match, you may see Java. RMI. unmarshalexception exceptions.
//************************************** **************************************** ************