This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Random net.sf.ehcache.CacheException: java.io.StreamCorruptedException: invalid stream header

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on an quite old application and when users use a functionality, "from time to time", they get this error :

net.sf.ehcache.CacheException: java.io.StreamCorruptedException: invalid stream header: 2F456E74


I can reproduce the problem "from time to time", and when it happens, it is when trying to read a temp file, stored in :

C:\Users[myuser]\AppData\Local\Temp


This temp file has the name of a "demon thread" I can see in the Debug view of Eclipse, and depiste the fact it's a random problem, it seems it's always the same file which causes the java.io.StreamCorruptedException !

If I stop the application and the JBoss server, delete those files in the folder, and restart, it works but only once - it seems that the 1st time after a clean/restart, the exception can be thrown but silently, right after the main treatment is done. If a try one more time, it fails.

This happens when calling a hibernate

so I don't know what I can do since it deals with the way java manages its temporary files... Do you have some idea to give to me ?

Thanks in advance for your help
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Best java exception handling tutorail http://www.javaproficiency.com/2015/02/exception-handling-in-java.html
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!