Javassist Enhancement fails when JPA Entity has an attribute named "handler"
----------------------------------------------------------------------------
Key: HHH-5731
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5731
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.5
Environment: Hibernate 3.5.5 (I observed the problem in JBoss AS 6 M4 and M5)
(Database MySQL)
Reporter: Jan Van Bulck
I have an Entity called {{HandlerError}}, refering to another Entity called {{Handler}}
The getter {{getHandler()}} causes following problem when I deploy the application to
JBoss 6 AS *M4*
{code}
15:49:37,306 ERROR [BasicLazyInitializer] Javassist Enhancement failed:
c.u.p.model.HandlerError: java.lang.RuntimeException: duplicate method: getHandler in
c.u.p.model.HandlerError_$$_javassist_11
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:509)
[javassist.jar:6.0.0.20100721-M4]
at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:486)
[javassist.jar:6.0.0.20100721-M4]
at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:422)
...
Caused by: javassist.bytecode.DuplicateMemberException: duplicate method: getHandler in
c.u.p.model.HandlerError_$$_javassist_11
at javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:637)
[javassist.jar:6.0.0.20100721-M4]
...
15:49:37,311 WARN [PojoEntityTuplizer] could not create proxy factory
for:com.unifiedpost.payments.model.HandlerError: org.hibernate.HibernateException:
Javassist Enhancement failed: c.u.p.model.HandlerError
at
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:170)
[:3.5.2-Final]
at
org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:66)
[:3.5.2-Final]
{code}
The same code works well in JBoss 6 AS *M3*.
||JBoss 6 Release||Javassist dependency||
|M3 |javassist-3.11.0.GA.jar|
|M4 |javassist-3.12.1.GA.jar|
|M5 |javassist-3.12.1.GA.jar|
|20101112 |javassist-3.12.1.GA.jar|
In between M3 and M4, following issue has been 'fixed':
[
JASSIST-97|https://jira.jboss.org/browse/JASSIST-97]
Not sure if it's related, but it looks close given the
[
patch|https://jira.jboss.org/secure/attachment/12332449/JASSIST-97.patch]
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira