Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-1448

ParseException "Unsupported repository, resources names are not uris" for ivy.xml with parent on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.3.0
    • 2.5.0-rc1
    • Core
    • None
    • Windows, Ant 1.8.3, Java 1.6

    Description

      (Remark: I already posted this on dev mailing list, but I think it's better to add an issue)

      When using Ivy's OSGi support with an ivy.xml (snippet) like

      <ivy-module version="2.2" xmlns:o="http://ant.apache.org/ivy/osgi">
      <info organisation="meta-level" module="osgi-parent">
      <extends organisation="bundle" module="mymodule"
      revision="1.0.0.qualifier"
      location="META-INF/MANIFEST.MF"/>
      </info>
      ....

      then after calling e.g. ant task ivy:resolve on Windows the following error can be seen on console output:

      Buildfile: C:\java\workspace\de.metalevel.eclipse.mlbuild\build.xml

      ivy:configure:
      [ivy:configure] :: Apache Ivy 2.3.0 - 20130110142753 ::
      http://ant.apache.org/ivy/ ::
      [ivy:configure] :: loading settings :: file =
      C:\java\workspace\ivysettings.xml

      ivy:resolve:
      [ivy:resolve] Problem occurred while parsing ivy file: Unsupported
      repository, resources names are not uris in
      file:/C:/java/workspace/de.metalevel.eclipse.mlbuild/ivy.xml

      BUILD FAILED
      C:\java\workspace\de.metalevel.eclipse.mlbuild\build.xml:55: syntax
      errors in ivy file: java.text.ParseException: Problem occurred while
      parsing ivy file: Unsupported repository, resources names are not uris
      in file:/C:/java/workspace/de.metalevel.eclipse.mlbuild/ivy.xml
      at
      org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parse(XmlModuleDescriptorParser.java:278)
      at
      org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:117)
      at
      org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at
      org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:185)
      at org.apache.ivy.Ivy.resolve(Ivy.java:507)
      at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:326)
      at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
      at
      org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at
      org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.Target.execute(Target.java:392)
      at org.apache.tools.ant.Target.performTasks(Target.java:413)
      at
      org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
      at
      org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      at org.apache.tools.ant.Main.runBuild(Main.java:811)
      at org.apache.tools.ant.Main.startAnt(Main.java:217)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
      Caused by: java.lang.RuntimeException: Unsupported repository, resources
      names are not uris
      at
      org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.startElement(XmlModuleDescriptorParser.java:363)
      at
      com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
      at
      com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
      at
      com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:739)
      at
      com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
      at
      com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
      at
      com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
      at
      com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
      at
      com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
      at
      com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
      at
      com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
      at
      com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
      at
      com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
      at
      com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
      at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:146)
      at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:109)
      at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:99)
      at
      org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parse(XmlModuleDescriptorParser.java:253)
      ... 23 more
      Caused by: java.lang.RuntimeException: Unsupported repository, resources
      names are not uris
      at
      org.apache.ivy.osgi.core.OSGiManifestParser.parseDescriptor(OSGiManifestParser.java:69)
      at
      org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parseParentModuleOnFilesystem(XmlModuleDescriptorParser.java:631)
      at
      org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.extendsStarted(XmlModuleDescriptorParser.java:408)
      at
      org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.startElement(XmlModuleDescriptorParser.java:304)
      ... 41 more
      Caused by: java.net.URISyntaxException: Illegal character in opaque part
      at index 2:
      C:\java\workspace\de.metalevel.eclipse.mlbuild\META-INF\MANIFEST.MF
      at java.net.URI$Parser.fail(URI.java:2809)
      at java.net.URI$Parser.checkChars(URI.java:2982)
      at java.net.URI$Parser.parse(URI.java:3019)
      at java.net.URI.<init>(URI.java:578)
      at
      org.apache.ivy.osgi.core.OSGiManifestParser.parseDescriptor(OSGiManifestParser.java:67)
      ... 44 more

      Attachments

        1. OSGiManifestParser.patch
          0.8 kB
          Riccardo Iaconelli
        2. OSGiManifestParserTest.patch
          2 kB
          Riccardo Iaconelli

        Issue Links

          Activity

            People

              hibou Nicolas Lalevée
              riccardo Riccardo Iaconelli
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: