Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 2.1
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Code:
[1/13/06 15:19:47:139 GMT] 00000042 SystemOut O ERROR [WebContainer : 2] (DiskStore.java:159) - a.b.hbeans.RGDataCache: Could not create disk store
java.io.FileNotFoundException: /tmp/a.b.hbeans.RGData.data (The file access permissions do not allow the specified action.)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:230)
at net.sf.ehcache.store.DiskStore.<init>(DiskStore.java:141)
at net.sf.ehcache.store.DiskStore.<init>(DiskStore.java:110)
at net.sf.ehcache.Cache.initialise(Cache.java:180)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:296)
at net.sf.ehcache.CacheManager.addCache(CacheManager.java:288)
at net.sf.ehcache.CacheManager.addCache(CacheManager.java:273)
at net.sf.hibernate.cache.EhCache.<init>(EhCache.java:96)
at net.sf.hibernate.cache.EhCacheProvider.buildCache(EhCacheProvider.java:84)
at net.sf.hibernate.cfg.Configuration.configureCaches(Configuration.java:1130)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:790)
at com.logistics.javalib.persistence.layer.SessionFactory.<init>(SessionFactory.java:74)
at a.b.HibWrapper.getSessionFactory(HibWrapper.java:721)
Name and version of the database you are using: Informix 10x
The generated SQL (show_sql=true):Debug level Hibernate log excerpt:We have the following tag in RGData.hbm.xml file (and some other hbm.xml files):
Code:
<jcs-cache usage="read-only" />
We have some hbm.xml files that do not have any such references (no explicit caching specified).
Now, only for the files which have <jcs-cache usage="..."> specified, Hibernate configuration tries to create a .data file under /tmp directory. Since we run multiple dev instances on the same AIX box, the RGData.data file that Hibernate tries to write to /tmp may get conflicted with the same file written by some other user, and that causes obvious permissions issues.
Here are my questions, if anyone can help me out:
1. Why is Hibernate using ehCache, if we are mentioning <jcs-cache> in the Hibernate file?
2. Is there a way to provide a specific file location or cache configuration?
Thanks.
Kartik