-
Bug
-
Resolution: Done
-
Blocker
-
7.0.0.ER1
When deploying native Hibernate applications in EAP, javassist is a private module and not meant to be included in explicit application dependencies. Without it, failure occurs during deployment:
16:16:47,293 SEVERE [support.jboss.ejb.session.SessionBean] (ServerService Thread Pool – 62) Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister
at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:123)
at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:77)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:346)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)
...
Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:91)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:116)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:388)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:502)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:122)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:96)
... 55 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:88)
... 64 more
Caused by: java.lang.RuntimeException: by java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:515)
at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:492)
at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:428)
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:400)
at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:72)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:177)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:157)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:63)
... 69 more
Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:170)
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:507)
... 76 more
Caused by: java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:182)
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:164)
... 77 more
Caused by: java.lang.ClassNotFoundException: javassist.util.proxy.ProxyObject from [Module "deployment.jboss.eap-1.0-SNAPSHOT.jar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
... 84 more
If you include the dependency explicitly (in jboss-deployment-structure.xml), a warning is raised:
16:19:19,700 WARN [org.jboss.as.dependency.private] (MSC service thread 1-2) WFLYSRV0018: Deployment "deployment.jboss.eap-1.0-SNAPSHOT.jar" is using a private module ("org.javassist:main") which may be changed or removed in future versions without notice.
- clones
-
WFLY-459 javassist should also be exported to Hibernate (native) applications
- Closed
- is cloned by
-
JBEAP-2148 [GSS](7.0.z) Dependency for javassist not resolved for native Hibernate applications
- Verified