Hi to everybody!!
Developing an application servlet-based, i need to pass an empty
ResultSet
Object from a servlet A to a servlet B, servlet B should fill the
ResultSet passed
and resend it back to servlet A. Well, when i try to resend back the
ResultSet
filled to servlet A, I'm facing the following exception:
java.io.WriteAbortedException: Writing aborted by exception;
java.io.NotSerializableException: oracle.jdbc.driver.OracleResultSet
I'm using Oracle thin driver JDBC and i perform the comunication
between the servlets opening an URLConnection and opening an
ObjectOutputStream (to send the ResultSet from servlet B to servlet
A), and an ObjectInputStream (to make the servlet B be able to recieve
the ResultSet Object from servlet A)
//hande request
ServletInputStream sis = req.getInputStream();
BufferedInputStream bis = new BufferedInputStream(sis);
ObjectInputStream ois = new ObjectInputStream(bis);
//read the object passed
rs = (ResultSet)ois.readObject();
/* opening connection to DataBase */
/*filling 'rs' executing a Select with executeQuery() */
//send response
res.setStatus(HttpServletResponse.SC_OK);
ServletOutputStream sos = res.getOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(sos);
ObjectOutputStream oos = new ObjectOutputStream(bos);
try{
oos.writeObject((Object)rs);
}catch(IOException e){
System.out.println("Errore="+e.toString());
}
well.... this try{}catch(){} statement encounter the mentioned
exception....
can someone help me??
Thank's in advance
Regards
Carlo
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html