Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Baffling nullpointer on a LOG statement?

Thanks Joakim! i'll keep digging

On Fri, Sep 28, 2012 at 8:34 AM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
Somehow the LOG object itself is null.
Not sure how that's possible.
The Log.getLogger() is wired up on first access.


Try setting up the Logger manually.
At the earliest point you can in your code, set the Logger implementation.

Log.setLogger(new StdErrLog()); or
Log.setLogger(new Slf4jLog()); or
Log.setLogger(new JavaUtilLog());


--
Joakim Erdfelt <joakim@xxxxxxxxxxx>



On Fri, Sep 28, 2012 at 8:04 AM, ceposta <christian.posta@xxxxxxxxx> wrote:
Any committers can help me understand how this could happen? I'm seeing a
null pointer at a logging statement at line 199 in AbstractLifeCycle:

        LOG.warn(FAILED+" " + this+": "+th,th);


I'm looking at    <jetty-version>7.6.1.v20120215</jetty-version>

The code for how we are starting the jetty server is here (line 146):

http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala?view=markup

And I see this stack trace:

2012-09-28 07:27:03,551 | WARN | stackref=13a0b579cf2
java.lang.NullPointerException
at
org.eclipse.jetty.util.component.AbstractLifeCycle.setFailed(AbstractLifeCycle.java:199)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at
org.apache.activemq.apollo.broker.jetty.WebSocketTransportFactory$WsTransportServer$$anonfun$_start$1.apply$mcV$sp(WebSocketTransportFactory.scala:146)
at org.fusesource.hawtdispatch.package$$anon$3.run(hawtdispatch.scala:357)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)



--
View this message in context: http://jetty.4.n6.nabble.com/Baffling-nullpointer-on-a-LOG-statement-tp4959249.html
Sent from the Jetty User mailing list archive at Nabble.com.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top