Hi, can you check the scala version you use ? 2.10 or 2.11 ?
Thanks, Regards JB On 12/11/2015 05:47 PM, Haijia Zhou wrote:
Hi, 0down vote favorite <http://stackoverflow.com/questions/34226735/a-signature-in-metricssystem-class-refers-to-term-servlet#> ** I'm trying to register a custom Spark metrics source to Spark metrics system with following code: val source = new CustomMetricSource() SparkEnv.get.metricsSystem.registerSource(source) Then the code failed compiling with following error: Error:scalac: Error: bad symbolic reference. A signature in MetricsSystem.class refers to term servlet in value org.jetty which is not available. It may be completely missing from the current classpath, or the version on the classpath might be incompatible with the version used when compiling MetricsSystem.class. scala.reflect.internal.Types$TypeError: bad symbolic reference. A signature in MetricsSystem.class refers to term servlet in value org.jetty which is not available. It may be completely missing from the current classpath, or the version on the classpath might be incompatible with the version used when compiling MetricsSystem.class. at scala.reflect.internal.pickling.UnPickler$Scan.toTypeError(UnPickler.scala:847) at scala.reflect.internal.pickling.UnPickler$Scan$LazyTypeRef.complete(UnPickler.scala:854) at scala.reflect.internal.pickling.UnPickler$Scan$LazyTypeRef.load(UnPickler.scala:863) at scala.reflect.internal.Symbols$Symbol.typeParams(Symbols.scala:1489) at scala.tools.nsc.transform.SpecializeTypes$$anonfun$scala$tools$nsc$transform$SpecializeTypes$$normalizeMember$1.apply(SpecializeTypes.scala:798) at scala.tools.nsc.transform.SpecializeTypes$$anonfun$scala$tools$nsc$transform$SpecializeTypes$$normalizeMember$1.apply(SpecializeTypes.scala:798) at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:207) at scala.reflect.internal.SymbolTable.beforePhase(SymbolTable.scala:215) at scala.tools.nsc.transform.SpecializeTypes.scala$tools$nsc$transform$SpecializeTypes$$normalizeMember(SpecializeTypes.scala:797) at scala.tools.nsc.transform.SpecializeTypes$$anonfun$22.apply(SpecializeTypes.scala:751) at scala.tools.nsc.transform.SpecializeTypes$$anonfun$22.apply(SpecializeTypes.scala:749) 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.transform.SpecializeTypes.specializeClass(SpecializeTypes.scala:749) at scala.tools.nsc.transform.SpecializeTypes.transformInfo(SpecializeTypes.scala:1172) at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:38) at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1321) at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1241) at scala.reflect.internal.Symbols$Symbol.isDerivedValueClass(Symbols.scala:658) at scala.reflect.internal.Symbols$Symbol.isMethodWithExtension(Symbols.scala:661) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.preEraseNormalApply(Erasure.scala:1100) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.preEraseApply(Erasure.scala:1195) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.preErase(Erasure.scala:1205) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.transform(Erasure.scala:1280) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.transform(Erasure.scala:1030) at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1235) at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1233) at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:34) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:28) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:19) at scala.reflect.internal.Trees$class.itransform(Trees.scala:1232) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:48) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.transform(Erasure.scala:1288) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.transform(Erasure.scala:1030) at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2927) at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2925) at scala.collection.immutable.List.loop$1(List.scala:170) at scala.collection.immutable.List.mapConserve(List.scala:186) at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2925) at scala.reflect.internal.Trees$class.itransform(Trees.scala:1276) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:44) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:44) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:44) at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:34) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:44) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.transform(Erasure.scala:1292) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.transform(Erasure.scala:1030) at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2904) at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1280) at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1279) at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:34) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:28) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:19) at scala.reflect.internal.Trees$class.itransform(Trees.scala:1278) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:48) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.transform(Erasure.scala:1292) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.transform(Erasure.scala:1030) at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2927) at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2925) at scala.collection.immutable.List.loop$1(List.scala:170) at scala.collection.immutable.List.mapConserve(List.scala:186) at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2925) at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1298) at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1298) at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:34) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:28) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:19) at scala.reflect.internal.Trees$class.itransform(Trees.scala:1297) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13) at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:44) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:46) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:46) at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:34) at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:46) at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$1.transform(Erasure.scala:1292) at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:1302) at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:888) at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:227) at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30) at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:464) at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:431) at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:431) at scala.collection.Iterator$class.foreach(Iterator.scala:727) at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:431) at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1583) at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1557) at scala.tools.nsc.Global$Run.compileSources(Global.scala:1553) at scala.tools.nsc.Global$Run.compile(Global.scala:1662) at xsbt.CachedCompiler0.run(CompilerInterface.scala:115) at xsbt.CachedCompiler0.run(CompilerInterface.scala:94) at xsbt.CompilerInterface.run(CompilerInterface.scala:22) 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 org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:29) at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26) at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:67) at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:24) at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319) The IDE I'm using is Jetbrains IntelliJIDea 15 CE. I'm suspecting it's classpath issue but not sure how to further debug. Thanks Haijia
-- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org