0

I am using Jetty 9.4.44 and for jetty debug logs I have added jetty-logging.properties in classpath

Setup logging implementation
 org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
 org.eclipse.jetty.LEVEL=INFO
 Make websocket more verbose for testing
 org.eclipse.jetty.websocket.LEVEL=DEBUG

After adding jetty-logging.properties file and restarting the server getting this Error

ALL 000000000000 GLOBAL_SCOPE 2022-04-21 01:03:42.427:DBUG:oejs.HttpChannel:qtp1984050658-1676: Could not perform ERROR dispatch, aborting
java.lang.NoClassDefFoundError: org.eclipse.jetty.server.Dispatcher (initialization failure)
        at java.lang.J9VMInternals.initializationAlreadyFailed(J9VMInternals.java:91)
        at org.eclipse.jetty.server.handler.ContextHandler$Context.getRequestDispatcher(ContextHandler.java:2249)
        at org.eclipse.jetty.server.handler.ErrorHandler.doError(ErrorHandler.java:111)
        at org.eclipse.jetty.server.handler.ErrorHandler.handle(ErrorHandler.java:95)
        at org.eclipse.jetty.server.HttpChannel.lambda$handle$3(HttpChannel.java:449)
        at org.eclipse.jetty.server.HttpChannel$$Lambda$885.00000000D40118D0.dispatch(Unknown Source)
        at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:447)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
        at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
        at java.lang.Thread.run(Thread.java:785)
Caused by:
java.lang.NullPointerException: Logger with name [org.eclipse.jetty.server.Dispatcher]
        at java.util.Objects.requireNonNull(Objects.java:239)
        at org.eclipse.jetty.util.log.Log.getLogger(Log.java:294)
        at org.eclipse.jetty.util.log.Log.getLogger(Log.java:267)
        at org.eclipse.jetty.server.Dispatcher.<clinit>(Dispatcher.java:45)
        at org.eclipse.jetty.server.handler.ContextHandler$Context.getRequestDispatcher(ContextHandler.java:2249)
        at org.eclipse.jetty.server.handler.ErrorHandler.doError(ErrorHandler.java:111)
        at org.eclipse.jetty.server.handler.ErrorHandler.handle(ErrorHandler.java:95)
        at org.eclipse.jetty.server.HttpChannel.lambda$handle$3(HttpChannel.java:449)
        at org.eclipse.jetty.server.HttpChannel$$Lambda$885.00000000D40118D0.dispatch(Unknown Source)
        at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:447)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
        at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
Imdad Ali
  • 11
  • 2
  • Try again with normal Java (not IBM or J9, but something from the OpenJDK family) if it works there, then you know your J9 JVM is having issues (I ask you to do this, as the J9 JVM is constantly causing problems for valid java, and has a long list of bugs unresolved). – Joakim Erdfelt Apr 20 '22 at 19:57
  • Edit your question, and include the ["Logging initialized" output](https://github.com/eclipse/jetty.project/blob/jetty-9.4.44.v20210927/jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java#L170) (seen at INFO level). This will tell us more about your logging configuration. There might be 2 such events, one at server init, and one at webapp init. – Joakim Erdfelt Apr 27 '22 at 20:30
  • apart from OpenJDK if there is any possibility to make working with IBM JDK? – Imdad Ali Apr 28 '22 at 06:49
  • @JoakimErdfelt or passing any other param to make it working? – Imdad Ali Apr 28 '22 at 06:51
  • @JoakimErdfelt I have opened a ticket with Jetty too https://github.com/eclipse/jetty.project/issues/7932 – Imdad Ali Apr 28 '22 at 08:10

0 Answers0