title: Infinispan : Statistics are enabled while attribute 'available' is set to false
body: <p>I get the following exception when starting Wildfly configured for second level cache. I have enabled second level cache in <code>persistence.xml</code>. If I remove below <code>property</code> it starts properly. what is the problem with the below configuration ?</p>
  
  <p><strong>persistence.xml</strong></p>
  
  <pre><code>&lt;property name="hibernate.cache.infinispan.statistics" value= "true"/&gt;
  </code></pre>
  
  <p><strong>standalone.xml</strong> (default one that comes in wildfly)</p>
  
  <pre><code>    &lt;cache-container name="hibernate" default-cache="local-query" module="org.hibernate.infinispan"&gt;
          &lt;local-cache name="entity"&gt;
              &lt;transaction mode="NON_XA"/&gt;
              &lt;eviction strategy="LRU" max-entries="10000"/&gt;
              &lt;expiration max-idle="100000"/&gt;
          &lt;/local-cache&gt;
          &lt;local-cache name="local-query"&gt;
              &lt;eviction strategy="LRU" max-entries="10000"/&gt;
              &lt;expiration max-idle="100000"/&gt;
          &lt;/local-cache&gt;
          &lt;local-cache name="timestamps"/&gt;
      &lt;/cache-container&gt;
  </code></pre>
  
  <p><strong>exception :</strong></p>
  
  <blockquote>
    <p>Statistics are enabled while attribute 'available' is set to false.</p>
  </blockquote>
  
  <p><strong>logs</strong></p>
  
  <pre><code>        ... 7 more
  Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.spi.CacheImplementor]
          at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:264)
          at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:228)
          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207)
          at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:242)
          at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879)
          ... 9 more
  Caused by: org.hibernate.cache.CacheException: Unable to start region factory
          at org.hibernate.cache.infinispan.InfinispanRegionFactory.start(InfinispanRegionFactory.java:418)
          at org.hibernate.internal.CacheImpl.&lt;init&gt;(CacheImpl.java:49)
          at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:28)
          at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:20)
          at org.hibernate.service.internal.SessionFactoryServiceRegistryImpl.initiateService(SessionFactoryServiceRegistryImpl.java:46)
          at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:254)
          ... 14 more
  Caused by: org.infinispan.commons.CacheConfigurationException: ISPN000372: **Statistics are enabled while attribute 'available' is set to false.**
          at org.infinispan.configuration.cache.JMXStatisticsConfigurationBuilder.validate(JMXStatisticsConfigurationBuilder.java:69)
          at org.infinispan.configuration.cache.ConfigurationBuilder.validate(ConfigurationBuilder.java:203)
          at org.infinispan.configuration.cache.ConfigurationBuilder.build(ConfigurationBuilder.java:246)
          at org.infinispan.configuration.cache.ConfigurationBuilder.build(ConfigurationBuilder.java:236)
          at org.hibernate.cache.infinispan.InfinispanRegionFactory.defineGenericDataTypeCacheConfigurations(InfinispanRegionFactory.java:636)
          at org.hibernate.cache.infinispan.InfinispanRegionFactory.start(InfinispanRegionFactory.java:394)
          ... 19 more
  </code></pre>