Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-2678

RepositoryCopier has problems with multi-valued properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.6.2
    • None
    • jackrabbit-core
    • None
    • Jackrabbit 1.6.2

    Description

      When using the RepositoryCopier to backup and restore your repository you run into problems with multi-valued properties where you have only one value assigned.

      The backup works fine but when you try to restore the backup and want to get the values of a multi-valued property you get:

      java.lang.RuntimeException: property /ns:someNode/ns:multiValued is a single-valued property, so it's value can not be retrieved as an array
      at org.apache.jackrabbit.core.PropertyImpl.internalGetValues(PropertyImpl.java:441)
      at org.apache.jackrabbit.core.PropertyImpl.getValues(PropertyImpl.java:475)
      at xxx.MyClass.getProperty(MyClass.java:274)

      You can reproduce that by using the RepositoryCopier to copy your repository and then read it back again. You must have a node with a multi-valued property in it where you have only one value contained in the property to the time the backup is created.

      The node type definition looks like:

      // The namespace declaration
      <ns='http://noPlaceLikeHome/'>
      <nt='http://www.jcp.org/jcr/nt/1.0'>

      // Node type name
      [ns:myNodeType]

      • ns:multiValued (string)
        multiple

      Attachments

        1. JCR-2678.zip
          5 kB
          Sascha Theves
        2. RepositoryCopierTest.java
          9 kB
          Stefan Guggisberg

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sascha0137 Sascha Theves
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: