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

Ivy XML files fail with "Content is not allowed in prolog" when using Polipo proxy cache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.2.0
    • 2.2.0
    • Core
    • None
    • MacOS 10.6.7, sbt 0.7.5, jdk1.6.0_24

    Description

      This is an interesting issue, and one that I'm not 100% is a result of the proxy cache, but:

      1. Set up Polipo (http://www.pps.jussieu.fr/~jch/software/polipo/) out of the box using Macports (sudo port install polipo)
      2. Set up the System Preferences to use the HTTP proxy to go through Polipo.
      3. Delete the ~/.ivy2 directory
      4. Go to the SBT project you have set up, and type "sbt update" (or I'm assuming any Ivy related network task)

      Instead of getting the file you expect, you get the following:

      Getting org.scala-tools.sbt sbt_2.7.7 0.7.4 ...
      [Fatal Error] ivy-0.1.31.xml.original:2:1: Content is not allowed in prolog.
      org.xml.sax.SAXParseException: Content is not allowed in prolog.
      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249)
      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:153)
      at org.apache.ivy.util.XMLHelper.parseToDom(XMLHelper.java:196)
      at org.apache.ivy.plugins.parser.m2.PomReader.<init>(PomReader.java:95)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:118)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:108)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:659)
      at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:676)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:993)
      at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:546)
      at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:266)
      at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:503)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:169)
      at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:287)
      at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:696)
      at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
      at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
      at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
      at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
      at org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:576)
      at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:237)
      at xsbt.boot.Update.resolve(Update.scala:159)
      at xsbt.boot.Update.update(Update.scala:116)
      at xsbt.boot.Update.update(Update.scala:110)
      at xsbt.boot.Update.xsbt$boot$Update$$lockedApply(Update.scala:73)
      at xsbt.boot.Update$$anon$2.call(Update.scala:67)
      at xsbt.boot.Update$$anon$2.call(Update.scala:67)
      at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Using$.withResource(Using.scala:11)
      at xsbt.boot.Using$.apply(Using.scala:10)
      at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45)
      at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45)
      at xsbt.boot.Locks$.apply(Locks.scala:31)
      at xsbt.boot.Update.apply(Update.scala:68)
      at xsbt.boot.Provider$initialize.call(Provider.scala:41)
      at xsbt.boot.Provider$initialize.call(Provider.scala:32)
      at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Using$.withResource(Using.scala:11)
      at xsbt.boot.Using$.apply(Using.scala:10)
      at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45)
      at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45)
      at xsbt.boot.Locks$.apply(Locks.scala:31)
      at xsbt.boot.Provider$class.$init$(Provider.scala:31)
      at xsbt.boot.Launch$ScalaProvider$AppProvider.<init>(Launch.scala:100)
      at xsbt.boot.Launch$ScalaProvider.app(Launch.scala:98)
      at xsbt.boot.Launch$.run(Launch.scala:49)
      at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
      at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
      at xsbt.boot.Launch$.launch(Launch.scala:57)
      at xsbt.boot.Launch$.explicit(Launch.scala:42)
      at xsbt.boot.Launch$.initialized(Launch.scala:38)
      at xsbt.boot.Launch$.parsed(Launch.scala:31)
      at xsbt.boot.Launch$.configured(Launch.scala:21)
      at xsbt.boot.Launch$.apply(Launch.scala:16)
      at xsbt.boot.Launch$.apply(Launch.scala:13)
      at xsbt.boot.Boot$.runImpl(Boot.scala:24)
      at xsbt.boot.Boot$.run(Boot.scala:19)
      at xsbt.boot.Boot$.main(Boot.scala:15)
      at xsbt.boot.Boot.main(Boot.scala)
      [Fatal Error] ivy-2.1.0.xml.original:2:1: Content is not allowed in prolog.
      org.xml.sax.SAXParseException: Content is not allowed in prolog.
      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249)
      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:153)
      at org.apache.ivy.util.XMLHelper.parseToDom(XMLHelper.java:196)
      at org.apache.ivy.plugins.parser.m2.PomReader.<init>(PomReader.java:95)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:118)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:108)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:659)
      at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:676)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:993)
      at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:546)
      at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:266)
      at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:503)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:169)
      at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:287)
      at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:696)
      at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
      at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
      at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
      at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
      at org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:576)
      at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:237)
      at xsbt.boot.Update.resolve(Update.scala:159)
      at xsbt.boot.Update.update(Update.scala:116)
      at xsbt.boot.Update.update(Update.scala:110)
      at xsbt.boot.Update.xsbt$boot$Update$$lockedApply(Update.scala:73)
      at xsbt.boot.Update$$anon$2.call(Update.scala:67)
      at xsbt.boot.Update$$anon$2.call(Update.scala:67)
      at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Using$.withResource(Using.scala:11)
      at xsbt.boot.Using$.apply(Using.scala:10)
      at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45)
      at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45)
      at xsbt.boot.Locks$.apply(Locks.scala:31)
      at xsbt.boot.Update.apply(Update.scala:68)
      at xsbt.boot.Provider$initialize.call(Provider.scala:41)
      at xsbt.boot.Provider$initialize.call(Provider.scala:32)
      at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Using$.withResource(Using.scala:11)
      at xsbt.boot.Using$.apply(Using.scala:10)
      at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45)
      at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45)
      at xsbt.boot.Locks$.apply(Locks.scala:31)
      at xsbt.boot.Provider$class.$init$(Provider.scala:31)
      at xsbt.boot.Launch$ScalaProvider$AppProvider.<init>(Launch.scala:100)
      at xsbt.boot.Launch$ScalaProvider.app(Launch.scala:98)
      at xsbt.boot.Launch$.run(Launch.scala:49)
      at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
      at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
      at xsbt.boot.Launch$.launch(Launch.scala:57)
      at xsbt.boot.Launch$.explicit(Launch.scala:42)
      at xsbt.boot.Launch$.initialized(Launch.scala:38)
      at xsbt.boot.Launch$.parsed(Launch.scala:31)
      at xsbt.boot.Launch$.configured(Launch.scala:21)
      at xsbt.boot.Launch$.apply(Launch.scala:16)
      at xsbt.boot.Launch$.apply(Launch.scala:13)
      at xsbt.boot.Boot$.runImpl(Boot.scala:24)
      at xsbt.boot.Boot$.run(Boot.scala:19)
      at xsbt.boot.Boot$.main(Boot.scala:15)
      at xsbt.boot.Boot.main(Boot.scala)
      [Fatal Error] ivy-0.9.94.xml.original:2:1: Content is not allowed in prolog.
      org.xml.sax.SAXParseException: Content is not allowed in prolog.
      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249)
      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:153)
      at org.apache.ivy.util.XMLHelper.parseToDom(XMLHelper.java:196)
      at org.apache.ivy.plugins.parser.m2.PomReader.<init>(PomReader.java:95)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:118)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:108)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:659)
      at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:676)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:993)
      at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:546)
      at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:266)
      at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:503)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:169)
      at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:287)
      at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:696)
      at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
      at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
      at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
      at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
      at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
      at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
      at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
      at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
      at org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:576)
      at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:237)
      at xsbt.boot.Update.resolve(Update.scala:159)
      at xsbt.boot.Update.update(Update.scala:116)
      at xsbt.boot.Update.update(Update.scala:110)
      at xsbt.boot.Update.xsbt$boot$Update$$lockedApply(Update.scala:73)
      at xsbt.boot.Update$$anon$2.call(Update.scala:67)
      at xsbt.boot.Update$$anon$2.call(Update.scala:67)
      at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Using$.withResource(Using.scala:11)
      at xsbt.boot.Using$.apply(Using.scala:10)
      at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45)
      at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45)
      at xsbt.boot.Locks$.apply(Locks.scala:31)
      at xsbt.boot.Update.apply(Update.scala:68)
      at xsbt.boot.Provider$initialize.call(Provider.scala:41)
      at xsbt.boot.Provider$initialize.call(Provider.scala:32)
      at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:67)
      at xsbt.boot.Using$.withResource(Using.scala:11)
      at xsbt.boot.Using$.apply(Using.scala:10)
      at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67)
      at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45)
      at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45)
      at xsbt.boot.Locks$.apply(Locks.scala:31)
      at xsbt.boot.Provider$class.$init$(Provider.scala:31)
      at xsbt.boot.Launch$ScalaProvider$AppProvider.<init>(Launch.scala:100)
      at xsbt.boot.Launch$ScalaProvider.app(Launch.scala:98)
      at xsbt.boot.Launch$.run(Launch.scala:49)
      at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
      at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
      at xsbt.boot.Launch$.launch(Launch.scala:57)
      at xsbt.boot.Launch$.explicit(Launch.scala:42)
      at xsbt.boot.Launch$.initialized(Launch.scala:38)
      at xsbt.boot.Launch$.parsed(Launch.scala:31)
      at xsbt.boot.Launch$.configured(Launch.scala:21)
      at xsbt.boot.Launch$.apply(Launch.scala:16)
      at xsbt.boot.Launch$.apply(Launch.scala:13)
      at xsbt.boot.Boot$.runImpl(Boot.scala:24)
      at xsbt.boot.Boot$.run(Boot.scala:19)
      at xsbt.boot.Boot$.main(Boot.scala:15)
      at xsbt.boot.Boot.main(Boot.scala)

      Inspecting the ivy.xml file in question showed binary gibberish. Situation resolved itself when I turned off the proxy through System Preferences, deleted the .ivy2 directory, and then ran "sbt update" again.

      Attachments

        Activity

          People

            Unassigned Unassigned
            will_sargent Will Sargent
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: