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
|