This is observed while trying to use Spark codebase using the 4.0.0-RC4. Spark current codebase uses scala 2.10.4 along with macro-paradise facility using paradise_2.10.4-2.0.1.jar which may be the problem as I see failure in the method org.scalamacros.paradise.Plugin.<init>(Plugin.scala:25) in the stacktrace. This crash happens repeatedly filling up "Error Log" window, which is probably expected. With this error, the current version of the IDE is not quite usable for the Spark codebase.
The PC should not load any compiler plugins when it's in compatibility mode (but they should be loaded when building).
----------
Scala IDE version:
4.0.0.rc4-2_11-201412101700-027320c
Scala compiler version:
2.11.4.
Scala library version:
2.11.4.
Eclipse version:
4.3.2.v20140221-1700
Class loader store: 1 entries
Compiler v. 2.10.4.(/Users/pdas/eclipse/plugins/org.scala-ide.scala210.jars_4.0.0.201412101658/target/jars/scala-compiler.jar)
The PC should not load any compiler plugins when it's in compatibility mode (but they should be loaded when building).
----------
Scala IDE version:
4.0.0.rc4-2_11-201412101700-027320c
Scala compiler version:
2.11.4.
Scala library version:
2.11.4.
Eclipse version:
4.3.2.v20140221-1700
Class loader store: 1 entries
Compiler v. 2.10.4.(/Users/pdas/eclipse/plugins/org.scala-ide.scala210.jars_4.0.0.201412101658/target/jars/scala-compiler.jar)
2014-12-11 13:42:47,350 ERROR [main] - org.scala-ide.sdt.core - org.scala-ide.sdt.core - org.scala-ide.sdt.core - 0 - Error thrown while initializing the presentation compiler.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at scala.tools.nsc.plugins.Plugin$.instantiate(Plugin.scala:190)
at scala.tools.nsc.plugins.Plugins$$anonfun$loadRoughPluginsList$2.apply(Plugins.scala:47)
at scala.tools.nsc.plugins.Plugins$$anonfun$loadRoughPluginsList$2.apply(Plugins.scala:47)
at scala.collection.immutable.List.map(List.scala:276)
at scala.tools.nsc.plugins.Plugins$class.loadRoughPluginsList(Plugins.scala:47)
at scala.tools.nsc.Global.loadRoughPluginsList(Global.scala:39)
at scala.tools.nsc.plugins.Plugins$class.roughPluginsList(Plugins.scala:50)
at scala.tools.nsc.Global.roughPluginsList$lzycompute(Global.scala:39)
at scala.tools.nsc.Global.roughPluginsList(Global.scala:39)
at scala.tools.nsc.plugins.Plugins$class.loadPlugins(Plugins.scala:86)
at scala.tools.nsc.Global.loadPlugins(Global.scala:39)
at scala.tools.nsc.plugins.Plugins$class.plugins(Plugins.scala:102)
at scala.tools.nsc.Global.plugins$lzycompute(Global.scala:39)
at scala.tools.nsc.Global.plugins(Global.scala:39)
at scala.tools.nsc.plugins.Plugins$class.computePluginPhases(Plugins.scala:113)
at scala.tools.nsc.Global.computePluginPhases(Global.scala:39)
at scala.tools.nsc.Global.computePhaseDescriptors(Global.scala:738)
at scala.tools.nsc.Global.phaseDescriptors$lzycompute(Global.scala:743)
at scala.tools.nsc.Global.phaseDescriptors(Global.scala:743)
at scala.tools.nsc.Global$Run.<init>(Global.scala:1075)
at scala.tools.nsc.interactive.Global$TyperRun.<init>(Global.scala:1197)
at scala.tools.nsc.interactive.Global.newTyperRun(Global.scala:1220)
at scala.tools.nsc.interactive.Global.<init>(Global.scala:286)
at org.scalaide.core.internal.compiler.ScalaPresentationCompiler.<init>(ScalaPresentationCompiler.scala:71)
at org.scalaide.core.internal.compiler.PresentationCompilerProxy.liftedTree1$1(PresentationCompilerProxy.scala:158)
at org.scalaide.core.internal.compiler.PresentationCompilerProxy.create(PresentationCompilerProxy.scala:157)
at org.scalaide.core.internal.compiler.PresentationCompilerProxy.initialize(PresentationCompilerProxy.scala:122)
at org.scalaide.core.internal.compiler.PresentationCompilerProxy.obtainPc$1(PresentationCompilerProxy.scala:84)
at org.scalaide.core.internal.compiler.PresentationCompilerProxy.internal(PresentationCompilerProxy.scala:104)
at org.scalaide.core.internal.jdt.model.ScalaCompilationUnit$class.buildStructure(ScalaCompilationUnit.scala:116)
at org.scalaide.core.internal.jdt.model.ScalaSourceFile.buildStructure(ScalaSourceFile.scala:73)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:259)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:552)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:289)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:275)
at org.scalaide.core.internal.jdt.model.LazyToplevelClass.mirror$lzycompute(ScalaElements.scala:314)
at org.scalaide.core.internal.jdt.model.LazyToplevelClass.mirror(ScalaElements.scala:312)
at org.scalaide.core.internal.jdt.model.LazyToplevelClass.exists(ScalaElements.scala:326)
at scala.tools.eclipse.contribution.weaving.jdt.core.NameLookupAspect.ajc$around$scala_tools_eclipse_contribution_weaving_jdt_core_NameLookupAspect$1$1c7010b1(NameLookupAspect.aj:85)
at org.eclipse.jdt.internal.core.NameLookup.seekTypesInSourcePackage(NameLookup.java:1095)
at org.eclipse.jdt.internal.core.NameLookup.seekTypes(NameLookup.java:1009)
at org.eclipse.jdt.internal.core.NameLookup.findType(NameLookup.java:798)
at org.eclipse.jdt.internal.core.NameLookup.findType(NameLookup.java:663)
at org.eclipse.jdt.internal.core.NameLookup.findType(NameLookup.java:622)
at org.eclipse.jdt.internal.core.SearchableEnvironment.find(SearchableEnvironment.java:103)
at org.eclipse.jdt.internal.core.SearchableEnvironment.findType(SearchableEnvironment.java:294)
at org.eclipse.jdt.internal.core.CancelableNameEnvironment.findType(CancelableNameEnvironment.java:45)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:157)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:201)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:438)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:492)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInImports(CompilationUnitScope.java:373)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:417)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1197)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:689)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1183)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:809)
at org.eclipse.jdt.internal.junit.launcher.JUnit4TestFinder.internalIsTest(JUnit4TestFinder.java:229)
at org.eclipse.jdt.internal.junit.launcher.JUnit4TestFinder.isTest(JUnit4TestFinder.java:197)
at org.eclipse.jdt.internal.junit.util.CoreTestSearchEngine.isTestOrTestSuite(CoreTestSearchEngine.java:57)
at org.eclipse.jdt.internal.junit.JUnitPropertyTester.isJUnitTest(JUnitPropertyTester.java:119)
at org.eclipse.jdt.internal.junit.JUnitPropertyTester.canLaunchAsJUnitTest(JUnitPropertyTester.java:87)
at org.eclipse.jdt.internal.junit.JUnitPropertyTester.test(JUnitPropertyTester.java:71)
at org.eclipse.core.internal.expressions.Property.test(Property.java:58)
at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:99)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
at org.eclipse.core.internal.expressions.AdaptExpression.evaluate(AdaptExpression.java:106)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
at org.eclipse.core.internal.expressions.IterateExpression.evaluate(IterateExpression.java:150)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
at org.eclipse.core.internal.expressions.WithExpression.evaluate(WithExpression.java:72)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
at org.eclipse.core.internal.expressions.EnablementExpression.evaluate(EnablementExpression.java:53)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.evalEnablementExpression(LaunchShortcutExtension.java:287)
at org.eclipse.debug.ui.actions.LaunchShortcutsAction.isApplicable(LaunchShortcutsAction.java:262)
at org.eclipse.debug.ui.actions.LaunchShortcutsAction.fillMenu(LaunchShortcutsAction.java:166)
at org.eclipse.debug.ui.actions.LaunchShortcutsAction.access$0(LaunchShortcutsAction.java:157)
at org.eclipse.debug.ui.actions.LaunchShortcutsAction$2.menuShown(LaunchShortcutsAction.java:278)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:255)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4166)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1489)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1470)
at org.eclipse.swt.widgets.Menu.menuWillOpen(Menu.java:806)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5610)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:4918)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5296)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:94)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
Caused by: java.lang.NoClassDefFoundError: scala/tools/nsc/typechecker/Modes
at org.scalamacros.paradise.Plugin.<init>(Plugin.scala:25)
... 117 more
Caused by: java.lang.ClassNotFoundException: scala.tools.nsc.typechecker.Modes
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 118 more
Leave a comment
It works very well for me if you set the "Scala Installation" to 2.10, simply select all projects, right-click and choose Scala/Set Scala Installation. Indeed, by default it tries to go with Scala 2.11 and issues many erorrs in the log, but once the Scala installation is correctly set everything went back to normal (editing + building work for me).
I'm closing this as "Won't fix", though it's a valid concern. Let me know if you still have troubles using it.
I'm closing this as "Won't fix", though it's a valid concern. Let me know if you still have troubles using it.
on 2014-12-12 22:52 *
By pcdas186871
Based on your comment, I tried again with Typesafe's scala-SDK-4.0.0-rc4-2.11-macosx.cocoa.x86_64.zip installation in a completely new workspace. I did make all spark projects to use scala-2.10 installation using your approach. I did that earlier also but did that individually for each project (Thanks for the shortcut). The result is same. I'm attaching scala-ide.log file of this new installation. Have you tried building spark-sql, spark-catalyst project? I think the problem shows up with those projects. spark-catalyst uses scalamacros. This new workspace has no other projects other Spark projects.
You are right, 2.10 projects that have a compiler plugin are failing the presentation compiler. The build succeeds, though.
I'll change the ticket description to clarify the underlying issue.
I'll change the ticket description to clarify the underlying issue.
on 2014-12-15 12:44 *
By Iulian Dragos
Summary changed from Presentation compiler crash during initialization to Presentation compiler crash for 2.10 projects with compiler plugins
Description changed from This is observed while tryi... to This is observed while tryi...
on 2014-12-15 12:45 *
By Iulian Dragos
Description changed from This is observed while tryi... to This is observed while tryi...
on 2015-05-05 20:07 *
By Iulian Dragos
Assigned to set to Iulian Dragos
Status changed from Accepted to Fixed
Check compiler plugins for version conflicts and cleanup
PC options in case of incompatibilities.
Compiler plugins (like macro-paradise) are cross-compiled with
the full Scala version, and they are not binary compatible across
minor versions. We acknowledge that and check it properly in the
classpath validator.
Compiler plugins can’t be instantiated in the PC unless the
project Scala version (Installation) is exactly the same as
the platform (the one Eclipse is running). This commit fixes PC
crashes due to such incompatibilities.
Re #1002226
Fix #1002358
Fix #1002186
Branch: master
Commit: scala-ide:56b056f83e
PC options in case of incompatibilities.
Compiler plugins (like macro-paradise) are cross-compiled with
the full Scala version, and they are not binary compatible across
minor versions. We acknowledge that and check it properly in the
classpath validator.
Compiler plugins can’t be instantiated in the PC unless the
project Scala version (Installation) is exactly the same as
the platform (the one Eclipse is running). This commit fixes PC
crashes due to such incompatibilities.
Re #1002226
Fix #1002358
Fix #1002186
Branch: master
Commit: scala-ide:56b056f83e
No file chosen
You have an empty file field. Please select or remove it.
Name | Size | ||
---|---|---|---|
scala-ide.log | 1.12 MB | Added by pcdas186871 on 2014-12-12 - Upload new version |