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

IvyResolutionException: failed to resolve ivy dependencies unresolved dependency #583

Closed
izhangzhihao opened this Issue Mar 24, 2017 · 7 comments

Comments

Projects
None yet
3 participants
@izhangzhihao

izhangzhihao commented Mar 24, 2017

Welcome to the Ammonite Repl 0.8.1
(Scala 2.12.1 Java 1.8.0_112)
@ import $ivy.`org.nd4j:nd4j-native-platform:0.8.0` 
:: loading settings :: url = jar:file:/usr/local/Cellar/ammonite-repl/0.8.1/bin/amm!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: org.nd4j#nd4j-native-platform-caller;working
	confs: [default]
	found org.nd4j#nd4j-native-platform;0.8.0 in chain-resolver
	found org.nd4j#nd4j-native;0.8.0 in chain-resolver
	found org.bytedeco#javacpp;1.3.2 in central
	found org.bytedeco.javacpp-presets#openblas-platform;0.2.19-1.3 in chain-resolver
	found org.bytedeco.javacpp-presets#openblas;0.2.19-1.3 in m2
	found org.nd4j#nd4j-native-api;0.8.0 in chain-resolver
	found org.nd4j#nd4j-buffer;0.8.0 in chain-resolver
	found org.nd4j#nd4j-common;0.8.0 in chain-resolver
	found org.slf4j#slf4j-api;1.7.10 in m2
	found org.reflections#reflections;0.9.10 in m2
	found com.google.guava#guava;18.0 in m2
	found commons-io#commons-io;2.4 in m2
	found org.apache.commons#commons-math3;3.4.1 in m2
	found org.apache.commons#commons-lang3;3.3.1 in m2
	found org.nd4j#nd4j-context;0.8.0 in chain-resolver
	found org.nd4j#nd4j-api;0.8.0 in chain-resolver
	found org.nd4j#jackson;0.8.0 in chain-resolver
	found org.yaml#snakeyaml;1.12 in m2
	found org.codehaus.woodstox#stax2-api;3.1.4 in m2
	found joda-time#joda-time;2.2 in m2
	found org.projectlombok#lombok;1.16.10 in m2
	found net.ericaro#neoitertools;1.0.0 in chain-resolver
	found junit#junit;4.8.2 in chain-resolver
downloading http://repo1.maven.org/maven2/org/bytedeco/javacpp/1.3.2/javacpp-1.3.2.jar ...
	[SUCCESSFUL ] org.bytedeco#javacpp;1.3.2!javacpp.jar (2584ms)
ammonite.runtime.tools.IvyThing$IvyResolutionException: failed to resolve ivy dependencies unresolved dependency: org.bytedeco.javacpp-presets#openblas;0.2.19-1.3: configuration not found in org.bytedeco.javacpp-presets#openblas;0.2.19-1.3: 'master(compile)'. Missing configuration: 'compile'. It was required from org.bytedeco.javacpp-presets#openblas-platform;0.2.19-1.3 compile, unresolved dependency: org.slf4j#slf4j-api;1.7.10: configuration not found in org.slf4j#slf4j-api;1.7.10: 'master(compile)'. Missing configuration: 'compile'. It was required from org.nd4j#nd4j-api;0.8.0 compile, unresolved dependency: org.reflections#reflections;0.9.10: configuration not found in org.reflections#reflections;0.9.10: 'master(compile)'. Missing configuration: 'compile'. It was required from org.nd4j#nd4j-common;0.8.0 compile, unresolved dependency: com.google.guava#guava;18.0: configuration not found in com.google.guava#guava;18.0: 'master(compile)'. Missing configuration: 'compile'. It was required from org.nd4j#nd4j-common;0.8.0 compile, unresolved dependency: commons-io#commons-io;2.4: configuration not found in commons-io#commons-io;2.4: 'master(compile)'. Missing configuration: 'compile'. It was required from org.nd4j#nd4j-common;0.8.0 compile, unresolved dependency: org.apache.commons#commons-math3;3.4.1: configuration not found in org.apache.commons#commons-math3;3.4.1: 'master(compile)'. Missing configuration: 'compile'. It was required from org.nd4j#nd4j-common;0.8.0 compile, unresolved dependency: org.apache.commons#commons-lang3;3.3.1: configuration not found in org.apache.commons#commons-lang3;3.3.1: 'master(compile)'. Missing configuration: 'compile'. It was required from org.nd4j#nd4j-common;0.8.0 compile, unresolved dependency: org.yaml#snakeyaml;1.12: configuration not found in org.yaml#snakeyaml;1.12: 'master(compile)'. Missing configuration: 'compile'. It was required from org.nd4j#jackson;0.8.0 compile, unresolved dependency: org.codehaus.woodstox#stax2-api;3.1.4: configuration not found in org.codehaus.woodstox#stax2-api;3.1.4: 'master(compile)'. Missing configuration: 'compile'. It was required from org.nd4j#jackson;0.8.0 compile, unresolved dependency: joda-time#joda-time;2.2: configuration not found in joda-time#joda-time;2.2: 'master(compile)'. Missing configuration: 'compile'. It was required from org.nd4j#jackson;0.8.0 compile, unresolved dependency: org.projectlombok#lombok;1.16.10: configuration not found in org.projectlombok#lombok;1.16.10: 'master(compile)'. Missing configuration: 'compile'. It was required from org.nd4j#nd4j-api;0.8.0 compile
  ammonite.runtime.tools.IvyThing.resolveArtifact(IvyThing.scala:108)
  ammonite.interp.Interpreter.loadIvy(Interpreter.scala:603)
  ammonite.runtime.ImportHook$BaseIvy.liftedTree1$1(ImportHook.scala:166)
  ammonite.runtime.ImportHook$BaseIvy.$anonfun$resolve$2(ImportHook.scala:166)
  ammonite.util.Res$Success.flatMap(Res.scala:58)
  ammonite.runtime.ImportHook$BaseIvy.resolve(ImportHook.scala:163)
  ammonite.runtime.ImportHook$BaseIvy.$anonfun$handle$7(ImportHook.scala:175)
  ammonite.util.Res$.$anonfun$map$1(Res.scala:34)
  scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:122)
  scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:118)
  scala.collection.immutable.List.foldLeft(List.scala:86)
  ammonite.util.Res$.map(Res.scala:31)
  ammonite.runtime.ImportHook$BaseIvy.$anonfun$handle$6(ImportHook.scala:175)
  ammonite.util.Res$Success.flatMap(Res.scala:58)
  ammonite.runtime.ImportHook$BaseIvy.handle(ImportHook.scala:174)
  ammonite.interp.Interpreter.$anonfun$resolveSingleImportHook$5(Interpreter.scala:153)
  ammonite.util.Res$Success.flatMap(Res.scala:58)
  ammonite.interp.Interpreter.resolveSingleImportHook(Interpreter.scala:152)
  ammonite.interp.Interpreter.$anonfun$resolveImportHooks$3(Interpreter.scala:201)
  ammonite.util.Res$.$anonfun$map$1(Res.scala:34)
  scala.collection.IndexedSeqOptimized.foldLeft(IndexedSeqOptimized.scala:56)
  scala.collection.IndexedSeqOptimized.foldLeft$(IndexedSeqOptimized.scala:64)
  scala.collection.mutable.ArrayBuffer.foldLeft(ArrayBuffer.scala:48)
  ammonite.util.Res$.map(Res.scala:31)
  ammonite.interp.Interpreter.resolveImportHooks(Interpreter.scala:201)
  ammonite.interp.Interpreter.$anonfun$processLine$3(Interpreter.scala:217)
  ammonite.util.Catching.flatMap(Res.scala:109)
  ammonite.interp.Interpreter.processLine(Interpreter.scala:211)
  ammonite.repl.Repl.$anonfun$action$6(Repl.scala:91)
  ammonite.repl.Scoped.$anonfun$flatMap$1(Signaller.scala:44)
  ammonite.repl.Signaller.apply(Signaller.scala:29)
  ammonite.repl.Scoped.flatMap(Signaller.scala:44)
  ammonite.repl.Scoped.flatMap$(Signaller.scala:44)
  ammonite.repl.Signaller.flatMap(Signaller.scala:11)
  ammonite.repl.Repl.$anonfun$action$4(Repl.scala:90)
  ammonite.util.Res$Success.flatMap(Res.scala:58)
  ammonite.repl.Repl.action(Repl.scala:77)
  ammonite.repl.Repl.loop$1(Repl.scala:101)
  ammonite.repl.Repl.run(Repl.scala:120)
  ammonite.Main.run(Main.scala:109)
  ammonite.Main$.$anonfun$main$2(Main.scala:250)
  ammonite.Main$.ifContinually$1(Main.scala:229)
  ammonite.Main$.$anonfun$main$1(Main.scala:231)
  scala.Option.foreach(Option.scala:257)
  ammonite.Main$.main(Main.scala:231)
  ammonite.Main.main(Main.scala:-1)
@lihaoyi

This comment has been minimized.

Owner

lihaoyi commented May 18, 2017

This passes/fails nondeterministically on my machine, but should be fixed by 662859f

@lihaoyi lihaoyi closed this May 18, 2017

@lihaoyi

This comment has been minimized.

Owner

lihaoyi commented May 21, 2017

@izhangzhihao

This comment has been minimized.

izhangzhihao commented May 21, 2017

Awesome !

@jackmaney

This comment has been minimized.

jackmaney commented Jun 13, 2017

It appears as though the 0.9.9 release has caused this issue (or a similar one) on my machine (macOS Sierra 10.12.5). Before that, it was working fine. Here's the stack trace:

$ amm
Loading...
Compiling /Users/jmaney/.ammonite/predef.sc
Exception in thread "main" java.lang.RuntimeException: Error during Predef:
	at ammonite.interp.PredefInitialization$.$anonfun$apply$7(PredefInitialization.scala:68)
	at ammonite.interp.PredefInitialization$.$anonfun$apply$7$adapted(PredefInitialization.scala:48)
	at scala.collection.TraversableLike$WithFilter.$anonfun$map$2(TraversableLike.scala:739)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:738)
	at ammonite.interp.PredefInitialization$.apply(PredefInitialization.scala:48)
	at ammonite.interp.Interpreter.<init>(Interpreter.scala:104)
	at ammonite.repl.Repl.<init>(Repl.scala:47)
	at ammonite.Main.instantiateRepl(Main.scala:87)
	at ammonite.Main.run(Main.scala:121)
	at ammonite.Main$.$anonfun$main0$2(Main.scala:199)
	at scala.util.Either$RightProjection.flatMap(Either.scala:672)
	at ammonite.Main$.$anonfun$main0$1(Main.scala:191)
	at scala.util.Either$RightProjection.flatMap(Either.scala:672)
	at ammonite.Main$.main0(Main.scala:190)
	at ammonite.Main$.main(Main.scala:161)
	at ammonite.Main.main(Main.scala)
Caused by: java.lang.Exception: Failed to resolve ivy dependencies:
  com.lihaoyi:ammonite-shell_2.12:0.9.9
    not found: /Users/jmaney/.ivy2/local/com.lihaoyi/ammonite-shell_2.12/0.9.9/ivys/ivy.xml
    not found: https://repo1.maven.org/maven2/com/lihaoyi/ammonite-shell_2.12/0.9.9/ammonite-shell_2.12-0.9.9.pom
	at ammonite.interp.Interpreter$DefaultLoadJar.ivy(Interpreter.scala:550)
	at ammonite.predef.UserPredef$.<init>(/Users/jmaney/.ammonite/predef.sc:1)
	at ammonite.predef.UserPredef$.<clinit>(/Users/jmaney/.ammonite/predef.sc)
	at ammonite.predef.UserPredef.$main(/Users/jmaney/.ammonite/predef.sc)
	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 ammonite.runtime.Evaluator$$anon$1.$anonfun$evalMain$1(Evaluator.scala:103)
	at ammonite.runtime.Evaluator$$anon$1.withContextClassloader(Evaluator.scala:110)
	at ammonite.runtime.Evaluator$$anon$1.evalMain(Evaluator.scala:103)
	at ammonite.runtime.Evaluator$$anon$1.$anonfun$processScriptBlock$1(Evaluator.scala:146)
	at ammonite.util.Catching.map(Res.scala:109)
	at ammonite.runtime.Evaluator$$anon$1.processScriptBlock(Evaluator.scala:144)
	at ammonite.interp.Interpreter.$anonfun$processScriptBlock$3(Interpreter.scala:258)
	at ammonite.util.Res$Success.flatMap(Res.scala:56)
	at ammonite.interp.Interpreter.$anonfun$processScriptBlock$2(Interpreter.scala:252)
	at ammonite.util.Res$Success.flatMap(Res.scala:56)
	at ammonite.interp.Interpreter.processScriptBlock(Interpreter.scala:249)
	at ammonite.interp.Interpreter.$anonfun$processModule$7(Interpreter.scala:311)
	at ammonite.interp.Interpreter.$anonfun$processCorrectScript$3(Interpreter.scala:436)
	at ammonite.util.Res$Success.flatMap(Res.scala:56)
	at ammonite.interp.Interpreter.compileRunBlock$1(Interpreter.scala:425)
	at ammonite.interp.Interpreter.$anonfun$processCorrectScript$9(Interpreter.scala:452)
	at ammonite.util.Res$Success.flatMap(Res.scala:56)
	at ammonite.interp.Interpreter.$anonfun$processCorrectScript$8(Interpreter.scala:451)
	at ammonite.util.Res$Success.flatMap(Res.scala:56)
	at ammonite.interp.Interpreter.loop$1(Interpreter.scala:449)
	at ammonite.interp.Interpreter.processCorrectScript(Interpreter.scala:499)
	at ammonite.interp.Interpreter.$anonfun$processModule$5(Interpreter.scala:313)
	at ammonite.util.Res$Success.flatMap(Res.scala:56)
	at ammonite.interp.Interpreter.processModule(Interpreter.scala:298)
	at ammonite.interp.Interpreter.$anonfun$new$1(Interpreter.scala:103)
	at ammonite.interp.Interpreter.$anonfun$new$1$adapted(Interpreter.scala:103)
	at ammonite.interp.PredefInitialization$.$anonfun$apply$7(PredefInitialization.scala:57)
	... 16 more

Edited to add: I've installed ammonite-repl and scala (2.12.2) via Homebrew.

@jackmaney

This comment has been minimized.

jackmaney commented Jun 13, 2017

Looks like a maven dependency can't be found, specifically: https://repo1.maven.org/maven2/com/lihaoyi/ammonite-shell_2.12/0.9.9/ammonite-shell_2.12-0.9.9.pom In fact, there is no 0.9.9 subdirectory in https://repo1.maven.org/maven2/com/lihaoyi/ammonite-shell_2.12, but the following path does exist (and appears to have what is needed): https://repo1.maven.org/maven2/com/lihaoyi/ammonite-shell_2.12.0/0.9.9/

@jackmaney

This comment has been minimized.

jackmaney commented Jun 13, 2017

Ah, after removing ~/.ammonite and ~/.ivy2, amm seems to be working, now.

@lihaoyi

This comment has been minimized.

Owner

lihaoyi commented Jun 13, 2017

yeah you had an out of date ~/.ammonite/predef.sc. Removing it works, and you can re-download it to get the new version from the website if you want the ammonite-shell configuration again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment