Uploaded image for project: 'JCR Tools'
  1. JCR Tools
  2. JCRTOOLS-40

JCR Tools does not support property has multiple values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Neutral Neutral
    • None
    • 1.0.3
    • None
    • Saigon 89
    • 2

      Step to reproduce:

      • Using Rest Tools to create a dam node that property "contributor" is multiple values
        Ex:
        {
           "name":"test",
           "type":"mgnl:asset",
           "path":"/test",
           "properties":[
              {
                 "name":"type",
                 "type":"String",
                 "multiple":false,
                 "values":[
                    "png"
                 ]
              },
              {
                 "name":"name",
                 "type":"String",
                 "multiple":false,
                 "values":[
                    "test"
                 ]
              },
              {
                 "name":"type",
                 "type":"String",
                 "multiple":false,
                 "values":[
                    "png"
                 ]
              },
              {
                 "name":"contributor",
                 "type":"String",
                 "multiple":true,
                 "values":[
                    "hieugioi",
                    "hieutot"
                 ]
              }
           ]
        }
        
        
      • Open JCR Browser for checking that node
      • Open JCR Tools for checking that node
        -> JCR Tools does not show the "contributor" property and log exception is thrown as below:
      javax.jcr.ValueFormatException: property /test/contributor is a multi-valued property, so it's values can only be retrieved as an array
      	at org.apache.jackrabbit.core.PropertyImpl.internalGetValue(PropertyImpl.java:483)
      	at org.apache.jackrabbit.core.PropertyImpl.getValue(PropertyImpl.java:510)
      	at org.apache.jackrabbit.core.PropertyImpl.getString(PropertyImpl.java:520)
      	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getString(DelegatePropertyWrapper.java:162)
      	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getString(DelegatePropertyWrapper.java:162)
      	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getString(DelegatePropertyWrapper.java:162)
      	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getString(DelegatePropertyWrapper.java:162)
      	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getString(DelegatePropertyWrapper.java:162)
      	at info.magnolia.cms.util.DumperUtil.dump(DumperUtil.java:153)
      	at info.magnolia.cms.util.DumperUtil.dump(DumperUtil.java:83)
      

        Acceptance criteria

              khuong.nguyenduy Khuong Nguyen
              oanh.thai Oanh Thai Hoang
              Nucleus
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - 3.5d
                    3.5d
                    Remaining:
                    Time Spent - 1d 7h Remaining Estimate - 1d 5h
                    1d 5h
                    Logged:
                    Time Spent - 1d 7h Remaining Estimate - 1d 5h
                    1d 7h