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



--
*##**##**##**##**##**##**##**##*
... E tutti furono accecati da
quel bagliore rosso che tagli�
l'asfalto nero in due...
*##**##**##**##**##**##**##**##*

Carlo Indolfi                   AOL Istant Messenger User
                                [Pit-Radio] Poster
                                Other [Pit-Radio] Posters:
                                -Sbaturzio
                                -Luca Varani
<[EMAIL PROTECTED]>    -Vandervecken
<[EMAIL PROTECTED]> -Vinci
                                -Folco
ICQ #--> 4262089 (home)         -Piero Giuseppe Goletto
ICQ #--> 29505621 (office)      -Giulio Lippi
---------------------------------------------------------
|Chiunque volesse dare il proprio contributo a Pit-Radio|
|puo contattarmi via e-mail agli indirizzi indicati     |
---------------------------------------------------------

___________________________________________________________________________
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

Reply via email to