Hi,

I am running the BaseX webapp deployed on a Jetty server.

I’m trying to upgrade to BaseX 12.2, running with Jetty 12.1.7.

When I run a job using job:eval I find that the Jobs tab in the web UI displays the below error/stack trace while the job is running. 

The job itself is running a proc:system command that runs a script that makes a REST call to a web service and then uploads the data into a BaseX db. It takes 2-3 minutes to complete.

The error doesn’t occur every single time the job is run, but often. I have reproduced it both on my local Mac and on a server running Amazon Linux.

It doesn’t seem to happen when I use BaseX 12.2 with Jetty 11.0.24.

It may not be a significant problem. Despite the error the job still completes, so it doesn’t affect anything other than the jobs tab display in the Web UI. But it is odd and I wonder if anyone has any idea what the issue might be. Also, is there any drawback to using Jetty 11 (other than it being deprecated)?

Thanks,

Darryl


Unexpected error: Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 12.2
Java: Azul Systems, Inc., 21.0.10
OS: Linux, amd64
Stack Trace:
java.lang.NullPointerException: Cannot invoke "org.eclipse.jetty.server.Request.getAttribute(String)" because the return value of "org.eclipse.jetty.ee11.servlet.ServletApiRequest.getRequest()" is null
      at org.eclipse.jetty.ee11.servlet.ServletApiRequest.getAttribute(ServletApiRequest.java:915)
      at org.basex.http.HTTPConnection.getAttribute(HTTPConnection.java:448)
      at org.basex.http.HTTPConnection.clientName(HTTPConnection.java:272)
      at org.basex.core.Context.clientName(Context.java:283)
      at org.basex.query.func.job.JobListDetails.value(JobListDetails.java:53)
      at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:64)
      at org.basex.query.expr.gflwor.For$1.next(For.java:113)
      at org.basex.query.expr.gflwor.Let$LetEval.next(Let.java:145)
      at org.basex.query.expr.gflwor.OrderBy$1.sort(OrderBy.java:73)
      at org.basex.query.expr.gflwor.OrderBy$1.next(OrderBy.java:54)
      at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:93)
      at org.basex.query.expr.Pipeline.value(Pipeline.java:82)
      at org.basex.query.expr.gflwor.Let$LetEval.next(Let.java:147)
      at org.basex.query.expr.gflwor.GFLWOR$1.next(GFLWOR.java:79)
      at org.basex.query.QueryContext.next(QueryContext.java:403)
      at org.basex.query.expr.constr.Constr.add(Constr.java:73)
      at org.basex.query.expr.constr.CElem.item(CElem.java:139)
      at org.basex.query.expr.constr.CElem.item(CElem.java:32)
      at org.basex.query.expr.ParseExpr.value(ParseExpr.java:69)
      at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:64)
      at org.basex.query.expr.constr.Constr.add(Constr.java:72)
      at org.basex.query.expr.constr.CElem.item(CElem.java:139)
      at org.basex.query.expr.constr.CElem.item(CElem.java:32)
      at org.basex.query.expr.ParseExpr.value(ParseExpr.java:69)
      at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:64)
      at org.basex.query.expr.constr.Constr.add(Constr.java:72)
      at org.basex.query.expr.constr.CElem.item(CElem.java:139)
      at org.basex.query.expr.constr.CElem.item(CElem.java:32)
      at org.basex.query.expr.ParseExpr.value(ParseExpr.java:69)
      at org.basex.query.func.FuncCall.evalFunc(FuncCall.java:38)
      at org.basex.query.func.StaticFuncCall.value(StaticFuncCall.java:121)
      at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:64)
      at org.basex.query.scope.MainModule.iter(MainModule.java:53)
      at org.basex.query.QueryContext.lambda$iter$4(QueryContext.java:382)
      at org.basex.query.QueryContext.run(QueryContext.java:779)
      at org.basex.query.QueryContext.iter(QueryContext.java:382)
      at org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:85)
      at org.basex.http.web.WebResponse.create(WebResponse.java:58)
      at org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:70)
      at org.basex.http.BaseXServlet.service(BaseXServlet.java:68)
      at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:723)
      at org.eclipse.jetty.ee11.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1384)
      at org.eclipse.jetty.ee11.servlet.ServletHolder.handle(ServletHolder.java:750)
      at org.eclipse.jetty.ee11.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1668)
      at org.eclipse.jetty.ee11.servlet.ServletHandler$MappedServlet.handle(ServletHandler.java:1602)
      at org.eclipse.jetty.ee11.servlet.ServletChannel.dispatch(ServletChannel.java:868)
      at org.eclipse.jetty.ee11.servlet.ServletChannel.handle(ServletChannel.java:449)
      at org.eclipse.jetty.ee11.servlet.ServletHandler.handle(ServletHandler.java:470)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:546)
      at org.eclipse.jetty.ee11.servlet.SessionHandler.handle(SessionHandler.java:763)
      at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1224)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:148)
      at org.eclipse.jetty.server.Server.handle(Server.java:197)
      at org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:787)
      at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:420)
      at org.eclipse.jetty.server.internal.HttpConnection$FillableCallback.succeeded(HttpConnection.java:1809)
      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
      at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:54)
      at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:492)
      at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.epcRunTask(AdaptiveExecutionStrategy.java:428)
      at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:401)
      at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:255)
      at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:204)
      at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:317)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:1009)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1239)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1194)
      at java.base/java.lang.Thread.run(Thread.java:1583)