Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-952

Zip sequencer does not work correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.3.0.Final, 2.2.1.GA
    • 2.2.1.GA
    • Sequencers
    • None

      I uploaded a zip file (named test01.zip) into repository under "/files" location, the result of sequence process should be available under "/sequence/zip/test01.zip". When I looked on http://127.0.0.1:8080/modeshape-rest/test-inmemory/default/items/sequenced/zip/test01.zip I've got HTTP 500 ERROR with following stacktrace:

      org.jboss.resteasy.spi.UnhandledException: org.modeshape.graph.session.ValidationException: Missing primary node type "ns001:content" for node /sequenced/zip/test01.zip/test01.zip in workspace "default" of "JCR test-inmemory"
      org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:263)
      org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:169)
      org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:146)
      org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:456)
      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:418)
      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:111)
      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:217)
      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:159)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      root cause

      org.modeshape.graph.session.ValidationException: Missing primary node type "ns001:content" for node /sequenced/zip/test01.zip/test01.zip in workspace "default" of "JCR test-inmemory"
      org.modeshape.jcr.SessionCache$JcrNodeOperations.materialize(SessionCache.java:2572)
      org.modeshape.graph.session.GraphSession$Node.load(GraphSession.java:1654)
      org.modeshape.graph.session.GraphSession$Node.getPayload(GraphSession.java:2925)
      org.modeshape.jcr.AbstractJcrNode.getNodes(AbstractJcrNode.java:969)
      org.modeshape.web.jcr.rest.ItemHandler.jsonFor(ItemHandler.java:200)
      org.modeshape.web.jcr.rest.ItemHandler.getItem(ItemHandler.java:92)
      org.modeshape.web.jcr.rest.JcrResources.getItem(JcrResources.java:225)
      sun.reflect.GeneratedMethodAccessor438.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:124)
      org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:247)
      org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:212)
      org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:202)
      org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:441)
      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:418)
      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:111)
      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:217)
      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:159)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      Correct URL the content should be http://127.0.0.1:8080/modeshape-rest/test-inmemory/default/items/sequenced/zip/test01.zip but after typing it into browser it looks for content under URL with rel. path: /sequenced/zip/test01.zip/test01.zip.

      Stacktrace from server console:

      10:43:57,640 ERROR [[Resteasy]] Servlet.service() for servlet Resteasy threw exception
      org.jboss.resteasy.spi.UnhandledException: org.modeshape.graph.session.ValidationException: Missing primary node type "ns001:content" for node /sequenced/zip/test01.zip/test01.zip in workspace "default" of "JCR test-inmemory"
      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:598)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: org.modeshape.graph.session.ValidationException: Missing primary node type "ns001:content" for node /sequenced/zip/test01.zip/test01.zip in workspace "default" of "JCR test-inmemory"
      at org.modeshape.jcr.SessionCache$JcrNodeOperations.materialize(SessionCache.java:2572)
      at org.modeshape.graph.session.GraphSession$Node.load(GraphSession.java:1654)
      at org.modeshape.graph.session.GraphSession$Node.getPayload(GraphSession.java:2925)
      at org.modeshape.jcr.AbstractJcrNode.getNodes(AbstractJcrNode.java:969)
      at org.modeshape.web.jcr.rest.ItemHandler.jsonFor(ItemHandler.java:200)
      at org.modeshape.web.jcr.rest.ItemHandler.getItem(ItemHandler.java:92)
      at org.modeshape.web.jcr.rest.JcrResources.getItem(JcrResources.java:225)
      at sun.reflect.GeneratedMethodAccessor438.invoke(Unknown Source)
      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

        1. MODE-952-fix.patch
          17 kB
        2. MODE-952-fix2.patch
          190 kB
        3. reproducer.tar.bz2
          1.89 MB

              rhauch Randall Hauch (Inactive)
              bbelovic_jira Boris Belovic (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: