Anyone got scala working under Intellij 14

Refuses to work for me, tried reinstalling the plugin with no luck.

Get something similar for scala from mvn repo, ivy or homebrew

Information:05/11/2014 20:09 - Compilation completed with 3 errors and 0 warnings in 4 sec
Error:scalac: error while loading package, Missing dependency 'object java.lang.Object in compiler mirror', required by /Users/graham/.m2/repository/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar(scala/package.class)
Error:scalac: error while loading package, Missing dependency 'object java.lang.Object in compiler mirror', required by /Users/graham/.m2/repository/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar(scala/runtime/package.class)
Error:scalac: Error: object java.lang.Object in compiler mirror not found.
scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
 at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:16)
 at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:17)
 at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:48)
 at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:40)
 at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:40)
 at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:61)
 at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:99)
 at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:102)
 at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:264)
 at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:264)
 at scala.reflect.internal.Definitions$DefinitionsClass.AnyRefClass$lzycompute(Definitions.scala:263)
 at scala.reflect.internal.Definitions$DefinitionsClass.AnyRefClass(Definitions.scala:263)
 at scala.reflect.internal.Definitions$DefinitionsClass.specialPolyClass(Definitions.scala:1120)
 at scala.reflect.internal.Definitions$DefinitionsClass.RepeatedParamClass$lzycompute(Definitions.scala:407)
 at scala.reflect.internal.Definitions$DefinitionsClass.RepeatedParamClass(Definitions.scala:407)
 at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses$lzycompute(Definitions.scala:1154)
 at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses(Definitions.scala:1152)
 at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode$lzycompute(Definitions.scala:1196)
 at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode(Definitions.scala:1196)
 at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1261)
 at scala.tools.nsc.Global$Run.<init>(Global.scala:1290)
 at xsbt.CachedCompiler0$$anon$2.<init>(CompilerInterface.scala:116)
 at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
 at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)
 at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
 at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
 at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
 at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:29)
 at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
 at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:65)
 at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:23)
 at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)

评论操作 固定链接

Invalidated caches, tried nightly build - still nothing works.

0
评论操作 固定链接

Is there any recommended way of actually getting this plugin to work ?

0
评论操作 固定链接

Hi,

Please attach build.log (Help -> Show log in explorer).

As a temporary workaround you can turn off compile server (Settings -> Languages & Frameworks -> Scala Compile Server).

1
评论操作 固定链接

Thanks, already have the compile server off with no difference, attched is the log.



Attachment(s):
idea.log.zip
0
评论操作 固定链接

There is a folder build.log under log directory. It should be more helpful in your case.

0
评论操作 固定链接

added build.log, thanks



Attachment(s):
build.log.zip
0
评论操作 固定链接

It seems that the SDK of your project does not contain java libraries. You can check it in Project Settings -> SDKs.
Try to replace it by a new one.

0
评论操作 固定链接

which sdk the java or scala one ?

I was expecting the project to work as it did under 13 with maven and pulling out the version of scala to use from the pom.

0
评论操作 固定链接

Java sdk. Does it contain rt.jar?

0
评论操作 固定链接

yes just the standard oracle sdk

/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home

0
评论操作 固定链接

Thanks, that has helped.

I remove the JDK from intellij and added it back in.

It now compiles and runs scala code.

Not sure what corruption the upgrade to 14 from 13 caused.

I still have the invalid syntax highlighting that others have reported.
Will try invalid the cache a few times.

0
评论操作 固定链接

That worked and now the syntax highlighting is working as well.

Thanks for the help.
Graham

0
评论操作 固定链接

I've got a similar error with IDEA 2021.2.2:

Error:scalac: error while loading Object, Missing dependency 'object scala in compiler mirror', required by <jdk>/jre/lib/rt.jar(java/lang/Object.class)

I've resolved it by aligning the version of JDK in project settings and Scala server, and manually adding lib `scala-sdk` to the `Libraries` list in the `Project Settings` in IDEA.

0

请先登录再写评论。