0

Im new to java and Scala. I have downloaded IntelliJ 13.1 and Im trying to run this project (Goose text extractor) as is: https://github.com/GravityLabs/goose

Im using JDK 1.7.0_67 with these project structure settings:

enter image description here When Im trying to run the file TalkToMeGoose.scala Im getting this error:

Error:scalac: Error: class scala.deprecatedInheritance in compiler mirror not found. scala.reflect.internal.MissingRequirementError: class scala.deprecatedInheritance in compiler mirror not found.

at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17)
at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18)

at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53)

at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66)

at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:102)

at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:105)

at scala.reflect.internal.Mirrors$RootsBase.requiredClass(Mirrors.scala:108)

at scala.reflect.internal.Definitions$DefinitionsClass.DeprecatedInheritanceAttr$lzycompute(Definitions.scala:1101)

at scala.reflect.internal.Definitions$DefinitionsClass.DeprecatedInheritanceAttr(Definitions.scala:1101)

at scala.reflect.internal.Symbols$Symbol.hasDeprecatedInheritanceAnnotation(Symbols.scala:842)

at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$validateParentClass$1(Typers.scala:1675)

at scala.tools.nsc.typechecker.Typers$Typer.validateParentClasses(Typers.scala:1706)

at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1864)

at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1738)

at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5206)

at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5256)

at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5293)

at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5320)

at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5267)

at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5271)

at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5349)

at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2985)

at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3089)

at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3089)

at scala.collection.immutable.List.loop$1(List.scala:172)

at scala.collection.immutable.List.mapConserve(List.scala:188)

at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3089)

at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:4916)

at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5209)

at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5256)

at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5293)

at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5320)

at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5267)

at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5271)

at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5345)

at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:102)

at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:410)

at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:94)

at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:93)

at scala.collection.Iterator$class.foreach(Iterator.scala:743)

at scala.collection.AbstractIterator.foreach(Iterator.scala:1177)

at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)

at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1557)

at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1542)

at scala.tools.nsc.Global$Run.compileSources(Global.scala:1537)

at scala.tools.nsc.Global$Run.compile(Global.scala:1644)

at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)

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:28)

at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)

at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:64)

at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:22)

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)

couldn't find anything relevant on Google...

11
  • Can you attach screenshot of Scala facet settings (Project Structure -> Facets)? Commented Sep 8, 2014 at 10:47
  • I just tried to download Goose and run it from Intellig and I faced no problems. So it should come from your conf. Does your Intellij provide consistent highlighting ? Commented Sep 8, 2014 at 10:53
  • @om-nom-nom - attached a screenshot. Commented Sep 8, 2014 at 11:19
  • @gzou - no consistent highlighting... Commented Sep 8, 2014 at 11:21
  • In the module view of project settings, try to change the scala compiler to Maven: org.scala-lang:scala-compiler:2.9.0-1. Indeed Goose seems to attach the scala compiler as a Maven dependency. Commented Sep 8, 2014 at 11:27

2 Answers 2

1

So to resume my comments:

The compiler library you should use is : Maven: org.scala-lang:scala-compiler-bundle:2.9.0-1

I don't know why it haven't been created when you opened the Goose project.

But you can create it yourself:

Open the library settings and spot where your system download the maven libraries by clicking eg on: Maven: org.scala-lang:scala-library:2.9.0-1.

Then click on New Project Library, and add to it both Maven: org.scala-lang:scala-library:2.9.0-1 and Maven: org.scala-lang:scala-compiler:2.9.0-1. The file selector has an option to display hidden directories, which can be useful.

Then go in the Module settings and change the Scala compiler to the library you just created. (It may take a few seconds before appearing in the list of libraries). It should work fine.

Sign up to request clarification or add additional context in comments.

Comments

0

I am able to compile goose with maven on the command line. It requires Scala 2.9.0. Please check the version of Scala compiler used by IDEA 13.1. If there are version differences, you can get such an error. Refer http://grokbase.com/t/gg/scala-ide-user/143ntm6n3p/switching-scala-library-version-to-match-project

1 Comment

Im also using 2.9.0 - attached a screenshot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.