NoClassDefFoundError when using Hibernate and javassist on JBoss EAP 7

Solution Verified - Updated -

Issue

  • When annotating a Hibernate entity with @Proxy(proxyClass = javax.management.DynamicMBean.class), a java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy error occurs when the application is deployed.
  • When starting EAP with -Dhibernate.bytecode.provider=javassist, an java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy error occurs on startup.

Environment

  • Red Hat JBoss Enterprise Application Platform 7
  • Hibernate with the javassist bytecode enhancer

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