Hi Darryl, Would you be ready to have a look at the latest snapshot? It would be interesting to hear if the problem persists. BaseX 12.3 will be released this or next month. Best, Christian ________________________________ Von: Darryl Pretto <darryl.pretto@workday.com> Gesendet: Mittwoch, 18. März 2026 17:17 An: Christian Grün <cg@basex.org>; basex-talk@mailman.uni-konstanz.de <basex-talk@mailman.uni-konstanz.de> Betreff: Re: NullPointer when job is running Thanks Christian. Which Jetty version would you recommend until the issue gets sorted out? 12.0? 11.0? From: Christian Grün <cg@basex.org> Date: Wednesday, March 18, 2026 at 3:58 AM To: basex-talk@mailman.uni-konstanz.de <basex-talk@mailman.uni-konstanz.de>, Darryl Pretto <darryl.pretto@workday.com> Subject: AW: NullPointer when job is running This Message Is From an Untrusted Sender You have not previously corresponded with this sender. Report Suspicious<https://us-phishalarm-ewt.proofpoint.com/EWT/v1/Iz9xO38YGHZK!YJNDJk5Ie2Lsr1khFS1n0KDXWR7iM6d-rDvbL4wzMCCabpLvJTHI5btxJjbwEqB8lT9ccqmrT3eK1u42b2ToKmRLO_R-bevKcTecBLr0N2UAYegCQ-pYbb2XeHO049H5vVMEfhOTFH8Bb-UK$> Hi Darryl, Thanks for the observation. Yes, the underlying problem is known [1]: BaseX propagates HTTP Request information to asynchronous jobs. This worked fine with previous versions of Jetty. With 12.1, the cleanup of completed Request instances seems to be enforced by the web server. This results in NPEs as soon as BaseX is trying to retrieve obsolete request metadata, as it e.g. happens for queries started by job:eval in the DBA. It is tricky to understand exactly when NPEs may occur, as the behavior of Jetty can be seen as an internal optimization which is not reflected by the generic JDK WebServlet API that we talk to. However, I have created a new snapshot that should improve the situation [2]. If things still fail, it will probably be best to completely stop propagating HTTP request information to asynchronously started jobs. Hope this helps, Christian [1] https://github.com/jetty/jetty.project/issues/14094<https://urldefense.com/v3/__https://github.com/jetty/jetty.project/issues/14094__;!!Iz9xO38YGHZK!_RG3EsCm1CU6NdZeaYIMRx6NNaYN_wWp8ygaChBvVp4qao6UUPR3IQuWzslQCkt6rM7hAR0oQyQeacs$> [2] https://files.basex.org/releases/latest/<https://urldefense.com/v3/__https://files.basex.org/releases/latest/__;!!Iz9xO38YGHZK!_RG3EsCm1CU6NdZeaYIMRx6NNaYN_wWp8ygaChBvVp4qao6UUPR3IQuWzslQCkt6rM7hAR0ocQH-Two$> ________________________________ Von: Darryl Pretto via BaseX-Talk <basex-talk@mailman.uni-konstanz.de> Gesendet: Dienstag, 17. März 2026 23:06 An: basex-talk@mailman.uni-konstanz.de <basex-talk@mailman.uni-konstanz.de> Betreff: [basex-talk] NullPointer when job is running 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)