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

Exception in Property.getNode for REFERENCE from JPA node to FileSystem node in federated repository

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.8.0.Final
    • 2.6.0.Beta2
    • Graph (2.x), JCR
    • None
    • Hide

      Configuration:

      • Federated repository
      • JPA connector source projected into /database
      • Filesystem source, configured for extra properties = "store", projected into /filesystem
      • /database/node1 - nt:unstructured node
      • /filesystem/file1/jcr:content - nt:resource

      Code:

      Node content = session.getNode("/filesystem/file1/jcr:content");
      content.addMixin("nt:referenceable");
      Node node1 = session.getNode("/database/node1");
      node1.setProperty("contentRef", content);
      session.save();
      content.getProperty("jcr:uuid").getString(); // equals: 42ed286b-fe2d-4d92-a867-7625f52655bc 
      Property contentRef = node1.getProperty("contentRef");
      contentRef.getString(); // equals: 42ed286b-fe2d-4d92-a867-7625f52655bc
      contentRef.getNode();  // exception thrown here; see below
      
      

      Exception thrown:

      Caused by: javax.jcr.ItemNotFoundException: Unable to find "[{http://www.modeshape.org/1.0}uuid = 42ed286b-fe2d-4d92-a867-7625f52655bc]"; lowest existing path is "/{}database"
      	at org.modeshape.jcr.SessionCache.findJcrNode(SessionCache.java:621)
      	at org.modeshape.jcr.JcrSession.getNodeByIdentifier(JcrSession.java:863)
      	at org.modeshape.jcr.JcrSingleValueProperty.getNode(JcrSingleValueProperty.java:170)
              ...
      
      Caused by: org.modeshape.graph.property.PathNotFoundException: Unable to find "[{http://www.modeshape.org/1.0}uuid = 42ed286b-fe2d-4d92-a867-7625f52655bc]"; lowest existing path is "/{}database"
      	at org.modeshape.graph.connector.federation.JoinRequestProcessor.setPathNotFound(JoinRequestProcessor.java:399)
      	at org.modeshape.graph.connector.federation.JoinRequestProcessor.process(JoinRequestProcessor.java:332)
      	at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:297)
      	at org.modeshape.graph.connector.federation.JoinRequestProcessor.process(JoinRequestProcessor.java:195)
      	at org.modeshape.graph.connector.federation.JoinRequestProcessor.process(JoinRequestProcessor.java:145)
      	at org.modeshape.graph.connector.federation.FederatedRepositoryConnection.execute(FederatedRepositoryConnection.java:225)
      	at org.modeshape.graph.Graph.execute(Graph.java:288)
      	at org.modeshape.graph.Graph$5.process(Graph.java:231)
      	at org.modeshape.graph.request.RequestBuilder.readNode(RequestBuilder.java:145)
      	at org.modeshape.graph.Graph.getNodeAt(Graph.java:2418)
      	at org.modeshape.graph.session.GraphSession.findNodeWith(GraphSession.java:311)
      	at org.modeshape.jcr.SessionCache.findJcrNode(SessionCache.java:619)
      	... 118 more
      

      Also, calling

      session.getNodeByIdentifier("42ed286b-fe2d-4d92-a867-7625f52655bc")
      

      results in the same issue.

      Show
      Configuration: Federated repository JPA connector source projected into /database Filesystem source, configured for extra properties = "store", projected into /filesystem /database/node1 - nt:unstructured node /filesystem/file1/jcr:content - nt:resource Code: Node content = session.getNode( "/filesystem/file1/jcr:content" ); content.addMixin( "nt:referenceable" ); Node node1 = session.getNode( "/database/node1" ); node1.setProperty( "contentRef" , content); session.save(); content.getProperty( "jcr:uuid" ).getString(); // equals: 42ed286b-fe2d-4d92-a867-7625f52655bc Property contentRef = node1.getProperty( "contentRef" ); contentRef.getString(); // equals: 42ed286b-fe2d-4d92-a867-7625f52655bc contentRef.getNode(); // exception thrown here; see below Exception thrown: Caused by: javax.jcr.ItemNotFoundException: Unable to find "[{http://www.modeshape.org/1.0}uuid = 42ed286b-fe2d-4d92-a867-7625f52655bc]"; lowest existing path is "/{}database" at org.modeshape.jcr.SessionCache.findJcrNode(SessionCache.java:621) at org.modeshape.jcr.JcrSession.getNodeByIdentifier(JcrSession.java:863) at org.modeshape.jcr.JcrSingleValueProperty.getNode(JcrSingleValueProperty.java:170) ... Caused by: org.modeshape.graph.property.PathNotFoundException: Unable to find "[{http://www.modeshape.org/1.0}uuid = 42ed286b-fe2d-4d92-a867-7625f52655bc]"; lowest existing path is "/{}database" at org.modeshape.graph.connector.federation.JoinRequestProcessor.setPathNotFound(JoinRequestProcessor.java:399) at org.modeshape.graph.connector.federation.JoinRequestProcessor.process(JoinRequestProcessor.java:332) at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:297) at org.modeshape.graph.connector.federation.JoinRequestProcessor.process(JoinRequestProcessor.java:195) at org.modeshape.graph.connector.federation.JoinRequestProcessor.process(JoinRequestProcessor.java:145) at org.modeshape.graph.connector.federation.FederatedRepositoryConnection.execute(FederatedRepositoryConnection.java:225) at org.modeshape.graph.Graph.execute(Graph.java:288) at org.modeshape.graph.Graph$5.process(Graph.java:231) at org.modeshape.graph.request.RequestBuilder.readNode(RequestBuilder.java:145) at org.modeshape.graph.Graph.getNodeAt(Graph.java:2418) at org.modeshape.graph.session.GraphSession.findNodeWith(GraphSession.java:311) at org.modeshape.jcr.SessionCache.findJcrNode(SessionCache.java:619) ... 118 more Also, calling session.getNodeByIdentifier( "42ed286b-fe2d-4d92-a867-7625f52655bc" ) results in the same issue.

      (See: MODE-1232)

      When creating a REFERENCE property from a JPA node to a filesystem node, in a federated repository, the reference appears to be created correctly, but attempt to de-reference it using Property.getNode() results in a javax.jcr.ItemNotFoundException.

              hchiorean Horia Chiorean (Inactive)
              jonathandfields_jira Jonathan Fields (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: