Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-2038

Invalid type error while importing DocView xml data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.4
    • 1.0.5, 1.1.0
    • core
    • None

    Description

      There is a bug that occurs when importing document view xml using

      session.getWorkspace().importXML(path, ins, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
      

      When importing the following error is returned:

      RepositoryTest
      org.apache.jackrabbit.oak.jcr.RepositoryTest
      [0]
      importWithRegisteredType[0](org.apache.jackrabbit.oak.jcr.RepositoryTest)
      javax.jcr.ValueFormatException: Invalid type: 0
      	at org.apache.jackrabbit.oak.plugins.value.ValueFactoryImpl.createValue(ValueFactoryImpl.java:267)
      	at org.apache.jackrabbit.oak.jcr.xml.StringValue.getValue(StringValue.java:88)
      	at org.apache.jackrabbit.oak.spi.xml.PropInfo.getValues(PropInfo.java:163)
      	at org.apache.jackrabbit.oak.jcr.xml.ImporterImpl.createProperty(ImporterImpl.java:202)
      	at org.apache.jackrabbit.oak.jcr.xml.ImporterImpl.startNode(ImporterImpl.java:452)
      	at org.apache.jackrabbit.oak.jcr.xml.DocViewImportHandler.startElement(DocViewImportHandler.java:277)
      	at org.apache.jackrabbit.oak.jcr.xml.ImportHandler.startElement(ImportHandler.java:183)
      	at org.apache.jackrabbit.commons.xml.DefaultContentHandler.startElement(DefaultContentHandler.java:161)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
      ....
      

      Attachments

        1. OAK-2038.patch
          3 kB
          Amit Jain

        Activity

          People

            mduerig Michael Dürig
            amitjain Amit Jain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: