Giter Club home page Giter Club logo

fcrepo's Introduction

Build

JavaDocs | Fedora Wiki | Use cases | Technical Docs | REST API

Fedora is a robust, modular, open source repository system for the management and dissemination of digital content. It is especially suited for digital libraries and archives, both for access and preservation. It is also used to provide specialized access to very large and complex digital collections of historic and cultural materials as well as scientific data. Fedora has a worldwide installed user base that includes academic and cultural heritage organizations, universities, research institutions, university libraries, national libraries, and government agencies. The Fedora community is supported by the stewardship of the Lyrasis organization.

Technical goals:

  • Enhanced preservation sensibilities including preservation storage layer transparency
  • Improved scalability and performance
  • More flexible storage options
  • Improved durability
  • Improved reporting and metrics

Downloads

The current web-deployable version of Fedora can be downloaded from the Lyrasis website or from Github. These artifacts can be deployed directly in a Jetty or Tomcat container as described in the guide to deploying Fedora.

Contributing

Contributions to the Fedora project are always welcome. These may take the form of testing the application, clarifying documentation or writing code.

Code contributions will take the form of pull requests to this repository. They also require a signed contributor license agreement on file before a pull request can be merged. New developers may wish to review this guide as it explains both the process and standards for test coverage, style and documentation.

Getting help

There are two community mailing lists where you can post questions or raise topics for discussion. Everyone is welcome to subscribe and participate.

Many of the developers are available on Slack in the #tech and bleeding-edge channels, hosted by fedora-project .slack.com.

In addition, there are weekly Zoom technical calls which anyone may join.

Building and running Fedora from source

System Requirements

  • Java 11
  • Maven 3.6.3
$ git clone https://github.com/fcrepo/fcrepo.git
$ cd fcrepo
$ mvn install

The compiled Fedora war file can be found in ./fcrepo-webapp/target. This can be deployed directly to a servlet container as described in the deployment guide.

If deployed locally using a war file called fcrepo.war, the web application will typically be available at http://localhost:8080/fcrepo/rest.

There are two convenient methods for testing the Fedora application by launching it directly from the command line.

One option is to use the "one click" application, which comes with an embedded Jetty servlet. This can be optionally built by running:

mvn install -pl fcrepo-webapp -P one-click

and can be started by either double-clicking on the jar file or by running the following command:

java -jar ./fcrepo-webapp/target/fcrepo-webapp-<version>-jetty-console.jar

By default, a Fedora home directory, fcrepo, is created in the current directory. You can change the default location by passing in an argument when starting the one-click, e.g.:

java -Dfcrepo.home=/data/fedora-home -jar fcrepo-webapp-<version>-jetty-console.jar

An alternative is use the maven command: mvn jetty:run

$ cd fcrepo-webapp
$ mvn jetty:run

For both of these methods, your Fedora repository will be available at: http://localhost:8080/rest/

Note: You may need to set the $JAVA_HOME property, since Maven uses it to find the Java runtime to use, overriding your PATH. mvn --version will show which version of Java is being used by Maven, e.g.:

Java version: 11.0.2, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8

To set your $JAVA_HOME environment variable:

export JAVA_HOME=/path/to/java

fcrepo's People

Contributors

acoburn avatar ajs6f avatar barmintor avatar bbpennel avatar birkland avatar bseeger avatar cbeer avatar claussni avatar daines avatar dbernstein avatar dependabot[bot] avatar emetsger avatar escowles avatar fasseg avatar gregjan avatar harringj avatar ksclarke avatar lsitu avatar mikedurbin avatar mikejritter avatar mohideen avatar nigelgbanks avatar osmandin avatar peichman-umd avatar pwinckles avatar robyj avatar ruebot avatar surfrdan avatar whikloj avatar yinlinchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fcrepo's Issues

stacktrace when creating an object after a node joins the cluster(?)

m3dl-sm-04-mbpt:fcrepo-webapp cabeer$ curl "http://localhost:8080/rest/objects/new" -X POST
java.lang.NullPointerException
at org.modeshape.jcr.cache.document.LazyCachedNode.getPrimaryType(LazyCachedNode.java:293)
at org.modeshape.jcr.AbstractJcrNode.validateChildNodeDefinition(AbstractJcrNode.java:1135)
at org.modeshape.jcr.AbstractJcrNode.addChildNode(AbstractJcrNode.java:1035)
at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:991)
at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:921)
at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:107)
at org.modeshape.jcr.api.JcrTools.findOrCreateNode(JcrTools.java:434)
at org.modeshape.jcr.api.JcrTools.findOrCreateNode(JcrTools.java:388)
at org.modeshape.jcr.api.JcrTools.findOrCreateNode(JcrTools.java:368)
at org.fcrepo.FedoraObject.(FedoraObject.java:28)
at org.fcrepo.services.ObjectService.createObjectNode(ObjectService.java:30)
at org.fcrepo.api.legacy.FedoraObjects.ingest(FedoraObjects.java:102)
at org.fcrepo.api.legacy.FedoraObjects.ingestAndMint(FedoraObjects.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:102)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:218)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:163)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:158)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:243)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:163)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:219)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:488)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:932)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:994)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:722)

Updating datastream does not fire JMS ATOM message

If I do e.g.
curl --verbose -X PUT http://localhost:8080/rest/objects/92b0aa57-e742-479b-ac37-4b5f8c9ad396/datastreams/DC --data-binary '<oai_dc:dc
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc
http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
dc:titletest2/dc:title
<oai_dc:dc>'
I get no JMS message.
If I do -X POST I do get a message for addDatastream

StackOverflowError when updating the node types

When updating the node types via the HTML interface (/rest/fcr:nodetypes) I've encountered a bug (in fcrepo-4.0.0-beta-01).

First thing I did was update the node types with the following CND:

<skt = 'http://jool.nl/test'>
[skt:TestItem]
 - skt:firstProperty 
 - skt:secondProperty (string)
 - skt:thirdProperty (string) multiple

This went fine. However then I tried the update node types again, with the same CND except for a trailing slash in the namespace:

<skt = 'http://jool.nl/test/'>
[skt:TestItem]
 - skt:firstProperty 
 - skt:secondProperty (string)
 - skt:thirdProperty (string) multiple

Afterwards when retrieving the the node types via /rest/fcr:nodetypes, I am getting an error 500 caused by a StackOverflowError:

org.infinispan.CacheException: java.lang.StackOverflowError
    at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:351)
    at org.infinispan.CacheImpl.get(CacheImpl.java:391)
    at org.infinispan.CacheImpl.get(CacheImpl.java:383)
    at org.infinispan.schematic.internal.CacheSchematicDb.get(CacheSchematicDb.java:235)
    at org.modeshape.jcr.cache.document.LocalDocumentStore.get(LocalDocumentStore.java:78)
    at org.modeshape.jcr.cache.document.WorkspaceCache.documentFor(WorkspaceCache.java:164)
    at org.modeshape.jcr.cache.document.WorkspaceCache.documentFor(WorkspaceCache.java:183)
    at org.modeshape.jcr.cache.document.WorkspaceCache.getNode(WorkspaceCache.java:215)
    at org.modeshape.jcr.cache.document.AbstractSessionCache.getNode(AbstractSessionCache.java:237)
    at org.modeshape.jcr.cache.document.WritableSessionCache.getNode(WritableSessionCache.java:169)
    at org.modeshape.jcr.SystemContent.readNamespacePrefix(SystemContent.java:760)
    at org.modeshape.jcr.SystemNamespaceRegistry.getPrefixForNamespaceUri(SystemNamespaceRegistry.java:123)
    at org.modeshape.jcr.value.basic.BasicName.getString(BasicName.java:113)
    at org.modeshape.jcr.NodeTypeSchemata.addAllNodesTable(NodeTypeSchemata.java:195)
    at org.modeshape.jcr.NodeTypeSchemata.<init>(NodeTypeSchemata.java:138)
    at org.modeshape.jcr.RepositoryNodeTypeManager.getRepositorySchemata(RepositoryNodeTypeManager.java:293)
    at org.modeshape.jcr.JcrRepository$RepositoryMonitorFactory.indexingMonitor(JcrRepository.java:1913)
    at org.modeshape.jcr.JcrRepository$RepositoryMonitorFactory.createMonitor(JcrRepository.java:1908)
    at org.modeshape.jcr.txn.Transactions.newMonitor(Transactions.java:243)
    at org.modeshape.jcr.txn.SynchronizedTransactions$SynchronizedTransaction.<init>(SynchronizedTransactions.java:165)
    at org.modeshape.jcr.txn.SynchronizedTransactions.begin(SynchronizedTransactions.java:77)
    at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:443)
    at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:420)
    at org.modeshape.jcr.SystemContent.save(SystemContent.java:110)
    at org.modeshape.jcr.SystemNamespaceRegistry.getPrefixForNamespaceUri(SystemNamespaceRegistry.java:125)
    at org.modeshape.jcr.value.basic.BasicName.getString(BasicName.java:113)
    at org.modeshape.jcr.NodeTypeSchemata.addAllNodesTable(NodeTypeSchemata.java:195)
    at org.modeshape.jcr.NodeTypeSchemata.<init>(NodeTypeSchemata.java:138)
    at org.modeshape.jcr.RepositoryNodeTypeManager.getRepositorySchemata(RepositoryNodeTypeManager.java:293)
    at org.modeshape.jcr.JcrRepository$RepositoryMonitorFactory.indexingMonitor(JcrRepository.java:1913)
    at org.modeshape.jcr.JcrRepository$RepositoryMonitorFactory.createMonitor(JcrRepository.java:1908)
    at org.modeshape.jcr.txn.Transactions.newMonitor(Transactions.java:243)
    at org.modeshape.jcr.txn.SynchronizedTransactions$SynchronizedTransaction.<init>(SynchronizedTransactions.java:165)
    at org.modeshape.jcr.txn.SynchronizedTransactions.begin(SynchronizedTransactions.java:77)
    at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:443)
    at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:420)
    at org.modeshape.jcr.SystemContent.save(SystemContent.java:110)
    at org.modeshape.jcr.SystemNamespaceRegistry.getPrefixForNamespaceUri(SystemNamespaceRegistry.java:125)
    at org.modeshape.jcr.value.basic.BasicName.getString(BasicName.java:113)
... (and so on; the last 13 lines keep repeating in the stack trace)

I continue to receive this error whenever I try to access the node types.

After creating a node, 'Location' response header is wrong.

-> "HTTP/1.1 201 Created\r\n"
-> "Expires: Thu, 01-Jan-1970 00:00:00 GMT\r\n"
-> "Set-Cookie: JSESSIONID=91mlh33cwfxs1vbv4ea49fwbp;Path=/fc4a2\r\n"
-> "Location: http://localhost:8983/fc4a2/rest/tx:fed67266-04e2-41f8-9e7b-f4463ff55994/objects/foo2345/fcr:content\r\n"

The header should not have the last path component /fcr:content because going to that url is 404

fcrepo-jms message doesn't conform to the org.fcrepo.server.messaging.AtomAPIMMessage format. apparently.

ERROR 2013-02-18 17:17:53,002 (ActiveMQMessageConsumer) ID:futures6-37032-1361207803752-0:1:2:1 Exception while processing message: ID:futures6-60478-1361146730033-3:1:1:1:1
java.lang.NullPointerException
    at org.fcrepo.server.messaging.AtomAPIMMessage.<init>(AtomAPIMMessage.java:177)
    at dk.defxws.fedoragsearch.server.UpdateListener.onMessage(UpdateListener.java:158)
    at org.fcrepo.client.messaging.JmsMessagingClient.onMessage(JmsMessagingClient.java:331)
    at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1230)
    at org.apache.activemq.ActiveMQMessageConsumer.iterate(ActiveMQMessageConsumer.java:1364)
    at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:194)
    at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)
    at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)

Unit tests fail #f4fede9

When I do MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=1024m" mvn install

I got this output:

Failed tests: 
  FedoraBackupIT.shouldRoundTripBackups:63 expected:<200> but was:<500>
  FedoraBackupLevelDBIT>FedoraBackupIT.shouldRoundTripBackups:63 expected:<200> but was:<500>
  FedoraExportIT.shouldMoveObjectToTheRootLevelUsingTheRepositoryWideApi:87 expected:<200> but was:<500>
  FedoraExportIT.shouldExportUsingTheRepositoryWideApi:123 expected:<200> but was:<500>
  FedoraHtmlIT.testGetRoot:34 expected:<200> but was:<500>
  FedoraNodesIT.testDescribeCount:618 expected:<200> but was:<500>
  FedoraNodesIT.testValidHTMLForRepo:712->validateHTML:782 expected:<200> but was:<500>
  FedoraNodesIT.testDescribeSize:576 expected:<200> but was:<500>
  FedoraNodesIT.testGetRepositoryGraph:277 expected:<200> but was:<500>
  FedoraTransactionsIT.testCreateAndTimeoutTransaction:86 expected:<200> but was:<500>

Is that expected?

Usecase: Harvesting repository subsets

At the State and University Library, Denmark, we're harvesting subsets of our repository to different dissemination platforms.
Right now, what we are doing is using the RDF triple store to harvest objects with iTQL queries like this:

select $object $cm $date
from rmi://localhost/fedora#ri
where
$object info:fedora/fedora-system:def/model#hasModel $cm
and
$cm http://ecm.sourceforge.net/relations/0/2/#isEntryForViewAngle 'SummaVisible'
and
$object http://doms.statsbiblioteket.dk/relations/default/0/1/#isPartOfCollection info:fedora/doms:RadioTV_Collection
and
$object info:fedora/fedora-system:def/model#state info:fedora/fedora-system:def/model#Active
and
$object info:fedora/fedora-system:def/view#lastModifiedDate $date
and
$date http://mulgara.org/mulgara#after '2012-12-12T00:26:56.535Z'^^http://www.w3.org/2001/XMLSchema#dateTime in rmi://localhost/fedora#xsd
order by $date asc
limit 10000
offset 150000

(Basically this says "give me active stuff of a specific content model in a specific collection modified since last update, please page it")

The problem is with 2.300.000 object in the repo, this takes hours, and actually fails before returning a result.

Probably the right way to fix this is not to scale the resource index, but to figure a better way to provide this kind of functionality

Too many ports (2048) open

Using this version of hydra-jetty https://github.com/projecthydra/hydra-jetty/tree/fedora-4/edge

Oct 15, 2014 6:51:15 PM org.glassfish.jersey.internal.Errors logErrors
WARNING: The following warnings have been detected: WARNING: Unknown HK2 failure detected:
MultiException stack 1 of 2
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:691)
    at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:943)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1336)
    at org.modeshape.common.collection.ring.RingBuffer.addConsumer(RingBuffer.java:248)
    at org.modeshape.common.collection.ring.RingBuffer.addConsumer(RingBuffer.java:220)
    at org.modeshape.jcr.bus.RepositoryChangeBus.register(RepositoryChangeBus.java:79)
    at org.modeshape.jcr.JcrObservationManager.<init>(JcrObservationManager.java:174)
    at org.modeshape.jcr.JcrWorkspace.observationManager(JcrWorkspace.java:627)
    at org.modeshape.jcr.JcrWorkspace.getObservationManager(JcrWorkspace.java:619)
    at org.fcrepo.http.api.FedoraBaseResource.setUpJMSBaseURIs(FedoraBaseResource.java:97)
    at org.fcrepo.http.api.FedoraLdp.postConstruct(FedoraLdp.java:129)
    at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1019)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:335)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
    at org.glassfish.jersey.process.internal.RequestScope.findOrCreate(RequestScope.java:160)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2268)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:690)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:655)
    at org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:169)
    at org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:185)
    at org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:74)
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:115)
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:115)
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:115)
    at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:94)
    at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:63)
    at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
    at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:263)
    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:297)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1030)
    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:364)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
    at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
    at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
    at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Thread.java:722)
MultiException stack 2 of 2
java.lang.IllegalStateException: Unable to perform operation: post construct on org.fcrepo.http.api.FedoraLdp
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:395)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
    at org.glassfish.jersey.process.internal.RequestScope.findOrCreate(RequestScope.java:160)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2268)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:690)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:655)
    at org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:169)
    at org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:185)
    at org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:74)
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:115)
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:115)
    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:115)
    at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:94)
    at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:63)
    at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
    at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:263)
    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:297)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1030)
    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:364)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
    at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
    at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
    at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Thread.java:722)

Restoring versions not behaving as expected

@escowles and I found this today. When restoring the properties of an "object" resource from a previous version, I'm not getting the version labels and properties restored correctly.

Given this script:

TMPOBJ=http://localhost:8080/rest/$RANDOM
# Create resource
curl -X PUT $TMPOBJ && echo

# Give it a title
curl -X PATCH -H "Content-type: application/sparql-update" --data-binary "insert data { <> <http://purl.org/dc/terms/title> 'title 1' }" $TMPOBJ

# call it ver1
curl -X POST -H "Slug: ver1" $TMPOBJ/fcr:versions

# change the title
curl -X PATCH -H "Content-type: application/sparql-update" --data-binary "insert data { <> <http://purl.org/dc/terms/title> 'title 2' }" $TMPOBJ

# call it ver2
curl -X POST -H "Slug: ver2" $TMPOBJ/fcr:versions

# restore ver1
curl -X PATCH $TMPOBJ/fcr:versions/ver1

# call it ver3
curl -X POST -H "Slug: ver3" $TMPOBJ/fcr:versions

When you examine the restored version, it is given a timestamp but it lacks a version label and the value of ns001: title is the same as ver2 and not ver1 from which we were trying to restore. It's not until you create ver3 that we see the restored value of ns001:title to be the same as ver1.

ETag changes for a resource changes when another resource points at it.

Running Beta 2. If I have a resource that is commonly pointed at, its E-Tag is almost constantly changing, making it impossible to cache the resource.

Here's an example setting /fedora/rest/test/r1 to point at /fedora/rest/test/r2 and /fedora/rest/test/r2 to set an inverse relationship on /fedora/rest/test/r1

D, [2014-08-22T23:11:34.535210 #99357] DEBUG -- :   HTTP HEAD (3.56ms)   http://localhost:8983/fedora/rest/test/r1
D, [2014-08-22T23:11:34.535280 #99357] DEBUG -- :   Response status   Net::HTTPNotFound (404)
D, [2014-08-22T23:11:34.758197 #99357] DEBUG -- :   HTTP PUT (14.12ms)   http://localhost:8983/fedora/rest/test/r1
D, [2014-08-22T23:11:34.758330 #99357] DEBUG -- :   Request body
<http://localhost:8983/fedora/rest/test/r1> <http://fedora.info/definitions/v4/rels-ext#hasModel> "Book" .

D, [2014-08-22T23:11:34.758409 #99357] DEBUG -- :   Response status   Net::HTTPCreated (201)
D, [2014-08-22T23:11:34.758467 #99357] DEBUG -- :   Response body   http://localhost:8983/fedora/rest/test/r1
D, [2014-08-22T23:11:34.764212 #99357] DEBUG -- :   HTTP HEAD (4.06ms)   http://localhost:8983/fedora/rest/test/r1
D, [2014-08-22T23:11:34.764301 #99357] DEBUG -- :   Response status   Net::HTTPOK (200)
D, [2014-08-22T23:11:34.770219 #99357] DEBUG -- :   HTTP GET (4.77ms)   http://localhost:8983/fedora/rest/test/r1
D, [2014-08-22T23:11:34.770338 #99357] DEBUG -- :   Response status   Net::HTTPOK (200)
D, [2014-08-22T23:11:34.770395 #99357] DEBUG -- :   Response body
<http://localhost:8983/fedora/rest/test/r1> <http://fedora.info/definitions/v4/rest-api#hasAccessRoles> <http://localhost:8983/fedora/rest/test/r1/fcr:accessroles> ;
    <http://fedora.info/definitions/v4/rest-api#exportsAs> <http://localhost:8983/fedora/rest/test/r1/fcr:export?format=jcr/xml> ;
    <http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8983/fedora/rest/test> ;
    a <http://www.w3.org/ns/ldp#Container> , <http://www.w3.org/ns/ldp#DirectContainer> ;
    <http://www.w3.org/ns/ldp#membershipResource> <http://localhost:8983/fedora/rest/test/r1> ;
    <http://www.w3.org/ns/ldp#hasMemberRelation> <http://fedora.info/definitions/v4/repository#hasChild> ;
    <http://fedora.info/definitions/v4/rest-api#writable> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
    a <http://www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , <http://fedora.info/definitions/v4/rest-api#resource> , <http://fedora.info/definitions/v4/rest-api#object> , <http://fedora.info/definitions/v4/rest-api#relations> , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0lockable> , <http://www.jcp.org/jcr/mix/1.0referenceable> , <http://purl.org/dc/elements/1.1/describable> , <http://fedora.info/definitions/v4/rest-api#resource> ;
    <http://fedora.info/definitions/v4/repository#primaryType> "nt:folder"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/rels-ext#hasModel> "Book"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#created> "2014-08-23T04:11:34.753Z"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#lastModified> "2014-08-23T04:11:34.753Z"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#mixinTypes> "fedora:resource"^^<http://www.w3.org/2001/XMLSchema#string> , "fedora:object"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#lastModifiedBy> "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#uuid> "2e7c7dea-cc5c-4214-9475-80f68fb45906"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#createdBy> "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/rest-api#writable> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
    a <http://www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , <http://fedora.info/definitions/v4/rest-api#resource> , <http://fedora.info/definitions/v4/rest-api#object> , <http://fedora.info/definitions/v4/rest-api#relations> , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0lockable> , <http://www.jcp.org/jcr/mix/1.0referenceable> , <http://purl.org/dc/elements/1.1/describable> , <http://fedora.info/definitions/v4/rest-api#resource> .

GET etag "da3e7790abf2eaf771959f6f3e67f900944c2820" for http://localhost:8983/fedora/rest/test/r1



D, [2014-08-22T23:11:35.001556 #99357] DEBUG -- :   HTTP HEAD (2.15ms)   http://localhost:8983/fedora/rest/test/r2
D, [2014-08-22T23:11:35.001644 #99357] DEBUG -- :   Response status   Net::HTTPNotFound (404)
D, [2014-08-22T23:11:35.017304 #99357] DEBUG -- :   HTTP PUT (13.32ms)   http://localhost:8983/fedora/rest/test/r2
D, [2014-08-22T23:11:35.017476 #99357] DEBUG -- :   Request body
<http://localhost:8983/fedora/rest/test/r2> <http://fedora.info/definitions/v4/rels-ext#hasModel> "Topic" .

D, [2014-08-22T23:11:35.017579 #99357] DEBUG -- :   Response status   Net::HTTPCreated (201)
D, [2014-08-22T23:11:35.017665 #99357] DEBUG -- :   Response body   http://localhost:8983/fedora/rest/test/r2
D, [2014-08-22T23:11:35.025253 #99357] DEBUG -- :   HTTP HEAD (5.48ms)   http://localhost:8983/fedora/rest/test/r2
D, [2014-08-22T23:11:35.025379 #99357] DEBUG -- :   Response status   Net::HTTPOK (200)
D, [2014-08-22T23:11:35.033254 #99357] DEBUG -- :   HTTP GET (6.66ms)   http://localhost:8983/fedora/rest/test/r2
D, [2014-08-22T23:11:35.033333 #99357] DEBUG -- :   Response status   Net::HTTPOK (200)
D, [2014-08-22T23:11:35.033370 #99357] DEBUG -- :   Response body
<http://localhost:8983/fedora/rest/test/r2> <http://fedora.info/definitions/v4/rest-api#hasAccessRoles> <http://localhost:8983/fedora/rest/test/r2/fcr:accessroles> ;
    <http://fedora.info/definitions/v4/rest-api#exportsAs> <http://localhost:8983/fedora/rest/test/r2/fcr:export?format=jcr/xml> ;
    <http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8983/fedora/rest/test> ;
    a <http://www.w3.org/ns/ldp#Container> , <http://www.w3.org/ns/ldp#DirectContainer> ;
    <http://www.w3.org/ns/ldp#membershipResource> <http://localhost:8983/fedora/rest/test/r2> ;
    <http://www.w3.org/ns/ldp#hasMemberRelation> <http://fedora.info/definitions/v4/repository#hasChild> ;
    <http://fedora.info/definitions/v4/rest-api#writable> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
    a <http://www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , <http://fedora.info/definitions/v4/rest-api#resource> , <http://fedora.info/definitions/v4/rest-api#object> , <http://fedora.info/definitions/v4/rest-api#relations> , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0lockable> , <http://www.jcp.org/jcr/mix/1.0referenceable> , <http://purl.org/dc/elements/1.1/describable> , <http://fedora.info/definitions/v4/rest-api#resource> ;
    <http://fedora.info/definitions/v4/repository#primaryType> "nt:folder"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/rels-ext#hasModel> "Topic"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#created> "2014-08-23T04:11:35.01Z"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#lastModified> "2014-08-23T04:11:35.01Z"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#mixinTypes> "fedora:resource"^^<http://www.w3.org/2001/XMLSchema#string> , "fedora:object"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#lastModifiedBy> "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#uuid> "8c3e7d0c-0561-4f19-949e-afbaeccd8788"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#createdBy> "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/rest-api#writable> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
    a <http://www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , <http://fedora.info/definitions/v4/rest-api#resource> , <http://fedora.info/definitions/v4/rest-api#object> , <http://fedora.info/definitions/v4/rest-api#relations> , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0lockable> , <http://www.jcp.org/jcr/mix/1.0referenceable> , <http://purl.org/dc/elements/1.1/describable> , <http://fedora.info/definitions/v4/rest-api#resource> .

GET etag "c8ab590b7d13b68cd9cf381871762b14adbf7984" for http://localhost:8983/fedora/rest/test/r2



Update http://localhost:8983/fedora/rest/test/r2 If-Match "c8ab590b7d13b68cd9cf381871762b14adbf7984"
D, [2014-08-22T23:11:35.122819 #99357] DEBUG -- :   HTTP PUT (10.80ms)   http://localhost:8983/fedora/rest/test/r2
D, [2014-08-22T23:11:35.123069 #99357] DEBUG -- :   Request body
<http://localhost:8983/fedora/rest/test/r2> a <http://www.w3.org/ns/ldp#Container>,
     <http://www.w3.org/ns/ldp#DirectContainer>,
     <http://www.jcp.org/jcr/nt/1.0folder>,
     <http://www.jcp.org/jcr/nt/1.0hierarchyNode>,
     <http://www.jcp.org/jcr/nt/1.0base>,
     <http://www.jcp.org/jcr/mix/1.0created>,
     <http://fedora.info/definitions/v4/rest-api#resource>,
     <http://fedora.info/definitions/v4/rest-api#object>,
     <http://fedora.info/definitions/v4/rest-api#relations>,
     <http://www.jcp.org/jcr/mix/1.0lastModified>,
     <http://www.jcp.org/jcr/mix/1.0lockable>,
     <http://www.jcp.org/jcr/mix/1.0referenceable>,
     <http://purl.org/dc/elements/1.1/describable>;
   <http://fedora.info/definitions/v4/rels-ext#hasModel> "Topic";
   <http://fedora.info/definitions/v4/rels-ext#isTopicOf> <http://localhost:8983/fedora/rest/test/r1>;
   <http://fedora.info/definitions/v4/repository#created> "2014-08-23T04:11:35.01Z";
   <http://fedora.info/definitions/v4/repository#createdBy> "bypassAdmin";
   <http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8983/fedora/rest/test>;
   <http://fedora.info/definitions/v4/repository#lastModified> "2014-08-23T04:11:35.01Z";
   <http://fedora.info/definitions/v4/repository#lastModifiedBy> "bypassAdmin";
   <http://fedora.info/definitions/v4/repository#mixinTypes> "fedora:resource",
     "fedora:object";
   <http://fedora.info/definitions/v4/repository#primaryType> "nt:folder";
   <http://fedora.info/definitions/v4/repository#uuid> "8c3e7d0c-0561-4f19-949e-afbaeccd8788";
   <http://fedora.info/definitions/v4/rest-api#exportsAs> <http://localhost:8983/fedora/rest/test/r2/fcr:export?format=jcr/xml>;
   <http://fedora.info/definitions/v4/rest-api#hasAccessRoles> <http://localhost:8983/fedora/rest/test/r2/fcr:accessroles>;
   <http://fedora.info/definitions/v4/rest-api#writable> true;
   <http://www.w3.org/ns/ldp#hasMemberRelation> <http://fedora.info/definitions/v4/repository#hasChild>;
   <http://www.w3.org/ns/ldp#membershipResource> <http://localhost:8983/fedora/rest/test/r2> .

D, [2014-08-22T23:11:35.136933 #99357] DEBUG -- :   Response status   Net::HTTPNoContent (204)
Updating cache for http://localhost:8983/fedora/rest/test/r2: "65ce4843efad091147fbb8e40b7c94742f38c2cf"




Update http://localhost:8983/fedora/rest/test/r1 If-Match "da3e7790abf2eaf771959f6f3e67f900944c2820"
D, [2014-08-22T23:11:35.186266 #99357] DEBUG -- :   HTTP PUT (3.26ms)   http://localhost:8983/fedora/rest/test/r1
D, [2014-08-22T23:11:35.186368 #99357] DEBUG -- :   Request body
<http://localhost:8983/fedora/rest/test/r1> a <http://www.w3.org/ns/ldp#Container>,
     <http://www.w3.org/ns/ldp#DirectContainer>,
     <http://www.jcp.org/jcr/nt/1.0folder>,
     <http://www.jcp.org/jcr/nt/1.0hierarchyNode>,
     <http://www.jcp.org/jcr/nt/1.0base>,
     <http://www.jcp.org/jcr/mix/1.0created>,
     <http://fedora.info/definitions/v4/rest-api#resource>,
     <http://fedora.info/definitions/v4/rest-api#object>,
     <http://fedora.info/definitions/v4/rest-api#relations>,
     <http://www.jcp.org/jcr/mix/1.0lastModified>,
     <http://www.jcp.org/jcr/mix/1.0lockable>,
     <http://www.jcp.org/jcr/mix/1.0referenceable>,
     <http://purl.org/dc/elements/1.1/describable>;
   <http://fedora.info/definitions/v4/rels-ext#hasModel> "Book";
   <http://fedora.info/definitions/v4/rels-ext#hasTopic> <http://localhost:8983/fedora/rest/test/r2>;
   <http://fedora.info/definitions/v4/repository#created> "2014-08-23T04:11:34.753Z";
   <http://fedora.info/definitions/v4/repository#createdBy> "bypassAdmin";
   <http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8983/fedora/rest/test>;
   <http://fedora.info/definitions/v4/repository#lastModified> "2014-08-23T04:11:34.753Z";
   <http://fedora.info/definitions/v4/repository#lastModifiedBy> "bypassAdmin";
   <http://fedora.info/definitions/v4/repository#mixinTypes> "fedora:resource",
     "fedora:object";
   <http://fedora.info/definitions/v4/repository#primaryType> "nt:folder";
   <http://fedora.info/definitions/v4/repository#uuid> "2e7c7dea-cc5c-4214-9475-80f68fb45906";
   <http://fedora.info/definitions/v4/rest-api#exportsAs> <http://localhost:8983/fedora/rest/test/r1/fcr:export?format=jcr/xml>;
   <http://fedora.info/definitions/v4/rest-api#hasAccessRoles> <http://localhost:8983/fedora/rest/test/r1/fcr:accessroles>;
   <http://fedora.info/definitions/v4/rest-api#writable> true;
   <http://www.w3.org/ns/ldp#hasMemberRelation> <http://fedora.info/definitions/v4/repository#hasChild>;
   <http://www.w3.org/ns/ldp#membershipResource> <http://localhost:8983/fedora/rest/test/r1> .

D, [2014-08-22T23:11:35.186749 #99357] DEBUG -- :   Response status   Net::HTTPPreconditionFailed (412)
D, [2014-08-22T23:11:35.186821 #99357] DEBUG -- :   Response body   ETag mismatch

adding datastream from GUI - nothing happens

CREATE NEW NODE type:object works (ex result:http://localhost:8080/rest/58/a9/eb/74/58a9eb74-2e93-4f3b-82d5-6f716e3081d0

but then CREATE NEW NODE type:datastream file: - nothing happens but this in logs:

DEBUG 17:57:19.287 (SessionFactory) Returning an authenticated session in the default workspace
TRACE 17:57:19.288 (AbstractResource) converting URI path to JCR path: [com.sun.jersey.api.uri.UriComponent$PathSegmentImpl@c584e45, com.sun.jersey.api.uri.UriComponent$PathSegmentImpl@797a9a57, com.sun.jersey.api.uri.UriComponent$PathSegmentImpl@602b040f, com.sun.jersey.api.uri.UriComponent$PathSegmentImpl@2817a61c, com.sun.jersey.api.uri.UriComponent$PathSegmentImpl@289a8cd4]
TRACE 17:57:19.288 (AbstractResource) Adding segment 58
TRACE 17:57:19.288 (AbstractResource) Adding segment a9
TRACE 17:57:19.288 (AbstractResource) Adding segment eb
TRACE 17:57:19.288 (AbstractResource) Adding segment 74
TRACE 17:57:19.288 (AbstractResource) Adding segment 58a9eb74-2e93-4f3b-82d5-6f716e3081d0
TRACE 17:57:19.288 (FedoraNodes) Getting profile for /58/a9/eb/74/58a9eb74-2e93-4f3b-82d5-6f716e3081d0
INFO 17:57:19.299 (WildcardExceptionMapper) WebApplicationException intercepted by WildcardExceptionMapper:
javax.ws.rs.WebApplicationException: null
at org.fcrepo.http.api.FedoraNodes.describe(FedoraNodes.java:168) ~[fcrepo-http-api-4.0.0-alpha-3-SNAPSHOT.jar:na]

and comments re that Exception in FedoraNodes.java:168 in source are:
// here we are implicitly emitting a 304
// the exception is not an error, it's genuinely
// an exceptional condition

Round trip of resources causing "409 Could not remove triple containing predicate"

Here's an HTTP log:

HTTP GET (6.88ms)  http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35
Response status  Net::HTTPOK (200)
Response body  @prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix nt: <http://www.jcp.org/jcr/nt/1.0> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix fcrepo: <http://fedora.info/definitions/v4/repository#> .
@prefix ns001: <http://purl.org/dc/terms/> .
@prefix test: <info:fedora/test/> .
@prefix fedoraconfig: <http://fedora.info/definitions/v4/config#> .
@prefix image: <http://www.modeshape.org/images/1.0> .
@prefix xs: <http://www.w3.org/2001/XMLSchema> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix fedorarelsext: <http://fedora.info/definitions/v4/rels-ext#> .
@prefix mix: <http://www.jcp.org/jcr/mix/1.0> .
@prefix premis: <http://www.loc.gov/premis/rdf/v1#> .
@prefix mode: <http://www.modeshape.org/1.0> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix sv: <http://www.jcp.org/jcr/sv/1.0> .
@prefix fedora: <http://fedora.info/definitions/v4/rest-api#> .
@prefix xsi: <http://www.w3.org/2001/XMLSchema-instance> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .


<http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35/fcr:export?format=jcr/xml> dc:format <http://fedora.info/definitions/v4/repository#jcr/xml> .

<http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35> fedora:exportsAs <http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35/fcr:export?format=jcr/xml> .

<http://fedora.info/definitions/v4/repository#jcr/xml> rdfs:label "jcr/xml"^^<http://www.w3.org/2001/XMLSchema#string> .

<http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35> ldp:membershipResource <http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35> ;
    ldp:hasMemberRelation ldp:member ;
    a ldp:Container , ldp:DirectContainer ;
    ldp:member <http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35/descMetadata> ;
    ldp:contains <http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35/descMetadata> ;
    fcrepo:hasParent <http://localhost:8983/fedora/rest/test/b4/6e/88/3d> ;
    a <http://www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , fedora:resource , fedora:object , fedora:relations , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0referenceable> , dc:describable , fedora:resource , ldp:Container ;
    fedora:writable "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
    fcrepo:primaryType "nt:folder"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fedorarelsext:hasModel "MockAFBase"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fcrepo:created "2014-10-17T12:43:56.76Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
    fcrepo:lastModified "2014-10-17T12:43:56.792Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
    fcrepo:mixinTypes "fedora:resource"^^<http://www.w3.org/2001/XMLSchema#string> , "fedora:object"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fcrepo:lastModifiedBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fcrepo:uuid "271232f0-8428-4059-8305-6807920670b6"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fcrepo:createdBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> .




HTTP PUT (6.56ms)  http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35
Request body
<http://fedora.info/definitions/v4/repository#jcr/xml> <http://www.w3.org/2000/01/rdf-schema#label> "jcr/xml" .

<http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35> a <http://www.w3.org/ns/ldp#Container>,
     <http://www.w3.org/ns/ldp#DirectContainer>,
     <http://www.jcp.org/jcr/nt/1.0folder>,
     <http://www.jcp.org/jcr/nt/1.0hierarchyNode>,
     <http://www.jcp.org/jcr/nt/1.0base>,
     <http://www.jcp.org/jcr/mix/1.0created>,
     <http://fedora.info/definitions/v4/rest-api#resource>,
     <http://fedora.info/definitions/v4/rest-api#object>,
     <http://fedora.info/definitions/v4/rest-api#relations>,
     <http://www.jcp.org/jcr/mix/1.0lastModified>,
     <http://www.jcp.org/jcr/mix/1.0referenceable>,
     <http://purl.org/dc/elements/1.1/describable>;
   <http://fedora.info/definitions/v4/rels-ext#hasModel> "MockAFBase";
   <http://fedora.info/definitions/v4/repository#created> "2014-10-17T12:43:56.76Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
   <http://fedora.info/definitions/v4/repository#createdBy> "bypassAdmin";
   <http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8983/fedora/rest/test/b4/6e/88/3d>;
   <http://fedora.info/definitions/v4/repository#lastModified> "2014-10-17T12:43:56.792Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
   <http://fedora.info/definitions/v4/repository#lastModifiedBy> "bypassAdmin";
   <http://fedora.info/definitions/v4/repository#mixinTypes> "fedora:resource",
     "fedora:object";
   <http://fedora.info/definitions/v4/repository#primaryType> "nt:folder";
   <http://fedora.info/definitions/v4/repository#uuid> "271232f0-8428-4059-8305-6807920670b6";
   <http://fedora.info/definitions/v4/rest-api#exportsAs> <http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35/fcr:export?format=jcr/xml>;
   <http://fedora.info/definitions/v4/rest-api#writable> true;
   <http://www.w3.org/ns/ldp#contains> <http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35/descMetadata>;
   <http://www.w3.org/ns/ldp#hasMemberRelation> <http://www.w3.org/ns/ldp#member>;
   <http://www.w3.org/ns/ldp#member> <http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35/descMetadata>;
   <http://www.w3.org/ns/ldp#membershipResource> <http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35> .

<http://localhost:8983/fedora/rest/test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35/fcr:export?format=jcr/xml> <http://purl.org/dc/elements/1.1/format> <http://fedora.info/definitions/v4/repository#jcr/xml> .

Response status  Net::HTTPConflict (409)
Response body  Could not remove triple containing predicate http://fedora.info/definitions/v4/repository#primaryType to node /test/b4/6e/88/3d/b46e883d-2507-4aa8-a9c9-fd151c10ca35

One xml file per object doesn't allow for efficient backups. Suggest fewer larger files

Our it operations department tells me that just enumerating the 2.3 million objects in our repo for incremental backup takes more than 24h.

Suggested solution for an optional different storage backend for durable human readable storage:
Never delete xml files, just add xml files. When adding xml files add them to tar balls of xml files (or another flat file format), and simply switch to next tar ball when file is > 100MB (for example).
Pros: Once tar ball is "full" it never changes => easy preservation and fixity checks
Cons: XML files can never be deleted.
Efficient use of these files will require some index over the tar files.

Object versioning should of course simply point to old xml objects in the tar file.

500 javax.jcr.ValueFormatException: Cannot convert URI value to Node

In alpha 5

       STATUS: 500 javax.jcr.ValueFormatException: Cannot convert URI value to Node
        at org.modeshape.jcr.JcrValue.createValueFormatException(JcrValue.java:92)
        at org.modeshape.jcr.JcrValue.asType(JcrValue.java:414)
        at org.modeshape.jcr.JcrMultiValueProperty.internalSetValue(JcrMultiValueProperty.java:185)
        at org.modeshape.jcr.JcrMultiValueProperty.setValue(JcrMultiValueProperty.java:157)
        at org.fcrepo.kernel.utils.NodePropertiesTools.appendOrReplaceNodeProperty(NodePropertiesTools.java:86)
        at org.fcrepo.kernel.utils.iterators.RdfAdder.operateOnProperty(RdfAdder.java:96)
        at org.fcrepo.kernel.utils.iterators.PersistingRdfStreamConsumer.operateOnTriple(PersistingRdfStreamConsumer.java:140)
        at org.fcrepo.kernel.utils.iterators.PersistingRdfStreamConsumer.consume(PersistingRdfStreamConsumer.java:116)
        at org.fcrepo.kernel.FedoraResourceImpl.replaceProperties(FedoraResourceImpl.java:363)
        at org.fcrepo.http.api.FedoraNodes.createOrReplaceObjectRdf(FedoraNodes.java:418)

Modular, embeddable components

It would be great to see Fedora's business layer exposed as first-class objects, allowing it to be used directly from Java/JRuby/Java-bytecode-language-of-the-month.

Use case: Direct bulk operations such as ingest, batch changes, indexing, etc. that often break at the REST/SOAP layer.

Wrong response code (unchecked error) loading versions of a non-versioned node

When trying to get versions back from a NonRDFSource node I'm getting the following error:

       STATUS: 500 javax.jcr.UnsupportedRepositoryOperationException: This operation requires that the node be versionable (that is, isNodeType("mix:versionable") == true)
        at org.modeshape.jcr.JcrVersionManager.checkVersionable(JcrVersionManager.java:276)
        at org.modeshape.jcr.JcrVersionManager.getVersionHistory(JcrVersionManager.java:196)
        at org.modeshape.jcr.JcrVersionManager.getVersionHistory(JcrVersionManager.java:192)
        at org.modeshape.jcr.JcrVersionManager.getVersionHistory(JcrVersionManager.java:80)
        at org.fcrepo.kernel.impl.rdf.impl.VersionsRdfContext.<init>(VersionsRdfContext.java:73)
        at sun.reflect.GeneratedConstructorAccessor75.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at org.fcrepo.kernel.impl.FedoraResourceImpl.getTriples(FedoraResourceImpl.java:262)
        at org.fcrepo.kernel.impl.FedoraResourceImpl.getTriples(FedoraResourceImpl.java:...
HTTP PUT (5.67ms)  http://localhost:8983/fedora/rest/test/descMetadata
Request body  <?xml version="1.0"?>
<xml>
  <title>Greetings Earthlings</title>
</xml>
Response status  Net::HTTPNoContent (204)
HTTP POST (9.57ms)  http://localhost:8983/fedora/rest/test/descMetadata/fcr:versions
Response status  Net::HTTPNoContent (204)
HTTP GET (3.49ms)  http://localhost:8983/fedora/rest/test/descMetadata/fcr:versions
Response status  Net::HTTPInternalServerError (500)

I think this should be some type of 4xx error, not a 500.

fcrepo-http-api tests (and others?) use the slf4j no-op logger

Probably for @ajs6f:

When running the fcrepo-http-api tests, we don't get any of the org.fcrepo module logging. The logs show slf4j can't find an implementation and defaults to a no-op logger. This used to work, so I assume we used to get logback through some transitive dependency (and no longer do). I assume we should provide a logger impl at least for <scope>test</scope>. What's the right way to do this? A hard dependency somewhere, a test-jar dependency in -kernel-impl, etc??

Can't create a new object

Trying
POST /rest/tx:4322123e-ba6b-427f-8a41-989b848d633c/fcr:new?pid=new

Getting:

Caused by: javax.jcr.RepositoryException: Error converting "fcr:new" from String to a Name
    at org.modeshape.jcr.JcrSession.absolutePathFor(JcrSession.java:661)
    at org.modeshape.jcr.JcrSession.nodeExists(JcrSession.java:898)
    ... 44 more

With alpha-2

Legacy API: "/objects" does not respect state parameter

I believe that in the Legacy API, GET /objects is supposed to accept the URL parameter ?state={A|I|D} (among others) in order to filter the result set by the object's active/inactive/deleted state. Currently, the result set does not get filtered if this param is passed.

Add stomp to jms

currently there is no stomp
and jms is not run when run webapp with jetty.

to fix this:
1 add xml file to start jms in webapp resource
2 add stomp transport connector in apachemq.xml
3 add xstream dependency in jms

This may also cause permGen space exception,
need to set Maven opts to -XX:MaxPermSize=128m

500 error on open ended range request.

When you issue an open ended Range header, Fedora gives a 500 error.

Range: bytes=0-

If Fedora 4 can't handle that it should return 416 (Requested range not satisfiable)

500 NPE error on update

       STATUS: 500 java.lang.NullPointerException
        at org.modeshape.jcr.JcrMultiValueProperty.getValues(JcrMultiValueProperty.java:138)
        at org.modeshape.jcr.JcrMultiValueProperty.getValues(JcrMultiValueProperty.java:56)
        at org.fcrepo.kernel.utils.FedoraTypesUtils$6.apply(FedoraTypesUtils.java:192)
        at org.fcrepo.kernel.utils.FedoraTypesUtils$6.apply(FedoraTypesUtils.java:185)
        at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
        at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
        at org.fcrepo.kernel.rdf.impl.mappings.ZippingIterator.computeNext(ZippingIterator.java:62)
        at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
        at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
        at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542)
        at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542)
        at com.google.common.collect.ForwardingIterator.hasNext(ForwardingIterator....

Don't show jcr exceptions in error messages

Response status   Net::HTTPNotFound (404)
HTTP PUT (139.81ms)   http://localhost:8983/fedora/rest/test/te/st/12/3/test123
Request body
<http://localhost:8983/fedora/rest/test/te/st/12/3/test123> <http://purl.org/dc/terms/title> "world.png";
   <http://fedora.info/definitions/v4/rels-ext#hasModel> "GenericFile";
   <http://fedora.info/definitions/v4/rels-ext#isPartOf> <http://localhost:8983/fedora/rest/test/sa/mp/le/_b/sample_batch_id>;
   <http://id.loc.gov/vocabulary/relators/dpt> "[email protected]";
   <http://purl.org/dc/terms/creator> "[email protected]";
   <http://purl.org/dc/terms/dateSubmitted> "2014-11-10"^^<http://www.w3.org/2001/XMLSchema#date>;
   <http://purl.org/dc/terms/modified> "2014-11-10"^^<http://www.w3.org/2001/XMLSchema#date>;
   <http://scholarsphere.psu.edu/ns#onBehalfOf> "carolyn" .

Response status   Net::HTTPConflict (409)
Response body   javax.jcr.PathNotFoundException: No node exists at path '/test/sa/mp/le/_b/sample_batch_id' in workspace "default"

Another error I've seen is javax.jcr.RepositoryException: Error converting ":b" from String to a Name

Error when saving datastream

On Alpha 4, when I POST an XML document to: http://localhost:8983/fedora/rest/ad/da/87/89/adda8789-ab2a-44f8-be67-8f57fd4e5fb3/descMetadata/fcr:content

I get a 500 response with this body:

javax.jcr.nodetype.ConstraintViolationException: Unable to determine a valid node definition for the node "/ad/da/87/89/adda8789-ab2a-44f8-be67-8f57fd4e5fb3/descMetadata/19" in workspace "default" of "repo"
    at org.modeshape.jcr.AbstractJcrNode.validateChildNodeDefinition(AbstractJcrNode.java:1290)
    at org.modeshape.jcr.AbstractJcrNode.addChildNode(AbstractJcrNode.java:1119)
    at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:1066)
    at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:980)
    at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:108)
    at org.modeshape.jcr.api.JcrTools.findOrCreateNode(JcrTools.java:432)
    at org.modeshape.jcr.api.JcrTools.findOrCreateNode(JcrTools.java:386)
    at org.fcrepo.kernel.FedoraResourceImpl.initializeNewResourceProperties(FedoraResourceImpl.java:110)
    at org.fcrepo.kernel.FedoraResourceImpl.<init>(FedoraResourceImpl.java:104)
    at org.fcrepo.kernel.DatastreamImpl.<init>(DatastreamImpl.java:83)
    at org.fcrepo.kernel.DatastreamImpl.<init>(DatastreamImpl.java:98)
    at org.fcrepo.kernel.services.DatastreamServiceImpl.createDatastream(DatastreamServiceImpl.java:102)
    at org.fcrepo.kernel.services.DatastreamServiceImpl.createDatastreamNode(DatastreamServiceImpl.java:146)
    at org.fcrepo.http.api.FedoraContent.create(FedoraContent.java:144)
    at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.codahale.metrics.jersey.InstrumentedResourceMethodDispatchProvider$TimedRequestDispatcher.dispatch(InstrumentedResourceMethodDispatchProvider.java:30)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:365)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
    at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
    at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
    at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Thread.java:722)

500 error trying after trying to access node after successful head.

LDP: HEAD [http://localhost:8983/fedora/rest/b4/6a/e0/f5/b46ae0f5-3b61-4e89-931a-7c6fb236915e]
LDP: HEAD RESP 200
LDP: GET [http://localhost:8983/fedora/rest/b4/6a/e0/f5/b46ae0f5-3b61-4e89-931a-7c6fb236915e]
LDP: GET RESP 500

It seems like this might be a timing issue. Because when I run the steps manually it works, but when I run it in a test case it fails.

I had this error:

HTTP ERROR 500

Problem accessing /fedora/rest/2d/32/33/8b/2d32338b-ffea-4ef3-ac75-040881a2a5f7. Reason:

    javax.jcr.ItemNotFoundException: 87a0a8c7505d64d0c6c330-8276-4da5-8c13-e7f6dc5efc34
Caused by:

java.lang.RuntimeException: javax.jcr.ItemNotFoundException: 87a0a8c7505d64d0c6c330-8276-4da5-8c13-e7f6dc5efc34
    at com.google.common.base.Throwables.propagate(Throwables.java:160)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple.propertyvalue2node(PropertyToTriple.java:153)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple.propertyvalue2triple(PropertyToTriple.java:120)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple.access$000(PropertyToTriple.java:53)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple$1$1.apply(PropertyToTriple.java:101)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple$1$1.apply(PropertyToTriple.java:97)
    at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
    at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.ForwardingIterator.next(ForwardingIterator.java:48)
    at org.fcrepo.kernel.utils.iterators.RdfStream.asModel(RdfStream.java:293)
    at org.fcrepo.http.commons.responses.StreamingBaseHtmlProvider.writeTo(StreamingBaseHtmlProvider.java:99)
    at org.fcrepo.http.commons.responses.StreamingBaseHtmlProvider.writeTo(StreamingBaseHtmlProvider.java:53)
    at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1479)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:365)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
    at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
    at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
    at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Thread.java:722)
Caused by: javax.jcr.ItemNotFoundException: 87a0a8c7505d64d0c6c330-8276-4da5-8c13-e7f6dc5efc34
    at org.modeshape.jcr.JcrSession.node(JcrSession.java:484)
    at org.modeshape.jcr.JcrSession.node(JcrSession.java:466)
    at org.modeshape.jcr.JcrSession.getNodeByIdentifier(JcrSession.java:757)
    at org.modeshape.jcr.JcrSession.getNodeByIdentifier(JcrSession.java:131)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple.traverseLink(PropertyToTriple.java:169)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple.propertyvalue2node(PropertyToTriple.java:148)
    ... 50 more
Caused by:

javax.jcr.ItemNotFoundException: 87a0a8c7505d64d0c6c330-8276-4da5-8c13-e7f6dc5efc34
    at org.modeshape.jcr.JcrSession.node(JcrSession.java:484)
    at org.modeshape.jcr.JcrSession.node(JcrSession.java:466)
    at org.modeshape.jcr.JcrSession.getNodeByIdentifier(JcrSession.java:757)
    at org.modeshape.jcr.JcrSession.getNodeByIdentifier(JcrSession.java:131)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple.traverseLink(PropertyToTriple.java:169)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple.propertyvalue2node(PropertyToTriple.java:148)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple.propertyvalue2triple(PropertyToTriple.java:120)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple.access$000(PropertyToTriple.java:53)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple$1$1.apply(PropertyToTriple.java:101)
    at org.fcrepo.kernel.rdf.impl.mappings.PropertyToTriple$1$1.apply(PropertyToTriple.java:97)
    at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
    at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.Iterators$5.next(Iterators.java:553)
    at com.google.common.collect.ForwardingIterator.next(ForwardingIterator.java:48)
    at org.fcrepo.kernel.utils.iterators.RdfStream.asModel(RdfStream.java:293)
    at org.fcrepo.http.commons.responses.StreamingBaseHtmlProvider.writeTo(StreamingBaseHtmlProvider.java:99)
    at org.fcrepo.http.commons.responses.StreamingBaseHtmlProvider.writeTo(StreamingBaseHtmlProvider.java:53)
    at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1479)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:365)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
    at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
    at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
    at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Thread.java:722)
Powered by Jetty://

















500 NullPointerException

In alpha 5

       STATUS: 500 java.lang.NullPointerException
        at org.modeshape.jcr.JcrMultiValueProperty.getValues(JcrMultiValueProperty.java:138)
        at org.modeshape.jcr.JcrMultiValueProperty.getValues(JcrMultiValueProperty.java:56)
        at org.fcrepo.kernel.utils.FedoraTypesUtils$6.apply(FedoraTypesUtils.java:192)
        at org.fcrepo.kernel.utils.FedoraTypesUtils$6.apply(FedoraTypesUtils.java:185)
        at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
        at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
        at org.fcrepo.kernel.rdf.impl.mappings.ZippingIterator.computeNext(ZippingIterator.java:62)
        at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
        at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
        at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542)
        at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542)

500 error Error converting "baz:1" from String to a Name

When I do GET http://localhost:8983/fedora/rest/baz:1

I get a 500 response with this trace:


javax.jcr.RepositoryException: Error converting "baz:1" from String to a Name
    at org.modeshape.jcr.JcrSession.absolutePathFor(JcrSession.java:682)
    at org.modeshape.jcr.JcrSession.getNode(JcrSession.java:814)
    at org.modeshape.jcr.JcrSession.getNode(JcrSession.java:807)
    at org.modeshape.jcr.JcrSession.getNode(JcrSession.java:131)
    at org.fcrepo.kernel.services.NodeServiceImpl.getObject(NodeServiceImpl.java:80)
    at org.fcrepo.http.api.FedoraNodes.describe(FedoraNodes.java:165)
    at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)

409 conflict for fcrepo:lastModified

GET request:

HTTP GET (6.15ms)  http://localhost:8983/fedora/rest/test/9f/30/63/86/9f306386-f98f-4fc0-af2f-8a85cb2257ad
Response status  Net::HTTPOK (200)
Response body  @prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix nt: <http://www.jcp.org/jcr/nt/1.0> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix fcrepo: <http://fedora.info/definitions/v4/repository#> .
@prefix ns001: <http://purl.org/dc/terms/> .
@prefix test: <info:fedora/test/> .
@prefix fedoraconfig: <http://fedora.info/definitions/v4/config#> .
@prefix image: <http://www.modeshape.org/images/1.0> .
@prefix xs: <http://www.w3.org/2001/XMLSchema> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix fedorarelsext: <http://fedora.info/definitions/v4/rels-ext#> .
@prefix mix: <http://www.jcp.org/jcr/mix/1.0> .
@prefix premis: <http://www.loc.gov/premis/rdf/v1#> .
@prefix mode: <http://www.modeshape.org/1.0> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix sv: <http://www.jcp.org/jcr/sv/1.0> .
@prefix fedora: <http://fedora.info/definitions/v4/rest-api#> .
@prefix xsi: <http://www.w3.org/2001/XMLSchema-instance> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .


<http://localhost:8983/fedora/rest/test/9f/30/63/86/9f306386-f98f-4fc0-af2f-8a85cb2257ad/fcr:export?format=jcr/xml> dc:format <http://fedora.info/definitions/v4/repository#jcr/xml> .

<http://fedora.info/definitions/v4/repository#jcr/xml> rdfs:label "jcr/xml"^^<http://www.w3.org/2001/XMLSchema#string> .

<http://localhost:8983/fedora/rest/test/9f/30/63/86/9f306386-f98f-4fc0-af2f-8a85cb2257ad> fedora:exportsAs <http://localhost:8983/fedora/rest/test/9f/30/63/86/9f306386-f98f-4fc0-af2f-8a85cb2257ad/fcr:export?format=jcr/xml> ;
    ldp:membershipResource <http://localhost:8983/fedora/rest/test/9f/30/63/86/9f306386-f98f-4fc0-af2f-8a85cb2257ad> ;
    ldp:hasMemberRelation ldp:member ;
    a ldp:Container , ldp:DirectContainer ;
    fcrepo:hasParent <http://localhost:8983/fedora/rest/test/9f/30/63/86> ;
    a <http://www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , fedora:resource , fedora:object , fedora:relations , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0referenceable> , dc:describable , fedora:resource , ldp:Container ;
    fedora:writable "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
    fcrepo:primaryType "nt:folder"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fedorarelsext:hasModel "Component"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fcrepo:created "2014-10-20T21:28:44.107Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
    fcrepo:lastModified "2014-10-20T21:28:44.107Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
    fcrepo:mixinTypes "fedora:resource"^^<http://www.w3.org/2001/XMLSchema#string> , "fedora:object"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fcrepo:lastModifiedBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fcrepo:uuid "58a20281-4ef9-477e-8c47-1079481efb11"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fcrepo:createdBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> .

PUT request:

HTTP PUT (7.42ms)  http://localhost:8983/fedora/rest/test/9f/30/63/86/9f306386-f98f-4fc0-af2f-8a85cb2257ad
Request body
<http://fedora.info/definitions/v4/repository#jcr/xml> <http://www.w3.org/2000/01/rdf-schema#label> "jcr/xml" .

<http://localhost:8983/fedora/rest/test/9f/30/63/86/9f306386-f98f-4fc0-af2f-8a85cb2257ad> a <http://www.w3.org/ns/ldp#Container>,
     <http://www.w3.org/ns/ldp#DirectContainer>,
     <http://www.jcp.org/jcr/nt/1.0folder>,
     <http://www.jcp.org/jcr/nt/1.0hierarchyNode>,
     <http://www.jcp.org/jcr/nt/1.0base>,
     <http://www.jcp.org/jcr/mix/1.0created>,
     <http://fedora.info/definitions/v4/rest-api#resource>,
     <http://fedora.info/definitions/v4/rest-api#object>,
     <http://fedora.info/definitions/v4/rest-api#relations>,
     <http://www.jcp.org/jcr/mix/1.0lastModified>,
     <http://www.jcp.org/jcr/mix/1.0referenceable>,
     <http://purl.org/dc/elements/1.1/describable>;
   <http://fedora.info/definitions/v4/rels-ext#hasModel> "Component";
   <http://fedora.info/definitions/v4/rels-ext#isPartOf> <http://localhost:8983/fedora/rest/test/a0/33/19/2b/a033192b-7247-4ea0-8fdc-27372d1c3404>;
   <http://fedora.info/definitions/v4/repository#created> "2014-10-20T21:28:44.107Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
   <http://fedora.info/definitions/v4/repository#createdBy> "bypassAdmin";
   <http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8983/fedora/rest/test/9f/30/63/86>;
   <http://fedora.info/definitions/v4/repository#lastModifiedBy> "bypassAdmin";
   <http://fedora.info/definitions/v4/repository#mixinTypes> "fedora:resource",
     "fedora:object";
   <http://fedora.info/definitions/v4/repository#primaryType> "nt:folder";
   <http://fedora.info/definitions/v4/repository#uuid> "58a20281-4ef9-477e-8c47-1079481efb11";
   <http://fedora.info/definitions/v4/rest-api#exportsAs> <http://localhost:8983/fedora/rest/test/9f/30/63/86/9f306386-f98f-4fc0-af2f-8a85cb2257ad/fcr:export?format=jcr/xml>;
   <http://fedora.info/definitions/v4/rest-api#writable> true;
   <http://www.w3.org/ns/ldp#hasMemberRelation> <http://www.w3.org/ns/ldp#member>;
   <http://www.w3.org/ns/ldp#membershipResource> <http://localhost:8983/fedora/rest/test/9f/30/63/86/9f306386-f98f-4fc0-af2f-8a85cb2257ad> .

<http://localhost:8983/fedora/rest/test/9f/30/63/86/9f306386-f98f-4fc0-af2f-8a85cb2257ad/fcr:export?format=jcr/xml> <http://purl.org/dc/elements/1.1/format> <http://fedora.info/definitions/v4/repository#jcr/xml> .

Response status  Net::HTTPConflict (409)
Response body  Could not remove triple containing predicate http://fedora.info/definitions/v4/repository#lastModified to node /test/9f/30/63/86/9f306386-f98f-4fc0-af2f-8a85cb2257ad
F

Odd error when attempting to serialize to application/rdf+json

I'm getting the following stack trace when I tried to make fcr:search produce application/rdf+json.

javax.servlet.ServletException: javax.servlet.ServletException: org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.hp.hpl.jena.shared.LockMRSW and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.hp.hpl.jena.sparql.core.DatasetImpl["lock"])
at org.glassfish.grizzly.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:139)
at org.glassfish.grizzly.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:106)
at org.glassfish.grizzly.servlet.ServletHandler.doServletService(ServletHandler.java:221)
at org.glassfish.grizzly.servlet.ServletHandler.service(ServletHandler.java:169)
at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:212)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:744)
Caused by: javax.servlet.ServletException: org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.hp.hpl.jena.shared.LockMRSW and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.hp.hpl.jena.sparql.core.DatasetImpl["lock"])
at org.glassfish.grizzly.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:151)
at org.fcrepo.http.commons.test.util.TestAuthenticationRequestFilter.doFilter(TestAuthenticationRequestFilter.java:78)
at org.glassfish.grizzly.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:137)
... 7 more
Caused by: org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.hp.hpl.jena.shared.LockMRSW and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.hp.hpl.jena.sparql.core.DatasetImpl["lock"])
at org.codehaus.jackson.map.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:52)
at org.codehaus.jackson.map.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:25)
at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:446)
at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:150)
at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112)
at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:610)
at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256)
at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1604)
at org.codehaus.jackson.jaxrs.JacksonJsonProvider.writeTo(JacksonJsonProvider.java:558)
at com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy.writeTo(JacksonProviderProxy.java:160)
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1479)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.glassfish.grizzly.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:147)
... 9 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.