-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Powered by SuggestiMate
(Copied from https://github.com/hudson/sbt-plugin/issues#issue/1)
I'm having problems running sbt from Hudson 1.395. Console output says:
[workspace] $ /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java -Dsbt.log.noformat=true -jar /home/matt/Downloads/local-root/bin/sbt-launch-0.7.4.jar clean update compile test Exception in thread "main" java.lang.NoClassDefFoundError:
Caused by: java.lang.ClassNotFoundException:
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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: . Program will exit.
Finished: FAILURE
Running the same sbt command at the shell works fine, however. (Let me know if I can provide other relevant info.)
[JENKINS-8587] Exception in thread "main" java.lang.NoClassDefFoundError
> I'm sorry but I don't think that Scalariform is an sbt project.
Scalariform is definitely an sbt project (I'm the author).
> Did you get it to build with sbt?
On my machine, running the sbt command which Hudson logged from the command line builds the project correctly.
Got it
The problem occurred when no jvm arguments were given. Resolved in version 1.2.
Thanks for reporting this issue and sorry for doubting your project's sbt compatibility.
I'm getting this exact error still on 1.2 with sbt 0.10.0 - as in the original report, running the exact same command from the command line with the jenkins user works.
/home/jenkins/jdk1.6.0_16/bin/java -Xmx1512M -noverify -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m -Dsbt.log.noformat=true -jar /home/jenkins/lib/sbt-launch-0.10.1.jar update compile test
Exception in thread "main" java.lang.NoClassDefFoundError:
Caused by: java.lang.ClassNotFoundException:
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: . Program will exit.
Build step 'Build using sbt' changed build result to FAILURE
Build step 'Build using sbt' marked build as failure
I just tried it with sbt 0.74 as well and see the same behaviour.
Is there any further debugging I can do to figure out why this is not working?
It turns out our case is almost exactly backwards of the original issue as I understand it.
For us it works if we do NOT put jvm arguments in, but does not work with jvm arguments.
I had the same issue, after much trial and error I found what was causing this: an extra space between the system properties I was passing.
-Darg1=value1 -Darg2=value2
fails
-Darg1=value1 -Darg2=value2
works
Not sure if its same issue, but seems Jenkins Gauva Library is coming in the way of Play's later version:
15:54:29.534 [pool-4-thread-1] ERROR o.a.c.s.StartupChecks - cassandra.jmx.local.port missing from cassandra-env.sh, unable to start local JMX service.
verifying
3
completed
[error] Uncaught exception when running com.consultengine.controllers.v1.DBAwareSuite: java.lang.NoSuchMethodError: com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap;
[error] sbt.ForkMain$ForkError: java.lang.NoSuchMethodError: com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap;
[error] at com.google.inject.internal.Annotations$AnnotationChecker.<init>(Annotations.java:104)
[error] at com.google.inject.internal.Annotations.<clinit>(Annotations.java:122)
[error] at com.google.inject.Key.ensureRetainedAtRuntime(Key.java:362)
[error] at com.google.inject.Key.strategyFor(Key.java:339)
[error] at com.google.inject.Key.get(Key.java:229)
[error] at play.api.inject.guice.GuiceKey$.apply(GuiceInjectorBuilder.scala:390)
[error] at play.api.inject.guice.GuiceableModuleConversions$$anon$1.$anonfun$configure$3(GuiceInjectorBuilder.scala:355)
[error] at scala.Option.foreach(Option.scala:257)
[error] at play.api.inject.guice.GuiceableModuleConversions$$anon$1.$anonfun$configure$2(GuiceInjectorBuilder.scala:351)
[error] at play.api.inject.guice.GuiceableModuleConversions$$anon$1.$anonfun$configure$2$adapted(GuiceInjectorBuilder.scala:348)
[error] at scala.collection.immutable.List.foreach(List.scala:389)
[error] at play.api.inject.guice.GuiceableModuleConversions$$anon$1.configure(GuiceInjectorBuilder.scala:348)
[error] at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
[error] at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)
[error] at com.google.inject.spi.Elements.getElements(Elements.java:103)
[error] at com.google.inject.spi.Elements.getElements(Elements.java:94)
[error] at com.google.inject.util.Modules$RealOverriddenModuleBuilder$1.configure(Modules.java:153)
[error] at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
[error] at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)
[error] at com.google.inject.spi.Elements.getElements(Elements.java:103)
[error] at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136)
[error] at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
[error] at com.google.inject.Guice.createInjector(Guice.java:94)
[error] at com.google.inject.Guice.createInjector(Guice.java:82)
[error] at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:185)
[error] at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:137)
[error] at org.scalatestplus.play.guice.GuiceFakeApplicationFactory.fakeApplication(GuiceFakeApplicationFactory.scala:16)
[error] at org.scalatestplus.play.guice.GuiceFakeApplicationFactory.fakeApplication$(GuiceFakeApplicationFactory.scala:16)
[error] at com.consultengine.controllers.v1.SurveyControllerPlaySpec.fakeApplication(SurveyControllerPlaySpec.scala:95)
[error] at org.scalatestplus.play.BaseOneAppPerSuite.app(BaseOneAppPerSuite.scala:29)
[error] at org.scalatestplus.play.BaseOneAppPerSuite.app$(BaseOneAppPerSuite.scala:29)
[error] at com.consultengine.controllers.v1.SurveyControllerPlaySpec.app$lzycompute(SurveyControllerPlaySpec.scala:95)
[error] at com.consultengine.controllers.v1.SurveyControllerPlaySpec.app(SurveyControllerPlaySpec.scala:95)
[error] at org.scalatestplus.play.BaseOneAppPerSuite.run(BaseOneAppPerSuite.scala:42)
[error] at org.scalatestplus.play.BaseOneAppPerSuite.run$(BaseOneAppPerSuite.scala:41)
[error] at com.consultengine.controllers.v1.SurveyControllerPlaySpec.run(SurveyControllerPlaySpec.scala:95)
[error] at org.scalatest.Suite.callExecuteOnSuite$1(Suite.scala:1210)
[error] at org.scalatest.Suite.$anonfun$runNestedSuites$1(Suite.scala:1257)
[error] at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:32)
[error] at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:29)
[error] at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:191)
[error] at org.scalatest.Suite.runNestedSuites(Suite.scala:1255)
[error] at org.scalatest.Suite.runNestedSuites$(Suite.scala:1189)
[error] at org.scalatest.Suites.runNestedSuites(Suites.scala:56)
[error] at org.scalatest.Suite.run(Suite.scala:1144)
[error] at org.scalatest.Suite.run$(Suite.scala:1129)
[error] at com.consultengine.controllers.v1.DBAwareSuite.org$scalatest$BeforeAndAfterAll$$super$run(DBAwareSuite.scala:34)
[error] at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
[error] at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
[error] at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
[error] at com.consultengine.controllers.v1.DBAwareSuite.run(DBAwareSuite.scala:34)
[error] at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:314)
[error] at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:507)
[error] at sbt.ForkMain$Run$2.call(ForkMain.java:300)
[error] at sbt.ForkMain$Run$2.call(ForkMain.java:290)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Error: Total 1, Failed 0, Errors 1, Passed 0
I'm sorry but I don't think that Scalariform is an sbt project. Did you get it to build with sbt?