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 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.