-->
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.  [ 4 posts ] 
Author Message
 Post subject: Second-level cache error: 'Could not create disk store'
PostPosted: Wed Jun 15, 2005 5:23 am 
Newbie

Joined: Fri Jun 03, 2005 1:27 am
Posts: 2
Hi,

We are using second-level read/write caching to accelerate access to an
often-accessed db object. In hbm file:

<cache usage="read-write"/>

The cache provider is Hibernate's default (EHCache).

We attempt to access this db object from two different
applications running on the same Solaris9 machine, both
accessing it via a second-level cache.

The first application loads fine.

The second application fails to load with the following error:


mypackage.MyDBObjectCache: Could not create disk store
java.io.FileNotFoundException: /var/tmp/mypackage/MyDBObject.data (Permission denied)


our best bet is that upon loading of a second-level-cache marked entity,
Hibernate creats/locks a dedicated file in /var/tmp/. Works fine the
first time. Cannot work afterwards.

is there any way in which we can direct each of our applications
to create the cache data file in a different directory/using a different
name, thus solving the problem.

If not - is there any other solution/workaround?

Thank you,
Gilad Haimov
BMC Software




Domain Details
======================
Hibernate ver: 2.1.8
OS: Solaris 9
Application-Server: WLS 8.1
DB: Oracle-9



Exception stack
--------------------------
- Could not find configuration [com.bmc.idm.ctsa.hb8.dbobject.AsyncServiceStatusDBRep]; using defaults.

- mypackage.MyDBObjectCache: Could not create disk store

java.io.FileNotFoundException: /var/tmp/mypackage/MyDBObject.data (Permission denied)

at java.io.RandomAccessFile.open(Native Method)

at java.io.RandomAccessFile.<init>(RandomAccessFile.java:204)

at net.sf.ehcache.store.DiskStore.<init>(DiskStore.java:144)

at net.sf.ehcache.store.DiskStore.<init>(DiskStore.java:113)

at net.sf.ehcache.Cache.initialise(Cache.java:211)

at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:297)

at net.sf.ehcache.CacheManager.addCache(CacheManager.java:289)

at net.sf.ehcache.CacheManager.addCache(CacheManager.java:274)

at net.sf.hibernate.cache.EhCacheProvider.buildCache(EhCacheProvider.java:98)

at net.sf.hibernate.cfg.Configuration.configureCaches(Configuration.java:1147)

at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:804)

at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:535)

at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:470)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1065)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:343)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:260)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:221)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:276)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:317)

at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:82)

at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:67)

at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:58)

at com.bmc.idm.ctsa.common.inbound.config.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:25)

at com.bmc.idm.ctsa.common.inbound.config.SpringRegistry.init(SpringRegistry.java:63)

at com.bmc.idm.ctsa.config.TangoServerConfigListener.loadSpring(TangoServerConfigListener.java:186)

at com.bmc.idm.ctsa.config.TangoServerConfigListener.loadDataLayerConfig(TangoServerConfigListener.java:177)

at com.bmc.idm.ctsa.config.TangoServerConfigListener.contextInitialized(TangoServerConfigListener.java:55)

at weblogic.servlet.internal.WebAppServletContext$FireContextListenerAction.run(WebAppServletContext.java:6781)

at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)

at weblogic.servlet.internal.WebAppServletContext.notifyCreated(WebAppServletContext.java:1681)

at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3255)

at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5949)

at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:862)

at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2127)

at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2168)

at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2115)

at weblogic.management.deploy.slave.SlaveDeployer$Application.setActivation(SlaveDeployer.java:3082)

at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:1751)

at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:359)

at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)

at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)

at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)

at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)

at weblogic.Server.main(Server.java:32)


hbm file
---------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping package="com.bmc.idm.ctsa.hb8.dbobject">
<class name="MyDBObject" table="SERVICE_STATUS">
<cache usage="read-write"/>

<id name="id" column="ID" type="string" unsaved-value="null" >
<generator class="assigned"/>
</id>


<property name="resultClob" column="RESULT" type="text"/> <!--clob-->


<property name="status" type="com.bmc.idm.ctsa.hb8.usertype.AsyncStatusUserType" >
<column name="STATUS"/>
</property>

</class>
</hibernate-mapping>


--EOF--


Top
 Profile  
 
 Post subject: Hey, Did you find solution for this?
PostPosted: Sun Nov 12, 2006 6:25 pm 
Beginner
Beginner

Joined: Thu Nov 02, 2006 2:23 pm
Posts: 33
Thank you.


Top
 Profile  
 
 Post subject: Re: Hey, Did you find solution for this?
PostPosted: Tue Nov 28, 2006 10:54 am 
Regular
Regular

Joined: Mon Jul 31, 2006 4:59 pm
Posts: 53
avihaimar wrote:
Thank you.

Where ist the answer for his question?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 11:06 am 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
Use ehcache.xml,
http://ehcache.sourceforge.net/EhcacheU ... tml#id.s12


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