Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kevin-dmello opened this issue Dec 15, 2023 · 5 comments
Open

Comments

@kevin-dmello
Copy link

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
Copy link

Keziake commented May 27, 2024

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

@pepcim
Copy link

pepcim commented Nov 18, 2024

I have the same issue:
java.lang.NullPointerException
at org.apache.hop.www.GetStatusServlet.doGet(GetStatusServlet.java:421)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
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:273)
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.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
at java.base/java.lang.Thread.run(Thread.java:829)

@jortilles
Copy link
Contributor

I have the same issue.

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-154f8280 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:230)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at org.apache.hop.www.BaseHttpServlet.service(BaseHttpServlet.java:102)
	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:833)
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:264)
at org.apache.hop.www.WebServiceServlet.doGet(WebServiceServlet.java:194)
... 34 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:108)
at org.apache.hop.core.logging.LogChannel.logBasic(LogChannel.java:160)
at org.apache.hop.pipeline.engines.remote.RemotePipelineEngine.prepareExecution(RemotePipelineEngine.java:235)
... 35 more

@hansva
Copy link
Contributor

hansva commented Nov 20, 2024

The answer is already in the ticket. A misconfigured remote pipeline configuration.
The Run configuration of the remote Pipeline Run configuration should be a local run configuration.

@pepcim
Copy link

pepcim commented Nov 20, 2024

Thank you Hans!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants