- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
当我尝试在 Eclipse 中编译我的 Scala 项目时,出现以下错误(最后是堆栈跟踪)。它说断言在 Java 类 TransportConf 上失败(在 Java 构建路径中指定的项目 spark-network-common 中)。我检查了目标文件夹,TransportConf.class 存在
问题的可能原因,因为它之前工作正常:
我做过的事情:- 将 spark-network-common 编译级别更新为 1.6,因为不知何故编译级别设置为 1.4,我收到了 Java 泛型错误。
eclipse.buildId=3.0.3-20140327-1716-Typesafe
java.version=1.8.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -keyring /Users/rajivabraham/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -keyring /Users/rajivabraham/.eclipse_keyring -showlocation
Error
Thu Nov 27 07:52:19 EST 2014
Error in Scala compiler
java.lang.AssertionError: assertion failed: TransportConf
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1212)
at scala.reflect.internal.Symbols$Symbol.baseTypeSeqLength$1(Symbols.scala:1628)
at scala.reflect.internal.Symbols$Symbol.isLess(Symbols.scala:1631)
at scala.reflect.internal.Types$Type.baseTypeIndex(Types.scala:992)
at scala.reflect.internal.Types$CompoundType.baseType(Types.scala:1655)
at scala.reflect.internal.Types$ClassTypeRef$class.baseType(Types.scala:2186)
at scala.reflect.internal.Types$TypeRef$$anon$6.baseType(Types.scala:2544)
at scala.reflect.internal.Types$class.firstTry$1(Types.scala:6043)
at scala.reflect.internal.Types$class.isSubType2(Types.scala:6207)
at scala.reflect.internal.Types$class.isSubType(Types.scala:5816)
at scala.reflect.internal.SymbolTable.isSubType(SymbolTable.scala:13)
at scala.reflect.internal.Types$Type.$less$colon$less(Types.scala:872)
at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1160)
at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1102)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5660)
at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:3042)
at scala.tools.nsc.typechecker.Typers$Typer.loop$1(Typers.scala:3069)
at scala.tools.nsc.typechecker.Typers$Typer.typedArgs(Typers.scala:3074)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$handleMonomorphicCall$1(Typers.scala:3354)
at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3398)
at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4627)
at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4659)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5564)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5642)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5721)
at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:5808)
at scala.tools.nsc.typechecker.Namers$Namer.assignTypeToTree(Namers.scala:834)
at scala.tools.nsc.typechecker.Namers$Namer.valDefSig(Namers.scala:1315)
at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1457)
at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1466)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:731)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:730)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:730)
at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1499)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:730)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:729)
at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1614)
at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1622)
at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1612)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1231)
at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1374)
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$32.apply(Typers.scala:1917)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$32.apply(Typers.scala:1917)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1856)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1853)
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:1917)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1759)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5583)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5642)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2928)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3032)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3032)
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:3032)
at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5301)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5587)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5642)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5704)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:99)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:464)
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: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:123)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:99)
at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:99)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:99)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:99)
at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:166)
at sbt.compiler.AggressiveCompile$$anonfun$3.compileScala$1(AggressiveCompile.scala:98)
at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:143)
at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:87)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:39)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:37)
at sbt.inc.IncrementalCommon.cycle(Incremental.scala:99)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:38)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:37)
at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:65)
at sbt.inc.Incremental$.compile(Incremental.scala:37)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:27)
at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:157)
at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:46)
at sbt.compiler.IC$.compile(IncrementalCompiler.scala:22)
at scala.tools.eclipse.buildmanager.sbtintegration.EclipseSbtBuildManager.runCompiler(EclipseSbtBuildManager.scala:133)
at scala.tools.eclipse.buildmanager.sbtintegration.EclipseSbtBuildManager.update(EclipseSbtBuildManager.scala:124)
at scala.tools.eclipse.buildmanager.sbtintegration.EclipseSbtBuildManager.build(EclipseSbtBuildManager.scala:178)
at scala.tools.eclipse.ScalaProject.build(ScalaProject.scala:666)
at scala.tools.eclipse.ScalaBuilder.build(ScalaBuilder.scala:119)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:514)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:423)
at org.eclipse.jdt.internal.ui.util.CoreUtility$BuildJob.run(CoreUtility.java:162)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
最佳答案
执行 mvn clean 修复了上述错误。我之前用 mvn 做过构建,然后也用过 sbt。
关于java - Scala 编译器错误 : java. lang.AssertionError:断言失败(即使在 Eclipse 中指定了项目依赖项),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27171702/
我在一个Spring Boot应用程序中有以下路线。并进行以下测试。第二个测试的目的是验证如果将消息“{}”发送到DIRECT:LOG终结点,它将超出To(Bean-validator://check
这是我的简单 test.py 脚本: import argparse parser = argparse.ArgumentParser('A long string that goes on and
我在Android Studio的另一台计算机上打开我的Kotlin项目,并在事件日志中遇到错误: AssertionError: Root package must be initialized R
我在redux (redux@3.7.2) 中使用combineReducer 方法时遇到错误。当我只使用一个 reducer 时,相同的代码将起作用。 Running code here 代码 co
我目前正在对我的 Controller 的一个方法进行单元测试。只是尝试测试该方法是否返回正确的字符串。 @RequestMapping(value = "/createTestscenario",
我收到错误: java.lang.AssertionError: expected: learning.java.advancedoop2.MyComplex but was: learning.ja
这个问题在这里已经有了答案: How can I check if two ArrayList differ, I don't care what's changed (6 个答案) 关闭 7 年前
我正在准备 OCP 7,我在其中一本证书书上遇到了这篇文章。 To discourage you from trying to substitute an assertion for an excep
我有一个 index.js 文件,它实现了一个 forEach 助手,如下所示: var images = [ { height: 10, width: 30 }, { height: 20,
作为实验,我 try catch 失败的断言。 try: assert 1==2 except Exception as e: print e 为什么没有显示? 最佳答案 >>> try: asser
我在 django 中创建了一个调用函数的命令。该函数执行 django orm 调用: def get_notes(): notes = Note.objects.filter(number
我有一个用户类和一个主题类。用户类可以创建一个主题,将一个主题添加到主题的字典中,并且应该能够返回主题的字典。我是 python 的新手,所以我在 python 逻辑/语法方面遇到了问题 class
我正在尝试创建一个基于用户身份验证限制结果的 View 。出于某种原因,列表切片总是导致 AssertionError Cannot filter a query once a slice has b
我正在使用带有注释处理器的内部 sun API (com.sun.tools.javac) 修改现有类。我能够使用以下代码生成 MethodDecl 并将其添加到 ClassDecl: JCTree.
这是原代码 //@author Brian Goetz and Tim Peierls @ThreadSafe public class SafePoint { @GuardedBy("thi
我能够访问 PasswordChangeSerializer 的 validate() 函数的 user_queryset,但是我仍然收到此错误: assert value is not None,
我正在尝试从破解编码面试中回答以下问题。下面的代码是 GitHub 上一个项目的一部分,here . Given a binary search tree, design an algorithm w
我正在使用 IBM Bluemix 为学校项目创建 Web 服务。 我设置了本地主机来运行我的代码,但是当我在 Windows 10 命令提示符中键入“npm start”时,我遇到了“assert.
将 tf.Dataset 传递到 tf.Keras 模型的 fit() 时,我收到 AssertionError方法。 我正在使用tensorflow==2.0.0。 我检查了我的数据集是否有效: #
我有一个异步回调,我为此编写了一个 junit 测试用例。我正在遵循 CountDownLatch 方法。如果回调失败,我必须使测试用例失败。这是我的代码 lock = new CountDo
我是一名优秀的程序员,十分优秀!