File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet-servlet communication

 
Ron Knight
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an applet that talks to a servlet in order to get information from an informix database. The servlet connects to the database using JDBC. It actually uses the code from the
"common.jar" file.(Which by the way has proved to be very handy)
This has worked fine on an NT box, but when I try to run it on a Unix box I get this exception message >>
ObjectServer: java.io.NotSerializableException: com.informix.jdbc.IfxResultSet
 
Ashwin Desai
Ranch Hand
Posts: 124
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
what is common.jar? some informix specific library.
If you look at the Java 1.2 API you will find that ResultSet is not Serializable.
Ashwin.
 
Ashwin Desai
Ranch Hand
Posts: 124
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An addition to the above answer:
Refering to the Java 1.2 API for ResultSet, therer are functions like updateRow() and updateString() which will not be able to work on remote connections as they update the DB directly.
Thus, ResultSet is not serializable and cannot be used accross the network on different machines. However, you can extract the data out of the ResultSet and send that across the network.
Hope this helps.
Ashwin.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When passing classes from an applet to a servlet only Serializable classes can be sent. ResultSet is not Serializable.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic