Warnings for javassist when deploying a native Hibernate application in EAP 6

Solution Verified - Updated -

Issue

  • HHH000305: Could not create proxy factory ... HHH000142: Javassist Enhancement failed when deploying a native (non-JPA) Hibernate application
... WARN  [org.hibernate.tuple.entity.PojoEntityTuplizer] ... HHH000305: Could not create proxy factory for:org.test.MyEntity: org.hibernate.HibernateException: HHH000142: Javassist Enhancement failed: org.test.MyEntity
        at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:167)
        at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:66)
        at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:229)
        ...
        at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:506)
        at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:146)
        ...
        at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:389)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1799)
...
Caused by: java.lang.RuntimeException: by java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject
        at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:515)
        ...
        at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:163)
        ...
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)
        ...
Caused by: java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject
        at java.lang.ClassLoader.defineClass1(Native Method)
        ...
        at javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:182)
        at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:164)
        ... 62 more
Caused by: java.lang.ClassNotFoundException: javassist.util.proxy.ProxyObject ...
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
        ...
  • JBAS015867: Deployment ... is using a private module ("org.javassist:main") if an explicit module dependency is added to jboss-deployment-structure.xml
... WARN  [org.jboss.as.dependency.private] ... JBAS015867: Deployment ... is using a private module ("org.javassist:main") which may be changed or removed in future versions without notice.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 6
  • Hibernate 4 (non-JPA/native Hibernate applications only)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content