-
Bug
-
Resolution: Done
-
Critical
-
3.0.0.Alpha6
-
None
-
None
NPE encountered when invoking an SQL2 query via the REST service, while an asynchronous EJB, with BMT, is updating the repository. Specifically, it appears that the EJB is executing either Session.save() or UserTransaction.commit() when the exception is encountered. If the EJB is not executing save() or commit(), but doing other things, the query works correctly.
The exception is below:
17:02:19,826 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/modeshape-rest].[Resteasy]] (http-localhost-127.0.0.1-8080-1) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.2.Final.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_27] Caused by: java.lang.NullPointerException at org.modeshape.jcr.cache.document.LazyCachedNode.getSegment(LazyCachedNode.java:172) [modeshape-jcr-3.0.0.Alpha6.jar:3.0.0.Alpha6] at org.modeshape.jcr.cache.document.LazyCachedNode.getPath(LazyCachedNode.java:181) [modeshape-jcr-3.0.0.Alpha6.jar:3.0.0.Alpha6] at org.modeshape.jcr.cache.PathCache.getPath(PathCache.java:45) [modeshape-jcr-3.0.0.Alpha6.jar:3.0.0.Alpha6] at org.modeshape.jcr.query.lucene.basic.BasicTupleCollector.doCollect(BasicTupleCollector.java:187) [modeshape-jcr-3.0.0.Alpha6.jar:3.0.0.Alpha6] at org.modeshape.jcr.query.lucene.LuceneQueryEngine$TupleCollector.collect(LuceneQueryEngine.java:378) [modeshape-jcr-3.0.0.Alpha6.jar:3.0.0.Alpha6] at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:281) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:581) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:383) at org.modeshape.jcr.query.lucene.LuceneQueryEngine$LuceneAccessQuery.execute(LuceneQueryEngine.java:314) [modeshape-jcr-3.0.0.Alpha6.jar:3.0.0.Alpha6] at org.modeshape.jcr.query.process.QueryProcessor.execute(QueryProcessor.java:96) [modeshape-jcr-3.0.0.Alpha6.jar:3.0.0.Alpha6] at org.modeshape.jcr.query.process.QueryEngine.execute(QueryEngine.java:140) [modeshape-jcr-3.0.0.Alpha6.jar:3.0.0.Alpha6] at org.modeshape.jcr.query.lucene.LuceneQueryEngine$1.getResults(LuceneQueryEngine.java:149) [modeshape-jcr-3.0.0.Alpha6.jar:3.0.0.Alpha6] at org.modeshape.jcr.query.JcrQuery.execute(JcrQuery.java:119) [modeshape-jcr-3.0.0.Alpha6.jar:3.0.0.Alpha6] at org.modeshape.web.jcr.rest.QueryHandler.postItem(QueryHandler.java:78) [modeshape-web-jcr-rest-3.0.0.Alpha6.jar:3.0.0.Alpha6] at org.modeshape.web.jcr.rest.JcrResources.postJcrSql2Query(JcrResources.java:441) [modeshape-web-jcr-rest-3.0.0.Alpha6.jar:3.0.0.Alpha6] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_27] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_27] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_27] at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_27] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) [resteasy-jaxrs-2.3.2.Final.jar:] ... 20 more