aesTRYERY / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

NPE in logger #216

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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