0
votes

I' ve been struggling with setting up IntelliJ IDEA Ultimate for use with Scala/SBT for the past couple of hours and currently i am facing an error that i dont even know how to look up properly. Googleing the error code didnt help unfortunately :(.

So, everytime i set up a new project or import an existing one, following the instructions found here:

https://scala-lang.org/documentation/getting-started-intellij-track/building-a-scala-project-with-intellij-and-sbt.html

and

https://www.jetbrains.com/help/idea/creating-and-running-your-scala-application.html

i am getting the following error msg as soon as the project has finished loading:

Error:Error while importing SBT project:
...

[error]   at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:118)
[error]     at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2353)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[error]     at sbt.std.Transform$$anon$4.work(System.scala:64)

[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:257) [error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16) [error] at sbt.Execute.work(Execute.scala:266) [error] at sbt.Execute.$anonfun$submit$1(Execute.scala:257) [error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167) [error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:32) [error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) [error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) [error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) [error] at java.base/java.lang.Thread.run(Thread.java:844) [error] (*:update) sbt.librarymanagement.ResolveException: download failed: org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar) Invalid response.


See complete log in file:/home/a0947188/.IntelliJIdea2017.2/system/log/sbt.last.log

I have properly installed SBT 1.0.3 and the scala plugin 2.1.14.

Do you have any idea what i can do about this? I need to hand in the project in 2 weeks and our teacher specifically requires us to use IntelliJ IDEA.

1
Lorenz, are you sure the project builds with plain sbt? This log looks like you just have some dependency (library jar) that can't be resolved. Show us your build.sbt or wherever you put your dependencies. - SergGr

1 Answers

0
votes

Lorenz I had exactly the same problem. When reading the whole error message i found https://dl.bintray.com/sbt/sbt-plugin-releases/org.apache.logging.log4j where sbt seems to search for an update, but it is not available.

My solution was, to use older SBT and Scala plugins: I'm now using SBT 0.13.13 and Scala 2.12.0 and everything is working fine so far. (JDK version should be 1.8)

I hope it will work for you too.