I'm trying to install Apache Spark standalone on Ubuntu and while running "sbt/sbt assembly" command, I get this error:
java.lang.RuntimeException: Could not create directory /opt/spark-1.5.1/external/zeromq/target/streams/compile/$global/$global/discoveredMainClasses
at scala.sys.package$.error(package.scala:27)
at sbt.IO$.createDirectory(IO.scala:166)
at sbt.IO$.touch(IO.scala:142)
at sbt.std.Streams$$anon$3$$anon$2.make(Streams.scala:129)
at sbt.std.Streams$$anon$3$$anon$2.binary(Streams.scala:116)
at sbt.SessionVar$$anonfun$persist$1.apply(SessionVar.scala:27)
at sbt.SessionVar$$anonfun$persist$1.apply(SessionVar.scala:26)
at sbt.std.Streams$class.use(Streams.scala:75)
at sbt.std.Streams$$anon$3.use(Streams.scala:100)
at sbt.SessionVar$.persist(SessionVar.scala:26)
at sbt.SessionVar$.persistAndSet(SessionVar.scala:21)
at sbt.Project$RichTaskSessionVar$$anonfun$storeAs$1$$anonfun$apply$5.apply(Project.scala:556)
at sbt.Project$RichTaskSessionVar$$anonfun$storeAs$1$$anonfun$apply$5.apply(Project.scala:556)
at sbt.SessionVar$$anonfun$1$$anonfun$apply$1.apply(SessionVar.scala:40)
at sbt.SessionVar$$anonfun$1$$anonfun$apply$1.apply(SessionVar.scala:40)
at scala.Function$$anonfun$chain$1$$anonfun$apply$1.apply(Function.scala:24)
at scala.Function$$anonfun$chain$1$$anonfun$apply$1.apply(Function.scala:24)
at scala.collection.IndexedSeqOptimized$class.foldl(IndexedSeqOptimized.scala:51)
at scala.collection.IndexedSeqOptimized$class.foldLeft(IndexedSeqOptimized.scala:60)
at scala.collection.mutable.ArrayBuffer.foldLeft(ArrayBuffer.scala:47)
at scala.collection.TraversableOnce$class.$div$colon(TraversableOnce.scala:138)
at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:105)
at scala.Function$$anonfun$chain$1.apply(Function.scala:24)
at sbt.EvaluateTask$.applyResults(EvaluateTask.scala:370)
at sbt.EvaluateTask$.liftedTree1$1(EvaluateTask.scala:344)
at sbt.EvaluateTask$.run$1(EvaluateTask.scala:341)
at sbt.EvaluateTask$.runTask(EvaluateTask.scala:361)
at sbt.Aggregation$$anonfun$3.apply(Aggregation.scala:64)
at sbt.Aggregation$$anonfun$3.apply(Aggregation.scala:62)
at sbt.EvaluateTask$.withStreams(EvaluateTask.scala:293)
at sbt.Aggregation$.timedRun(Aggregation.scala:62)
at sbt.Aggregation$.runTasks(Aggregation.scala:71)
at sbt.Aggregation$$anonfun$applyTasks$1.apply(Aggregation.scala:32)
at sbt.Aggregation$$anonfun$applyTasks$1.apply(Aggregation.scala:31)
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.Aggregation$$anonfun$evaluatingParser$4$$anonfun$apply$5.apply(Aggregation.scala:153)
at sbt.Aggregation$$anonfun$evaluatingParser$4$$anonfun$apply$5.apply(Aggregation.scala:152)
at sbt.Act$$anonfun$sbt$Act$$actParser0$1$$anonfun$sbt$Act$$anonfun$$evaluate$1$1$$anonfun$apply$10.apply(Act.scala:244)
at sbt.Act$$anonfun$sbt$Act$$actParser0$1$$anonfun$sbt$Act$$anonfun$$evaluate$1$1$$anonfun$apply$10.apply(Act.scala:241)
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] Could not create directory /opt/spark-1.5.1/external/zeromq/target/streams/compile/$global/$global/discoveredMainClasses
[error] Use 'last' for the full log.
Has anyone else faced this problem?
java version "1.8.0_65"
Scala code runner version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL
As the error mentions you do not have write access to the /opt directory.
Could not create directory /opt/spark-1.5.1/external/zeromq/target/streams/compile/$global/$global/discoveredMainClasses
You need root access in order to write to this folder.
You can either
Download and compile Apache Spark to your home folder and then move it to /opt
Run sudo sbt/sbt assembly to gain root access while building spark (it is considered unsafe compiling as root)
You must have root privileges to add and manipulate /opt/ files. Spark configuration is wrong. I recommend follow these steps to install spark and scala, then try to run sbt. all the best. https://www.youtube.com/watch?v=BozSL9ygUto
We get this error inconsistently. It may be caused by an internal SBT bug.
"It seems like there is a race condition in SBT which is triggered only by plugins that cause multiple compilation processes to run in parallel."
See here for more info: https://github.com/sbt/sbt/issues/1673
See if you can disable some plugins and re-run.
Related
I have installed sbt 1.2.8 on fedora 29 following this instruction:
https://www.scala-sbt.org/1.0/docs/Installing-sbt-on-Linux.html
When I run sbt (don't matter if in project folder or any other place) I get:
java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)[Ljava/lang/Object;
at sbt.xMain.run(Main.scala:74)
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:56)
at xsbt.boot.Boot$.main(Boot.scala:18)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)[Ljava/lang/Object;
Running sbt with sudo privilages solves the problem. I have also tried downloading tgz package from sbt site and running
./bin/sbt
but with the same result (non sudo - error / sudo - everything ok).
Downgrading to 1.2.7 version also solves the problem but this is not a long term solution.
Do you have any idea what is going on ?
It's not a particularly satisfying answer, but I was able to solve this problem (also on Fedora 29) by deleting the ~/.sbt folder
I don't know what goes on in that folder, so maybe best to make a backup first. After it was deleted, I re-ran sbt and the folder was re-appeared, but sbt no longer crashed.
I want the source code of akka-actor v 2.4.17 and compile on my windows machine.
I downloaded the source code from below location.
https://github.com/akka/akka/tree/v2.4.17
After downloading the entire source code installed sbt on my machine, And ran sbt command on the command line in the project root directory.
While running I got the below error, Please let me know how to compile this source code.
Error:
java.lang.NullPointerException
at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1769)
at java.base/java.util.regex.Matcher.reset(Matcher.java:416)
at java.base/java.util.regex.Matcher.<init>(Matcher.java:253)
at java.base/java.util.regex.Pattern.matcher(Pattern.java:1147)
at java.base/java.util.regex.Pattern.split(Pattern.java:1264)
at java.base/java.util.regex.Pattern.split(Pattern.java:1335)
at sbt.IO$.pathSplit(IO.scala:797)
at sbt.IO$.parseClasspath(IO.scala:912)
at sbt.compiler.CompilerArguments.extClasspath(CompilerArguments.scala:6
6)
at sbt.compiler.MixedAnalyzingCompiler$.withBootclasspath(MixedAnalyzing
Compiler.scala:188)
at sbt.compiler.MixedAnalyzingCompiler$.searchClasspathAndLookup(MixedAn
alyzingCompiler.scala:166)
at sbt.compiler.MixedAnalyzingCompiler$.apply(MixedAnalyzingCompiler.sca
la:176)
at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
at sbt.Compiler$.compile(Compiler.scala:152)
at sbt.Compiler$.compile(Compiler.scala:138)
at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala
:860)
at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:8
51)
at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:8
49)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:22
8)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:22
8)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestric
tions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executo
rs.java:514)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoo
lExecutor.java:1167)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPo
It looks like you are using Java 9. I had some issues using sbt with Java 9 in the past. I'm not sure if all problems have been fixed in a recent sbt version, but switching to Java 8 would most likely let you compile Akka successfully.
I tried downloading and running sbt on RedHat using:
curl https://bintray.com/sbt/rpm/rpm | sudo tee /etc/yum.repos.d/bintray-sbt-rpm.repo
sudo yum install sbt
, and I get this error
java.lang.ExceptionInInitializerError
at xsbt.boot.Update.settings$lzycompute(Update.scala:76)
at xsbt.boot.Update.settings(Update.scala:71)
at xsbt.boot.Update.ivyLockFile$lzycompute(Update.scala:93)
at xsbt.boot.Update.apply(Update.scala:100)
at xsbt.boot.Launch.update(Launch.scala:350)
at xsbt.boot.Launch.xsbt$boot$Launch$$retrieve$1(Launch.scala:208)
at xsbt.boot.Launch$$anonfun$3.apply(Launch.scala:216)
at scala.Option.getOrElse(Option.scala:120)
at xsbt.boot.Launch.xsbt$boot$Launch$$getAppProvider0(Launch.scala:216)
at xsbt.boot.Launch$$anon$2.call(Launch.scala:196)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at xsbt.boot.Launch.locked(Launch.scala:238)
at xsbt.boot.Launch.app(Launch.scala:147)
at xsbt.boot.Launch.app(Launch.scala:145)
at xsbt.boot.Launch$.run(Launch.scala:102)
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.RuntimeException: The SHA1 algorithm is not available in your classpath
at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.<clinit>(DefaultRepositoryCacheManager.java:86)
... 29 more
Caused by: java.security.NoSuchAlgorithmException: SHA1 MessageDigest not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
at java.security.Security.getImpl(Security.java:695)
at java.security.MessageDigest.getInstance(MessageDigest.java:167)
at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.<clinit>(DefaultRepositoryCacheManager.java:84)
... 29 more
Error during sbt execution: java.lang.ExceptionInInitializerError
I'm not sure where the error is coming from. Is it an error in the sbt initialization itself?
Since this is the recommended way to install sbt from the official website, what other ways of installing sbt on redhat would you recommend?
I ended up solving this by installing the bouncy castle jars onto my jvm installation, which were not present in my RedHat vms.
I personally prefer the latest SBT version and a proper wrapper run script for it. There is a very nice script for it written by Paul Phillips (one of the Scala lang contributors). I just have a little shell script get_sbt.sh that downloads the latest version for me:
#!/bin/bash
# Downloads the latest version of SBT runner script which in turn downloads
# SBT launcher JAR and provides lots of convenience methods.
curl -s https://raw.githubusercontent.com/paulp/sbt-extras/master/sbt > sbt && chmod 0755 sbt
You can run it like this:
./get_sbt.sh
It will download the runner script to your current directory, afterwards just run the runner script with:
./sbt
This in turn will download the latest SBT JAR and whatever else is needed will be bootstrapped from here.
I am new to scala and sbt and I want to run the sbt command but I get some Nullpointer exception, not sure why.
I have scala installed in the system:
scala -version
Scala code runner version 2.11.8 -- Copyright 2002-2016, LAMP/EPFL
Also if i try to check the sbt version works fine:
sbt --version sbt launcher version 0.13.5
But when I just run sbt, I get an exception:
info] Loading project definition from /home/workspace/myproject
java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(java.base#9-internal/Matcher.java:1747)
at java.util.regex.Matcher.reset(java.base#9-internal/Matcher.java:402)
at java.util.regex.Matcher.<init>(java.base#9-internal/Matcher.java:244)
at java.util.regex.Pattern.matcher(java.base#9-internal/Pattern.java:1108)
at java.util.regex.Pattern.split(java.base#9-internal/Pattern.java:1221)
at java.util.regex.Pattern.split(java.base#9-internal/Pattern.java:1288)
at sbt.IO$.pathSplit(IO.scala:744)
at sbt.IO$.parseClasspath(IO.scala:859)
at sbt.compiler.CompilerArguments.extClasspath(CompilerArguments.scala:62)
at sbt.compiler.MixedAnalyzingCompiler$.withBootclasspath(MixedAnalyzingCompiler.scala:189)
at sbt.compiler.MixedAnalyzingCompiler$.searchClasspathAndLookup(MixedAnalyzingCompiler.scala:167)
at sbt.compiler.MixedAnalyzingCompiler$.apply(MixedAnalyzingCompiler.scala:177)
at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
at sbt.Compiler$.compile(Compiler.scala:128)
at sbt.Compiler$.compile(Compiler.scala:114)
at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:814)
at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:805)
at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:803)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(java.base#9-internal/FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base#9-internal/Executors.java:514)
at java.util.concurrent.FutureTask.run(java.base#9-internal/FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base#9-internal/ThreadPoolExecutor.java:1158)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base#9-internal/ThreadPoolExecutor.java:632)
at java.lang.Thread.run(java.base#9-internal/Thread.java:804)
[error] (compile:compileIncremental) java.lang.NullPointerException
Any idea how to fix this?
The stack trace
Loading project definition from /home/workspace/myproject
java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(java.base#9-internal/Matcher.java:1747)
at java.util.regex.Matcher.reset(java.base#9-internal/Matcher.java:402)
at java.util.regex.Matcher.<init>(java.base#9-internal/Matcher.java:244)
at java.util.regex.Pattern.matcher(java.base#9-internal/Pattern.java:1108)
at java.util.regex.Pattern.split(java.base#9-internal/Pattern.java:1221)
at java.util.regex.Pattern.split(java.base#9-internal/Pattern.java:1288)
indicates that you tried running sbt 0.13.5 under JDK 9, which at the time was not supported. As suggested by thirstycrow in comment, at the recommended course of action is to use JDK 8.
If you're using JDK 9 or 10, sbt 1.1.6 or later should work better using the latest launch script.
Problem:
IntelliJ is not letting me import a play framework project. It just displays errors when I try to open project using SBT.
Its really simple what I want to do, but I haven't used any of these tools and I'm a bit lost at how to fix this.
I just want to create a Play framework project, and edit it in IntelliJ as shown on multiple tutorials on youtube.
Below I have provided some info about how I have tried to make it work to "help you help me".
I really hope there is some easy solution that I fail to see!
Background info:
I have downloaded and installed IntelliJ 14.1.5 Community Edition and the latest avtivator from Play Framework - Activator 1.3.6 and Play 2.4.3
Note: I also downloaded the latest java jdk, 1.8.0_65 and added both java and activator to path - I'm using Windows 8. I have also downloaded the latest plugin of Scala inside IntelliJ
Then I opened cmd and typed "activator ui" and opened browser at localhost:8888 as instructed in tutorials. I managed to create a "play-java-intro" project. So far, so good.
After this I have tried a few different approaches.
NOTE: I have clicked "Invalidate cache / restart" each time I try something new
First try
I tried to Open project after I had created the project through activator. I selected root directory of the project and selected SDK jdk 1.7 (have tried with 1.8 aswell).
I got the error
Error while importing SBT project: ... 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:129) at xsbt.boot.Launch$.run(Launch.scala:109) at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36) at xsbt.boot.Launch$.launch(Launch.scala:117) at xsbt.boot.Launch$.apply(Launch.scala:19) at xsbt.boot.Boot$.runImpl(Boot.scala:44) at xsbt.boot.Boot$.main(Boot.scala:20) at xsbt.boot.Boot.main(Boot.scala) [error] java.lang.UnsupportedClassVersionError: com/typesafe/config/ConfigException : Unsupported major.minor version 52.0 [error] Use 'last' for the full log.
Inside the log file:
[info] Loading project definition from C:\play-java-intro\project
[info] Set current project to play-java-intro (in build file:/C:/play-java-intro/)
java.lang.UnsupportedClassVersionError: com/typesafe/config/ConfigException : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.typesafe.sbt.web.SbtWeb$$anonfun$com$typesafe$sbt$web$SbtWeb$$load$1.apply(SbtWeb.scala:535)
at com.typesafe.sbt.web.SbtWeb$$anonfun$com$typesafe$sbt$web$SbtWeb$$load$1.apply(SbtWeb.scala:535)
at scala.Option.fold(Option.scala:157)
at com.typesafe.sbt.web.SbtWeb$.com$typesafe$sbt$web$SbtWeb$$load(SbtWeb.scala:549)
at com.typesafe.sbt.web.SbtWeb$$anonfun$globalSettings$1$$anonfun$apply$1.apply(SbtWeb.scala:143)
at com.typesafe.sbt.web.SbtWeb$$anonfun$globalSettings$1$$anonfun$apply$1.apply(SbtWeb.scala:143)
at scala.Function1$$anonfun$andThen$1.apply(Function1.scala:55)
at sbt.Project$.setProject(Project.scala:319)
at sbt.BuiltinCommands$.doLoadProject(Main.scala:484)
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:129)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:19)
at xsbt.boot.Boot$.runImpl(Boot.scala:44)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.UnsupportedClassVersionError: com/typesafe/config/ConfigException : Unsupported major.minor version 52.0
[error] Use 'last' for the full log.
I have tried to search what this means, but the answers I find on google wont apply to my problem.
I have tried to select and deselect all of the options within SBT - Use auto-import, Download sources and docs etc.. But still the same error message.
Second try
Similar to first try, but I clicked "Create IntelliJ project" inside activator at localhost:8888 and then tried to import the project the same method as First try.
Third try
Open project and select the root directory, and I managed to import the project somewhat, but its moved project files to "project backup" and I got lots of warnings saying its based on a outdated version. Didn't quite understand this.
Fourth try
Create project from existing sources after creating the project at activator, and I got the project imported without warnings.
But when I open Application.java (or any other file for that matter), everything inside that file gets red underlined with a error saying similar to "Cannot resolve symbol 'Result'" and I cant compile anything.
I have tried to open modules and click + and add Scala as a module, but it doesn't seem to make any difference.
I really hope there is someone out there that can help me as this should be a fairly easy thing to install IntelliJ + Play framework.
The issue is that even if IntelliJ is set to use JDK8, the SBT process is using JDK7 (you can confirm that looking at it with a tool like JVisualVM). Not sure what their logic is to pick up SBT's JVM, but you can force it when you import the projet:
This solved it for me with this version of Idea:
From the documentation: https://www.playframework.com/documentation/2.4.x/Highlights24
Play 2.4 now requires JDK 8
So you definitely must use only JDK 8.
Unsupported major.minor version 52.0
Means that you try to open project that was compiled with JDK 8 but your settings in IDE is JDK 7 (or less)
My proposition - check twice if you really use JDK8 in the intelliJ