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

FileSystemConnector uses incorrect ID when adding content to nt:file nodes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.2.0.Final
    • 3.1.3.Final
    • Federation, JCR
    • None
    • Hide

      Configure federation, then add a typical "nt:file" node with "jcr:content" child:

      Node node = root.getNode("federated/foo").addNode("bar.xml", "nt:file");
      Node contentNode = node.addNode("jcr:content", "nt:resource");
      Binary binary = session.getValueFactory().createBinary(new ByteArrayInputStream(SOME_STRING_CONTAINING_XML.getBytes()));
      contentNode.setProperty("jcr:data", binary);
      session.save();
      
      Show
      Configure federation, then add a typical "nt:file" node with "jcr:content" child: Node node = root.getNode( "federated/foo" ).addNode( "bar.xml" , "nt:file" ); Node contentNode = node.addNode( "jcr:content" , "nt:resource" ); Binary binary = session.getValueFactory().createBinary( new ByteArrayInputStream(SOME_STRING_CONTAINING_XML.getBytes())); contentNode.setProperty( "jcr:data" , binary); session.save();

    Description

      Creating a federated node of primary type nt:file and adding binary content results in a file of zero length on disk.

      May affect earlier versions - sorry, haven't checked.

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            mashtun Mark Scott (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: