有两个非常相似的问题here和here。我使用play new
创建了一个项目并运行play idea
。测试使用play test
命令运行,当我尝试在IDEA中运行它时,我得到以下堆栈跟踪。
Internal error: (java.lang.ClassNotFoundException) com.pty4j.PtyProcess
java.lang.ClassNotFoundException: com.pty4j.PtyProcess
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
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:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.intellij.scala.play.jpsSupport.Play2TemplateJpsBuilder$$anonfun$build$1.apply(Play2TemplateJpsBuilder.scala:90)
at com.intellij.scala.play.jpsSupport.Play2TemplateJpsBuilder$$anonfun$build$1.apply(Play2TemplateJpsBuilder.scala:88)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:105)
at com.intellij.scala.play.jpsSupport.Play2TemplateJpsBuilder.build(Play2TemplateJpsBuilder.scala:88)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1086)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:797)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:845)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:760)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:583)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:344)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:184)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:224)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
我尝试在设置(IDE)中关闭外部编译器服务器 - > Scala,使缓存无效,并获得相同的异常。这是关于编译器服务器的jetbrains post。
答案 0 :(得分:2)
在我的情况下,133.331没有解决问题。 IntelliJ 13仍然无法编译测试代码。
我认为这是由于外部构建,因为IntelliJ 12没有外部构建选项关闭的问题。
答案 1 :(得分:0)
将IntelliJ从13.0.1 133.330更新到13.0.1 133.331为我解决了这个问题。