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

hk2-locator transitive dependency crashes cbt's resolver #582

Open
lolgab opened this issue Jan 17, 2018 · 0 comments
Open

hk2-locator transitive dependency crashes cbt's resolver #582

lolgab opened this issue Jan 17, 2018 · 0 comments

Comments

@lolgab
Copy link

lolgab commented Jan 17, 2018

I posted the files on github: Quill-spark

my build.scala:

import cbt._

class Build(val context: Context) extends BaseBuild with SbtLayoutMain {
  override def name = "spark-quill"

  override val defaultScalaVersion = "2.11.12"

  override def dependencies = {
    super.dependencies ++ Resolver(mavenCentral).bind(
      ScalaDependency("org.apache.spark", "spark-sql", "2.2.0"),
      ScalaDependency("io.getquill", "quill-sql", "2.3.2"),
      ScalaDependency("io.getquill", "quill-spark", "2.3.2")
    )
  } 
}

It gives me this error:

Compiling to /home/lorenzo/scala/quillspark/build/target/scala-2.11/classes
[info] Compiling 1 Scala source to /home/lorenzo/scala/quillspark/build/target/scala-2.11/classes...
[info] Compile success at 17-gen-2018 16.31.21 [2.735s]
java.lang.Exception: Dependencies( BoundMavenDependency(org.scala-lang:scala-library:2.11.12), BoundMavenDependency(org.apache.spark:spark-sql_2.11:2.2.0), BoundMavenDependency(io.getquill:quill-sql_2.11:2.3.2), BoundMavenDependency(io.getquill:quill-spark_2.11:2.3.2) )
	at cbt.Stage1Lib.linearize$1(Stage1Lib.scala:351)
	at cbt.Stage1Lib.transitiveDependencies(Stage1Lib.scala:361)
	at cbt.DependencyImplementation$$anonfun$transitiveDependencies$1.apply(resolver.scala:138)
	at cbt.DependencyImplementation$$anonfun$transitiveDependencies$1.apply(resolver.scala:138)
	at cbt.PerClassCache$MethodCache.memoize(Stage1Lib.scala:464)
	at cbt.DependencyImplementation$class.transitiveDependencies(resolver.scala:137)
	at cbt.Dependencies.transitiveDependencies(resolver.scala:169)
	at cbt.DependencyImplementation$$anonfun$dependencyClasspath$1.apply(resolver.scala:128)
	at cbt.DependencyImplementation$$anonfun$dependencyClasspath$1.apply(resolver.scala:127)
	at cbt.PerClassCache$MethodCache.memoize(Stage1Lib.scala:464)
	at cbt.DependencyImplementation$class.dependencyClasspath(resolver.scala:126)
	at cbt.Dependencies.dependencyClasspath(resolver.scala:169)
	at cbt.DependencyImplementation$class.classpath(resolver.scala:124)
	at cbt.Dependencies.classpath(resolver.scala:169)
	at cbt.Stage1Lib.compile(Stage1Lib.scala:148)
	at cbt.BaseBuild$$anonfun$compile$1.apply(BasicBuild.scala:168)
	at cbt.BaseBuild$$anonfun$compile$1.apply(BasicBuild.scala:168)
	at cbt.PerClassCache$MethodCache.memoize(Stage1Lib.scala:464)
	at cbt.BaseBuild$class.compile(BasicBuild.scala:167)
	at Build.compile(build.scala:3)
	at cbt.BaseBuild$class.exportedClasspath(BasicBuild.scala:144)
	at Build.exportedClasspath(build.scala:3)
	at cbt.DependencyImplementation$class.classes(resolver.scala:96)
	at Build.classes(build.scala:3)
	at cbt.DependencyImplementation$class.mainClass(resolver.scala:93)
	at Build.mainClass(build.scala:3)
	at cbt.DependencyImplementation$class.mainClassOrFail(resolver.scala:87)
	at Build.mainClassOrFail(build.scala:3)
	at cbt.DependencyImplementation$class.runMain(resolver.scala:85)
	at Build.runMain(build.scala:3)
	at cbt.BaseBuild$class.run(BasicBuild.scala:217)
	at Build.run(build.scala:3)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at cbt.Lib$$anonfun$cbt$Lib$$callInternal$1$$anonfun$apply$9$$anonfun$apply$11$$anonfun$apply$12.apply(Lib.scala:155)
	at cbt.reflect.Module$$anon$1.run(reflect.scala:178)
	at cbt.reflect.Module$$anon$1.run(reflect.scala:177)
	at cbt.reflect.TrapSystemExit.run(TrapSystemExit.java:15)
	at cbt.reflect.Module$class.trapExitCodeOrValue(reflect.scala:176)
	at cbt.Stage1Lib.trapExitCodeOrValue(Stage1Lib.scala:14)
	at cbt.Lib$$anonfun$cbt$Lib$$callInternal$1$$anonfun$apply$9$$anonfun$apply$11.apply(Lib.scala:155)
	at cbt.Lib$$anonfun$cbt$Lib$$callInternal$1$$anonfun$apply$9$$anonfun$apply$11.apply(Lib.scala:153)
	at scala.Option.map(Option.scala:146)
	at cbt.Lib$$anonfun$cbt$Lib$$callInternal$1$$anonfun$apply$9.apply(Lib.scala:153)
	at cbt.Lib$$anonfun$cbt$Lib$$callInternal$1$$anonfun$apply$9.apply(Lib.scala:150)
	at scala.Option.map(Option.scala:146)
	at cbt.Lib$$anonfun$cbt$Lib$$callInternal$1.apply(Lib.scala:150)
	at cbt.Lib$$anonfun$3.cbt$Lib$$anonfun$$g$1(Lib.scala:103)
	at cbt.Lib$$anonfun$3$$anonfun$apply$5.apply(Lib.scala:105)
	at cbt.Lib.cbt$Lib$$callInternal(Lib.scala:175)
	at cbt.Lib.getReflective(Lib.scala:143)
	at cbt.Lib.callReflective(Lib.scala:106)
	at cbt.Stage2$.run(Stage2.scala:35)
	at cbt.Stage2.run(Stage2.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at cbt.Stage1$.run(Stage1.scala:210)
	at cbt.Stage1.run(Stage1.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at cbt.NailgunLauncher.main(NailgunLauncher.java:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.martiansoftware.nailgun.NGSession.run(NGSession.java:280)
Caused by: java.lang.Exception: Dependencies( BoundMavenDependency(org.scala-lang:scala-library:2.11.12), BoundMavenDependency(org.apache.spark:spark-sql_2.11:2.2.0), BoundMavenDependency(io.getquill:quill-sql_2.11:2.3.2), BoundMavenDependency(io.getquill:quill-spark_2.11:2.3.2) )
	at cbt.Stage1Lib.linearize$1(Stage1Lib.scala:351)
	at cbt.Stage1Lib.linearize$1(Stage1Lib.scala:349)
	... 71 more
Caused by: java.lang.Exception: Dependencies( BoundMavenDependency(org.scala-lang:scala-library:2.11.12), BoundMavenDependency(org.apache.spark:spark-sql_2.11:2.2.0), BoundMavenDependency(io.getquill:quill-sql_2.11:2.3.2), BoundMavenDependency(io.getquill:quill-spark_2.11:2.3.2) )
	at cbt.Stage1Lib.linearize$1(Stage1Lib.scala:351)
	at cbt.Stage1Lib.linearize$1(Stage1Lib.scala:349)
	... 72 more
Caused by: java.lang.Exception: hk2-locator not found in 
Map(httpclient -> (org.apache.httpcomponents,4.5), persistence-api -> (javax.persistence,1.0), grizzly-http-server -> (org.glassfish.grizzly,2.3.23), connection-pool -> (org.glassfish.grizzly,2.3.23), weld-servlet -> (org.jboss.weld.servlet,2.2.14.Final), javax.el -> (org.glassfish.web,2.2.4), jetty-webapp -> (org.eclipse.jetty,9.1.1.v20140108), pax-exam-junit-extender-impl -> (org.ops4j.pax.exam,1.2.4), javassist -> (org.javassist,3.18.1-GA), org.apache.felix.eventadmin -> (org.apache.felix,1.2.2), jackson-jaxrs-base -> (com.fasterxml.jackson.jaxrs,2.5.4), jaxb-impl -> (com.sun.xml.bind,2.2.7), jmockit -> (org.jmockit,1.18), hamcrest-library -> (org.hamcrest,1.3), grizzly-http-client -> (org.glassfish.grizzly,1.9), jmh-generator-annprocess -> (org.openjdk.jmh,1.10.2), jackson-annotations -> (com.fasterxml.jackson.core,2.5.4), xercesImpl -> (xerces,2.11.0), grizzly-websockets -> (org.glassfish.grizzly,2.3.23), container-common -> (org.glassfish.main.common,4.0), grizzly-http-servlet -> (org.glassfish.grizzly,2.3.23), jetty-continuation -> (org.eclipse.jetty,9.1.1.v20140108), junit -> (junit,4.12), aopalliance-repackaged -> (org.glassfish.hk2.external,2.4.0-b34), pax-exam-container-native -> (org.ops4j.pax.exam,3.3.0), osgi-resource-locator -> (org.glassfish.hk2,1.0.1), servlet-api-2.5 -> (org.mortbay.jetty,6.1.14), jackson-mapper-asl -> (org.codehaus.jackson,1.9.13), jackson-core-asl -> (org.codehaus.jackson,1.9.13), jackson-xc -> (org.codehaus.jackson,1.9.13), testng -> (org.testng,6.9.6), javax.ws.rs-api -> (javax.ws.rs,2.0.1), org.apache.felix.framework -> (org.apache.felix,4.2.1), javax.json -> (org.glassfish,1.0.4), jackson-module-jaxb-annotations -> (com.fasterxml.jackson.module,2.5.4), javax.ejb-api -> (javax.ejb,3.2), ejb-container -> (org.glassfish.main.ejb,4.0), hibernate-validator -> (org.hibernate,5.1.3.Final), jackson-jaxrs -> (org.codehaus.jackson,1.9.13), org.eclipse.persistence.moxy -> (org.eclipse.persistence,2.6.0), jaxb-api -> (javax.xml.bind,2.2.7), pax-web-extender-war -> (org.ops4j.pax.web,0.7.4), pax-exam-junit4 -> (org.ops4j.pax.exam,3.3.0), hk2-api -> (org.glassfish.hk2,2.4.0-b34), jackson-core -> (com.fasterxml.jackson.core,2.5.4), javax.transaction-api -> (javax.transaction,1.2), javax.el-api -> (javax.el,2.2.4), jetty-util -> (org.mortbay.jetty,6.1.24), org.apache.felix.framework.security -> (org.apache.felix,2.2.0), weld-se-core -> (org.jboss.weld.se,2.2.14.Final), pax-exam-link-mvn -> (org.ops4j.pax.exam,3.3.0), simple -> (org.simpleframework,5.1.4), org.osgi.compendium -> (org.osgi,4.2.0), hk2-bom -> (org.glassfish.hk2,2.4.0-b34), jsonp-jaxrs -> (org.glassfish,1.0), javax.inject -> (org.glassfish.hk2.external,2.4.0-b34), jetty-client -> (org.eclipse.jetty,9.1.1.v20140108), org.osgi.core -> (org.osgi,4.2.0), javax.annotation-api -> (javax.annotation,1.2), pax-exam -> (org.ops4j.pax.exam,3.3.0), jettison -> (org.codehaus.jettison,1.3.7), commons-logging -> (commons-logging,1.1), jboss-logging -> (org.jboss.logging,3.3.0.Final), jmh-core -> (org.openjdk.jmh,1.10.2), xmlunit -> (xmlunit,1.6), kryo -> (com.esotericsoftware,3.0.2), asm-debug-all -> (org.ow2.asm,5.0.4), cdi-api -> (javax.enterprise,1.1), jetty -> (org.mortbay.jetty,6.1.24), pax-web-jetty-bundle -> (org.ops4j.pax.web,0.7.4), hibernate-validator-cdi -> (org.hibernate,5.1.3.Final), pax-exam-container-forked -> (org.ops4j.pax.exam,3.3.0), jackson-jaxrs-json-provider -> (com.fasterxml.jackson.jaxrs,2.5.4), jetty-server -> (org.eclipse.jetty,9.1.1.v20140108), classmate -> (com.fasterxml,1.2.0), guava -> (com.google.guava,18.0), jackson-databind -> (com.fasterxml.jackson.core,2.5.4))
	at cbt.BoundMavenDependency$$anonfun$dependencies$3$$anonfun$apply$2$$anonfun$17$$anonfun$apply$16.apply(resolver.scala:382)
	at cbt.BoundMavenDependency$$anonfun$dependencies$3$$anonfun$apply$2$$anonfun$17$$anonfun$apply$16.apply(resolver.scala:382)
	at scala.Option.getOrElse(Option.scala:121)
	at cbt.BoundMavenDependency$$anonfun$dependencies$3$$anonfun$apply$2$$anonfun$17.apply(resolver.scala:381)
	at cbt.BoundMavenDependency$$anonfun$dependencies$3$$anonfun$apply$2$$anonfun$17.apply(resolver.scala:381)
	at scala.Option.getOrElse(Option.scala:121)
	at cbt.BoundMavenDependency$$anonfun$dependencies$3$$anonfun$apply$2.applyOrElse(resolver.scala:378)
	at cbt.BoundMavenDependency$$anonfun$dependencies$3$$anonfun$apply$2.applyOrElse(resolver.scala:366)
	at scala.PartialFunction$$anonfun$runWith$1.apply(PartialFunction.scala:141)
	at scala.PartialFunction$$anonfun$runWith$1.apply(PartialFunction.scala:140)
	at scala.collection.Iterator$class.foreach(Iterator.scala:893)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
	at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
	at scala.collection.TraversableLike$class.collect(TraversableLike.scala:271)
	at scala.collection.AbstractTraversable.collect(Traversable.scala:104)
	at cbt.BoundMavenDependency$$anonfun$dependencies$3.apply(resolver.scala:366)
	at cbt.BoundMavenDependency$$anonfun$dependencies$3.apply(resolver.scala:387)
	at cbt.Stage1Lib$$anonfun$cacheOnDisk$6.apply(Stage1Lib.scala:327)
	at cbt.Stage1Lib$$anonfun$cacheOnDisk$6.apply(Stage1Lib.scala:326)
	at scala.Option.getOrElse(Option.scala:121)
	at cbt.Stage1Lib.cacheOnDisk(Stage1Lib.scala:326)
	at cbt.BoundMavenDependency.dependencies(resolver.scala:365)
	at cbt.DependencyImplementation$class.dependenciesArray(resolver.scala:25)
	at cbt.BoundMavenDependency.dependenciesArray(resolver.scala:236)
	at cbt.package$DependencyExtensions.dependencies(cbt.scala:67)
	at cbt.Stage1Lib$$anonfun$linearize$1$1.apply(Stage1Lib.scala:349)
	at cbt.Stage1Lib$$anonfun$linearize$1$1.apply(Stage1Lib.scala:349)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
	at scala.collection.Iterator$class.foreach(Iterator.scala:893)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
	at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
	at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:241)
	at scala.collection.AbstractTraversable.flatMap(Traversable.scala:104)
	at cbt.Stage1Lib.linearize$1(Stage1Lib.scala:349)
	... 73 more

Don't know if it is useful to know but the same project with same dependencies runs nicely with sbt.

@cvogt cvogt changed the title Simple project with few dependencies doesn't compile hk2-locator transitive dependency crashes cbt's resolver Jan 17, 2018
@cvogt cvogt added this to the 0.9 milestone Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants