We're having serious problems using Hibernate 3.2 plus Annotations 3.2CR2 on iSeries AS400.
When using annotated entities, the SessionFactory refuses to start up, with the following exception:
Code:
java.lang.NullPointerException
at java.lang.ClassLoader.defineClass(ClassLoader.java:651)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:170)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1231)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:350)
at org.hibernate.cfg.AnnotationBinder.bindDefaults(AnnotationBinder.java:187)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:251)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1205)
We've also noticed the following:
- The application
does work on a Windows machine.
- When using xml mappings instead of annotations, it works on iSeries as well.
- Annotations in itself work on the iSeries, we've done a separate test on this (JVM 1.5.0_03-b07).
I cannot seem to correlate line number 187 with anything that makes sense in AnnotationBinder.java. I have no idea why the line numbers wouldn't match, but I guess that's a separate issue.
I'm seriously thinking we're onto a bug here, any help would be greatly appreciated.