-->
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: Hibernate tries to write to /tmp : No permission issue
PostPosted: Fri Jan 13, 2006 1:03 pm 
Newbie

Joined: Fri Aug 13, 2004 12:25 pm
Posts: 7
Location: Boston
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 13, 2006 3:52 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
http://www.developer.com/open/print.php/10930_3559931_4


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 13, 2006 3:58 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
probably ehache documentation is a better information source. http://ehcache.sourceforge.net/documentation/


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.