We have a legacy application that uses Hibernate 3.0.5 and we're trying to upgrade it to Hibernate 3.3.2 (the version that has less impact on the current code).
After updating the dependencies in pom.xml
, the application deploys correctly, but on queries where there's a lazy association, the following error occurs:
java.lang.AbstractMethodError: org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.setUnwrap(Z)V
The dependencies are configured as follow:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.3.2.GA</version>
<exclusions>
<!--
Excludes to avoid conflict with JBoss libs
See http://stackoverflow.com/questions/3413488/saxparser-errors-with-hibernate-and-jboss-conflicting-versions
-->
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.0.b2</version>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.4.GA</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
We've already tried to switch do CGLIB instead of Javassist, but we receive the same error on the equivalent class (org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer
). There is no stack trace. Here is a picture of the execution stack in the moment the error is thrown.
The application is running on JBoss 5.1.0.
Any tips about this error? Could this be the wrong version of javassist library?
EDITED
- Added JBoss version and corrected javassist version to 3.4.GA
- Digging further I found that (Z)V means "void return" and "boolean parameter" (http://www.rgagnon.com/javadetails/java-0286.html)