>Could you post the complete stack trace please?

Unfortunately I cannot provide a more complete stack trace at this
time, since I've rewritten the code. I may be able to produce some
sample code which recreates the exception.

>I don't understand what you mean here.

After posting the original comment, I found the source code and see
that the deserialization of the field is happening within the org.h2
code, when I was expecting that I would need to do the deserialization
within my own code - that is where my confusion on that part of it was
resulting from.

>But the class (com.test.types.MyRecord) needs to be in the classpath on the 
>client side when you call ResultSet.getObject.

As far as I know, the object in question is in my class path, because
I have instantiated the class and stored it within the 'storeRecord'
method call. The 'retrieveRecord' method, called later within the same
class file, is where the Class Not Found exception was being
generated.

I'm sure the issue is related to the classpath, however it seems that
my program has the 'MyRecord' class visible to it (after all I'm using
the class in my code) but that the org.h2 classes cannot see it, and
I'm not entirely sure how that could be, especially since the 'store'
and 'retrieve' methods are being called from one test method similar
to:

test() {
  MyRecord mr = new MyRecord();
  // populate record...
  // populate map with id and record
  storeRecord( storeMap );

  MyRecord newRec = retrieveRecord(retrieveMap);
}

A coworker of mine told me he went into the org.h2 source code and
added an 'import' statement for the 'MyRecord' class, and after that,
the retrieveRecord code worked fine  (I'm not sure which file he did
this in and he is out of the office this week so I can't clarify it at
this time). However, this is obviously not the correct way to fix it.

I will have to see if I can generate a simple test program to recreate
the issue and post it back here.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to