Attempting to run the tests in a Streaming project result in test runner failures and may show the following error stack trace:
java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor
at com.streambase.sb.unittest.ServerManagerFactory.getEmbeddedServer(ServerManagerFactory.java:109)
at com.example.sample_custom_java_function.TestCase.setupServer(TestCase.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.IProgressMonitor
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 20 more
Issue/Introduction
Streaming uses Maven Test functionality instead of JUnit from version 10.6 and later.
Resolution
From Streaming 10.x, EventFlow and LiveView projects are Maven projects and expect to use Maven functionality for build and test activity Instead of using Junit test launch, use "Maven test" in its place for new and migrated projects.
From the Project Explorer, right-click the project top level folder and choose: Run As > Maven test. The process and test results will be shown in the Console view.
The same tests may be run from the StreamBase Command Prompt or terminal window by doing: 1. change the current directory to be the project folder (the directory that contains the pom.xml file) 2. run: mvn test