• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Best java exception handling tutorail http://www.javaproficiency.com/2015/02/exception-handling-in-java.html
 
Create symphonies in seed and soil. For this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic