"ClassNotFoundException: com.example.JPAEntity_$$_javassist_2" error when making remote EJB call with JPA entity as parameter

Solution Unverified - Updated -

Issue

We are making a remote EJB call to another deployment, and when one of the parameters is a Hibernate entity, it fails with an error

java.lang.RuntimeException: JBAS014154: Failed to marshal EJB parameters
Caused by: java.lang.ClassNotFoundException: com.example.JPAEntity_$$_javassist_2 from [Module "deployment.myapp.ear.ejb-impl.jar:main" from Service Module Loader]

The entity class is in ejb-api.jar which is in both the EAR containing the EJB jar and the WAR making the call.

Environment

  • JBoss Enterprise Application Platform (EAP) 6.0.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.