1 Reply Latest reply on Dec 20, 2005 4:27 PM by fmaredia

    EHCache.xml not found!

    fmaredia

      Ehcache.xml is not recognized by our application in JBoss. Our application contains a har file and inside the har we have the ehcache.xml.

      Our jboss-service.xml file includes the following:

      <server>
      <mbean code="org.hibernate.jmx.HibernateService"
      name="jboss.jca:service=HibernateFactory,name=HibernateFactory">
      <depends>jboss.jca:service=RARDeployer</depends>
      <depends>jboss.jca:service=LocalTxCM,name=MySqlDS</depends>
      <attribute name="Datasource">java:/MySqlDS</attribute>
      <attribute name="Dialect">org.hibernate.dialect.MySQLDialect</attribute>
      <attribute name="JndiName">java:/hibernate/HibernateFactory</attribute>
      <attribute name="SecondLevelCacheEnabled">true</attribute>
      <attribute name="CacheProviderClass">org.hibernate.cache.EhCacheProvider</attribute>
      <attribute name="ShowSqlEnabled">false</attribute>
      <attribute name="TransactionStrategy">org.hibernate.transaction.JTATransactionFactory</attribute>
      <attribute name="TransactionManagerLookupStrategy">org.hibernate.transaction.JBossTransactionManagerLookup</attribute>
      <attribute name="FlushBeforeCompletionEnabled">true</attribute>
      <attribute name="AutoCloseSessionEnabled">true</attribute>
      <attribute name="MapResources">...</attribute>
      </mbean>
      </server>


      I get the following warnings:
      10:53:31,609 WARN [Configurator] No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/JBoss/myjboss/server/all/lib/ehcache-1.1.jar!/ehcache-failsafe.xml

      What is wrong here? I can't seem to figure out what is the problem.

        • 1. Re: EHCache.xml not found!
          fmaredia

          Well I fixed the problem! You have to create an ehcache.jar which contains your EHCache.xml. In JBoss you have to put it in server/servername/lib. I tried various places such as inside my application, outside it, etc, but if you put a jar inside the lib folder everything works fine!