"HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated..." in JBoss EAP

Solution Verified - Updated -

Issue

  • Updating from EAP 7.1 / Hibernate 5.1 (or older)
  • Using the legacy Hibernate (non-JPA/Session) interface createCriteria(Class) method (or another legacy criteria API variant)
  • Encountering warnings each time a criteria query object is created

    ... HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7.2 and later
  • Hibernate 5.3

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