[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Javassist Enhancement failed: Duplicate Method error

marinovm do-not-reply at jboss.com
Thu Jan 29 07:27:16 EST 2009


Hi there,

I've just started using JBoss AS 5 so excuse me if I'm missing something obvious...

I have a problem with EJBs I'm deploying to a JBoss 5.0.0 GA installation.  Some of the entities I'm deploying cause the following error to occur during deployment:

...
14:11:15,750 INFO  [SessionFactoryImpl] building session factory
14:11:16,812 ERROR [BasicLazyInitializer] Javassist Enhancement failed: za.co.bridgept.persistence.model.ResponsibilityColumn
java.lang.RuntimeException: duplicate method: remove in za.co.bridgept.persistence.model.ResponsibilityColumn_$$_javassist_8
	at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:344)
	at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:314)
	at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:273)
	at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:162)
	at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:66)
	at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:183)
	at org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:158)
	at org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:76)
	at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:80)
	at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:325)
	at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:457)
	at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:131)
	at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
	at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:261)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
	at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:311)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
	at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
	at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
	at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
	at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
	at org.jboss.system.ServiceController.start(ServiceController.java:460)
	at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
	at org.jboss.Main.boot(Main.java:209)
	at org.jboss.Main$1.run(Main.java:547)
	at java.lang.Thread.run(Thread.java:619)
Caused by: javassist.bytecode.DuplicateMemberException: duplicate method: remove in za.co.bridgept.persistence.model.ResponsibilityColumn_$$_javassist_8
	at javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:593)
	at javassist.bytecode.ClassFile.addMethod(ClassFile.java:577)
	at javassist.util.proxy.ProxyFactory.override(ProxyFactory.java:658)
	at javassist.util.proxy.ProxyFactory.overrideMethods(ProxyFactory.java:632)
	at javassist.util.proxy.ProxyFactory.make(ProxyFactory.java:552)
	at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:335)
	... 69 more
14:11:16,812 WARN  [PojoEntityTuplizer] could not create proxy factory for:za.co.bridgept.persistence.model.ResponsibilityColumn
org.hibernate.HibernateException: Javassist Enhancement failed: za.co.bridgept.persistence.model.ResponsibilityColumn
	at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:169)
	at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:66)
	at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:183)
	at org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:158)
	at org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:76)
	at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:80)
	at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:325)
	at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:457)
	at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:131)
	at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
	at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:261)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
	at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:311)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
	at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
	at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
	at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
	at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
	at org.jboss.system.ServiceController.start(ServiceController.java:460)
	at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
	at org.jboss.Main.boot(Main.java:209)
	at org.jboss.Main$1.run(Main.java:547)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: duplicate method: remove in za.co.bridgept.persistence.model.ResponsibilityColumn_$$_javassist_8
	at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:344)
	at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:314)
	at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:273)
	at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:162)
	... 66 more
Caused by: javassist.bytecode.DuplicateMemberException: duplicate method: remove in za.co.bridgept.persistence.model.ResponsibilityColumn_$$_javassist_8
	at javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:593)
	at javassist.bytecode.ClassFile.addMethod(ClassFile.java:577)
	at javassist.util.proxy.ProxyFactory.override(ProxyFactory.java:658)
	at javassist.util.proxy.ProxyFactory.overrideMethods(ProxyFactory.java:632)
	at javassist.util.proxy.ProxyFactory.make(ProxyFactory.java:552)
	at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:335)
	... 69 more

I've checked my code and I can't see any duplicate remove method signatures in the classes that are causing the exceptions.

I've seen some similar problems in the forums and on JIRA for both hibernate and JBoss projects...see these:

https://jira.jboss.org/jira/browse/JBAS-5254

http://www.jboss.com/index.html?module=bb&op=viewtopic&t=83199&postdays=0&postorder=asc&start=0

In older versions of JBoss it looks like you can switch Javassist for cglib.  I could not get this to work in JBoss 5.

Anyone seen this before?  All advice/assistance gratefully accepted.

Matthew

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205532#4205532

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205532



More information about the jboss-user mailing list