-
Bug
-
Resolution: Done
-
Major
-
2.5.0.Final
-
None
I published CND file into default repository. Publishing went fine, but when try to look at file's content (jcr:content node) I received NPE.
I queried file content through REST interface (using curl utility), I issued this command:
curl -u admin:admin -X GET http://127.0.0.1:8080/modeshape-rest/eds/default/items/test.cnd/jcr:content
and I got this exception:
16:34:14,500 ERROR [[Resteasy]] Servlet.service() for servlet Resteasy threw exception org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:263) at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:169) at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:146) at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:456) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:418) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:111) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:217) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at org.modeshape.jcr.SelfClosingInputStream.<init>(SelfClosingInputStream.java:58) at org.modeshape.jcr.JcrBinary.getStream(JcrBinary.java:75) at org.modeshape.web.jcr.rest.AbstractHandler.jsonEncodedStringFor(AbstractHandler.java:75) at org.modeshape.web.jcr.rest.ItemHandler.jsonFor(ItemHandler.java:194) at org.modeshape.web.jcr.rest.ItemHandler.getItem(ItemHandler.java:97) at org.modeshape.web.jcr.rest.JcrResources.getItem(JcrResources.java:223) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:124) at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:247) at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:212) at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:202) at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:441) ... 26 more
Steps to reproduce:
- unzip reproducer and invoke mvn package
- deploy webapp into server
- run http://localhost:8080/wsdl-reproducer/wsdl?repository=eds&workspace=default