Compiling error using play framework
Importing projects that are working in the activator (from playframework.com) and they are having an error when i build them in the IntelliJ. Can anyone help me?
Error:Module 'root' production: java.lang.NullPointerException
请先登录再写评论。
Hi Luis!
Can you provide us with your Intellij version and scala plugin version?
Hi Kate,
I've tried both Intellij 15.0.2 and 15.0.3, with scala 2.1.0
Any luck solving this issue? I am having the same problem with my Play Framework project. In my case, the error is:
Error:Module 'email_worker' production: java.lang.NullPointerException
I am using IntelliJ 15.0.3 and Scala plugin 2.2.0.
If it matters, I have setting "Use Play 2 compiler for this project" turned on. If I don't turn this on, I get a different error messages in my Helper.scala file. I have this same Play 2 compiler option set in IntelliJ 14. I get the same errors about the Helper.scala file in IntelliJ 14 as well if I don't use the Play 2 compiler option.
I also have IntelliJ 14 installed with Scala plugin 1.6.2 installed. This works just fine. By the way, I created a new directory with a fresh copy of code to import in IntelliJ 15 so I could continue using IntelliJ 14 so I am not trying to use project files generated by IntelliJ 14.
This seems to be the relevant part of my build.log file:
2016-02-13 18:01:18,050 [ 3277] INFO - .incremental.IncProjectBuilder - Module 'email_worker' production: java.lang.NullPointerException
org.jetbrains.jps.incremental.ProjectBuildException: Module 'email_worker' production: java.lang.NullPointerException
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1005)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:870)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:695)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:386)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:193)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:137)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:294)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:232)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.intellij.scala.play.jpsSupport.playutil.Play2JPSUtil$.pathFromUrl(Play2JPSUtil.scala:120)
at com.intellij.scala.play.jpsSupport.Play2TemplateJpsBuilder$$anonfun$2.applyOrElse(Play2TemplateJpsBuilder.scala:86)
at com.intellij.scala.play.jpsSupport.Play2TemplateJpsBuilder$$anonfun$2.applyOrElse(Play2TemplateJpsBuilder.scala:85)
at scala.PartialFunction$$anonfun$runWith$1.apply(PartialFunction.scala:141)
at scala.PartialFunction$$anonfun$runWith$1.apply(PartialFunction.scala:140)
at scala.collection.mutable.HashSet.foreach(HashSet.scala:78)
at scala.collection.TraversableLike$class.collect(TraversableLike.scala:282)
at scala.collection.AbstractTraversable.collect(Traversable.scala:104)
at com.intellij.scala.play.jpsSupport.Play2TemplateJpsBuilder.build(Play2TemplateJpsBuilder.scala:85)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1230)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:904)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:976)
... 14 more
I haven't found any solution. I tried using Intellij 14.1.6, although I have no compilation problem, I can't run it. Now I am using the activator ui from playframework.com