Hi,
I am trying to figure out the cause of getting an ObjectList of GenericObject back from a query instead of my own application's objects. I am using 6.4 (haven't tried 7.2 yet but will soon if I can't get around this). It's a web application that runs under Tomcat, everything is on one node but multithreaded by http request so I'm using Db4o.openServer(config, filename, 0) with a ThreadLocal to hold ObjectContainers (server.openClient()). During runtime, the database is opened read-only (it is loaded with data during a development step).
Things work fine if I run my application (through Tomcat) against the classes that Eclipse creates. Db4o is damn fast. However when I do an ant build (using the same jdk, which is MacOSX Java 1.5) and deploy to Tomcat (same version), the queries return GenericObject and things crash (due to classcast exceptions).
The info available on these forums seem to suggest that this will happen if the classes change fully qualified names in any way. This is not the case. In fact, I put in some diagnostic code at the point the query comes back to do a forName on my class, and it does work. If I log the GenericObject directly (toString, that is), it shows up as "(G) com.blah.MyClass" - the correct fully qualified class name.
I haven't dug into the db4o source code yet, and would prefer not to at this point. Does anyone know of all reasons that db4o would return GenericObject, besides the class not being available by its exact name?
Thanks!