Baffling nullpointer on a LOG statement?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Baffling nullpointer on a LOG statement?

ceposta
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)
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-users] Baffling nullpointer on a LOG statement?

Joakim Erdfelt-9
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 <[hidden email]>



On Fri, Sep 28, 2012 at 8:04 AM, ceposta <[hidden email]> 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
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-users] Baffling nullpointer on a LOG statement?

ceposta
Thanks Joakim! i'll keep digging

On Fri, Sep 28, 2012 at 8:34 AM, Joakim Erdfelt <[hidden email]> 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 <[hidden email]>



On Fri, Sep 28, 2012 at 8:04 AM, ceposta <[hidden email]> 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
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users