"java.lang.NoSuchMethodError: scala.tools.nsc.Global.rangePos" when switching from scala 2.10 to 2.11

Using Intellij 13.1.4, and latest Scala plugin 0.41.2, when switching from Scala 2.10.2 to Scala 2.11.2 in my mixed java/scala project, I get the following when recompiling my project:

Error:scalac: Error: scala.tools.nsc.Global.rangePos(Lscala/reflect/internal/util/SourceFile;III)Lscala/reflect/internal/util/OffsetPosition;
java.lang.NoSuchMethodError: scala.tools.nsc.Global.rangePos(Lscala/reflect/internal/util/SourceFile;III)Lscala/reflect/internal/util/OffsetPosition;
 at com.typesafe.genjavadoc.Comments$class.$init$(Comments.scala:72)
 at com.typesafe.genjavadoc.GenJavaDocPlugin$MyComponent$GenJavaDocTransformer.<init>(Plugin.scala:48)
 at com.typesafe.genjavadoc.GenJavaDocPlugin$MyComponent$.newTransformer(Plugin.scala:46)
 at com.typesafe.genjavadoc.GenJavaDocPlugin$MyComponent$.newTransformer(Plugin.scala:34)
 at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
 at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:410)
 at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:377)
 at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:377)
 at scala.collection.Iterator$class.foreach(Iterator.scala:743)
 at scala.collection.AbstractIterator.foreach(Iterator.scala:1177)
 at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:377)
 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:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:483)
 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:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:483)
 at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)

Any ideas?

1 comment
Comment actions Permalink

I think the error was caused by using com.typesafe.genjavadoc plugin that still used Scala 2.10. Switching it to Scala 2.11 should work     

0

Please sign in to leave a comment.