Can't start a JUnit test in debug mode

33 views
Skip to first unread message

Arnaud

unread,
Jun 17, 2016, 6:02:03 AM6/17/16
to Scala IDE User
hi

I have a strange error. I can start a JUnit test in normal mode but not in debug mode.
I use "Scala JUnit 4" launcher.

java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;
at org.scalaide.core.internal.launching.ClasspathGetterForLaunchDelegate$$anonfun$1.apply(ClasspathGetterForLaunchDelegate.scala:28)
at scala.collection.generic.GenericTraversableTemplate$$anonfun$flatten$1.apply(GenericTraversableTemplate.scala:172)
at scala.collection.generic.GenericTraversableTemplate$$anonfun$flatten$1.apply(GenericTraversableTemplate.scala:171)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at scala.collection.MapLike$DefaultValuesIterable.foreach(MapLike.scala:206)
at scala.collection.generic.GenericTraversableTemplate$class.flatten(GenericTraversableTemplate.scala:171)
at scala.collection.AbstractTraversable.flatten(Traversable.scala:104)
at org.scalaide.core.internal.launching.ClasspathGetterForLaunchDelegate$class.toInclude(ClasspathGetterForLaunchDelegate.scala:28)
at org.scalaide.core.internal.launching.ClasspathGetterForLaunchDelegate$class.scalaClasspath(ClasspathGetterForLaunchDelegate.scala:23)
at org.scalaide.core.internal.launching.ClasspathGetterForLaunchDelegate$class.getClasspath(ClasspathGetterForLaunchDelegate.scala:16)
at org.scalaide.debug.internal.launching.ScalaJUnitLaunchConfigurationDelegate.getClasspath(ScalaJUnitLaunchConfigurationDelegate.scala:7)
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.launch(JUnitLaunchConfigurationDelegate.java:147)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Any idea?
thanks
Arnaud

wpopie...@virtuslab.com

unread,
Jun 17, 2016, 8:29:42 AM6/17/16
to Scala IDE User
Could you look at launch configuration and share it with me? Looks like some value of it is list of strings and just string is requested.
W.

Arnaud

unread,
Jun 22, 2016, 12:30:50 PM6/22/16
to Scala IDE User
I can't reproduce the bug anymore! I don't know why....
My test has @RunWith(classOf[Parameterized]), not sure if it's related.

Simon Schäfer

unread,
Jun 22, 2016, 12:46:46 PM6/22/16
to scala-ide-user



---- On Wed, 22 Jun 2016 18:30:49 +0200 Arnaud <ama...@gmail.com>wrote ----

I can't reproduce the bug anymore! I don't know why....

Good for us, then we don't have to fix anything. Just by looking at our code I don't even know how that class cast exception can happen in the first place. I hope you don't have to see it again.

--
You received this message because you are subscribed to the Google Groups "Scala IDE User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages