Have side project that is using db4o. It's doesn't work with JVM 8 (on deserialising getting Caused by: java.lang.IllegalArgumentException: Can not set java.lang.Long field com.xxx.yyy.version to com.db4o.reflect.generic.GenericObject
).
Quick answer: Db4o IS compliant Java 8. It was hibernate proxy issue (Javassist and dynamic classes) :(
Update 07/20/15: Not sure that db4o is 100% correctly works under JVM 8. We have a strange test case that we cannot explain (see below). At the same time native Java serialisation works correctly (but db4o doesn't).
Full answer:
If someone need details, this issue appears in Hibernate 4.3 (in previous versions everything works as expected). Unfortunately, I didn't find correct solution. Quick and dirty workaround is to skip problem fields from exporting to db4o (via transient
keyword).
Update 07/30/15: Found a solution (the issue appears in Javassist 1.8):
ProxyFactory.nameGenerator = new JavassitBackwardCompatibleNamingGenerator();
public class JavassitBackwardCompatibleNamingGenerator implements UniqueName{
private static int counter = 0;
@Override
public String get(String classname) {
return classname + "_$$_javassist_" + counter++;
}
}