3
votes

When I try to import the newly created play framework project to my IntelliJ IDEA 15 I got following exception:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0
[info] Loading settings from plugins.sbt,scaffold.sbt ...
[info] Loading project definition from /Users/lukasz/dev/repository/local-examples/scala-examples/scala-hands-on/scala-api-example/project
[info] Loading settings from build.sbt ...
[info] Set current project to scala-api-example (in build file:/Users/lukasz/dev/repository/local-examples/scala-examples/scala-hands-on/scala-api-example/)
[info] sbt server started at 127.0.0.1:5218
[scala-api-example] $ [info] Defining *:shellPrompt
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to scala-api-example (in build file:/Users/lukasz/dev/repository/local-examples/scala-examples/scala-hands-on/scala-api-example/)
[info] Defining */*:sbtStructureOutputFile
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to scala-api-example (in build file:/Users/lukasz/dev/repository/local-examples/scala-examples/scala-hands-on/scala-api-example/)
[info] Defining */*:sbtStructureOptions
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to scala-api-example (in build file:/Users/lukasz/dev/repository/local-examples/scala-examples/scala-hands-on/scala-api-example/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/lukasz/Library/Application Support/IntelliJIdea15/Scala/launcher/sbt-structure-1.0.jar
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error]     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error]     at java.lang.Class.forName0(Native Method)
[error]     at java.lang.Class.forName(Class.java:348)
[error]     at sbt.internal.inc.ModuleUtilities$.getObject(ModuleUtilities.scala:20)
[error]     at sbt.BasicCommands$.$anonfun$call$5(BasicCommands.scala:187)
[error]     at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error]     at scala.collection.immutable.List.foreach(List.scala:389)
[error]     at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error]     at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error]     at scala.collection.immutable.List.map(List.scala:295)
[error]     at sbt.BasicCommands$.$anonfun$call$2(BasicCommands.scala:187)
[error]     at sbt.Command$.$anonfun$applyEffect$4(Command.scala:125)
[error]     at sbt.Command$.$anonfun$applyEffect$2(Command.scala:121)
[error]     at sbt.MainLoop$.processCommand(MainLoop.scala:121)
[error]     at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:105)
[error]     at sbt.State$$anon$1.runCmd$1(State.scala:227)
[error]     at sbt.State$$anon$1.process(State.scala:233)
[error]     at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:105)
[error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]     at sbt.MainLoop$.next(MainLoop.scala:105)
[error]     at sbt.MainLoop$.run(MainLoop.scala:98)
[error]     at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:76)
[error]     at sbt.io.Using.apply(Using.scala:22)
[error]     at sbt.MainLoop$.runWithNewLog(MainLoop.scala:70)
[error]     at sbt.MainLoop$.runAndClearLast(MainLoop.scala:52)
[error]     at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37)
[error]     at sbt.MainLoop$.runLogged(MainLoop.scala:29)
[error]     at sbt.StandardMain$.runManaged(Main.scala:104)
[error]     at sbt.xMain.run(Main.scala:71)
[error]     at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error]     at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error]     at xsbt.boot.Launch$.run(Launch.scala:109)
[error]     at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error]     at xsbt.boot.Launch$.launch(Launch.scala:117)
[error]     at xsbt.boot.Launch$.apply(Launch.scala:18)
[error]     at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error]     at xsbt.boot.Boot$.main(Boot.scala:17)
[error]     at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[error] Not a valid key: dump-structure (similar: buildStructure)
[error] */*:dump-structure
[error]                   ^
[INFO] [10/21/2017 15:49:58.974] [Thread-5] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook

More details:

  • OS: macOS Sierra 10.12.6
  • IntelliJ IDEA: 15 (2016.12023 built on 28 Apr 2016)
  • SBT: 1.0.2 (installed with brew)
  • Play version: 2.6.6
  • Java: 1.8.0_131
  • Project created with command: sbt new playframework/play-scala-seed.g8

Application starts with no problem when I use command sbt run

I tried to solve that problem by:

  • providing -Dsbt.version=1.0.2 to IntelliJ vmoptions and using bundled sbt-launcher
  • providing path to custom sbt-launcher (/usr/local/Cellar/sbt/1.0.2/libexec/bin/sbt-launch.jar)

but it didn't work.

1
I'd try a more recent IntelliJ IDEA version, yours is several years old.CrazyCoder
Besides @CrazyCoder's advice you can try sbt 0.13.16.Dmytro Mitin
@DmytroMitin Thanks, changing sbt.version in project/build.properties from 1.0.2 to 0.13.16 helped.luwojtaszek

1 Answers

5
votes

Suggestion of "Dmytro Mitin Oct 22 at 7:10" worked for me.

change the sbt version in project/build.properties sbt.version=0.13.16