MaikJaek/flying-saucer

NPE in logger

Opened this issue · 2 comments

This was entered in the java.net issue tracker on Nov. 12 2012 by user "tyuha"

>>>


Hello!

I got:

java.lang.NullPointerException
at org.xhtmlrenderer.util.XRLog.log(XRLog.java:206)
at org.xhtmlrenderer.util.XRLog.render(XRLog.java:194)
at org.xhtmlrenderer.util.XRLog.render(XRLog.java:190)
at org.xhtmlrenderer.layout.SharedContext.<init>(SharedContext.java:107)
at org.xhtmlrenderer.pdf.ITextRenderer.<init>(ITextRenderer.java:111)
at org.xhtmlrenderer.pdf.ITextRenderer.<init>(ITextRenderer.java:102)

when I was using Flying Saucer (Release R8) in several threads. Before it 
worked fine in several processes, with no changes in code after redeploy I got 
this exception.

It seems very similar to this problem:
http://java.net/projects/xhtmlrenderer/lists/dev/archive/2008-10/message/0

Thank you!

>>>

Original issue reported on code.google.com by pdoubl...@gmail.com on 6 Feb 2013 at 11:07

Hi, im sorry for my english.

When i run my program the first time XRLog.loggingEnabled is true,
subsequent executions  XRLog.loggingEnabled is false, that fails first time 
with Threads.

My patch is XRLog.setLoggingEnabled(false);
I know the post is old, hope to help more people like me come here.

Original comment by japer...@gmail.com on 12 Jun 2014 at 7:09

We are experiencing the same problem.

Any ideas on what causes this ?

@japer...@gmail.com: if I understand you correctly, you did the following 
change in the init method of XRLog class ? Correct ?
XRLog.setLoggingEnabled(false);



Thanks!

Original comment by johan.ru...@gmail.com on 4 Sep 2014 at 12:04