Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> error in jdbc OracleConnection
hi all, I am right now using oracle to write jsp /servlet with tomcat 4.0.2
. But I always get the following error:
java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: oracle.jdbc.driver.OracleConnection
I have class called
public OraConnBean implements Serializable {
String URL, username, passwd, driver;
public void connect( ) { ... }
}
public class ReportBean implements Serializable {
....
public void SaveReport( ) {
Connection _conn = (Connection) beans.instantiate (.... ,
OraConnBeanPath );
// do the rest of sql;
}
}
I serialize the OraConn to a bean and then the SaveReport action will
instantiate it. So why I get the above error ? And can I put the OraConn
bean in the session such that I can connect using the instantiated bean next
time to prevent connecting again ?
thanks .
perseus Received on Fri Feb 22 2002 - 13:01:55 CST