Uploaded image for project: 'Archiva (Retired)'
  1. Archiva (Retired)
  2. MRM-1625

java.lang.ArrayIndexOutOfBoundsException from parsing maven-metadata.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4-M2
    • 1.4-M3
    • Metadata Repository
    • None
    • Linux rhel 6
    • Patch

    Description

      ArrayIndexOutOfBoundsException is thrown when parsing some maven-metadata.xml files. Please see the attached sample maven-metadata.xml and the proposed patch to fix the problem.

      2012-04-17 00:04:43,098 WARN
      [org.apache.archiva.repository.metadata.MetadataTools] Unable to read metadata:
      /home/y/var/yarchiva/data/repositories/public/yahoo/yinst/listings_reconciliation_framework
      /listings-reconciliation-framework/maven-metadata-dist.xml
      org.apache.archiva.repository.metadata.RepositoryMetadataException: Unable to
      parse metadata xml
      file:/home/y/var/yarchiva/data/repositories/public/yahoo/yinst/listings_reconciliation_framework/listing
      s-reconciliation-framework/maven-metadata-dist.xml: null Nested exception: null
      at
      org.apache.archiva.repository.metadata.RepositoryMetadataReader.read(RepositoryMetadataReader.java:95)
      at
      org.apache.archiva.repository.metadata.MetadataTools.readProxyMetadata(MetadataTools.java:394)
      at
      org.apache.archiva.repository.metadata.MetadataTools.getMetadatasForManagedRepository(MetadataTools.java:527)
      at
      org.apache.archiva.repository.metadata.MetadataTools.updateMetadata(MetadataTools.java:437)
      at

      Caused by: org.apache.archiva.xml.XMLException: Unable to parse metadata xml
      file:/home/y/var/yarchiva/data/repositories/public/yahoo/yinst/listings_reconciliation_framework/listings-reconciliation-framework/maven-metadata-dist.xml:
      null Nested exception: null
      at org.apache.archiva.xml.XMLReader.init(XMLReader.java:113)
      at org.apache.archiva.xml.XMLReader.<init>(XMLReader.java:81)
      at
      org.apache.archiva.repository.metadata.RepositoryMetadataReader.read(RepositoryMetadataReader.java:52)
      ... 55 more
      Caused by: org.dom4j.DocumentException: null Nested exception: null
      at org.dom4j.io.SAXReader.read(SAXReader.java:484)
      at org.dom4j.io.SAXReader.read(SAXReader.java:365)
      at org.apache.archiva.xml.XMLReader.init(XMLReader.java:109)
      ... 57 more

      Attachments

        1. maven-metadata-leftover.xml
          3 kB
          Charles King
        2. patch_test.txt
          2 kB
          Charles King
        3. patch.txt
          1 kB
          Charles King

        Activity

          People

            olamy Olivier Lamy
            charlesk Charles King
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: