{"action":"created","issue":{"url":"https://api.github.com/repos/scalameter/scalameter/issues/93","labels_url":"https://api.github.com/repos/scalameter/scalameter/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/scalameter/scalameter/issues/93/comments","events_url":"https://api.github.com/repos/scalameter/scalameter/issues/93/events","html_url":"https://github.com/scalameter/scalameter/issues/93","id":53315978,"number":93,"title":"ClassCastException","user":{"login":"ayedo","id":4739734,"avatar_url":"https://avatars.githubusercontent.com/u/4739734?v=3","gravatar_id":"","url":"https://api.github.com/users/ayedo","html_url":"https://github.com/ayedo","followers_url":"https://api.github.com/users/ayedo/followers","following_url":"https://api.github.com/users/ayedo/following{/other_user}","gists_url":"https://api.github.com/users/ayedo/gists{/gist_id}","starred_url":"https://api.github.com/users/ayedo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayedo/subscriptions","organizations_url":"https://api.github.com/users/ayedo/orgs","repos_url":"https://api.github.com/users/ayedo/repos","events_url":"https://api.github.com/users/ayedo/events{/privacy}","received_events_url":"https://api.github.com/users/ayedo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2015-01-03T21:30:26Z","updated_at":"2015-06-24T22:10:16Z","closed_at":null,"body":"Hi,\r\n\r\nFirst of all: thanks for your awesome work!\r\nI run a benchmark that gets stuck. When I abort it, the following is printed to the console:\r\n\r\n```Scala\r\nError running separate JVM: java.lang.ClassCastException: cannot assign instance of scala.collection.immutable.HashMap$SerializationProxy to field org.scalameter.Context.properties of type scala.collection.immutable.Map in instance of org.scalameter.Context\r\n```\r\nWhat could the source of the problem be?"},"comment":{"url":"https://api.github.com/repos/scalameter/scalameter/issues/comments/115025677","html_url":"https://github.com/scalameter/scalameter/issues/93#issuecomment-115025677","issue_url":"https://api.github.com/repos/scalameter/scalameter/issues/93","id":115025677,"user":{"login":"andrewdbate","id":2998569,"avatar_url":"https://avatars.githubusercontent.com/u/2998569?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewdbate","html_url":"https://github.com/andrewdbate","followers_url":"https://api.github.com/users/andrewdbate/followers","following_url":"https://api.github.com/users/andrewdbate/following{/other_user}","gists_url":"https://api.github.com/users/andrewdbate/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewdbate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewdbate/subscriptions","organizations_url":"https://api.github.com/users/andrewdbate/orgs","repos_url":"https://api.github.com/users/andrewdbate/repos","events_url":"https://api.github.com/users/andrewdbate/events{/privacy}","received_events_url":"https://api.github.com/users/andrewdbate/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T22:10:16Z","updated_at":"2015-06-24T22:10:16Z","body":"It doesn't seem to make any difference, although I did not try in cygwin, I tried in Command Prompt.\r\n\r\nI modified the path as you suggested. In particular, before making any changes to the configuration used for my previous comments I had that:\r\n```\r\n$ echo %PATH%\r\nC:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\sbt\\\\bin\r\n$ where java\r\nC:\\Windows\\System32\\java.exe\r\n```\r\nAnd then modifying the path:\r\n```\r\n$ echo %PATH%\r\nC:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\sbt\\\\bin;C:\\Program Files\\Java\\jdk1.7.0_21\\bin\r\n```\r\n\r\nIn both cases, the error was exactly the same:\r\n```\r\n> test\r\n[info] Running test set for Range.map, curve Test-0\r\n[info] Starting 36 measurements across 9 independent JVM runs.\r\n[info] Starting new JVM: java -server -verbose:gc -Xmx2048m -Xms2048m -XX:CompileThreshold=100 -cp /C:/Users/Andrew%20Bate/Downloads/scala-meter-issue\r\n-93/target/scala-2.11/test-classes/;/C:/Users/Andrew%20Bate/Downloads/scala-meter-issue-93/target/scala-2.11/classes;/C:/Users/Andrew%20Bate/.ivy2/cac\r\nhe/org.scala-lang/scala-library/jars/scala-library-2.11.6.jar;/C:/Users/Andrew%20Bate/.ivy2/cache/com.storm-enroute/scalameter_2.11/jars/scalameter_2.\r\n11-0.6.jar;/C:/Users/Andrew%20Bate/.ivy2/cache/com.storm-enroute/scalameter-core_2.11/jars/scalameter-core_2.11-0.6.jar;/C:/Users/Andrew%20Bate/.ivy2/\r\ncache/org.apache.commons/commons-math3/jars/commons-math3-3.2.jar;/C:/Users/Andrew%20Bate/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-\r\n2.11.0.jar;/C:/Users/Andrew%20Bate/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.1.jar;/C:/Users/Andrew%20Bate/.ivy2/ca\r\nche/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.1.jar;/C:/Users/Andrew%20Bate/.ivy2/cache/com.githu\r\nb.wookietreiber/scala-chart_2.11/jars/scala-chart_2.11-0.4.2.jar;/C:/Users/Andrew%20Bate/.ivy2/cache/org.jfree/jfreechart/jars/jfreechart-1.0.17.jar;/\r\nC:/Users/Andrew%20Bate/.ivy2/cache/org.jfree/jcommon/jars/jcommon-1.0.21.jar;/C:/Users/Andrew%20Bate/.ivy2/cache/xml-apis/xml-apis/jars/xml-apis-1.3.0\r\n4.jar;/C:/Users/Andrew%20Bate/.ivy2/cache/org.scala-lang.modules/scala-swing_2.11/bundles/scala-swing_2.11-1.0.1.jar;/C:/Users/Andrew%20Bate/.ivy2/cac\r\nhe/org.scala-tools.testing/test-interface/jars/test-interface-0.5.jar org.scalameter.execution.Main C:\\Users\\ANDREW~1\\AppData\\Local\\Temp\\newjvm-178524\r\n4181490853426-io\r\nError: Could not find or load main class org.scalameter.execution.Main\r\n[error] Error running separate JVM: java.lang.ClassCastException: cannot assign instance of scala.collection.immutable.HashMap$SerializationProxy to f\r\nield org.scalameter.Context.properties of type scala.collection.immutable.Map in instance of org.scalameter.Context\r\n[error] Classpath: C:\\Program Files (x86)\\sbt\\bin\\sbt-launch.jar\r\nTest threw exception: java.lang.ClassCastException: cannot assign instance of scala.collection.immutable.HashMap$SerializationProxy to field org.scala\r\nmeter.Context.properties of type scala.collection.immutable.Map in instance of org.scalameter.Context\r\njava.lang.ClassCastException: cannot assign instance of scala.collection.immutable.HashMap$SerializationProxy to field org.scalameter.Context.properti\r\nes of type scala.collection.immutable.Map in instance of org.scalameter.Context\r\n        at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(Unknown Source)\r\n        at java.io.ObjectStreamClass.setObjFieldValues(Unknown Source)\r\n        at java.io.ObjectInputStream.defaultReadFields(Unknown Source)\r\n        at java.io.ObjectInputStream.readSerialData(Unknown Source)\r\n        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)\r\n        at java.io.ObjectInputStream.readObject0(Unknown Source)\r\n        at java.io.ObjectInputStream.defaultReadFields(Unknown Source)\r\n        at java.io.ObjectInputStream.readSerialData(Unknown Source)\r\n        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)\r\n        at java.io.ObjectInputStream.readObject0(Unknown Source)\r\n        at java.io.ObjectInputStream.defaultReadFields(Unknown Source)\r\n        at java.io.ObjectInputStream.readSerialData(Unknown Source)\r\n        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)\r\n        at java.io.ObjectInputStream.readObject0(Unknown Source)\r\n        at java.io.ObjectInputStream.readObject(Unknown Source)\r\n        at org.scalameter.execution.JvmRunner.readOutput(JvmRunner.scala:45)\r\n        at org.scalameter.execution.JvmRunner.run(JvmRunner.scala:18)\r\n        at org.scalameter.execution.SeparateJvmsExecutor.sample$1(SeparateJvmsExecutor.scala:46)\r\n        at org.scalameter.execution.SeparateJvmsExecutor.org$scalameter$execution$SeparateJvmsExecutor$$sampleReport$1(SeparateJvmsExecutor.scala:81)\r\n        at org.scalameter.execution.SeparateJvmsExecutor$$anonfun$2.apply(SeparateJvmsExecutor.scala:95)\r\n        at org.scalameter.execution.SeparateJvmsExecutor$$anonfun$2.apply(SeparateJvmsExecutor.scala:93)\r\n        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)\r\n        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)\r\n        at scala.collection.Iterator$class.foreach(Iterator.scala:750)\r\n        at scala.collection.AbstractIterator.foreach(Iterator.scala:1202)\r\n        at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)\r\n        at scala.collection.AbstractIterable.foreach(Iterable.scala:54)\r\n        at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)\r\n        at scala.collection.AbstractTraversable.map(Traversable.scala:104)\r\n        at org.scalameter.execution.SeparateJvmsExecutor.runSetup(SeparateJvmsExecutor.scala:93)\r\n        at org.scalameter.Executor$$anonfun$run$1.apply(Executor.scala:15)\r\n        at org.scalameter.Executor$$anonfun$run$1.apply(Executor.scala:13)\r\n        at org.scalameter.utils.Tree$$anonfun$1.apply(Tree.scala:17)\r\n        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)\r\n        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)\r\n        at scala.collection.immutable.List.foreach(List.scala:381)\r\n        at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)\r\n        at scala.collection.immutable.List.map(List.scala:285)\r\n        at org.scalameter.utils.Tree.map(Tree.scala:17)\r\n        at org.scalameter.utils.Tree$$anonfun$2.apply(Tree.scala:18)\r\n        at org.scalameter.utils.Tree$$anonfun$2.apply(Tree.scala:18)\r\n        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)\r\n        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)\r\n        at scala.collection.immutable.List.foreach(List.scala:381)\r\n        at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)\r\n        at scala.collection.immutable.List.map(List.scala:285)\r\n        at org.scalameter.utils.Tree.map(Tree.scala:18)\r\n        at org.scalameter.utils.Tree$$anonfun$2.apply(Tree.scala:18)\r\n        at org.scalameter.utils.Tree$$anonfun$2.apply(Tree.scala:18)\r\n        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)\r\n        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)\r\n        at scala.collection.immutable.List.foreach(List.scala:381)\r\n        at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)\r\n        at scala.collection.immutable.List.map(List.scala:285)\r\n        at org.scalameter.utils.Tree.map(Tree.scala:18)\r\n        at org.scalameter.Executor$class.run(Executor.scala:13)\r\n        at org.scalameter.execution.SeparateJvmsExecutor.run(SeparateJvmsExecutor.scala:19)\r\n        at org.scalameter.PerformanceTest$Initialization$class.executeTests(PerformanceTest.scala:44)\r\n        at org.scalameter.PerformanceTest.executeTests(PerformanceTest.scala:10)\r\n        at org.scalameter.ScalaMeterFramework$$anon$1$$anonfun$run$1$$anonfun$apply$1$$anonfun$apply$2.apply(ScalaMeterFramework.scala:65)\r\n        at org.scalameter.ScalaMeterFramework$$anon$1$$anonfun$run$1$$anonfun$apply$1$$anonfun$apply$2.apply(ScalaMeterFramework.scala:56)\r\n        at org.scalameter.MonadicDynVar$$anon$1$$anonfun$foreach$1.apply(MonadicDynVar.scala:7)\r\n        at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)\r\n        at org.scalameter.MonadicDynVar$$anon$1.foreach(MonadicDynVar.scala:7)\r\n        at org.scalameter.ScalaMeterFramework$$anon$1$$anonfun$run$1$$anonfun$apply$1.apply(ScalaMeterFramework.scala:56)\r\n        at org.scalameter.ScalaMeterFramework$$anon$1$$anonfun$run$1$$anonfun$apply$1.apply(ScalaMeterFramework.scala:55)\r\n        at org.scalameter.MonadicDynVar$$anon$1$$anonfun$foreach$1.apply(MonadicDynVar.scala:7)\r\n        at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)\r\n        at org.scalameter.MonadicDynVar$$anon$1.foreach(MonadicDynVar.scala:7)\r\n        at org.scalameter.ScalaMeterFramework$$anon$1$$anonfun$run$1.apply(ScalaMeterFramework.scala:55)\r\n        at org.scalameter.ScalaMeterFramework$$anon$1$$anonfun$run$1.apply(ScalaMeterFramework.scala:54)\r\n        at org.scalameter.MonadicDynVar$$anon$1$$anonfun$foreach$1.apply(MonadicDynVar.scala:7)\r\n        at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)\r\n        at org.scalameter.MonadicDynVar$$anon$1.foreach(MonadicDynVar.scala:7)\r\n        at org.scalameter.ScalaMeterFramework$$anon$1.run(ScalaMeterFramework.scala:54)\r\n        at sbt.RunnerWrapper$1.runRunner2(FrameworkWrapper.java:223)\r\n        at sbt.RunnerWrapper$1.execute(FrameworkWrapper.java:236)\r\n        at sbt.TestRunner.runTest$1(TestFramework.scala:76)\r\n        at sbt.TestRunner.run(TestFramework.scala:85)\r\n        at sbt.TestFramework$$anon$2$$anonfun$$init$$1$$anonfun$apply$8.apply(TestFramework.scala:202)\r\n        at sbt.TestFramework$$anon$2$$anonfun$$init$$1$$anonfun$apply$8.apply(TestFramework.scala:202)\r\n        at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:185)\r\n        at sbt.TestFramework$$anon$2$$anonfun$$init$$1.apply(TestFramework.scala:202)\r\n        at sbt.TestFramework$$anon$2$$anonfun$$init$$1.apply(TestFramework.scala:202)\r\n        at sbt.TestFunction.apply(TestFramework.scala:207)\r\n        at sbt.Tests$.sbt$Tests$$processRunnable$1(Tests.scala:239)\r\n        at sbt.Tests$$anonfun$makeSerial$1.apply(Tests.scala:245)\r\n        at sbt.Tests$$anonfun$makeSerial$1.apply(Tests.scala:245)\r\n        at sbt.std.Transform$$anon$3$$anonfun$apply$2.apply(System.scala:44)\r\n        at sbt.std.Transform$$anon$3$$anonfun$apply$2.apply(System.scala:44)\r\n        at sbt.std.Transform$$anon$4.work(System.scala:63)\r\n        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)\r\n        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)\r\n        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)\r\n        at sbt.Execute.work(Execute.scala:235)\r\n        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)\r\n        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)\r\n        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)\r\n        at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)\r\n        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)\r\n        at java.util.concurrent.FutureTask.run(Unknown Source)\r\n        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)\r\n        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)\r\n        at java.util.concurrent.FutureTask.run(Unknown Source)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\r\n        at java.lang.Thread.run(Unknown Source)\r\n[trace] Stack trace suppressed: run last test:test for the full output.\r\n[error] Could not run test RangeBenchmark: java.lang.ClassCastException: cannot assign instance of scala.collection.immutable.HashMap$SerializationPro\r\nxy to field org.scalameter.Context.properties of type scala.collection.immutable.Map in instance of org.scalameter.Context\r\n[error] Error: Total 0, Failed 0, Errors 0, Passed 0\r\n[error] Error during tests:\r\n[error]         RangeBenchmark\r\n[error] (test:test) sbt.TestsFailedException: Tests unsuccessful\r\n[error] Total time: 1 s, completed Jun 24, 2015 10:58:51 PM\r\n```\r\n\r\nPerhaps the interesting line is:\r\n```\r\nError: Could not find or load main class org.scalameter.execution.Main\r\n```\r\n\r\nCould it be the case that the spawned JVM has its classpath messed up?"}}