Uploaded image for project: 'Fedora Repository Project'
  1. Fedora Repository Project
  2. FCREPO-2681

GET on LDPCv returns 500 on Binary Resource

    XMLWordPrintable

    Details

      Description

      Use the "memento-versioning" branch.

      curl -v -XPOST -H "Content-Type: text/rdf" -H "Slug: test" -H "Link: <http://fedora.info/definitions/fcrepo#VersionedResource>; rel=type" "http://localhost:8080/rest/" -u fedoraAdmin:fedoraAdmin

      < HTTP/1.1 201 Created
      < Date: Fri, 02 Mar 2018 18:29:04 GMT
      < ETag: "55caacfa565b7b9428d285ffc6fa97bf051556a7"
      < Last-Modified: Fri, 02 Mar 2018 18:29:04 GMT
      < Link: <http://localhost:8080/rest/test/fcr:metadata>; rel="describedby"; anchor="http://localhost:8080/rest/test"
      < Link: <http://fedora.info/definitions/fcrepo#VersionedResource>; rel="type"
      < Link: <http://localhost:8080/rest/test>; rel="timegate"
      < Link: <http://localhost:8080/rest/test/fcr:versions>; rel="timemap"
      < Location: http://localhost:8080/rest/test
      < Content-Type: text/plain
      < Content-Length: 31
      < Server: Jetty(9.2.3.v20140905)

      All good there.

      But when you perform a GET on the timemap: kaboom:

      curl -v http://localhost:8080/resthttp://localhost:8080/rest/test/fcr:versions

      < HTTP/1.1 500 Internal Server Error
      < Date: Fri, 02 Mar 2018 18:29:13 GMT
      < Content-Type: text/plain;charset=utf-8
      < Content-Length: 5043
      < Server: Jetty(9.2.3.v20140905)
      <
      javax.jcr.nodetype.ConstraintViolationException: The node at '/{}test/

      {http://www.jcp.org/jcr/1.0}

      content' with primary type 'nt:resource' and mixin types fedora:Binary} does not have any child node definitions and therefore cannot have any children
      at org.modeshape.jcr.NodeTypes$NoChildrenNodeDefinitionSet.determineReasonForMismatch(NodeTypes.java:2985)
      at org.modeshape.jcr.AbstractJcrNode.validateChildNodeDefinition(AbstractJcrNode.java:1274)
      at org.modeshape.jcr.AbstractJcrNode.addChildNode(AbstractJcrNode.java:1126)
      at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:1074)
      at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:988)
      at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:102)
      at org.modeshape.jcr.api.JcrTools.findOrCreateNode(JcrTools.java:437)
      at org.modeshape.jcr.api.JcrTools.findOrCreateChild(JcrTools.java:477)
      at org.fcrepo.kernel.modeshape.FedoraResourceImpl.findOrCreateTimeMap(FedoraResourceImpl.java:389)
      at org.fcrepo.http.api.FedoraVersioning.getVersionList(FedoraVersioning.java:166)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
      at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
      at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
      at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
      at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
      at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
      at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      at org.eclipse.jetty.server.Server.handle(Server.java:497)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      at java.lang.Thread.run(Thread.java:745)

      • Connection #0 to host localhost left intact

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              whikloj Jared Whiklo
              Reporter:
              dbernstein Danny Bernstein
              Reviewer:
              Danny Bernstein
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: