Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3631200
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:22:01+00:00 2026-05-19T00:22:01+00:00

I’m getting the following exception thrown in my Grails application: [1564928] store.DiskStore ClassNameCache: Could

  • 0

I’m getting the following exception thrown in my Grails application:

[1564928] store.DiskStore ClassNameCache: Could not remove disk store entry for ClassName#123195371. Error was null
java.io.EOFException
       at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2297)
       at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2766)
       at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:797)
       at java.io.ObjectInputStream.<init>(ObjectInputStream.java:297)
       at net.sf.ehcache.store.DiskStore$1.<init>(DiskStore.java:316)
       at net.sf.ehcache.store.DiskStore.loadElementFromDiskElement(DiskStore.java:316)
       at net.sf.ehcache.store.DiskStore.expireElements(DiskStore.java:973)
       at net.sf.ehcache.store.DiskStore.throwableSafeExpireElementsIfRequired(DiskStore.java:657)
       at net.sf.ehcache.store.DiskStore.spoolAndExpiryThreadMain(DiskStore.java:645)
       at net.sf.ehcache.store.DiskStore.access$900(DiskStore.java:68)
       at net.sf.ehcache.store.DiskStore$SpoolAndExpiryThread.run(DiskStore.java:1110)

The DataSource settings related to Hibernate are the following:

hibernate {
    cache.use_second_level_cache=true
    cache.use_query_cache=true
    cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider'
}

It seems like the current caching setup is writing to /tmp/tomcat6-tmp/.

I would like to completely disable caching to disk and instead only cache to memory. How do I do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:22:01+00:00Added an answer on May 19, 2026 at 12:22 am

    If you don’t have an ehcache.xml file in your classpath, ehcache uses its default settings. But if you do have one (put it in grails-app/conf or src/java) then that will be used instead. The example at http://ehcache.org/ehcache.xml is well documented.

    Something like this should work; tweak the default cache settings for caches that aren’t explicitly declared (although I prefer to create them all for documentation sake) and define any specific caches that have non-default settings:

    <ehcache>
    
       <diskStore path='java.io.tmpdir' />
    
       <defaultCache
          maxElementsInMemory='10000'
          eternal='false'
          timeToIdleSeconds='120'
          timeToLiveSeconds='120'
          overflowToDisk='true'
          maxElementsOnDisk='10000000'
          diskPersistent='false'
          diskExpiryThreadIntervalSeconds='120'
          memoryStoreEvictionPolicy='LRU'
       />
    
       <cache name='com.yourcompany.yourapp.DomainClassName'
          maxElementsInMemory='1000'
          overflowToDisk='false'
       />
    
       <!-- hibernate stuff -->
       <cache name='org.hibernate.cache.StandardQueryCache'
          maxElementsInMemory='50'
          eternal='false'
          timeToLiveSeconds='120'
          maxElementsOnDisk='0'
       />
    
       <cache name='org.hibernate.cache.UpdateTimestampsCache'
          maxElementsInMemory='5000'
          eternal='true'
          maxElementsOnDisk='0'
       />
    
    </ehcache>
    

    It’s also a good idea to put the two Hibernate caches in there so they can be conveniently adjusted as needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.