The problem is that the class in question is still not created in JVM by the time this function is called. There is a separate data structure which holds information for dynamic classes.
However, I found a temporary and ugly workaround for this : I copied the whole Transformer.java code and created a subclass of ClassWriter.java which overrides the getCommonSuperClass method.
Note: In Transformer.class ClassWriter is created by its constructor not by a factory.
This error occurs when enhancing a class which is entity and has a field of type SomeObject which is not an entity.
You can see entire integration effort (it's pretty simple) code here: http://bazaar.launchpad.net/~lyubo.ivanov/play-ebean/1.0/files
Look at the play.modules.ebean.EbeanPlugin.enhance() where the actual call to ebean enhancement is made
Here is the stacktrace:
java.lang.RuntimeException: java.lang.ClassNotFoundException: XXXX
at com.avaje.ebean.enhance.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:1272)
at com.avaje.ebean.enhance.asm.ClassWriter.getMergedType(ClassWriter.java:1244)
at com.avaje.ebean.enhance.asm.Frame.merge(Frame.java:1373)
at com.avaje.ebean.enhance.asm.Frame.merge(Frame.java:1280)
at com.avaje.ebean.enhance.asm.MethodWriter.visitMaxs(MethodWriter.java:1270)
at com.avaje.ebean.enhance.asm.MethodAdapter.visitMaxs(MethodAdapter.java:189)
at com.avaje.ebean.enhance.asm.ClassReader.accept(ClassReader.java:1447)
at com.avaje.ebean.enhance.asm.ClassReader.accept(ClassReader.java:420)
at play.modules.ebean.HackedTransformer.entityEnhancement(HackedTransformer.java:146)
at play.modules.ebean.HackedTransformer.transform(HackedTransformer.java:106)
at play.modules.ebean.EbeanPlugin.enhance(EbeanPlugin.java:83)
PS: I've sent a mail with SQLite platform file a long time ago. Maybe it'd been deleted by some spam filter? I can send it again of course.
Thanks,
Lyubo