-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Unrecognized EHCache.xml
PostPosted: Tue Dec 20, 2005 1:17 pm 
Regular
Regular

Joined: Wed Sep 29, 2004 11:34 am
Posts: 62
Location: Houston, TX
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:
Code:
<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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 5:26 pm 
Regular
Regular

Joined: Wed Sep 29, 2004 11:34 am
Posts: 62
Location: Houston, TX
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!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 11:06 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
it should work simply putting the ehcache.xml at the root of the har. The har itself is added to the deployment classpath.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.