ClassNotFoundException when trying to use quasiquotes and Paradise plugin

92 views
Skip to first unread message

Zoop

unread,
Apr 7, 2015, 2:19:44 AM4/7/15
to scala-i...@googlegroups.com
Hi,

I'm trying to use the Paradise compiler plugin to use quasiquotes in my project.  I get the following error from Scala IDE:

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    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:273)
    at scala.tools.nsc.plugins.Plugins$class.loadRoughPluginsList(Plugins.scala:47)
    at scala.tools.nsc.Global.loadRoughPluginsList(Global.scala:40)
    at scala.tools.nsc.plugins.Plugins$class.roughPluginsList(Plugins.scala:50)
    at scala.tools.nsc.Global.roughPluginsList$lzycompute(Global.scala:40)
    at scala.tools.nsc.Global.roughPluginsList(Global.scala:40)
    at scala.tools.nsc.plugins.Plugins$class.loadPlugins(Plugins.scala:86)
    at scala.tools.nsc.Global.loadPlugins(Global.scala:40)
    at scala.tools.nsc.plugins.Plugins$class.plugins(Plugins.scala:102)
    at scala.tools.nsc.Global.plugins$lzycompute(Global.scala:40)
    at scala.tools.nsc.Global.plugins(Global.scala:40)
    at scala.tools.nsc.plugins.Plugins$class.computePluginPhases(Plugins.scala:113)
    at scala.tools.nsc.Global.computePluginPhases(Global.scala:40)
    at scala.tools.nsc.Global.computePhaseDescriptors(Global.scala:751)
    at scala.tools.nsc.Global.phaseDescriptors$lzycompute(Global.scala:756)
    at scala.tools.nsc.Global.phaseDescriptors(Global.scala:756)
    at scala.tools.nsc.Global$Run.<init>(Global.scala:1238)
    at scala.tools.nsc.interactive.Global$TyperRun.<init>(Global.scala:1207)
    at scala.tools.nsc.interactive.Global.newTyperRun(Global.scala:1230)
    at scala.tools.nsc.interactive.Global.<init>(Global.scala:297)
    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.compiler.PresentationCompilerProxy.apply(PresentationCompilerProxy.scala:62)
    at org.scalaide.core.compiler.InteractiveCompilationUnit$class.withSourceFile(InteractiveCompilationUnit.scala:202)
    at org.scalaide.core.internal.jdt.model.ScalaSourceFile.withSourceFile(ScalaSourceFile.scala:73)
    at org.scala.tools.eclipse.search.indexing.OccurrenceCollector$.findOccurrences(OccurrenceCollector.scala:39)
    at org.scala.tools.eclipse.search.indexing.SourceIndexer$$anonfun$indexScalaFile$2.apply(SourceIndexer.scala:116)
    at org.scala.tools.eclipse.search.indexing.SourceIndexer$$anonfun$indexScalaFile$2.apply(SourceIndexer.scala:115)
    at scala.util.Success.flatMap(Try.scala:230)
    at org.scala.tools.eclipse.search.indexing.SourceIndexer.indexScalaFile(SourceIndexer.scala:115)
    at org.scala.tools.eclipse.search.indexing.SourceIndexer$$anonfun$indexIFile$2.apply(SourceIndexer.scala:87)
    at org.scala.tools.eclipse.search.indexing.SourceIndexer$$anonfun$indexIFile$2.apply(SourceIndexer.scala:87)
    at scala.Option.fold(Option.scala:158)
    at org.scala.tools.eclipse.search.indexing.SourceIndexer.indexIFile(SourceIndexer.scala:86)
    at org.scala.tools.eclipse.search.jobs.ProjectIndexJob.run(ProjectIndexJob.scala:99)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.NoClassDefFoundError: scala/tools/nsc/typechecker/Variances
    at org.scalamacros.paradise.Plugin.<init>(Plugin.scala:25)
    ... 47 more
Caused by: java.lang.ClassNotFoundException: scala.tools.nsc.typechecker.Variances
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 48 more

These are my Eclipse details:

eclipse.buildId=4.4.2.M20150204-1700
java.version=1.7.0_60
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product

I'm using Scala IDE 4.0.0.v-2_11-2015


iulian dragos

unread,
Apr 8, 2015, 5:06:30 AM4/8/15
to scala-i...@googlegroups.com
Your project is on 2.10, right? I think at this point there is no workaround (compiler plugins aren't supported in 2.10 mode... though it should not crash, that's a bug)

--
You received this message because you are subscribed to the Google Groups "Scala IDE User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-user/e0676b2c-d368-4ad2-8df8-42af992bf76f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

iulian dragos

unread,
Apr 10, 2015, 4:51:49 AM4/10/15
to scala-i...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages