This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet-servlet communication

 
Ron Knight
Greenhorn
Posts: 1
  • 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
  • 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
  • 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
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic