java.lang.NoClassDefFoundError: scala/reflect/api/Symbols$SymbolApi

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

A few things cause this exception:
1) Check if you have all jars and if they're in the correct path.
2) Your classpath might be broken, you can define it in the command line with java -cp yourClassPath or at your IDE if you're using one.

,

you can change your scala version to 2.11.11

Solutions on the web

via GitHub by TimothyKlim
, 1 year ago
scala/reflect/api/Symbols$SymbolApi
java.lang.ClassNotFoundException: scala.reflect.api.Symbols$SymbolApi
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at scala.meta.internal.tokens.package$.XtensionTokenName(package.scala:7)
at scala.meta.internal.parsers.ScalametaParser.syntaxErrorExpected(ScalametaParser.scala:416)
at scala.meta.internal.parsers.ScalametaParser.name(ScalametaParser.scala:1188)
at scala.meta.internal.parsers.ScalametaParser.termName(ScalametaParser.scala:1190)
at scala.meta.internal.parsers.ScalametaParser.path(ScalametaParser.scala:1226)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$simpleType$1.apply(ScalametaParser.scala:973)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$simpleType$1.apply(ScalametaParser.scala:969)
at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.simpleType(ScalametaParser.scala:969)
at scala.meta.internal.parsers.ScalametaParser$outPattern$.simpleType(ScalametaParser.scala:2478)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.annotType(ScalametaParser.scala:957)
at scala.meta.internal.parsers.ScalametaParser$outPattern$.annotType(ScalametaParser.scala:2478)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.compoundType(ScalametaParser.scala:1007)
at scala.meta.internal.parsers.ScalametaParser$outPattern$.compoundType(ScalametaParser.scala:2478)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.infixType(ScalametaParser.scala:1063)
at scala.meta.internal.parsers.ScalametaParser$outPattern$.infixType(ScalametaParser.scala:2478)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:938)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:935)
at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.typ(ScalametaParser.scala:935)
at scala.meta.internal.parsers.ScalametaParser$outPattern$.typ(ScalametaParser.scala:2478)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:941)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$$anonfun$typ$1.apply(ScalametaParser.scala:935)
at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
at scala.meta.internal.parsers.ScalametaParser$PatternContextSensitive$class.typ(ScalametaParser.scala:935)
at scala.meta.internal.parsers.ScalametaParser$outPattern$.typ(ScalametaParser.scala:2478)
at scala.meta.internal.parsers.ScalametaParser.typ(ScalametaParser.scala:2498)
at scala.meta.internal.parsers.ScalametaParser.typeOrInfixType(ScalametaParser.scala:1458)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1.apply(ScalametaParser.scala:1622)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$expr$1.apply(ScalametaParser.scala:1522)
at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
at scala.meta.internal.parsers.ScalametaParser.expr(ScalametaParser.scala:1522)
at scala.meta.internal.parsers.ScalametaParser.expr(ScalametaParser.scala:1499)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$funDefRest$1.apply(ScalametaParser.scala:2997)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$funDefRest$1.apply(ScalametaParser.scala:2969)
at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
at scala.meta.internal.parsers.ScalametaParser.funDefRest(ScalametaParser.scala:2969)
at scala.meta.internal.parsers.ScalametaParser.funDefOrDclOrSecondaryCtor(ScalametaParser.scala:2965)
at scala.meta.internal.parsers.ScalametaParser.defOrDclOrSecondaryCtor(ScalametaParser.scala:2909)
at scala.meta.internal.parsers.ScalametaParser.nonLocalDefOrDcl(ScalametaParser.scala:2883)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3474)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateStat$1.applyOrElse(ScalametaParser.scala:3470)
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
at scala.meta.internal.parsers.ScalametaParser.templateStats(ScalametaParser.scala:3469)
at scala.meta.internal.parsers.ScalametaParser.templateStatSeq(ScalametaParser.scala:3456)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$templateBody$1.apply(ScalametaParser.scala:3353)
at scala.meta.internal.parsers.ScalametaParser.inBraces(ScalametaParser.scala:338)
at scala.meta.internal.parsers.ScalametaParser.templateBody(ScalametaParser.scala:3353)
at scala.meta.internal.parsers.ScalametaParser.templateBodyOpt(ScalametaParser.scala:3358)
at scala.meta.internal.parsers.ScalametaParser.templateOpt(ScalametaParser.scala:3342)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$objectDef$1.apply(ScalametaParser.scala:3099)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$objectDef$1.apply(ScalametaParser.scala:3097)
at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
at scala.meta.internal.parsers.ScalametaParser.objectDef(ScalametaParser.scala:3097)
at scala.meta.internal.parsers.ScalametaParser.tmplDef(ScalametaParser.scala:3047)
at scala.meta.internal.parsers.ScalametaParser.topLevelTmplDef(ScalametaParser.scala:3027)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$topStat$1.applyOrElse(ScalametaParser.scala:3416)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$topStat$1.applyOrElse(ScalametaParser.scala:3406)
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
at scala.meta.internal.parsers.ScalametaParser.statSeq(ScalametaParser.scala:3388)
at scala.meta.internal.parsers.ScalametaParser.topStatSeq(ScalametaParser.scala:3405)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.scala$meta$internal$parsers$ScalametaParser$$anonfun$$bracelessPackageStats$1(ScalametaParser.scala:3633)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1$$anonfun$apply$87.apply(ScalametaParser.scala:3639)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1$$anonfun$apply$87.apply(ScalametaParser.scala:3639)
at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.apply(ScalametaParser.scala:3639)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$batchSource$1.apply(ScalametaParser.scala:3611)
at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
at scala.meta.internal.parsers.ScalametaParser.batchSource(ScalametaParser.scala:3611)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$source$1.apply(ScalametaParser.scala:3596)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$source$1.apply(ScalametaParser.scala:3595)
at scala.meta.internal.parsers.ScalametaParser.atPos(ScalametaParser.scala:394)
at scala.meta.internal.parsers.ScalametaParser.autoPos(ScalametaParser.scala:400)
at scala.meta.internal.parsers.ScalametaParser.source(ScalametaParser.scala:3594)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$parseSource$1.apply(ScalametaParser.scala:157)
at scala.meta.internal.parsers.ScalametaParser$$anonfun$parseSource$1.apply(ScalametaParser.scala:157)
at scala.meta.internal.parsers.ScalametaParser.parseRule(ScalametaParser.scala:46)
at scala.meta.internal.parsers.ScalametaParser.parseSource(ScalametaParser.scala:157)
at scala.meta.parsers.Parse$$anonfun$parseSource$1.apply(Parse.scala:31)
at scala.meta.parsers.Parse$$anonfun$parseSource$1.apply(Parse.scala:31)
at scala.meta.internal.parsers.ScalametaParser$$anon$201.apply(ScalametaParser.scala:3651)
at scala.meta.parsers.Api$XtensionParseDialectInput.parse(Api.scala:21)
at scala.meta.parsers.Api$XtensionParseInputLike.parse(Api.scala:10)
at org.scalafmt.Scalafmt$.format(Scalafmt.scala:51)
at org.scalafmt.cli.Cli$$anonfun$run$1.apply(Cli.scala:218)
at org.scalafmt.cli.Cli$$anonfun$run$1.apply(Cli.scala:209)
at scala.collection.parallel.mutable.ParArray$ParArrayIterator.foreach_quick(ParArray.scala:143)
at scala.collection.parallel.mutable.ParArray$ParArrayIterator.foreach(ParArray.scala:136)
at scala.collection.parallel.ParIterableLike$Foreach.leaf(ParIterableLike.scala:972)
at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply$mcV$sp(Tasks.scala:49)
at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48)
at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48)
at scala.collection.parallel.Task$class.tryLeaf(Tasks.scala:51)
at scala.collection.parallel.ParIterableLike$Foreach.tryLeaf(ParIterableLike.scala:969)
at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.internal(Tasks.scala:159)
at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.internal(Tasks.scala:443)
at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.compute(Tasks.scala:149)
at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:443)
at scala.concurrent.forkjoin.RecursiveAction.exec(RecursiveAction.java:160)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Users with the same issue

2 times, 13 hours ago
2 times, 20 hours ago
29 times, 1 day ago
Once, 1 day ago
Once, 1 day ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.