-->
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.  [ 2 posts ] 
Author Message
 Post subject: Cannot update Cache .data files created by another user
PostPosted: Wed Jan 10, 2007 5:09 pm 
Newbie

Joined: Wed Jan 10, 2007 4:59 pm
Posts: 1
Hi,

I have the following problem with generated cache files:

Cache .data files (like org.hibernate.cache.StandardQueryCache.data and org.hibernate.cache.UpdateTimestampsCache.data when query cache is enabled, as in "hibernate.cache.use_query_cache true"), when created by an user, cannot be updated by another user because write permissions deny this.
This is not an issue in Windows as each user have is own "Temp" directory.
Under Unix/Linux, with a common "temp" directory, this remain an issue.

Any idea on how can these files be written by other users? (like specifying some ownership)
Thank you in advance.

Hibernate version: 3.1

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
02:20:30,734 ERROR DiskStore:169 - org.hibernate.cache.StandardQueryCacheCache: Could not create disk store
java.io.FileNotFoundException: /tmp/org.hibernate.cache.StandardQueryCache.data (Permission denied)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
at net.sf.ehcache.store.DiskStore.initialiseFiles(DiskStore.java:199)
at net.sf.ehcache.store.DiskStore.<init>(DiskStore.java:151)
at net.sf.ehcache.Cache.initialise(Cache.java:269)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:333)
at net.sf.ehcache.CacheManager.addCache(CacheManager.java:325)
at net.sf.ehcache.CacheManager.addCache(CacheManager.java:310)
at org.hibernate.cache.EhCacheProvider.buildCache(EhCacheProvider.java:104)
at org.hibernate.cache.StandardQueryCache.<init>(StandardQueryCache.java:53)
at org.hibernate.cache.StandardQueryCacheFactory.getQueryCache(StandardQueryCacheFactory.java:21)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:315)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)


Name and version of the database you are using: HSQL

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Cache .data files (like org.hibernate.cache.StandardQueryCache.data and org.hibernate.cache.UpdateTimestampsCache.data when query cache is enabled, as in "hibernate.cache.use_query_cache true"), when created by an user, cannot be updated by another user because write permissions deny this.
This is not an issue in Windows as each user have is own "Temp" directory.
Under Unix/Linux, with a common "temp" directory, this remain an issue.

Any idea on how can these files be written by other users? (like specifying some ownership)
Thank you in advance.

_________________
Adrian Mitrica


Top
 Profile  
 
 Post subject: Re: Cannot update Cache .data files created by another user
PostPosted: Tue Sep 15, 2009 6:23 pm 
Beginner
Beginner

Joined: Sat Sep 12, 2009 10:20 am
Posts: 44
I'm getting the same error. Did you find a solution?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.