sbt throws error while launching it - java

i am trying command sbt package after sbt installation, it throws following error.
Getting org.scala-sbt sbt 0.13.12 ...
java.lang.InternalError
at sun.security.ec.SunEC.initialize(Native Method)
at sun.security.ec.SunEC.access$000(SunEC.java:49)
at sun.security.ec.SunEC$1.run(SunEC.java:61)
at sun.security.ec.SunEC$1.run(SunEC.java:58)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ec.SunEC.<clinit>(SunEC.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:383)
at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:221)
at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at xsbt.boot.Launch.locked(Launch.scala:238)
at xsbt.boot.Launch.app(Launch.scala:147)
at xsbt.boot.Launch.app(Launch.scala:145)
at xsbt.boot.Launch$.run(Launch.scala:102)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.InternalError
i am using RHEL 6.5 and my Java version is java version "1.7.0_111". Help me to resolve this error.

I am using openSuse Leap and I had the same issue with sbt and "java.lang.InternalError" today using both last openJDK8 and oracleJDK8 as well.
What helped me is making a system update. It looks like newer NSS library is required, please check https://bugzilla.redhat.com/show_bug.cgi?id=1332456 for more details.

Related

Intellij startup error due to bootstrap plugin on Mac

After installing a bootstrap plugin from the IntelliJ plugin marketplace, it asks for a reboot. After restarting Intellij, it is not open and showing the following log. I have already tried reinstalling it. I am using the community version 2022.3
com.intellij.diagnostic.PluginException: Fatal error initializing 'com.intellij.plugin.bootstrap.BootstrapPluginApplicationComponent
' [Plugin: nl.jworks.intellij.bootstrap3]
at com.intellij.serviceContainer.ComponentManagerImpl.handleInitComponentError$intellij_platform_serviceContainer(ComponentManagerImpl.kt:571)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:382)
at com.intellij.serviceContainer.ComponentManagerImpl.access$registerComponents(ComponentManagerImpl.kt:50)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:260)
at com.intellij.openapi.client.ClientAwareComponentManager.registerComponents(ClientAwareComponentManager.kt:46)
at com.intellij.idea.ApplicationLoader.doInitApplication(ApplicationLoader.kt:78)
at com.intellij.idea.ApplicationLoader.access$doInitApplication(ApplicationLoader.kt:1)
at com.intellij.idea.ApplicationLoader$doInitApplication$1.invokeSuspend(ApplicationLoader.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at com.intellij.idea.ApplicationLoader.initApplication(ApplicationLoader.kt:61)
at com.p.s.k.p._g.k(_g.java:60)
at com.p.s.k.p.p6.k(p6.java:113)
at com.p.s.k.p.pa.p(pa.java:139)
at com.p.s.k.p.pG.p(pG.java:57)
at com.intellij.idea.MainImpl.start(MainImpl.kt:13)
at com.intellij.idea.StartupUtil$startApplication$7.invokeSuspend(StartupUtil.kt:294)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at com.intellij.idea.Main.main(Main.kt:36)
Caused by: java.lang.ClassNotFoundException: com.intellij.plugin.bootstrap.BootstrapPluginApplicationComponent
PluginClassLoader(plugin=PluginDescriptor(name=Bootstrap 3, id=nl.jworks.intellij.bootstrap3, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/IdeaIC2022.3/plugins/bootstrap3.jar, version=4.1.1, package=null, isBundled=false), packagePrefix=null, instanceId=12, state=active)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:215)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponent(ComponentManagerImpl.kt:495)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:374)
... 26 more
-----
Your JRE: 17.0.5+1-b653.23 aarch64 (JetBrains s.r.o.)
/Applications/IntelliJ IDEA CE.app/Contents/jbr/Contents/Home```

Travis CI: java.lang.UnsupportedClassVersionError

I am trying to setup CI for https://github.com/amCap1712/pljava using Travis. But it fails with following log:
find pljava-packaging -name \*.jar | sudo xargs java -jar
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/gjt/cuspy/JarX has
been compiled by a more recent version of the Java Runtime (class file version 53.0), this
version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
The complete build log and travis config is available at https://travis-ci.org/github/amCap1712/pljava/builds/661687014 . I am using OpenJDK9 for this build but it fails for OpenJDK14 as well.
How to fix the error ?

Tizen TV - Deployment throws an error

When I try to install my package on my TV, I get this error.
C:\Temp\Tizen\tools>tizen install -n e:\systeminfo.wgt -t UE55KS7005
Transferring the package...
Transferred the package: E:\SystemInfo.wgt -> /opt/usr/apps/tmp
Installing the package...
java.lang.ClassNotFoundException:
org.tizen.ncli.subcommands.tv.SecureCmdVer2_0_device
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at org.tizen.ncli.subcommands.tv.TVSdbCmdSelector.<init>(TVSdbCmdSelector.java:32)
at org.tizen.ncli.subcommands.target.InstallCLICommand.installPackage(InstallCLICommand.java:333)
at org.tizen.ncli.subcommands.target.InstallCLICommand.call(InstallCLICommand.java:167)
at org.tizen.ncli.subcommands.target.InstallCLICommand.call(InstallCLICommand.java:62)
at org.tizen.ncli.subcommands.AbstractSubCommand.runCommand(AbstractSubCommand.java:76)
at org.tizen.ncli.ide.shell.InstallCLI.execute(InstallCLI.java:70)
at org.tizen.ncli.ide.shell.AbstractCLI.execute(AbstractCLI.java:91)
at org.tizen.ncli.ide.shell.Main.run(Main.java:183)
at org.tizen.ncli.ide.shell.Main.main(Main.java:115)
java.lang.ClassNotFoundException: org.tizen.ncli.subcommands.tv.SecureCmdVer2_0_device
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at org.tizen.ncli.subcommands.tv.TVSdbCmdSelector.<init>(TVSdbCmdSelector.java:32)
at org.tizen.ncli.subcommands.target.InstallCLICommand.getTVInstallCmd(InstallCLICommand.java:415)
at org.tizen.ncli.subcommands.target.InstallCLICommand.installPackage(InstallCLICommand.java:348)
at org.tizen.ncli.subcommands.target.InstallCLICommand.call(InstallCLICommand.java:167)
at org.tizen.ncli.subcommands.target.InstallCLICommand.call(InstallCLICommand.java:62)
at org.tizen.ncli.subcommands.AbstractSubCommand.runCommand(AbstractSubCommand.java:76)
at org.tizen.ncli.ide.shell.InstallCLI.execute(InstallCLI.java:70)
at org.tizen.ncli.ide.shell.AbstractCLI.execute(AbstractCLI.java:91)
at org.tizen.ncli.ide.shell.Main.run(Main.java:183)
at org.tizen.ncli.ide.shell.Main.main(Main.java:115)
An error has occurred. See the log file tizen-sdk\tools\ide\cli.log.
Total time: 00:00:00.491
I cannot find the log it's referring to.
I have installed JRE, JDE, Tizen SDK and in Device Manager, I've hit "Permit to install applications".
The TV is a UE55KS7005
Any idea what is wrong?
Found the log file:
2018-08-27 20:56:07,424 [ERROR] Main.java(191) -
2018-08-27 20:57:20,680 [TRACE] Main.java(127) - Start running Tizen CLI Main class...
2018-08-27 20:57:20,684 [TRACE] Main.java(128) - Argument count:7
2018-08-27 20:57:20,704 [TRACE] InstallCLI.java(59) - Execute InstallCLI...
2018-08-27 20:57:21,194 [ERROR] AbstractCLI.java(93) -
java.lang.NullPointerException
at org.tizen.ncli.subcommands.tv.TVSdbCmdSelector.getCmd(TVSdbCmdSelector.java:65)
at org.tizen.ncli.subcommands.target.InstallCLICommand.getTVInstallCmd(InstallCLICommand.java:416)
at org.tizen.ncli.subcommands.target.InstallCLICommand.installPackage(InstallCLICommand.java:348)
at org.tizen.ncli.subcommands.target.InstallCLICommand.call(InstallCLICommand.java:167)
at org.tizen.ncli.subcommands.target.InstallCLICommand.call(InstallCLICommand.java:62)
at org.tizen.ncli.subcommands.AbstractSubCommand.runCommand(AbstractSubCommand.java:76)
at org.tizen.ncli.ide.shell.InstallCLI.execute(InstallCLI.java:70)
at org.tizen.ncli.ide.shell.AbstractCLI.execute(AbstractCLI.java:91)
at org.tizen.ncli.ide.shell.Main.run(Main.java:183)
at org.tizen.ncli.ide.shell.Main.main(Main.java:115)
2018-08-27 20:57:21,196 [ERROR] Main.java(191) -
I have the same problem with my Samsung Tizen 2016. When trying to install my application on the target -t UE49KS7090, I get the same Java Error with the NullPointerException.
Following log was created inside cli.log
2018-08-29 11:12:05,310 [ERROR] AbstractCLI.java(93) -
java.lang.NullPointerException
at org.tizen.ncli.subcommands.tv.TVSdbCmdSelector.getCmd(TVSdbCmdSelector.java:65)
at org.tizen.ncli.subcommands.target.InstallCLICommand.getTVInstallCmd(InstallCLICommand.java:416)
at org.tizen.ncli.subcommands.target.InstallCLICommand.installPackage(InstallCLICommand.java:348)
at org.tizen.ncli.subcommands.target.InstallCLICommand.call(InstallCLICommand.java:167)
at org.tizen.ncli.subcommands.target.InstallCLICommand.call(InstallCLICommand.java:62)
at org.tizen.ncli.subcommands.AbstractSubCommand.runCommand(AbstractSubCommand.java:76)
at org.tizen.ncli.ide.shell.InstallCLI.execute(InstallCLI.java:70)
at org.tizen.ncli.ide.shell.AbstractCLI.execute(AbstractCLI.java:91)
at org.tizen.ncli.ide.shell.Main.run(Main.java:183)
at org.tizen.ncli.ide.shell.Main.main(Main.java:115)
2018-08-29 11:12:05,312 [ERROR] Main.java(191) -
I ran sdb connect <IP> and then tizen install -n my-application.wgt -- ./dist (-t is only needed if there are multiple devices connected).
Furthermore when trying to install a package on a Tizen 2015 it raises an error with a NumberFormatException for input string unk.
Transferring the package...
Transferred the package:
/my-hidden-path -> /opt/usr/apps/tmp
Installing the package...
java.lang.NumberFormatException: For input string: "unk"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
at java.lang.Float.parseFloat(Float.java:451)
at java.lang.Float.valueOf(Float.java:416)
at org.tizen.ncli.subcommands.target.InstallCLICommand.getTVInstallCmd(InstallCLICommand.java:423)
at org.tizen.ncli.subcommands.target.InstallCLICommand.installPackage(InstallCLICommand.java:348)
at org.tizen.ncli.subcommands.target.InstallCLICommand.call(InstallCLICommand.java:167)
at org.tizen.ncli.subcommands.target.InstallCLICommand.call(InstallCLICommand.java:62)
at org.tizen.ncli.subcommands.AbstractSubCommand.runCommand(AbstractSubCommand.java:76)
at org.tizen.ncli.ide.shell.InstallCLI.execute(InstallCLI.java:70)
at org.tizen.ncli.ide.shell.AbstractCLI.execute(AbstractCLI.java:91)
at org.tizen.ncli.ide.shell.Main.run(Main.java:183)
at org.tizen.ncli.ide.shell.Main.main(Main.java:115)
Platform log view
Failed to install Tizen application.
Total time: 00:00:01.290
UPDATE:
Installing Tizen applications for 2015, 2016 and 2017 was successful using the Java Version 8 Update 181 with Tizen CLI Version 2.4.50. But the problem described above following the prerequisites here (https://developer.tizen.org/ko/development/tizen-studio/download/installing-tizen-studio/prerequisites) still persists when installing the application on 2018.
java.lang.ClassNotFoundException:
org.tizen.ncli.subcommands.tv.SecureCmdVer2_0_device
Couldn't that be related with the fact that older TVs can't receive packages from newest Tizen SDKs. See answers on this question. Try to install an older version of Tizen Studio or SDK from here http://download.tizen.org/sdk/Installer/

Unsupported Class Version during Maven build in Jenkins

I've seen a few of these questions on here, but none of the solutions/tips seem to be pointing me in the right direction. So I have 3 JDK's installed in the locations of "/opt/java/6", "/opt/java/7", and "/opt/java/8". All of these are set in the global Jenkins configuration. Jenkins itself is run using Java 8 which is the system default JRE that I set manually through alternatives (I'm using CentOS 7). I had a bunch of old projects that are built using maven and the maven compiler plugin which is set to source=1.6 target=1.6 . Every time I try to execute a build with the Java 6 JDK I get
Started by user Antony Prince
ln builds/lastSuccessfulBuild /var/lib/jenkins/jobs/BitCalculator/lastSuccessful failed
java.nio.file.DirectoryNotEmptyException: /var/lib/jenkins/jobs/BitCalculator/lastSuccessful
at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108)
at java.nio.file.Files.deleteIfExists(Files.java:1165)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at hudson.Util.createSymlinkJava7(Util.java:1194)
at hudson.Util.createSymlink(Util.java:1112)
at hudson.model.Run.createSymlink(Run.java:1851)
at hudson.model.Run.updateSymlinks(Run.java:1832)
at hudson.model.Run.execute(Run.java:1743)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
ln builds/lastStableBuild /var/lib/jenkins/jobs/BitCalculator/lastStable failed
java.nio.file.DirectoryNotEmptyException: /var/lib/jenkins/jobs/BitCalculator/lastStable
at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108)
at java.nio.file.Files.deleteIfExists(Files.java:1165)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at hudson.Util.createSymlinkJava7(Util.java:1194)
at hudson.Util.createSymlink(Util.java:1112)
at hudson.model.Run.createSymlink(Run.java:1851)
at hudson.model.Run.updateSymlinks(Run.java:1833)
at hudson.model.Run.execute(Run.java:1743)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Building in workspace /var/lib/jenkins/workspace/BitCalculator
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url /home/git/repositories/java/BitCalculator.git # timeout=10
Fetching upstream changes from /home/git/repositories/java/BitCalculator.git
> git --version # timeout=10
> git fetch --tags --progress /home/git/repositories/java/BitCalculator.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse origin/master^{commit} # timeout=10
Checking out Revision 4f119f7783cc4ff00e5bf9bb27850ae7698d4fe8 (origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 4f119f7783cc4ff00e5bf9bb27850ae7698d4fe8
> git rev-list 4f119f7783cc4ff00e5bf9bb27850ae7698d4fe8 # timeout=10
Parsing POMs
[BitCalculator] $ /opt/java/6/bin/java -Djava.awt.headless=true -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.5.jar:/usr/share/maven/boot/plexus-classworlds.jar org.jvnet.hudson.maven3.agent.Maven3Main /usr/share/maven /var/lib/jenkins/war/WEB-INF/lib/remoting-2.44.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.5.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 56445
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /var/lib/jenkins/workspace/BitCalculator/pom.xml -P sign clean deploy
java.lang.reflect.InvocationTargetException
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.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:331)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178)
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 hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.UnsupportedClassVersionError: javax/inject/Provider : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:86)
... 22 more
channel stopped
[BitCalculator] $ /bin/sh -xe /tmp/hudson6524656470722686910.sh
+ rm 'target/*no_deps*'
rm: cannot remove 'target/*no_deps*': No such file or directory
Build step 'Execute shell' marked build as failure
ERROR: Failed to parse POMs
hudson.util.IOException2: java.lang.reflect.InvocationTargetException
at hudson.maven.Maven3Builder.call(Maven3Builder.java:178)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
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 hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
... 10 more
Caused by: java.lang.Exception: java.lang.reflect.InvocationTargetException
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:181)
... 15 more
Caused by: java.lang.reflect.InvocationTargetException
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.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:331)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178)
... 15 more
Caused by: java.lang.UnsupportedClassVersionError: javax/inject/Provider : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:86)
... 22 more
Archiving artifacts
Sending e-mails to: antony#blazrsoft.com
Finished: FAILURE
This indicates that there's Java 7 interfering somewhere, but I'm not sure where.
The code is 1.6 compliant and most of the projects have no dependencies, so I'm not sure why this is happening. If I execute maven outside of Jenkins, the projects build just fine with JDK 6, so its leading me to think there's a misconfiguration in Jenkins somewhere, but I'm not sure where since everything seems to be as it should be. The paths to the JDKs are set properly in the global config and the projects themselves are set to use the specified JDK's. I apologize if its a duplicate question or something silly, but I've been trying to figure this out for days with no results. Everyone just says to check the paths and make sure there are no dependent artifacts built with a later JDK and I'm sure that this is not the problem.
$ mvn -version
Apache Maven 3.0.5 (Red Hat 3.0.5-16)
Maven home: /usr/share/maven
Java version: 1.8.0_20, vendor: Oracle Corporation
Java home: /opt/java/8/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "2.6.32-openvz-042stab090.5-amd64", arch: "amd64", family: "unix"
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.6</source>
<target>1.6</target>
<compilerVersion>1.6</compilerVersion>
</configuration>
</plugin>
You have an old java version. For example in my case I´m compiling an old product so I have to keep the java deprecated version.
So the solution was to download a newest jdk and configure the JAVA_HOME in the slave.
http://lmarccdk12.ptx.fr.sopra:14000/computer//configure in the section Advanced/JavaPath=/root/jdk1.7.0_79/bin/java (that´s the version I chose)
You will see the following message in the slave launch log:
[SSH] Starting slave process: cd "/root" && /root/jdk1.7.0_79/bin/java -jar slave.jar
Your Jenkins job is of type "Maven project", and this job type has a limitation in that it cannot run a Maven build with a JDK version that is older than the Java version under which Jenkins is run.
Beginning with Jenkins 2.357 (released on June 28, 2022) and the forthcoming 2.361.1 LTS release, Jenkins requires Java 11 or newer. Therefore, you can no longer run Maven projects with JDKs 1.6, 1.7 and 1.8. The minimum version is now Java 11.
To resolve this, you may:
Create a Freestyle project and use Invoke top-level Maven targets to invoke Maven, or create a Jenkins Pipeline project. In both cases, using an older JDK will be possible.
Use JDK 11 but set source and target version to the older Java version. I haven't tried that though, and I believe this option may cause other trouble.
For further information, see also Jenkins requires Java 11 or newer and Maven Builds Fails After Upgrade

Jenkins Plugin having trouble using Class?

I'm trying to integrate scribe-java and write a Jenkins Plugin for it, but it seems Jenkins can't be used with Class? Does anyone know why is this?
Jenkins Plugin code:
OAuthService service =
new ServiceBuilder().provider( com.lookout.jenkins.publishoverbox.BoxApi20.class ).apiKey( clientId ).apiSecret(clientSecret ).callback(callbackUrl).grantType( OAuthConstants.AUTHORIZATION_CODE ).build();
Log:
SEVERE: Failed to create Guice container from all the plugins
com.google.common.collect.ComputationException: java.lang.NoClassDefFoundError: Lorg/scribe/oauth/OAuthService;
at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:397)
at com.google.inject.internal.FailableCache.get(FailableCache.java:49)
at com.google.inject.internal.MembersInjectorStore.get(MembersInjectorStore.java:66)
at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:73)
at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:36)
at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:38)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)
at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
at com.google.inject.internal.FailableCache.get(FailableCache.java:49)
at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49)
at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:127)
at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:506)
at com.google.inject.internal.AbstractBindingProcessor$Processor$1.run(AbstractBindingProcessor.java:171)
at com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:44)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:123)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.Guice.createInjector(Guice.java:94)
at com.google.inject.Guice.createInjector(Guice.java:71)
at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:282)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:310)
at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:625)
at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:600)
at hudson.ExtensionFinder._find(ExtensionFinder.java:151)
at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:318)
at hudson.ExtensionList.load(ExtensionList.java:295)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
at hudson.ExtensionList.iterator(ExtensionList.java:138)
at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:311)
at hudson.ExtensionList.load(ExtensionList.java:295)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
at hudson.ExtensionList.get(ExtensionList.java:153)
at hudson.PluginManager$PluginUpdateMonitor.getInstance(PluginManager.java:1066)
at hudson.maven.PluginImpl.init(PluginImpl.java:54)
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 hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:888)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoClassDefFoundError: Lorg/scribe/oauth/OAuthService;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2300)
at java.lang.Class.getDeclaredFields(Class.java:1745)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:651)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:358)
at com.google.inject.internal.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:91)
at com.google.inject.internal.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:38)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)
at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
... 56 more
Caused by: java.lang.ClassNotFoundException: org.scribe.oauth.OAuthService
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 71 more
Jun 3, 2013 11:37:17 AM jenkins.InitReactorRunner$1 onAttained
What ever you need in your plugin, you specify the same in dependencies.
Reason 1:
Jenkins loads each plugin into a separate class loader to avoid conflicts. Plugins can then participate to the system activities just like other Jenkins built-in classes do. They can participate in XStream-based persistence, they can provide "views" by Jelly, they can provide static resources like images, and from users, everything works seamlessly --- there's no distinction between functionalities that are built-in vs those from plugins.
Reason 2: You don't want to change your code when jenkins change their dependencies.

Categories

Resources