Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.0-M15-2 gives NoClassDefFoundError: org/vafer/jdeb/Console #450

Closed
erikvanoosten opened this Issue Mar 7, 2017 · 28 comments

Comments

Projects
None yet
10 participants
@erikvanoosten
Copy link

erikvanoosten commented Mar 7, 2017

I was trying out 1.0.0-M15-2 which resulted in a missing class.

~/currentproject $ sbt compile
[info] Loading global plugins from /Users/me/.sbt/0.13/plugins
[warn] Multiple resolvers having different access mechanism configured with same name 'sbt-plugin-releases'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
[info] Updating {file:/Users/me/.sbt/0.13/plugins/}global-plugins...
[info] Resolving io.get-coursier#sbt-coursier;1.0.0-M15-2 ...
[error] SERVER ERROR: Proxy Error url=http://nexus.company.com/content/groups/public/io.get-coursier/sbt-coursier/scala_2.10/sbt_0.13/1.0.0-M15-2/ivys/ivy.xml
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading http://nexus.company.com/content/groups/public/io/get-coursier/sbt-coursier_2.10_0.13/1.0.0-M15-2/sbt-coursier-1.0.0-M15-2.jar ...
[info] 	[SUCCESSFUL ] io.get-coursier#sbt-coursier;1.0.0-M15-2!sbt-coursier.jar (415ms)
[info] downloading http://nexus.company.com/content/groups/public/io/get-coursier/coursier_2.10/1.0.0-M15-2/coursier_2.10-1.0.0-M15-2.jar ...
[info] 	[SUCCESSFUL ] io.get-coursier#coursier_2.10;1.0.0-M15-2!coursier_2.10.jar (6791ms)
[info] downloading http://nexus.company.com/content/groups/public/io/get-coursier/coursier-cache_2.10/1.0.0-M15-2/coursier-cache_2.10-1.0.0-M15-2.jar ...
[info] 	[SUCCESSFUL ] io.get-coursier#coursier-cache_2.10;1.0.0-M15-2!coursier-cache_2.10.jar (841ms)
[info] downloading http://nexus.company.com/content/groups/public/org/scalaz/scalaz-core_2.10/7.2.8/scalaz-core_2.10-7.2.8.jar ...
[info] 	[SUCCESSFUL ] org.scalaz#scalaz-core_2.10;7.2.8!scalaz-core_2.10.jar(bundle) (1641ms)
[info] downloading http://nexus.company.com/content/groups/public/org/jsoup/jsoup/1.10.2/jsoup-1.10.2.jar ...
[info] 	[SUCCESSFUL ] org.jsoup#jsoup;1.10.2!jsoup.jar (122ms)
[info] downloading http://nexus.company.com/content/groups/public/org/scalaz/scalaz-concurrent_2.10/7.2.8/scalaz-concurrent_2.10-7.2.8.jar ...
[info] 	[SUCCESSFUL ] org.scalaz#scalaz-concurrent_2.10;7.2.8!scalaz-concurrent_2.10.jar(bundle) (132ms)
[info] downloading http://nexus.company.com/content/groups/public/org/scalaz/scalaz-effect_2.10/7.2.8/scalaz-effect_2.10-7.2.8.jar ...
[info] 	[SUCCESSFUL ] org.scalaz#scalaz-effect_2.10;7.2.8!scalaz-effect_2.10.jar(bundle) (147ms)
[info] Done updating.
[info] Loading project definition from /Users/me/currentproject/project
http://nexus.company.com/content/groups/public/io/get-coursier/sbt-coursier_2.10_0.13/1.0.0-M15-2/sbt-coursier-1.0.0-M15-2.pom
  100,0% [##########] 3,0 KiB (75,9 KiB / s)
http://nexus.company.com/content/groups/public/io/get-coursier/coursier_2.10/1.0.0-M15-2/coursier_2.10-1.0.0-M15-2.pom
  100,0% [##########] 2,6 KiB (3,4 KiB / s)
http://nexus.company.com/content/groups/public/io/get-coursier/coursier-cache_2.10/1.0.0-M15-2/coursier-cache_2.10-1.0.0-M15-2.pom
  100,0% [##########] 2,5 KiB (1,8 KiB / s)
http://nexus.company.com/content/groups/public/org/scalaz/scalaz-concurrent_2.10/7.2.8/scalaz-concurrent_2.10-7.2.8.pom
  100,0% [##########] 3,1 KiB (82,3 KiB / s)
http://nexus.company.com/content/groups/public/org/scalaz/scalaz-core_2.10/7.2.8/scalaz-core_2.10-7.2.8.pom
  100,0% [##########] 2,8 KiB (70,8 KiB / s)
http://nexus.company.com/content/groups/public/org/jsoup/jsoup/1.10.2/jsoup-1.10.2.pom
  100,0% [##########] 7,1 KiB (197,8 KiB / s)
http://nexus.company.com/content/groups/public/org/scalaz/scalaz-effect_2.10/7.2.8/scalaz-effect_2.10-7.2.8.pom
  100,0% [##########] 2,9 KiB (2,5 KiB / s)
http://nexus.company.com/content/groups/public/com/fasterxml/jackson/core/jackson-annotations/2.3.0/jackson-annotations-2.3.0.pom
  100,0% [##########] 1,3 KiB (927 B / s)
http://nexus.company.com/content/groups/public/com/fasterxml/jackson/core/jackson-annotations/2.3.0/jackson-annotations-2.3.0.jar
  100,0% [##########] 34,2 KiB (12,1 KiB / s)
http://nexus.company.com/content/groups/public/io/get-coursier/coursier-cache_2.10/1.0.0-M15-2/coursier-cache_2.10-1.0.0-M15-2.jar
  100,0% [##########] 317,2 KiB (101,9 KiB / s)
http://nexus.company.com/content/groups/public/org/scalaz/scalaz-effect_2.10/7.2.8/scalaz-effect_2.10-7.2.8.jar
  100,0% [##########] 389,5 KiB (124,5 KiB / s)
http://nexus.company.com/content/groups/public/io/get-coursier/sbt-coursier_2.10_0.13/1.0.0-M15-2/sbt-coursier-1.0.0-M15-2.jar
  100,0% [##########] 404,3 KiB (126,7 KiB / s)
http://nexus.company.com/content/groups/public/org/jsoup/jsoup/1.10.2/jsoup-1.10.2.jar
  100,0% [##########] 342,4 KiB (920,5 KiB / s)
http://nexus.company.com/content/groups/public/org/scalaz/scalaz-concurrent_2.10/7.2.8/scalaz-concurrent_2.10-7.2.8.jar
  100,0% [##########] 313,1 KiB (1,3 MiB / s)
http://nexus.company.com/content/groups/public/io/get-coursier/coursier_2.10/1.0.0-M15-2/coursier_2.10-1.0.0-M15-2.jar
  100,0% [##########] 1,2 MiB (343,7 KiB / s)
java.lang.NoClassDefFoundError: org/vafer/jdeb/Console
	at com.typesafe.sbt.packager.debian.JDebPackaging$class.debianJDebSettings(JDebPackaging.scala:42)
	at com.typesafe.sbt.SbtNativePackager$.debianJDebSettings(PackagerPlugin.scala:11)
	at com.typesafe.sbt.packager.debian.DebianPlugin$class.debianSettings(DebianPlugin.scala:186)
	at com.typesafe.sbt.SbtNativePackager$.debianSettings(PackagerPlugin.scala:11)
	at com.typesafe.sbt.SbtNativePackager$.packagerSettings(PackagerPlugin.scala:25)
	at com.typesafe.sbt.SbtNativePackager$packageArchetype$.genericMappingSettings(PackagerPlugin.scala:47)
	at com.typesafe.sbt.SbtNativePackager$packageArchetype$.java_server(PackagerPlugin.scala:51)
	at play.Play$.projectSettings(Project.scala:32)
	at sbt.Load$$anonfun$autoPluginSettings$1$1.apply(Load.scala:666)
	at sbt.Load$$anonfun$autoPluginSettings$1$1.apply(Load.scala:666)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.immutable.List.foreach(List.scala:318)
	at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
	at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
	at sbt.Load$.autoPluginSettings$1(Load.scala:666)
	at sbt.Load$.sbt$Load$$expandSettings$1(Load.scala:681)
	at sbt.Load$$anonfun$sbt$Load$$expandSettings$1$2.apply(Load.scala:682)
	at sbt.Load$$anonfun$sbt$Load$$expandSettings$1$2.apply(Load.scala:682)
	at scala.collection.IndexedSeqOptimized$class.foldl(IndexedSeqOptimized.scala:51)
	at scala.collection.IndexedSeqOptimized$class.foldLeft(IndexedSeqOptimized.scala:60)
	at scala.collection.mutable.WrappedArray.foldLeft(WrappedArray.scala:34)
	at scala.collection.TraversableOnce$class.$div$colon(TraversableOnce.scala:138)
	at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:105)
	at sbt.Load$.sbt$Load$$expandSettings$1(Load.scala:682)
	at sbt.Load$.resolveProject(Load.scala:684)
	at sbt.Load$.finalizeProject$1(Load.scala:549)
	at sbt.Load$.discoverAndLoad$1(Load.scala:562)
	at sbt.Load$.loadTransitive(Load.scala:570)
	at sbt.Load$.loadProjects$1(Load.scala:442)
	at sbt.Load$.loadUnit(Load.scala:446)
	at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
	at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
	at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:91)
	at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:90)
	at sbt.BuildLoader.apply(BuildLoader.scala:140)
	at sbt.Load$.loadAll(Load.scala:334)
	at sbt.Load$.loadURI(Load.scala:289)
	at sbt.Load$.load(Load.scala:285)
	at sbt.Load$.load(Load.scala:276)
	at sbt.Load$.apply(Load.scala:130)
	at sbt.Load$.defaultLoad(Load.scala:36)
	at sbt.BuiltinCommands$.doLoadProject(Main.scala:481)
	at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
	at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
	at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
	at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
	at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
	at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
	at sbt.Command$.process(Command.scala:92)
	at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
	at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
	at sbt.State$$anon$1.process(State.scala:184)
	at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
	at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.MainLoop$.next(MainLoop.scala:98)
	at sbt.MainLoop$.run(MainLoop.scala:91)
	at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
	at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
	at sbt.Using.apply(Using.scala:24)
	at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
	at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
	at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
	at sbt.MainLoop$.runLogged(MainLoop.scala:24)
	at sbt.StandardMain$.runManaged(Main.scala:53)
	at sbt.xMain.run(Main.scala:28)
	at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
	at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
	at xsbt.boot.Launch$.run(Launch.scala:109)
	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)
Caused by: java.lang.ClassNotFoundException: org.vafer.jdeb.Console
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at com.typesafe.sbt.packager.debian.JDebPackaging$class.debianJDebSettings(JDebPackaging.scala:42)
	at com.typesafe.sbt.SbtNativePackager$.debianJDebSettings(PackagerPlugin.scala:11)
	at com.typesafe.sbt.packager.debian.DebianPlugin$class.debianSettings(DebianPlugin.scala:186)
	at com.typesafe.sbt.SbtNativePackager$.debianSettings(PackagerPlugin.scala:11)
	at com.typesafe.sbt.SbtNativePackager$.packagerSettings(PackagerPlugin.scala:25)
	at com.typesafe.sbt.SbtNativePackager$packageArchetype$.genericMappingSettings(PackagerPlugin.scala:47)
	at com.typesafe.sbt.SbtNativePackager$packageArchetype$.java_server(PackagerPlugin.scala:51)
	at play.Play$.projectSettings(Project.scala:32)
	at sbt.Load$$anonfun$autoPluginSettings$1$1.apply(Load.scala:666)
	at sbt.Load$$anonfun$autoPluginSettings$1$1.apply(Load.scala:666)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.immutable.List.foreach(List.scala:318)
	at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
	at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
	at sbt.Load$.autoPluginSettings$1(Load.scala:666)
	at sbt.Load$.sbt$Load$$expandSettings$1(Load.scala:681)
	at sbt.Load$$anonfun$sbt$Load$$expandSettings$1$2.apply(Load.scala:682)
	at sbt.Load$$anonfun$sbt$Load$$expandSettings$1$2.apply(Load.scala:682)
	at scala.collection.IndexedSeqOptimized$class.foldl(IndexedSeqOptimized.scala:51)
	at scala.collection.IndexedSeqOptimized$class.foldLeft(IndexedSeqOptimized.scala:60)
	at scala.collection.mutable.WrappedArray.foldLeft(WrappedArray.scala:34)
	at scala.collection.TraversableOnce$class.$div$colon(TraversableOnce.scala:138)
	at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:105)
	at sbt.Load$.sbt$Load$$expandSettings$1(Load.scala:682)
	at sbt.Load$.resolveProject(Load.scala:684)
	at sbt.Load$.finalizeProject$1(Load.scala:549)
	at sbt.Load$.discoverAndLoad$1(Load.scala:562)
	at sbt.Load$.loadTransitive(Load.scala:570)
	at sbt.Load$.loadProjects$1(Load.scala:442)
	at sbt.Load$.loadUnit(Load.scala:446)
	at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
	at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
	at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:91)
	at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:90)
	at sbt.BuildLoader.apply(BuildLoader.scala:140)
	at sbt.Load$.loadAll(Load.scala:334)
	at sbt.Load$.loadURI(Load.scala:289)
	at sbt.Load$.load(Load.scala:285)
	at sbt.Load$.load(Load.scala:276)
	at sbt.Load$.apply(Load.scala:130)
	at sbt.Load$.defaultLoad(Load.scala:36)
	at sbt.BuiltinCommands$.doLoadProject(Main.scala:481)
	at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
	at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
	at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
	at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
	at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
	at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
	at sbt.Command$.process(Command.scala:92)
	at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
	at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
	at sbt.State$$anon$1.process(State.scala:184)
	at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
	at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.MainLoop$.next(MainLoop.scala:98)
	at sbt.MainLoop$.run(MainLoop.scala:91)
	at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
	at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
	at sbt.Using.apply(Using.scala:24)
	at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
	at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
	at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
	at sbt.MainLoop$.runLogged(MainLoop.scala:24)
	at sbt.StandardMain$.runManaged(Main.scala:53)
	at sbt.xMain.run(Main.scala:28)
	at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
	at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
	at xsbt.boot.Launch$.run(Launch.scala:109)
	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] java.lang.NoClassDefFoundError: org/vafer/jdeb/Console
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
@alexarchambault

This comment has been minimized.

Copy link
Member

alexarchambault commented Mar 10, 2017

@erikvanoosten Would have a small repro project? This looks like a bad interaction with sbt-native-packager under some conditions (it usually works fine with sbt-coursier for me...).

@jkleckner

This comment has been minimized.

Copy link

jkleckner commented Apr 11, 2017

One of my projects using "1.0.0-M15-1" gets the [warn] Unrecognized repository inter-project, ignoring it which is fixed with "1.0.0-M15-2"

A different project gets this error java.lang.NoClassDefFoundError: org/vafer/jdeb/Console with "1.0.0-M15-2".

So there is not one version of coursier that will work with both projects for me.

I wish they were small projects but they are not.

The one that requires M15-2 has numerous subprojects and a Spark assembly.

The one that fails with M15-2 is a Play Framework v2.3.9 application.

Below is a snippet from using last to get detailed errors which has a 9000+ line output.
This is the last portion prior to the exception.

Any ideas?

[debug] [Loading] Done in .../project, returning: (app-build)
[debug] Load.loadUnit: loadedProjectsRaw took 2344.824 ms
[debug] Load.loadUnit: cleanEvalClasses took 0.898 ms
[debug] Load.loadUnit(file:.../project/, ...) took 2418.274 ms
[debug] Load.apply: load took 2419.928 ms
[debug] Load.apply: resolveProjects took 0.151 ms
[debug] Load.apply: finalTransforms took 22.787 ms
[debug] Load.apply: config.delegates took 0.846 ms
[debug] Load.apply: Def.make(settings)... took 148.727 ms
[debug] Load.apply: structureIndex took 126.637 ms
[debug] Load.apply: mkStreams took 0.002 ms
[info] Loading project definition from .../project
[debug] Running task... Cancel: Null, check cycles: false, forcegc: true
[debug] [naha] 
[debug] [naha] Initial source changes: 
[debug] [naha] 	removed:Set()
[debug] [naha] 	added: Set()
[debug] [naha] 	modified: Set()
[debug] [naha] Invalidated products: Set()
[debug] [naha] External API changes: API Changes: Set()
[debug] [naha] Modified binary dependencies: Set()
[debug] [naha] Initial directly invalidated sources: Set()
[debug] [naha] 
[debug] [naha] Sources indirectly invalidated by:
[debug] [naha] 	product: Set()
[debug] [naha] 	binary dep: Set()
[debug] [naha] 	external source: Set()
[debug] All initially invalidated sources: Set()
[debug] Copy resource mappings: 
[debug] 	
[debug] Load.loadUnit: plugins took 5519.308 ms
[debug] Load.loadUnit: defsScala took 0.015 ms
[debug] [Loading] Scanning directory ...
[debug] Load.loadUnit: mkEval took 1.424 ms
[debug] [Loading] Found root project root w/ remaining 
[debug] Load.resolveProject(root): transformedProject took 0.005 ms
[debug] deducing auto plugins based on known facts Set(Atom(play.PlayScala), Atom(sbt.plugins.CorePlugin)) and clauses Clauses(List(Clause(Atom(sbt.plugins.JvmPlugin),Set(Atom(sbt.plugins.IvyPlugin))), Clause(Atom(sbt.plugins.JUnitXmlReportPlugin),Set(Atom(sbt.plugins.JvmPlugin))), Clause(Atom(play.twirl.sbt.SbtTwirl),Set(Atom(sbt.plugins.JvmPlugin))), Clause(Atom(coursier.CoursierPlugin),Set(Atom(sbt.plugins.IvyPlugin))), Clause(Atom(com.typesafe.sbt.jse.SbtJsEngine),Set(Atom(com.typesafe.sbt.web.SbtWeb))), Clause(Atom(com.typesafe.sbt.jse.SbtJsTask),Set(Atom(com.typesafe.sbt.jse.SbtJsEngine))), Clause(Atom(play.Play),Set(Atom(com.typesafe.sbt.webdriver.SbtWebDriver))), Clause(Atom(play.Play),Set(Atom(play.twirl.sbt.SbtTwirl))), Clause(Atom(play.Play),Set(Atom(com.typesafe.sbt.jse.SbtJsTask))), Clause(Atom(play.PlayJava),Set(Atom(play.Play))), Clause(Atom(play.PlayScala),Set(Atom(play.Play))), Clause(Atom(com.typesafe.sbt.webdriver.SbtWebDriver),Set(Atom(com.typesafe.sbt.web.SbtWeb))), Clause(Atom(sbt.plugins.CorePlugin),Set(Atom(sbt.plugins.IvyPlugin))), Clause(Atom(sbt.plugins.IvyPlugin),Set(Atom(sbt.plugins.JvmPlugin))), Clause(Atom(sbt.plugins.JvmPlugin),Set(Atom(sbt.plugins.JUnitXmlReportPlugin))), Clause(Atom(sbt.plugins.IvyPlugin),Set(Atom(coursier.CoursierPlugin))), Clause(Atom(com.typesafe.sbt.web.SbtWeb),Set(Atom(com.typesafe.sbt.jse.SbtJsEngine))), Clause(Atom(com.typesafe.sbt.jse.SbtJsEngine),Set(Atom(com.typesafe.sbt.jse.SbtJsTask))), Clause(Atom(com.typesafe.sbt.web.SbtWeb),Set(Atom(com.typesafe.sbt.webdriver.SbtWebDriver)))))
[debug]   :: deduced result: Matched(sbt.plugins.CorePlugin,play.PlayScala,sbt.plugins.IvyPlugin,play.Play,play.twirl.sbt.SbtTwirl,sbt.plugins.JvmPlugin,coursier.CoursierPlugin,com.typesafe.sbt.jse.SbtJsTask,com.typesafe.sbt.webdriver.SbtWebDriver,sbt.plugins.JUnitXmlReportPlugin,com.typesafe.sbt.web.SbtWeb,com.typesafe.sbt.jse.SbtJsEngine)
[debug] Plugins.deducer#function took 2.089 ms
[debug] Load.resolveProject(root): autoPlugins took 3.159 ms
java.lang.NoClassDefFoundError: org/vafer/jdeb/Console
	at com.typesafe.sbt.packager.debian.JDebPackaging$class.debianJDebSettings(JDebPackaging.scala:42)
	at com.typesafe.sbt.SbtNativePackager$.debianJDebSettings(PackagerPlugin.scala:11)
	at com.typesafe.sbt.packager.debian.DebianPlugin$class.debianSettings(DebianPlugin.scala:186)
	at com.typesafe.sbt.SbtNativePackager$.debianSettings(PackagerPlugin.scala:11)
	at com.typesafe.sbt.SbtNativePackager$.packagerSettings(PackagerPlugin.scala:25)
	at com.typesafe.sbt.SbtNativePackager$packageArchetype$.genericMappingSettings(PackagerPlugin.scala:47)
	at com.typesafe.sbt.SbtNativePackager$packageArchetype$.java_server(PackagerPlugin.scala:51)
	at play.Play$.projectSettings(Project.scala:32)
...

Here is the list of plugins that are active:

$ plugins
In file:.../app
        sbt.plugins.IvyPlugin: enabled in root
        sbt.plugins.JvmPlugin: enabled in root
        sbt.plugins.CorePlugin: enabled in root
        sbt.plugins.JUnitXmlReportPlugin: enabled in root
        com.typesafe.sbt.webdriver.SbtWebDriver: enabled in root
        com.typesafe.sbt.jse.SbtJsEngine: enabled in root
        com.typesafe.sbt.jse.SbtJsTask: enabled in root
        com.typesafe.sbt.web.SbtWeb: enabled in root
        coursier.CoursierPlugin: enabled in root
        play.twirl.sbt.SbtTwirl: enabled in root
        play.Play: enabled in root
        play.PlayJava
        play.PlayScala: enabled in root 
@jkleckner

This comment has been minimized.

Copy link

jkleckner commented Apr 11, 2017

@erikvanoosten Are you also using the jfrog artifactory service? Could this be something about transformation of pom data?

@alexarchambault Have you heard anything more about the SbtNativePackager issues? Do you have any ideas about what to "jiggle" to probe where the cause may originate?

@erikvanoosten

This comment has been minimized.

Copy link
Author

erikvanoosten commented Apr 12, 2017

@jkleckner no, we're using nexus. I am not aware of any pom transformations.

@jkleckner

This comment has been minimized.

Copy link

jkleckner commented Apr 12, 2017

I wonder if some dependent package has hit this bug sbt/sbt-native-packager#587 as happened with sbt/sbt#3096 and this is the evidence of it.

@jkleckner

This comment has been minimized.

Copy link

jkleckner commented Apr 18, 2017

FYI, this happens with RC1 as well.

@alexarchambault

This comment has been minimized.

Copy link
Member

alexarchambault commented Apr 19, 2017

Does sbt-coursier fetch the sbt plugins too, by being enabled in project/project/plugins.sbt, or globally? (Would the problem only happen in that case? or only without that?)

@alexarchambault

This comment has been minimized.

Copy link
Member

alexarchambault commented Apr 19, 2017

Pinging @muuki88... Don't know if the error above (java.lang.NoClassDefFoundError: org/vafer/jdeb/Console) would ring a bell to you?

@jkleckner

This comment has been minimized.

Copy link

jkleckner commented Apr 19, 2017

@alexarchambault Yes, adding sbt-coursier directly into the project/plugins.sbt allowed it to work, thanks!

I tried various alternative combinations of enabling it globally in ~/.sbt/0.13/plugins and then also in ~/.sbt/0.13/plugins/project, ~/.sbt/0.13/plugins/project/plugins etc and deleting/recreating target directories without success. Do you have a suggestion to try something else?

Note that we are using jfrog artifactory as a corporate proxy to cache artifacts, if that matters.

@erikvanoosten Give it a try by putting directly into the project to see if it works for you also.

@muuki88

This comment has been minimized.

Copy link

muuki88 commented Apr 19, 2017

@alexarchambault I know that errror indeed :D However this when you forget to add the jdeb dependencies in your plugins.sbt and want to use the JDebPackaging plugin.

@jkleckner

This comment has been minimized.

Copy link

jkleckner commented Apr 19, 2017

@muuki88 There must be some sort of dependence of the play plugin (we are using 2.3.9 for one of the projects) that causes this? We don't intentionally use the JDebPackaging plugin ourselves.

@alexarchambault Why would it work properly without any reference to jdeb when defined in the project but not when defined globally?

@muuki88

This comment has been minimized.

Copy link

muuki88 commented Apr 19, 2017

@jkleckner Well, play uses sbt-native-packager under the hood. However the JDebPackaging is not enabled. The only thing I could think of, is that somehow the JDebPackaging plugin is being activated. You could check this with sbt plugins

@jkleckner

This comment has been minimized.

Copy link

jkleckner commented Apr 19, 2017

@muuki88 It is not explicitly enabled, so it is a mystery why it happens when defined globally. Output of sbt plugins:

In file:/Users/jim/dev/einstein/
	sbt.plugins.IvyPlugin: enabled in main, kendall, podolsky
	sbt.plugins.JvmPlugin: enabled in main, kendall, podolsky
	sbt.plugins.CorePlugin: enabled in main, kendall, podolsky
	sbt.plugins.JUnitXmlReportPlugin: enabled in main, kendall, podolsky
	sbt.plugins.Giter8TemplatePlugin: enabled in main, kendall, podolsky
	net.virtualvoid.sbt.graph.DependencyGraphPlugin: enabled in main, kendall, podolsky
	play.Play: enabled in main, podolsky
	play.PlayJava
	play.PlayScala: enabled in main, podolsky
	play.twirl.sbt.SbtTwirl: enabled in main, podolsky
	com.typesafe.sbt.jse.SbtJsEngine: enabled in main, podolsky
	com.typesafe.sbt.jse.SbtJsTask: enabled in main, podolsky
	com.typesafe.sbt.web.SbtWeb: enabled in main, podolsky
	com.typesafe.sbt.webdriver.SbtWebDriver: enabled in main, podolsky
	coursier.CoursierPlugin: enabled in main, kendall, podolsky
@jkleckner

This comment has been minimized.

Copy link

jkleckner commented May 3, 2017

@alexarchambault Can you suggest how to diagnose the invariant failure that coursier RC1 works when enabled with project/plugins.sbt but fails with this exception when enabled with ~/.sbt/0.13/plugins/sbt-coursier.sbt? I'm happy to try narrowing this down.

@jkleckner

This comment has been minimized.

Copy link

jkleckner commented May 17, 2017

@alexarchambault @erikvanoosten @muuki88 See this gist for a script to demonstrate the problem.

@alexarchambault

This comment has been minimized.

Copy link
Member

alexarchambault commented May 18, 2017

Good news everyone, there's an easy workaround 😀: adding the following to project/plugins.sbt:

classpathTypes += "maven-plugin"

That's currently necessary, as the POM of org.vafer:jdeb:1.2 specifies it has a packaging maven-plugin. So coursier gives its JAR the type maven-plugin (instead of the default jar). This type then lands in the update report, and sbt happily ignores the artifact with type maven-plugin (it only keeps the types in the classpathTypes setting). Thus jdeb is missing from the classpath, hence the error you're getting.

@jkleckner

This comment has been minimized.

Copy link

jkleckner commented May 18, 2017

@alexarchambault Do you think this is an issue with sbt and that the maven-plugin type should not be ignored?

Cc: @dwijnand

@muuki88

This comment has been minimized.

Copy link

muuki88 commented May 18, 2017

@alexarchambault thanks for figuring this out! I'll try to add this ASAP to the sbt-native-packager documentation.

@jkleckner

This comment has been minimized.

Copy link

jkleckner commented May 18, 2017

@alexarchambault Can you explain the difference in behavior between defining coursier "in project" and defining coursier "in global"?

I updated the gist with attempts to use the workaround. Note the tracebacks about JNotify from the script - perhaps my environment? Or perhaps another class path type?

@Blaisorblade

This comment has been minimized.

Copy link

Blaisorblade commented Sep 24, 2017

The problem seems to appear again with SBT 1.0.2, and classpathTypes += "maven-plugin" doesn't seem to help. I'm loading plugins globally though, not sure if it matters.

I can reproduce this with the following in ~/.sbt/1.0/plugins/plugins.sbt:

// Conflicting:
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC11")

// This one fails altogether with coursier, and gives an eviction warning on
// guava with or without coursier.
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.2-RC2")

// // Fix https://github.com/coursier/coursier/issues/450
classpathTypes += "maven-plugin"

and sbt.version=1.0.2 in project/build.properties.

EDIT: sorry for not investigating further.

@godenji

This comment has been minimized.

Copy link

godenji commented Oct 6, 2017

So, yeah, what is the deal here? Same as @Blaisorblade getting this error on sbt 1.0.2 with coursier latest (RC12), Play 2.6.6 (which pulls in sbt native packer) in a global plugins setup.

I mean, I could care less about Debian, how can we have our cake (global plugin) and eat it too?

@godenji

This comment has been minimized.

Copy link

godenji commented Oct 6, 2017

Oh, as per @jkleckner gist we can add a helper sbt file to global root; in my case ~/.sbt/1.0/sbt-coursier.sbt with the following:

import coursier.Keys._
classpathTypes += "maven-plugin"
@Blaisorblade

This comment has been minimized.

Copy link

Blaisorblade commented Oct 6, 2017

@godenji Thanks, that works for me!
The crucial bit was to use ~/.sbt/1.0/sbt-coursier.sbt rather than ~/.sbt/1.0/plugins/plugins.sbt (and as usual file names are irrelevant, the paths are what matters).

@charego

This comment has been minimized.

Copy link

charego commented Feb 13, 2019

I'm still seeing this on 1.1.0-M11. In my case sbt-native-packager is provided by another plugin (via that plugin's build.sbt). I have sbt-coursier defined globally, and the workaround changed slightly.

~/.sbt/1.0/plugins/sbt-coursier.sbt:

addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.1.0-M11")

~/.sbt/1.0/sbt-coursier.sbt:

import coursier.sbtcoursier.Keys._     // used to be coursier.Keys._
classpathTypes += "maven-plugin"
@plavreshin

This comment has been minimized.

Copy link

plavreshin commented Feb 14, 2019

Thanks @charego , this workaround was very helpful!

@er1c

This comment has been minimized.

Copy link
Contributor

er1c commented Mar 25, 2019

@charego thanks for the updated import syntax, I created a PR here: #1097 to add this work-around to the sbt-coursier.md - feel free to review/clarify/replace/etc.

@dwijnand

This comment has been minimized.

Copy link
Contributor

dwijnand commented Mar 25, 2019

classpathTypes is a core sbt key, so no sbt plugin addition and import should be required.

I just have classpathTypes += "maven-plugin" in ~/.sbt/1.0/global.sbt.

@er1c

This comment has been minimized.

Copy link
Contributor

er1c commented Mar 25, 2019

@dwijnand thanks, I confirmed that is working for me, and also helps simplify the work-around instructions. I updated the PR to reflect simply adding the classpathTypes += "maven-plugin to ~/.sbt/1.0/global.sbt

eed3si9n added a commit to eed3si9n/sbt that referenced this issue Apr 21, 2019

eed3si9n added a commit to eed3si9n/sbt that referenced this issue Apr 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.