Currently extending custom tools plugin with a RAR file extractor. Using
the JUnrar library <https://github.com/edmund-wagner/junrar> to unpack RAR
files, just like the ZipExtractionInstaller
<https://github.com/kohsuke/hudson/blob/master/core/src/main/java/hudson/tools/ZipExtractionInstaller.java>
except this will be a standalone installer.
My problem is that when testing the installer in Jenkins, I get
NoClassDefFoundError for anything from the JUnrar lib. It's found when
compiled and packaged in Netbeans, but not during runtime.
The dependency is defined in pom.xml as:
<dependencies>
<dependency>
<groupId>com.github.junrar</groupId>
<artifactId>junrar</artifactId>
<version>0.7</version>
</dependency>
</dependencies>
Full code + pom.xml is found in this
<https://github.com/jenkinsci/extra-tool-installers-plugin/pull/4> pull
request.
Attached text file is the console output from the build log during the
installation.
Why do I get that error and how can I fix it?
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/a0321a7c-dc80-4a8f-83aa-970897461677%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Started by user anonymous
[CustomTools] - RAR test of Vivado: Starting installation
Unpacking file:///G:/packed1.rar to C:\Program Files
(x86)\Jenkins\tools\com.cloudbees.jenkins.plugins.customtools.CustomTool\RAR_test_of_Vivado
on Jenkins
FATAL: com/github/junrar/testutil/ExtractArchive
java.lang.NoClassDefFoundError: com/github/junrar/testutil/ExtractArchive
at
com.synopsys.arc.jenkinsci.plugins.extratoolinstallers.installers.RarExtractionInstaller.unrar(RarExtractionInstaller.java:308)
at
com.synopsys.arc.jenkinsci.plugins.extratoolinstallers.installers.RarExtractionInstaller.unrar(RarExtractionInstaller.java:281)
at
com.synopsys.arc.jenkinsci.plugins.extratoolinstallers.installers.RarExtractionInstaller.access$000(RarExtractionInstaller.java:76)
at
com.synopsys.arc.jenkinsci.plugins.extratoolinstallers.installers.RarExtractionInstaller$1.invoke(RarExtractionInstaller.java:255)
at
com.synopsys.arc.jenkinsci.plugins.extratoolinstallers.installers.RarExtractionInstaller$1.invoke(RarExtractionInstaller.java:253)
at
com.synopsys.arc.jenkinsci.plugins.extratoolinstallers.installers.RarExtractionInstaller$FileCallableWrapper.call(RarExtractionInstaller.java:610)
at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
at
com.synopsys.arc.jenkinsci.plugins.extratoolinstallers.installers.RarExtractionInstaller.act(RarExtractionInstaller.java:516)
at
com.synopsys.arc.jenkinsci.plugins.extratoolinstallers.installers.RarExtractionInstaller.act(RarExtractionInstaller.java:501)
at
com.synopsys.arc.jenkinsci.plugins.extratoolinstallers.installers.RarExtractionInstaller.unrarFrom(RarExtractionInstaller.java:253)
at
com.synopsys.arc.jenkinsci.plugins.extratoolinstallers.installers.RarExtractionInstaller.installIfNecessaryFrom(RarExtractionInstaller.java:227)
at
com.synopsys.arc.jenkinsci.plugins.extratoolinstallers.installers.RarExtractionInstaller.performInstallation(RarExtractionInstaller.java:120)
at
hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68)
at
hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at
com.cloudbees.jenkins.plugins.customtools.CustomTool.forNode(CustomTool.java:154)
at
com.cloudbees.jenkins.plugins.customtools.CustomToolInstallWrapper.decorateLauncher(CustomToolInstallWrapper.java:184)
at
hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:566)
at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:492)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.ClassNotFoundException:
com.github.junrar.testutil.ExtractArchive
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(Unknown Source)
... 23 more
Finished: FAILURE