apache / hop

Hop Orchestration Platform
https://hop.apache.org/
Apache License 2.0
951 stars 345 forks source link

[Bug]: Null pointer exception while executing a Webservice pipeline #3498

Open kevin-dmello opened 10 months ago

kevin-dmello commented 10 months ago

Apache Hop version?

2.7.0 (2023-12-01 10.59.05)

Java version?

11

Operating system

Linux

What happened?

Was testing out the web service capability of the Hop server and ran into a null pointer exception while executing the webservice pipeline. Had an incorrect setting on the Pipeline run configuration for the web service - had it remote instead of local, changing this fixed the issue, but logging this since we should ideally not have a NPE thrown. Here's the exception:

javax.servlet.ServletException: Error producing web service output at org.apache.hop.www.WebServiceServlet.doGet(WebServiceServlet.java:231) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at org.apache.hop.www.BaseHttpServlet.service(BaseHttpServlet.java:103) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:567) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:516) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) 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:336) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:135) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: org.apache.hop.core.exception.HopException: Error preparing remote pipeline at java.lang.Thread.run (Thread.java:829) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run (QueuedThreadPool.java:1036) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:882) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce (EatWhatYouKill.java:135) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce (EatWhatYouKill.java:171) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce (EatWhatYouKill.java:313) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask (EatWhatYouKill.java:336) at org.eclipse.jetty.io.ChannelEndPoint$1.run (ChannelEndPoint.java:104) at org.eclipse.jetty.io.FillInterest.fillable (FillInterest.java:105) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded (AbstractConnection.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable (HttpConnection.java:277) at org.eclipse.jetty.server.HttpChannel.handle (HttpChannel.java:380) at org.eclipse.jetty.server.HttpChannel.dispatch (HttpChannel.java:633) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1 (HttpChannel.java:388) at org.eclipse.jetty.server.Server.handle (Server.java:516) at org.eclipse.jetty.server.handler.HandlerWrapper.handle (HandlerWrapper.java:127) at org.eclipse.jetty.security.SecurityHandler.handle (SecurityHandler.java:567) at org.eclipse.jetty.server.handler.HandlerList.handle (HandlerList.java:59) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle (ContextHandlerCollection.java:234) at org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandler.doScope (ContextHandler.java:1350) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope (ScopedHandler.java:186) at org.eclipse.jetty.server.session.SessionHandler.doScope (SessionHandler.java:1594) at org.eclipse.jetty.servlet.ServletHandler.doScope (ServletHandler.java:501) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope (ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle (ContextHandler.java:1435) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle (ScopedHandler.java:233) at org.eclipse.jetty.server.session.SessionHandler.doHandle (SessionHandler.java:1624) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle (ScopedHandler.java:233) at org.eclipse.jetty.servlet.ServletHandler.doHandle (ServletHandler.java:550) at org.eclipse.jetty.servlet.ServletHolder.handle (ServletHolder.java:799) at javax.servlet.http.HttpServlet.service (HttpServlet.java:790) at org.apache.hop.www.BaseHttpServlet.service (BaseHttpServlet.java:103) at javax.servlet.http.HttpServlet.service (HttpServlet.java:687) at org.apache.hop.www.WebServiceServlet.doGet (WebServiceServlet.java:195) at org.apache.hop.pipeline.engines.remote.RemotePipelineEngine.prepareExecution (RemotePipelineEngine.java:229) at org.apache.hop.core.logging.LogChannel.logBasic (LogChannel.java:157) at org.apache.hop.core.logging.LogChannel.println (LogChannel.java:105) at org.apache.hop.core.logging.LogLevel.isVisible (LogLevel.java:103) at org.apache.hop.pipeline.engines.remote.RemotePipelineEngine.prepareExecution(RemotePipelineEngine.java:258) at org.apache.hop.www.WebServiceServlet.doGet(WebServiceServlet.java:195) ... 34 more Caused by: java.lang.NullPointerException at org.apache.hop.core.logging.LogLevel.isVisible(LogLevel.java:103) at org.apache.hop.core.logging.LogChannel.println(LogChannel.java:105) at org.apache.hop.core.logging.LogChannel.logBasic(LogChannel.java:157) at org.apache.hop.pipeline.engines.remote.RemotePipelineEngine.prepareExecution(RemotePipelineEngine.java:229) ... 35 more

Issue Priority

Priority: 3

Issue Component

Component: Hop Server

Keziake commented 4 months ago

Hi, I'm having the same issue.

Here is the message and stack:

HTTP ERROR 500 javax.servlet.ServletException: Error producing web service output

URI: | /hop/webService/ -- | -- 500 javax.servlet.ServletException: Error producing web service output org.apache.hop.www.WebServiceServlet-2ba9ed19 javax.servlet.ServletException: Error producing web service output org.apache.hop.core.exception.HopException: Error preparing remote pipeline Cannot invoke "org.apache.hop.core.logging.LogLevel.getLevel()" because "filterLogLevel" is null java.lang.NullPointerException: Cannot invoke "org.apache.hop.core.logging.LogLevel.getLevel()" because "filterLogLevel" is null

Caused by:

javax.servlet.ServletException: Error producing web service output
    at org.apache.hop.www.WebServiceServlet.doGet(WebServiceServlet.java:231)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at org.apache.hop.www.BaseHttpServlet.service(BaseHttpServlet.java:103)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234)
    at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:567)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
    at org.eclipse.jetty.server.Server.handle(Server.java:516)
    at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
    at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
    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.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
    at java.base/java.lang.Thread.run(Thread.java:1589)
Caused by: org.apache.hop.core.exception.HopException: 
Error preparing remote pipeline
Cannot invoke "org.apache.hop.core.logging.LogLevel.getLevel()" because "filterLogLevel" is null

    at org.apache.hop.pipeline.engines.remote.RemotePipelineEngine.prepareExecution(RemotePipelineEngine.java:259)
    at org.apache.hop.www.WebServiceServlet.doGet(WebServiceServlet.java:195)
    ... 30 more
Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.hop.core.logging.LogLevel.getLevel()" because "filterLogLevel" is null
    at org.apache.hop.core.logging.LogLevel.isVisible(LogLevel.java:103)
    at org.apache.hop.core.logging.LogChannel.println(LogChannel.java:105)
    at org.apache.hop.core.logging.LogChannel.logBasic(LogChannel.java:157)
    at org.apache.hop.pipeline.engines.remote.RemotePipelineEngine.prepareExecution(RemotePipelineEngine.java:230)
    ... 31 more