Bug 780933 (SOA-3400)

Summary: Modeshape throws NPE when retrieving file's content
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Van Halbert <vhalbert>
Component: EDSAssignee: Van Halbert <vhalbert>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.2.0.ER4CC: rhauch, vhalbert
Target Milestone: ---   
Target Release: 5.2.0.ER5   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-3400
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
JDK 1.6, Fedora 14 x86_64
Last Closed: 2011-10-26 18:39:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Van Halbert 2011-09-21 14:47:37 UTC
project_key: SOA

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

Comment 1 Van Halbert 2011-09-21 14:47:38 UTC
Link: Added: This issue Cloned from MODE-1267


Comment 2 Van Halbert 2011-09-21 14:48:05 UTC
Workflow: Removed: GIT Pull Request workflow  Added: jira
Security: Added: Public


Comment 3 Van Halbert 2011-09-21 15:55:24 UTC
There appears to be an issue publishing off the root node.

Comment 4 Randall Hauch 2011-09-22 22:30:44 UTC
A fix for this issue has been merged onto the '2.5.x' branch used for SOA-P.

Note that there was also a bug within the 'reproducer' test application, and it was this bug that made the ModeShape bug apparent; see MODE-1267 for details.

Comment 5 Van Halbert 2011-09-22 22:48:05 UTC
Link: Added: This issue relates to SOA-3359


Comment 6 Van Halbert 2011-10-26 18:39:03 UTC
This was determined not to be an issue, but it did raise another issue (see SOA-3359) for which has been resolved and closed.