Internal Error: null while running Scala Worksheet

After setting up the Scala plug-in (IntelliJ IDEA 2016.3.2, Scala Plugin 2016.3.5), I get an internal error: null regardless of running with external compile server or not displayed in the Scala Worksheet output window after entering a scala statement.  Any ideas?

I'm a newbie to Scala but I have reviewed the setup several times. Configured with Scala 2.12

With Scala Compile Server: 

Internal error: null
org.jetbrains.jps.incremental.scala.remote.ClientEventProcessor.process(ClientEventProcessor.scala:22)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$class.handle(RemoteResourceOwner.scala:47)
org.jetbrains.plugins.scala.compiler.RemoteServerRunner.handle(RemoteServerRunner.scala:14)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1$$anonfun$apply$1$$anonfun$apply$3.apply(RemoteResourceOwner.scala:30)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1$$anonfun$apply$1$$anonfun$apply$3.apply(RemoteResourceOwner.scala:29)
org.jetbrains.jps.incremental.scala.package$.using(package.scala:21)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1$$anonfun$apply$1.apply(RemoteResourceOwner.scala:29)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1$$anonfun$apply$1.apply(RemoteResourceOwner.scala:25)
org.jetbrains.jps.incremental.scala.package$.using(package.scala:21)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1.apply(RemoteResourceOwner.scala:25)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1.apply(RemoteResourceOwner.scala:24)
org.jetbrains.jps.incremental.scala.package$.using(package.scala:21)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$class.send(RemoteResourceOwner.scala:24)
org.jetbrains.plugins.scala.compiler.RemoteServerRunner.send(RemoteServerRunner.scala:14)
org.jetbrains.plugins.scala.compiler.RemoteServerRunner$$anon$1$$anonfun$run$1.apply$mcVI$sp(RemoteServerRunner.scala:33)
scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:166)
org.jetbrains.plugins.scala.compiler.RemoteServerRunner$$anon$1.run(RemoteServerRunner.scala:30)
org.jetbrains.plugins.scala.worksheet.server.RemoteServerConnector.compileAndRun(RemoteServerConnector.scala:85)
org.jetbrains.plugins.scala.worksheet.processor.WorksheetCompiler$$anon$1.run(WorksheetCompiler.scala:76)
com.intellij.compiler.progress.CompilerTask.run(CompilerTask.java:196)
com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:710)
com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:179)
com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:164)
com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:128)
com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:309)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)

 

With External Scala Compiler Service turned off:

Internal error: null
org.jetbrains.jps.incremental.scala.remote.ClientEventProcessor.process(ClientEventProcessor.scala:22)
org.jetbrains.plugins.scala.worksheet.server.RemoteServerConnector$$anonfun$6.apply(RemoteServerConnector.scala:74)
org.jetbrains.plugins.scala.worksheet.server.RemoteServerConnector$$anonfun$6.apply(RemoteServerConnector.scala:72)
org.jetbrains.plugins.scala.compiler.NonServerRunner$MyBase64StreamReader.onTextAvailable(NonServerRunner.scala:106)
org.jetbrains.plugins.scala.compiler.NonServerRunner$MyBase64StreamReader$$anonfun$readAvailable$1.apply(NonServerRunner.scala:131)
org.jetbrains.plugins.scala.compiler.NonServerRunner$MyBase64StreamReader$$anonfun$readAvailable$1.apply(NonServerRunner.scala:126)
scala.collection.immutable.Range.foreach(Range.scala:166)
org.jetbrains.plugins.scala.compiler.NonServerRunner$MyBase64StreamReader.readAvailable(NonServerRunner.scala:126)
com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:160)
com.intellij.util.io.BaseDataReader$1.run(BaseDataReader.java:61)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)
8 comments
Comment actions Permalink

Following up: the problem doesn't occur when using Scala 2.11.8, but does occur reliably with Scala 2.12.

 

0
Comment actions Permalink

Yep, I've also got the same issue

Idea Community 2016.3.2 on Mac OS El Capitan 10.11.6.

It happens for both Scala 2.12.0 and 2.12.1.

Scala 2.11 works fine

0
Comment actions Permalink

Hello,

I am facing an almost similar issue (screenshots of my scala & jdk version in settings attached), please let me know if you need more information)

Intelli Version: 2017.1

Scala SDK Version 2.12.2

Jdk Version: 1.8.0_131

Scala Plugin Version : 2017.1.15

I will appreciate your help to resolve this. Is this a bug ? Is there a work around? Thanks!

 My worksheet has just a simple expression "val s = "Hello") .The error I get in my right pane is:

 Internal error: File worksheetTempFile is null
org.jetbrains.jps.incremental.scala.remote.ClientEventProcessor.process(ClientEventProcessor.scala:22)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$class.handle(RemoteResourceOwner.scala:47)
org.jetbrains.plugins.scala.compiler.RemoteServerRunner.handle(RemoteServerRunner.scala:14)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1$$anonfun$apply$1$$anonfun$apply$3.apply(RemoteResourceOwner.scala:30)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1$$anonfun$apply$1$$anonfun$apply$3.apply(RemoteResourceOwner.scala:29)
org.jetbrains.jps.incremental.scala.package$.using(package.scala:21)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1$$anonfun$apply$1.apply(RemoteResourceOwner.scala:29)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1$$anonfun$apply$1.apply(RemoteResourceOwner.scala:25)
org.jetbrains.jps.incremental.scala.package$.using(package.scala:21)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1.apply(RemoteResourceOwner.scala:25)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$$anonfun$send$1.apply(RemoteResourceOwner.scala:24)
org.jetbrains.jps.incremental.scala.package$.using(package.scala:21)
org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner$class.send(RemoteResourceOwner.scala:24)
org.jetbrains.plugins.scala.compiler.RemoteServerRunner.send(RemoteServerRunner.scala:14)
org.jetbrains.plugins.scala.compiler.RemoteServerRunner$$anon$1$$anonfun$run$1.apply$mcVI$sp(RemoteServerRunner.scala:33)
scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:160)
org.jetbrains.plugins.scala.compiler.RemoteServerRunner$$anon$1.run(RemoteServerRunner.scala:30)
org.jetbrains.plugins.scala.worksheet.server.RemoteServerConnector.compileAndRun(RemoteServerConnector.scala:97)
org.jetbrains.plugins.scala.worksheet.processor.WorksheetCompiler$$anon$3.run(WorksheetCompiler.scala:69)
com.intellij.compiler.progress.CompilerTask.run(CompilerTask.java:196)
com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:176)
com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:556)
com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:137)
com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)

 





0
Comment actions Permalink

If the issue persists in 2017.1.3 release with the latest Scala plug-in installed, please file a bug at https://youtrack.jetbrains.com/issues/SCL.

0
Comment actions Permalink

Sorry to pull this one up again after 2 years sine the last update. But it's astonishing that this has not been fixed as yet.
Scala version 2.13.0

1
Comment actions Permalink

Using 2.13.0, I changed the settings of the worksheet from <Run type: REPL> into <Run type:plain> and it worked.

1

Please sign in to leave a comment.