Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.class file erroneously reported to be broken #1803

Closed
erikkaplun opened this issue Jan 13, 2015 · 7 comments
Closed

.class file erroneously reported to be broken #1803

erikkaplun opened this issue Jan 13, 2015 · 7 comments
Labels
needs info Needs more information to take further actions. Needs Reproduction Test Case uncategorized Used for Waffle integration

Comments

@erikkaplun
Copy link

If I rm the file and compile, it works fine, until the next compile.

Sometimes it emits a very long traceback, sometimes not, but the error message is the same.

If it's absolutely necessary, I can share the source code of the file under question. It's basically just ~30 or so definitions of type class instances of play-json's Format[T]/Reads[T]/Writes[T] + a few scalaz's Monoid[T] instances.

Short one:

[error] missing or invalid dependency detected while loading class file 'Mapping.class'.
[error] Could not access type $anon in value com.soda.profile.analysis.evidence.TwitterEvidence.twEvIO,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'Mapping.class' was compiled against an incompatible version of com.soda.profile.analysis.evidence.TwitterEvidence.twEvIO.
java.lang.ClassCastException
[error] error while loading Mapping, class file '/Users/erik/code/soda-profile/core/target/scala-2.11/classes/com/soda/profile/models/Mapping.class' is broken
[error] (class java.lang.RuntimeException/error reading Scala signature of Mapping.class: null)
[error] /Users/erik/code/soda-profile/core/src/main/scala/com/soda/profile/web/api/JobServlet.scala:180: No Json deserializer found for type com.soda.profile.models.JobTokens. Try to implement an implicit Reads or Format for this type.

Long one:

[error] missing or invalid dependency detected while loading class file 'Mapping.class'.
[error] Could not access type $anon in value com.soda.profile.analysis.evidence.TwitterEvidence.twEvIO,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'Mapping.class' was compiled against an incompatible version of com.soda.profile.analysis.evidence.TwitterEvidence.twEvIO.
java.lang.ClassCastException: scala.reflect.internal.Symbols$StubTermSymbol cannot be cast to scala.reflect.internal.Symbols$ClassSymbol
    at scala.reflect.internal.Symbols$Symbol.newLinkedModule(Symbols.scala:295)
    at scala.reflect.internal.pickling.UnPickler$Scan.readSymbol(UnPickler.scala:362)
    at scala.reflect.internal.pickling.UnPickler$Scan.run(UnPickler.scala:87)
    at scala.reflect.internal.pickling.UnPickler.unpickle(UnPickler.scala:38)
    at scala.tools.nsc.symtab.classfile.ClassfileParser.scala$tools$nsc$symtab$classfile$ClassfileParser$$parseAttribute$1(ClassfileParser.scala:832)
    at scala.tools.nsc.symtab.classfile.ClassfileParser.parseAttributes(ClassfileParser.scala:1008)
    at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:496)
    at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:133)
    at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply$mcV$sp(SymbolLoaders.scala:348)
    at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply(SymbolLoaders.scala:348)
    at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply(SymbolLoaders.scala:348)
    at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
    at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:348)
    at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:212)
    at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1483)
    at scala.reflect.internal.Types$TypeRef.thisInfo(Types.scala:2194)
    at scala.reflect.internal.Types$TypeRef.baseClasses(Types.scala:2199)
    at scala.reflect.internal.Types$class.computeBaseClasses(Types.scala:1439)
    at scala.reflect.internal.SymbolTable.computeBaseClasses(SymbolTable.scala:16)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$1.apply(Types.scala:1560)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$1.apply(Types.scala:1560)
    at scala.reflect.internal.Types$CompoundType.updateCache$1(Types.scala:1387)
    at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1396)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1560)
    at scala.reflect.internal.Types$class.define$1(Types.scala:1527)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1528)
    at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
    at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1370)
    at scala.reflect.internal.Types$TypeRef.baseClasses(Types.scala:2199)
    at scala.reflect.internal.Types$SimpleTypeProxy$class.baseClasses(Types.scala:165)
    at scala.reflect.internal.Types$SingletonType.baseClasses(Types.scala:1076)
    at scala.reflect.internal.tpe.FindMembers$FindMemberBase.<init>(FindMembers.scala:17)
    at scala.reflect.internal.tpe.FindMembers$FindMember.<init>(FindMembers.scala:219)
    at scala.reflect.internal.Types$Type.scala$reflect$internal$Types$Type$$findMemberInternal$1(Types.scala:1014)
    at scala.reflect.internal.Types$Type.findMember(Types.scala:1016)
    at scala.reflect.internal.Types$Type.memberBasedOnName(Types.scala:631)
    at scala.reflect.internal.Types$Type.nonLocalMember(Types.scala:622)
    at scala.tools.nsc.typechecker.Contexts$ImportInfo.importedSymbol(Contexts.scala:1438)
    at scala.tools.nsc.typechecker.Contexts$Context.importedAccessibleSymbol(Contexts.scala:956)
    at scala.tools.nsc.typechecker.Contexts$Context.lookupImport$1(Contexts.scala:1102)
    at scala.tools.nsc.typechecker.Contexts$Context.lookupSymbol(Contexts.scala:1123)
    at scala.tools.nsc.typechecker.Typers$Typer.typedIdent$2(Typers.scala:4844)
    at scala.tools.nsc.typechecker.Typers$Typer.typedIdentOrWildcard$1(Typers.scala:4882)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5317)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5337)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5373)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5400)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5347)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5351)
    at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5449)
    at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5455)
    at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:4787)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5321)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5337)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5373)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5400)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5347)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5351)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5440)
    at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:5531)
    at scala.tools.nsc.typechecker.Namers$Namer.assignTypeToTree(Namers.scala:879)
    at scala.tools.nsc.typechecker.Namers$Namer.valDefSig(Namers.scala:1381)
    at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1532)
    at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1541)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:781)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
    at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1568)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:780)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:772)
    at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1684)
    at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1692)
    at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1682)
    at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1483)
    at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1628)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4982)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5373)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5400)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5347)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5351)
    at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5429)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:3028)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3132)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3132)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3132)
    at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:2363)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5295)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5295)
    at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5294)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5330)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5337)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5373)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5400)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5347)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5351)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5440)
    at scala.tools.nsc.typechecker.Typers$Typer.typedIf$1(Typers.scala:4236)
    at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5296)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5330)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5337)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5373)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5400)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5347)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5351)
    at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5449)
    at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5455)
    at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:4787)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5321)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5337)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5373)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5400)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5347)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5351)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$95.apply(Typers.scala:4501)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$95.apply(Typers.scala:4501)
    at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:676)
    at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4500)
    at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4555)
    at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5320)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5337)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5373)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5400)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5347)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5351)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5440)
    at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:5531)
    at scala.tools.nsc.typechecker.Namers$Namer.assignTypeToTree(Namers.scala:879)
    at scala.tools.nsc.typechecker.Namers$Namer.methodSig(Namers.scala:1213)
    at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1529)
    at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1541)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:781)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
    at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1568)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:780)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:772)
    at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1684)
    at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1692)
    at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1682)
    at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1483)
    at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1628)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4982)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5373)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5400)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5347)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5351)
    at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5429)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:3028)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3132)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3132)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3132)
    at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1903)
    at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1744)
    at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5286)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5336)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5373)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5400)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5347)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5351)
    at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5429)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:3028)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3132)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3132)
    at scala.collection.immutable.List.loop$1(List.scala:173)
    at scala.collection.immutable.List.mapConserve(List.scala:189)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3132)
    at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:4989)
    at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5289)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5336)
    at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5373)
    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5400)
    at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5347)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5351)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5425)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:102)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:441)
    at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:432)
    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:441)
    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:750)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1202)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1500)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1487)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:1482)
    at scala.tools.nsc.Global$Run.compile(Global.scala:1580)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
    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:101)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
    at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:97)
    at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:97)
    at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:97)
    at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:162)
    at sbt.compiler.AggressiveCompile$$anonfun$3.compileScala$1(AggressiveCompile.scala:96)
    at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:139)
    at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:86)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:38)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:36)
    at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:31)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:39)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:38)
    at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:66)
    at sbt.inc.Incremental$.compile(Incremental.scala:38)
    at sbt.inc.IncrementalCompile$.apply(Compile.scala:26)
    at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:153)
    at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:70)
    at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:45)
    at sbt.Compiler$.apply(Compiler.scala:74)
    at sbt.Compiler$.apply(Compiler.scala:65)
    at sbt.Defaults$.sbt$Defaults$$compileTaskImpl(Defaults.scala:777)
    at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:769)
    at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:769)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
[error] error while loading Mapping, class file '/Users/erik/code/soda-profile/core/target/scala-2.11/classes/com/soda/profile/models/Mapping.class' is broken
[error] (class java.lang.RuntimeException/error reading Scala signature of Mapping.class: scala.reflect.internal.Symbols$StubTermSymbol cannot be cast to scala.reflect.internal.Symbols$ClassSymbol)
@erikkaplun
Copy link
Author

Loading the Queries object which extends the above problematic Mapping trait from sbt console yields the following. I'm posting it here since the error message is the same so it's probably relevant.

All in all, is this a SBT bug or a Scala/scalac one?

java.lang.ClassCastException: scala.reflect.internal.Symbols$StubTermSymbol cannot be cast to scala.reflect.internal.Symbols$ClassSymbol
    at scala.reflect.internal.Symbols$Symbol.newLinkedModule(Symbols.scala:295)
    at scala.reflect.internal.pickling.UnPickler$Scan.readSymbol(UnPickler.scala:362)
    at scala.reflect.internal.pickling.UnPickler$Scan.run(UnPickler.scala:87)
...

full stack trace: http://pastebin.com/raw.php?i=R0J2wwsD

@jsuereth
Copy link
Member

Looks like scalac's classfile parser, by the stack trace. sbt could still have somethign to do with it, but I'd check to see if it's reproducable sans-sbt

@eed3si9n eed3si9n added needs info Needs more information to take further actions. Needs Reproduction Test Case labels Feb 23, 2015
@eed3si9n
Copy link
Member

@eallik Any update on this? Were you able to reproduce the issue without using sbt?

@disaacson
Copy link

I'm getting the same issue. Error:
java.lang.ClassCastException: scala.reflect.internal.Symbols$NoSymbol cannot be cast to scala.reflect.internal.Symbols$ClassSymbol

@weiwanning
Copy link

Any updates on this? I got the same error

@eed3si9n
Copy link
Member

eed3si9n commented Jun 3, 2017

If anyone could offer reproducible test case that would move this issue forward.

@eed3si9n eed3si9n added the uncategorized Used for Waffle integration label Sep 18, 2018
@eed3si9n
Copy link
Member

I am closing this due to inactivity, but if this is still relevant let us know with more details (reproduction steps etc).

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs info Needs more information to take further actions. Needs Reproduction Test Case uncategorized Used for Waffle integration
Projects
None yet
Development

No branches or pull requests

5 participants