Issue while configuring Hibernate 2nd level cache

Solution Verified - Updated -


  • After having migrated from JBoss 5.x to EAP 6.3.2 how to configure and check 2nd level cache.
  • We have some question to find out in persistence.xml file :
    • If there is a 2nd level cache configured or not ?
    • configure a 2nd level cache if not yet done and
    • check whether the 2nd level cache is working or not?
  • We are using persistence.xml and an entity bean annotated by @Cache.
  • When we insert :

into persistence.xml, the System will complains below:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'shared-cache-mode'. One of '{"http://":property}' is expected.
  • Will we want to Configure Infinispan for a JPA application or Configure Infinispan for a native Hibernate application ? Is both kind of configuration true?
  • What is the right way to query the 2nd level chache about read and hit entities?


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.3.2

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