I am trying to setup Derby to use the RmiJdbc client / server (http://rmijdbc.objectweb.org/current/RmiJdbc/doc/index.html
). Firstly, I'm curious if anybody has ever tried this before. I'm trying this out because there seem to be some licensing issues with using the IBM db2cc driver if u want to run Derby as a network server.
My setup consists of a client which uses the RmiJdbc driver to talk to the RmiJdbc server, and the server in turn talks to the Derby database. During startup, I have the server load the apache derby embedded driver and bind itself to the rmiregistry.
# java org.objectweb.rmijdbc.RJJdbcServer org.apache.derby.jdbc.EmbeddedDriver
My client program first loads the RmiJdbc driver and then connects to the Derby database with the following URL - jdbc:rmi://localhost/jdbc:derby:testdb. This part goes fine. But if I try to fetch something from the database, I get the following exception:
java.sql.SQLException: Error unmarshaling return; nested exception is: java.io.InvalidClassException: org.apache.derby.impl.jdbc.EmbedSQLException; local class incompatible: stream classdesc serialVersionUID = -6688465790235736597, local class serialVersionUID = -8950025864534516143
I'm not sure if this is a bug with derby being unable to serialialize database objects, or if something is wrong with my setup? Would really appreciate any suggestions/pointers. btw, I also looked at the Derby network client which is not part of the official derby release yet. But I was not able to get that to work either...