psiegman / epublib

a java library for reading and writing epub files
http://www.siegmann.nl/epublib
1.05k stars 316 forks source link

Error with wrong epub files #71

Open mdelerue opened 10 years ago

mdelerue commented 10 years ago

Hello, I tried to set a Book object from a PDF file, I expected to get a beautiful error that I could have catched in my tomcat logs but all I got was these kind of error : ERROR nl.siegmann.epublib.epub.ResourcesLoader - Wrong Local header signature: 2065636e until the server crashes.

Is there a way to identify wrong epub file and stop the process ?

lmvco commented 9 years ago

I can also repro this issue. And worst: this message is written to log file so many times that now the server is out of space. I had to delete the log file. I know I can configure the server log4j library to ignore errors from nl.siegmann.epublib.* loggers but I don't want to.

alexandr-efimov commented 1 year ago

Same for us. Issue unexpectedly happened as user uploaded some EPUB file, as result - in the service ±16gb logs.

Any idea how to debug / workaround? We use try with resources to work with file and that caused infinitive loop looks like from the logs.

image