java.util.NoSuchElementException-during tests

20 views
Skip to first unread message

Justin Dallas

unread,
Aug 13, 2025, 6:55:13 AMAug 13
to Kogito development mailing list
Hello Folks,

I'm working with the traffic test demo floating around on the internet.  When using VSCode, I get 

java.util.NoSuchElementException (traffic_test)

When running my tests.  Sometimes I'll fiddle with it and the tests  will run, but most of the time it crashes.

What could I be doing wrong?

Here is the code that I'm working with: https://github.com/justindallasdev/Light-Rain

Sincerely,
  J. Dallas

Alex Porcelli

unread,
Aug 19, 2025, 3:04:41 PMAug 19
to kogito-de...@googlegroups.com
I just tried your example... and I faced no issue. However I made a
few adjustments:

renamed: src/main/java/com/myspace/traffic_violation/resources/com/myspace/traffic_violation/traffic_violation.dmn
-> src/main/resources/traffic_violation.dmn
renamed: src/test/java/com/myspace/traffic_violation/traffic_test.scesim
-> src/test/resources/traffic_test.scesim

deleted all target

Make sure you also have the latest Apache KIE extensions.

-
Alex
> --
> You received this message because you are subscribed to the Google Groups "Kogito development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kogito-developm...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/kogito-development/69cfc5cf-dad6-4218-ac9f-c0530f3cd7d9n%40googlegroups.com.

Justin Dallas

unread,
Aug 19, 2025, 10:35:11 PMAug 19
to Kogito development mailing list
Thanks Alex!  I don't know if it was my setup, or something else.  I managed to get it to run by changing my testing code use a different runner.

//@TestScenarioActivator
@org.junit.runner.RunWith(org.kogito.scenariosimulation.runner.KogitoJunitActivator.class)
public class KogitoScenarioJunitActivatorTest  {
}

Thanks for your response.

Yeser Amer

unread,
Aug 23, 2025, 1:00:40 PMAug 23
to kogito-de...@googlegroups.com
Hi Justin,

`@TestScenarioActivator`annotation and related feature is still not part of the 10.1.0 release, but will be part of 10.2.0. 

Yeser Amer

Partner Engineer

IBM | Red Hat



Reply all
Reply to author
Forward
0 new messages