Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-5394

maven-metadata-local.xml in KARs cause SAXParseException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.1.2
    • 4.1.3, 4.2.0.M1
    • karaf
    • None

    Description

      When deploying a kar file into my installation, I get a long list of DEBUG logs like:

      16:39:52.095 [DEBUG] [he.karaf.kar.internal.FeatureDetector] - File 'maven-metadata-local.xml' is not a features file.
      org.xml.sax.SAXParseException: Premature end of file.
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) [?:?]
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177) [?:?]
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400) [?:?]
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) [?:?]
      	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472) [?:?]
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1014) [?:?]
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) [?:?]
      	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) [?:?]
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) [?:?]
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841) [?:?]
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770) [?:?]
      	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) [?:?]
      	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243) [?:?]
      	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339) [?:?]
      	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205) [?:?]
      	at org.apache.karaf.kar.internal.FeatureDetector.parse(FeatureDetector.java:84) [56:org.apache.karaf.kar.core:4.1.2]
      	at org.apache.karaf.kar.internal.FeatureDetector.isFeaturesRepository(FeatureDetector.java:53) [56:org.apache.karaf.kar.core:4.1.2]
      	at org.apache.karaf.kar.internal.Kar.extract(Kar.java:122) [56:org.apache.karaf.kar.core:4.1.2]
      	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:102) [56:org.apache.karaf.kar.core:4.1.2]
      	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:94) [56:org.apache.karaf.kar.core:4.1.2]
      	at org.apache.karaf.deployer.kar.KarArtifactInstaller.install(KarArtifactInstaller.java:50) [47:org.apache.karaf.deployer.kar:4.1.2]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:937) [8:org.apache.felix.fileinstall:3.6.0]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:871) [8:org.apache.felix.fileinstall:3.6.0]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:485) [8:org.apache.felix.fileinstall:3.6.0]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.6.0]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.6.0]
      

      According to KARAF-1198, it seems to be ok to have those files within the kar, so I would expect that the FeatureDetector is also aware of their existence and simply ignore them instead of logging exceptions.

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            kkreuzer Kai Kreuzer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: