• 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
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

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

 
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!