Hi
Recently I started getting runtime exceptions in PDFParser.parse(), but I can't
seem to get any information out as to why. The weird thing is that it only
happens on Linux - on my laptop it is fine!
I have tried to get a stack trace (my code uses log4j), but all I get is:
org.slf4j.impl.Log4jLoggerAdapter.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
This is produced by my code:
try {
log.info("Parsing PDF document ...");
document = PDDocument.load(is, true); // skip corrupt pdf objects
} catch (Throwable t) {
message = "Failure when parsing PDF <" + filename + ">: " + t.getMessage();
if (t1.getCause() != null) {
message += " | CAUSE: " + t1.getCause().getMessage();
}
log.warn(t);
log.debug(message);
throw new Exception(message);
}
I have also tried to turn logging up in my log4j.properties:
log4j.logger.org.apache.pdfbox=TRACE
But I see nothing except the slf4j line above.
Can anyone tell me what I am doing wrong?
Thanks
- Chris
Chris Bamford
m: +44 7860 405292
www.mimecast.com
Mimecast
CityPoint
One Ropemaker Street, London, EC2Y 9AW
+44 (0) 207 847 8700
Disclaimer
[email protected] sent at 2015-01-21 14:24:10 is confidential and may be
legally privileged. It is intended solely for use by [email protected]
and others authorized to receive it. If you are not [email protected]
you are hereby notified that any disclosure, copying, distribution or taking
action in reliance of the contents of this information is strictly prohibited
and may be unlawful.
Mimecast Ltd. is a company registered in England and Wales with the company
number 4698693 VAT No. GB 123 4197 34
Registered Office: CityPoint, One Ropemaker Street, Moorgate, London, EC2Y 9AW
This email message has been scanned for viruses by Mimecast. Mimecast delivers
a complete managed email solution from a single web based platform. For more
information please visit www.mimecast.com
mcst2013