Incompatible TypedQuery exception is thrown when application(Using JPA-Hibernate) bundle is refreshed/re-installed

Solution Verified - Updated -

Issue

  • When we try to reinstall/refresh the application bundle using JPA-Hibernate, below error is thrown.
Caused by: java.lang.IllegalArgumentException: Type specified for TypedQuery [entity.Employee] is incompatible with query return type [class entity.Employee]
    at org.hibernate.ejb.AbstractEntityManagerImpl.resultClassChecking(AbstractEntityManagerImpl.java:702)
    at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:303)
  • Importing javax.jms package requires bundle restarts. The bundle can be successfully started only by running exports | grep javax.jms command in Fuse Console and then manually refreshing bundle with required javax.jms version (javax.jms; version=1.1.0). How can this issue be resolved?

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

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