Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37756

Broken dependency to bundled jsch-0.1.31.jar library - Ivy 2.4.0 distributes with jsch-0.1.50.jar

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • ivy-plugin
    • None
    • OS: Ubuntu 14.04 LTS
      Jenkins version 1.651.2
      ivy-plugin version 1.26
      Oracle Java version 1.8.0_60
      Running Jenkins directly from war via embedded http server

      I use some ssh resolvers in my environment, and after upgrading ivy-plugin from version 1.24 to 1.26 I am consistently experiencing the 'java.lang.NoClassDefFoundError: com/jcraft/jsch/IdentityRepository' as shown in the stacktrace included further below.

      Reporters observations:

      • ivy-plugin has upgraded from Ivy 2.3.0 to 2.4.0 between version 1.24 and 1.26
      • Ivy 2.3.0 is based on (according to its ivy-xml and its '-with-dependencies' distribution bundle) jsch-0.1.31
      • Ivy 2.4.0 is based on (according to its ivy-xml and its '-with-dependencies' distribution bundle) jsch-0.1.50
      • The SSH repository implementation in Ivy 2.4.0 appears to depend on features (IdentityRepository and possible others) that only came into the jsch library after jsch-0.1.31.jar

      Reporters suggestion:

      • Update the ivy-plugin to bundle the jsch-0.1.50.jar library to reflect the upgraded dependency of Ivy 2.4.0

      Reporters workaround:

      • I manually repackaged the ivy.hpi file for ivy-plugin version 1.26 to include the jsch-0.1.50.jar library, and that appears to fully resolve the issue. However, this means running with a non-standard repository plugin. Alternatively, use ivy-plugin 1.24 (based on Ivy 2.3.0) if possible/applicable.

      Stacktrace from job console:
      Parsing Ivy Descriptor Files
      ERROR: Failed to parse ivy.xml files
      java.io.IOException: Unable to parse ivy descriptors
      at hudson.ivy.IvyModuleSetBuild$RunnerImpl.parseIvyDescriptorFiles(IvyModuleSetBuild.java:545)
      at hudson.ivy.IvyModuleSetBuild$RunnerImpl.doRun(IvyModuleSetBuild.java:380)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      at hudson.model.Run.execute(Run.java:1738)
      at hudson.model.Run.run(Run.java:1676)
      at hudson.ivy.IvyModuleSetBuild.run(IvyModuleSetBuild.java:281)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      Caused by: java.lang.NoClassDefFoundError: com/jcraft/jsch/IdentityRepository
      at org.apache.ivy.plugins.repository.ssh.AbstractSshBasedRepository.getSession(AbstractSshBasedRepository.java:108)
      at org.apache.ivy.plugins.repository.ssh.SshRepository.resolveResource(SshRepository.java:82)
      at org.apache.ivy.plugins.repository.ssh.SshResource.resolve(SshResource.java:101)
      at org.apache.ivy.plugins.repository.ssh.SshResource.exists(SshResource.java:70)
      at org.apache.ivy.plugins.resolver.RepositoryResolver.findResourceUsingPattern(RepositoryResolver.java:97)
      at org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findResourceUsingPatterns(AbstractPatternsBasedResolver.java:97)
      at org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findIvyFileRef(AbstractPatternsBasedResolver.java:66)
      at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:230)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parseOtherIvyFile(XmlModuleDescriptorParser.java:725)
      at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.extendsStarted(XmlModuleDescriptorParser.java:461)
      at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.startElement(XmlModuleDescriptorParser.java:320)
      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)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:780)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:356)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
      at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:162)
      at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:139)
      at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:122)
      at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:113)
      at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parse(XmlModuleDescriptorParser.java:268)
      at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:119)
      at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:87)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at hudson.ivy.IvyModuleSetBuild$IvyXmlParser$1.doInIvyContext(IvyModuleSetBuild.java:805)
      at org.apache.ivy.Ivy.execute(Ivy.java:366)
      at hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call(IvyModuleSetBuild.java:802)
      at hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call(IvyModuleSetBuild.java:759)
      at hudson.FilePath.act(FilePath.java:1077)
      at hudson.ivy.IvyModuleSetBuild$RunnerImpl.parseIvyDescriptorFiles(IvyModuleSetBuild.java:539)
      ... 7 more
      Caused by: java.lang.ClassNotFoundException: com.jcraft.jsch.IdentityRepository
      at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376)
      at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
      at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 47 more

            tbingaman Timothy Bingaman
            riksen Henrik Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: