David Bess
Posts: 2
Nickname: davidbess
Registered: Apr, 2017
|
|
Re: Quick Start Example Compilation Failure
|
Posted: Apr 4, 2017 1:17 PM
|
|
Update:
Changing the jar file to an older version addressed the compilation issue I was facing. The scalatest quick start webpage lead me to believe that using the most recent version was compatible with any version of scala 10+, but it seems like maybe that is not the case. Maybe I was misunderstanding. When I switched to an older jar, namely, scalatest_2.11-2.2.4.jar, compilation is successful. However, I am now facing a runtime error. I am again posting the console input and output below, any help would be greatly appreciated.
--------------------------------------------
C:\java8\project\scala-test> ;dir Volume in drive C is Windows Volume Serial Number is D2FA-96C8
Directory of C:\java8\project\scala-test
04/04/2017 01:15 PM <DIR> . 04/04/2017 01:15 PM <DIR> .. 04/04/2017 12:12 PM 522 ExampleSpec.scala 04/04/2017 12:12 PM 11,163,008 scalatest-app_2.11-3.0.1.jar 04/04/2017 01:07 PM 7,185,789 scalatest_2.11-2.2.4.jar 3 File(s) 18,349,319 bytes 2 Dir(s) 101,056,634,880 bytes free
C:\java8\project\scala-test>scalac -cp scalatest_2.11-2.2.4.jar ExampleSpec.scala
C:\java8\project\scala-test>dir Volume in drive C is Windows Volume Serial Number is D2FA-96C8
Directory of C:\java8\project\scala-test
04/04/2017 01:16 PM <DIR> . 04/04/2017 01:16 PM <DIR> .. 04/04/2017 01:16 PM 1,726 ExampleSpec$$anonfun$1.class 04/04/2017 01:16 PM 1,191 ExampleSpec$$anonfun$2$$anonfun$apply$mcV$sp$1.class 04/04/2017 01:16 PM 1,818 ExampleSpec$$anonfun$2.class 04/04/2017 01:16 PM 37,661 ExampleSpec.class 04/04/2017 12:12 PM 522 ExampleSpec.scala 04/04/2017 12:12 PM 11,163,008 scalatest-app_2.11-3.0.1.jar 04/04/2017 01:07 PM 7,185,789 scalatest_2.11-2.2.4.jar 7 File(s) 18,391,715 bytes 2 Dir(s) 101,057,646,592 bytes free
C:\java8\project\scala-test>scala -cp scalatest_2.11-2.2.4.jar org.scalatest.run ExampleSpec An exception or error caused a run to abort. This may have been caused by a problematic custom reporter. java.lang.NoSuchMethodError: scala.runtime.ObjectRef.create(Ljava/lang/Object;)Lscala/runtime/ObjectRef; at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:2347) at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(R unner.scala:1044) at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(R unner.scala:1043) at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:272 2) at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1043 ) at org.scalatest.tools.Runner$.main(Runner.scala:860) at org.scalatest.run$.main(run.scala:120) at org.scalatest.run.main(run.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:43) at java.lang.reflect.Method.invoke(Method.java:498) at scala.tools.nsc.util.ScalaClassLoader$$anonfun$run$1.apply(ScalaClassLoader.sca la:71) at scala.tools.nsc.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:31 ) at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader .scala:139) at scala.tools.nsc.util.ScalaClassLoader$class.run(ScalaClassLoader.scala:71) at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala :139) at scala.tools.nsc.CommonRunner$class.run(ObjectRunner.scala:28) at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:45) at scala.tools.nsc.CommonRunner$class.runAndCatch(ObjectRunner.scala:35) at scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:45) at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:74) at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:96) at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:105) at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
|
|