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 is broken (Vaadin) #7439

Closed
scabug opened this issue Apr 30, 2013 · 8 comments
Closed

Class file is broken (Vaadin) #7439

scabug opened this issue Apr 30, 2013 · 8 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Apr 30, 2013

I am trying to compile Vaadin 7.0.5 using Scala 2.10.1.

Vaadin dependency is

"com.vaadin" % "vaadin-server" % "7.0.5"

I get the following error

[error] error while loading VaadinRequest, class file '/Users/nestor/.ivy2/cache/com.vaadin/vaadin-server/jars/vaadin-server-7.0.5.jar(com/vaadin/server/VaadinRequest.class)' is broken [error] (class java.lang.NullPointerException/)

@scabug
Copy link
Author

@scabug scabug commented Apr 30, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7439?orig=1
Reporter: John Nestor (nestorpersist)
Affected Versions: 2.10.1
Other Milestones: 2.11.0-M4

@scabug
Copy link
Author

@scabug scabug commented Apr 30, 2013

@paulp said:
I'll offer you the same deal I offered the other guy:

https://issues.scala-lang.org/browse/SI-2464

I already fixed it, all you have to do is come up with a test.

@scabug
Copy link
Author

@scabug scabug commented May 1, 2013

@retronym said:
Here's the steps to reproduce with Vaadin. The root problem is a missing dependency on the servlet API.

~/code/scratch2 tail build.sbt test.scala
==> build.sbt <==
scalaVersion := "2.10.1"

scalacOptions += "-Ydebug"

libraryDependencies += "com.vaadin" % "vaadin-server" % "7.0.5"

//libraryDependencies += "javax.servlet" % "servlet-api" % "2.5"

==> test.scala <==
object Test {
  val x = classOf[com.vaadin.server.VaadinRequest]
}
~/code/scratch2 sbt ';clean;compile'
Detected sbt version 0.12.1
Using /Users/jason/.sbt/0.12.1 as sbt dir, -sbt-dir to override.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
[info] Loading global plugins from /Users/jason/.sbt/0.12.1/plugins
[info] Set current project to default-ba9bdc (in build file:/Users/jason/code/scratch2/)
[success] Total time: 0 s, completed May 1, 2013 8:57:13 AM
[info] Updating {file:/Users/jason/code/scratch2/}default-ba9bdc...
[info] Resolving org.jsoup#jsoup;1.6.3 ...
[info] Done updating.
[info] Compiling 1 Scala source to /Users/jason/code/scratch2/target/scala-2.10/classes...
[info] [running phase parser on test.scala]
[info] [running phase namer on test.scala]
[info] [running phase packageobjects on test.scala]
[info] [running phase typer on test.scala]
[warn] Class javax.servlet.http.Cookie not found - continuing with a stub.
java.lang.NullPointerException
	at scala.reflect.internal.Symbols$Symbol.isMonomorphicType(Symbols.scala:712)
	at scala.reflect.internal.Symbols$Symbol.unsafeTypeParams(Symbols.scala:1467)
	at scala.reflect.internal.Symbols$TypeSymbol.tpe(Symbols.scala:2768)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:757)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:768)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:792)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.scala$tools$nsc$symtab$classfile$ClassfileParser$$sigToType(ClassfileParser.scala:838)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$ConstantPool.getType(ClassfileParser.scala:334)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parseMethod(ClassfileParser.scala:644)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.scala$tools$nsc$symtab$classfile$ClassfileParser$$queueLoad$1(ClassfileParser.scala:565)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parseClass$1.apply$mcV$sp(ClassfileParser.scala:575)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:580)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:94)
	at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:254)
	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:187)
	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.load(SymbolLoaders.scala:203)
	at scala.tools.nsc.typechecker.Typers$Typer.isStale(Typers.scala:548)
	at scala.tools.nsc.typechecker.Typers$Typer.reallyExists(Typers.scala:539)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedSelect$1(Typers.scala:4814)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:4938)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5551)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5630)
	at scala.tools.nsc.typechecker.Typers$Typer.typedType(Typers.scala:5749)
	at scala.tools.nsc.typechecker.Typers$Typer.typedHigherKindedType(Typers.scala:5756)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$115.apply(Typers.scala:5456)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$115.apply(Typers.scala:5456)
	at scala.reflect.internal.Types$class.map2Conserve(Types.scala:6396)
	at scala.reflect.internal.SymbolTable.map2Conserve(SymbolTable.scala:13)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTypeApply$1(Typers.scala:5454)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5560)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5630)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5704)
	at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:5788)
	at scala.tools.nsc.typechecker.Namers$Namer.assignTypeToTree(Namers.scala:828)
	at scala.tools.nsc.typechecker.Namers$Namer.valDefSig(Namers.scala:1309)
	at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1450)
	at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1459)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:725)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:724)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:724)
	at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1492)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:724)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:723)
	at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1607)
	at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1615)
	at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1605)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1229)
	at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1365)
	at scala.tools.nsc.typechecker.MethodSynthesis$MethodSynth$class.addDerivedTrees(MethodSynthesis.scala:225)
	at scala.tools.nsc.typechecker.Namers$Namer.addDerivedTrees(Namers.scala:55)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$33.apply(Typers.scala:1912)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$33.apply(Typers.scala:1912)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1851)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1848)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.immutable.List.foreach(List.scala:318)
	at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
	at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1912)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1794)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5572)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5630)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2921)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3025)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3025)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3025)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5288)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5575)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5630)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5687)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:99)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:463)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:91)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:91)
	at scala.collection.Iterator$class.foreach(Iterator.scala:727)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:91)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1582)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1556)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1552)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1661)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:90)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:72)
	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:487)
	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:73)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:35)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:29)
	at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:71)
	at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
	at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
	at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:101)
	at sbt.compiler.AggressiveCompile$$anonfun$4.compileScala$1(AggressiveCompile.scala:70)
	at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:88)
	at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:60)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:24)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:22)
	at sbt.inc.Incremental$.cycle(Incremental.scala:40)
	at sbt.inc.Incremental$.compile(Incremental.scala:25)
	at sbt.inc.IncrementalCompile$.apply(Compile.scala:20)
	at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:96)
	at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:44)
	at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:31)
	at sbt.Compiler$.apply(Compiler.scala:79)
	at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:572)
	at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:572)
	at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
	at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
	at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
	at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
	at sbt.std.Transform$$anon$5.work(System.scala:71)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
	at sbt.Execute.work(Execute.scala:238)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
	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:722)
java.io.IOException: class file '/Users/jason/.ivy2/cache/com.vaadin/vaadin-server/jars/vaadin-server-7.0.5.jar(com/vaadin/server/VaadinRequest.class)' is broken
(class java.lang.NullPointerException/)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.scala$tools$nsc$symtab$classfile$ClassfileParser$$handleError(ClassfileParser.scala:59)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$scala$tools$nsc$symtab$classfile$ClassfileParser$$parseErrorHandler$1.applyOrElse(ClassfileParser.scala:71)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$scala$tools$nsc$symtab$classfile$ClassfileParser$$parseErrorHandler$1.applyOrElse(ClassfileParser.scala:69)
	at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:94)
	at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:254)
	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:187)
	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.load(SymbolLoaders.scala:203)
	at scala.tools.nsc.typechecker.Typers$Typer.isStale(Typers.scala:548)
	at scala.tools.nsc.typechecker.Typers$Typer.reallyExists(Typers.scala:539)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedSelect$1(Typers.scala:4814)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:4938)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5551)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5630)
	at scala.tools.nsc.typechecker.Typers$Typer.typedType(Typers.scala:5749)
	at scala.tools.nsc.typechecker.Typers$Typer.typedHigherKindedType(Typers.scala:5756)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$115.apply(Typers.scala:5456)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$115.apply(Typers.scala:5456)
	at scala.reflect.internal.Types$class.map2Conserve(Types.scala:6396)
	at scala.reflect.internal.SymbolTable.map2Conserve(SymbolTable.scala:13)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTypeApply$1(Typers.scala:5454)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5560)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5630)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5704)
	at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:5788)
	at scala.tools.nsc.typechecker.Namers$Namer.assignTypeToTree(Namers.scala:828)
	at scala.tools.nsc.typechecker.Namers$Namer.valDefSig(Namers.scala:1309)
	at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1450)
	at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1459)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:725)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:724)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:724)
	at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1492)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:724)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:723)
	at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1607)
	at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1615)
	at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1605)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1229)
	at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1365)
	at scala.tools.nsc.typechecker.MethodSynthesis$MethodSynth$class.addDerivedTrees(MethodSynthesis.scala:225)
	at scala.tools.nsc.typechecker.Namers$Namer.addDerivedTrees(Namers.scala:55)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$33.apply(Typers.scala:1912)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$33.apply(Typers.scala:1912)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1851)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1848)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.immutable.List.foreach(List.scala:318)
	at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
	at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1912)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1794)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5572)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5630)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2921)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3025)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3025)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3025)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5288)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5575)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5630)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5687)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:99)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:463)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:91)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:91)
	at scala.collection.Iterator$class.foreach(Iterator.scala:727)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:91)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1582)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1556)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1552)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1661)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:90)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:72)
	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:487)
	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:73)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:35)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:29)
	at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:71)
	at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
	at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
	at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:101)
	at sbt.compiler.AggressiveCompile$$anonfun$4.compileScala$1(AggressiveCompile.scala:70)
	at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:88)
	at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:60)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:24)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:22)
	at sbt.inc.Incremental$.cycle(Incremental.scala:40)
	at sbt.inc.Incremental$.compile(Incremental.scala:25)
	at sbt.inc.IncrementalCompile$.apply(Compile.scala:20)
	at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:96)
	at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:44)
	at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:31)
	at sbt.Compiler$.apply(Compiler.scala:79)
	at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:572)
	at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:572)
	at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
	at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
	at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
	at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
	at sbt.std.Transform$$anon$5.work(System.scala:71)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
	at sbt.Execute.work(Execute.scala:238)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
	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:722)
[error] error while loading VaadinRequest, class file '/Users/jason/.ivy2/cache/com.vaadin/vaadin-server/jars/vaadin-server-7.0.5.jar(com/vaadin/server/VaadinRequest.class)' is broken
[error] (class java.lang.NullPointerException/)
[warn] one warning found
[error] one error found
[error] (compile:compile) Compilation failed
[error] Total time: 3 s, completed May 1, 2013 8:57:16 AM
~/code/scratch2 tail build.sbt test.scala
==> build.sbt <==
scalaVersion := "2.10.1"

scalacOptions += "-Ydebug"

libraryDependencies += "com.vaadin" % "vaadin-server" % "7.0.5"

libraryDependencies += "javax.servlet" % "servlet-api" % "2.5"

==> test.scala <==
object Test {
  val x = classOf[com.vaadin.server.VaadinRequest]
}
~/code/scratch2 sbt ';clean;compile'
Detected sbt version 0.12.1
Using /Users/jason/.sbt/0.12.1 as sbt dir, -sbt-dir to override.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
[info] Loading global plugins from /Users/jason/.sbt/0.12.1/plugins
[info] Set current project to default-ba9bdc (in build file:/Users/jason/code/scratch2/)
[success] Total time: 0 s, completed May 1, 2013 8:57:27 AM
[info] Updating {file:/Users/jason/code/scratch2/}default-ba9bdc...
[info] Resolving javax.servlet#servlet-api;2.5 ...
[info] Done updating.
[info] Compiling 1 Scala source to /Users/jason/code/scratch2/target/scala-2.10/classes...
[info] [running phase parser on test.scala]
[info] [running phase namer on test.scala]
[info] [running phase packageobjects on test.scala]
[info] [running phase typer on test.scala]
[info] [running phase patmat on test.scala]
[info] [running phase superaccessors on test.scala]
[info] [running phase extmethods on test.scala]
[info] [running phase pickler on test.scala]
[info] [running phase refchecks on test.scala]
[info] [running phase uncurry on test.scala]
[info] [running phase tailcalls on test.scala]
[info] [running phase specialize on test.scala]
[info] [running phase explicitouter on test.scala]
[info] [running phase erasure on test.scala]
[info] [running phase posterasure on test.scala]
[info] [running phase lazyvals on test.scala]
[info] [running phase lambdalift on test.scala]
[info] [running phase constructors on test.scala]
[info] [running phase flatten on test.scala]
[info] [running phase mixin on test.scala]
[info] [running phase cleanup on test.scala]
[info] [running phase icode on test.scala]
[info] [running phase inliner on test.scala]
[info] [running phase inlineExceptionHandlers on test.scala]
[info] [running phase closelim on test.scala]
[info] [running phase dce on test.scala]
[info] [running phase jvm on icode]
[success] Total time: 3 s, completed May 1, 2013 8:57:30 AM

@scabug
Copy link
Author

@scabug scabug commented May 1, 2013

@retronym said (edited on May 1, 2013 7:15:17 AM UTC):
And in isolation:

% tail A.java B.java C.scala
==> A.java <==
public class A {

}
==> B.java <==
public class B {
	public void b(A[] a) {}
}
==> C.scala <==
class C {
  new B
}

% javac *.java

% scalac *.scala

% rm A.class

% scalac29 *.scala
error: error while loading B, Missing dependency 'class A', required by ./B.class
one error found

% RUNNER=scalac scala-hash v2.10.0-M3~41 *.scala
[info] downloading http://scala-webapps.epfl.ch/artifacts/8a285258fdb37af9f4ba8ced0a5c8fb6fefbf62c/pack.tgz ...done.
[info] scala revision from 2012-04-18 11:29:42 +0100 downloaded to /Users/jason/usr/scala-v2.10.0-M2-649-g8a28525
[info] v2.10.0-M3 => /Users/jason/usr/scala-v2.10.0-M2-649-g8a28525
warning: Class A not found - continuing with a stub.
one warning found

% RUNNER=scalac scala-hash v2.10.0-M3~40 *.scala
[info] downloading http://scala-webapps.epfl.ch/artifacts/016bc3db52d6f1ffa3ef2285d5801f82f5f49167/pack.tgz ...done.
[info] scala revision from 2012-04-18 14:59:22 +0100 downloaded to /Users/jason/usr/scala-v2.10.0-M2-650-g016bc3d
[info] v2.10.0-M3 => /Users/jason/usr/scala-v2.10.0-M2-650-g016bc3d
warning: Class A not found - continuing with a stub.
error: error while loading B, class file './B.class' is broken
(class java.lang.NullPointerException)
one warning found
one error found

% RUNNER=scalac scala-hash v2.10.1 *.scala
[info] v2.10.1 => /Users/jason/usr/scala-v2.10.1-0-g77b864e
warning: Class A not found - continuing with a stub.
error: error while loading B, class file './B.class' is broken
(class java.lang.NullPointerException/)
one warning found
one error found

The NPE crept in here: https://github.com/scala/scala/commit/v2.10.0-M3~40#L2L721

@scabug
Copy link
Author

@scabug scabug commented Jun 6, 2013

@scabug scabug closed this Jun 24, 2013
@scabug
Copy link
Author

@scabug scabug commented Jun 24, 2013

kenji yoshida said:
is this same issue?
https://gist.github.com/xuwei-k/5849572

@scabug
Copy link
Author

@scabug scabug commented Jun 28, 2013

Youlian Troyanov (youlian) said:
FYI

Latest Scala 2.11-SNAPSHOT as of today gives me "the stub" issue in compiling Scaladin.

[info] Compiling 1 Scala source to /home/test/repos/henrikerola/scaladin/demo/target/scala-2.11/classes...
[warn] Class javax.servlet.http.Cookie not found - continuing with a stub.
[warn] Class javax.servlet.http.Cookie not found - continuing with a stub.
[warn] there were 6 feature warning(s); re-run with -feature for details
[warn] three warnings found

I would like the combo Vaadin+Scala to have a future.

@scabug
Copy link
Author

@scabug scabug commented Jun 28, 2013

@retronym said:
That warning is the best we can do, really. To avoid it altogether, add the servlet-api to your compilation classpath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants