Open vaisakhkannan opened 1 month ago
Terminal Logs :
[INFO] Rendering content with org.apache.maven.skins:maven-fluido-skin:jar:2.0.0-M9 skin
[ERROR] Failed to run unit tests
io.openliberty.tools.common.plugins.util.PluginExecutionException: Failed to run unit tests
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runUnitTests (DevMojo.java:1273)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:595)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:122)
at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867)
at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87)
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runUnitTests (DevMojo.java:1267)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:595)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution null of goal org.apache.maven.plugins:maven-surefire-report-plugin:3.5.0:report-only failed: Cannot invoke "Object.toString()" because "value" is null
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:133)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867)
at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87)
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runUnitTests (DevMojo.java:1267)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:595)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
Caused by: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "value" is null
at org.apache.maven.doxia.sink.impl.SinkUtils.getAttributeString (SinkUtils.java:188)
at org.apache.maven.doxia.sink.impl.AbstractXmlSink.writeStartTag (AbstractXmlSink.java:126)
at org.apache.maven.doxia.sink.impl.Xhtml5BaseSink.writeStartTag (Xhtml5BaseSink.java:1647)
at org.apache.maven.doxia.sink.impl.AbstractXmlSink.writeStartTag (AbstractXmlSink.java:95)
at org.apache.maven.doxia.sink.impl.Xhtml5BaseSink.anchor (Xhtml5BaseSink.java:1204)
at org.apache.maven.doxia.sink.impl.AbstractSink.anchor (AbstractSink.java:354)
at org.apache.maven.reporting.AbstractMavenReportRenderer.startSection (AbstractMavenReportRenderer.java:132)
at org.apache.maven.reporting.AbstractMavenReportRenderer.startSection (AbstractMavenReportRenderer.java:116)
at org.apache.maven.plugins.surefire.report.SurefireReportRenderer.renderSectionPackages (SurefireReportRenderer.java:220)
at org.apache.maven.plugins.surefire.report.SurefireReportRenderer.renderBody (SurefireReportRenderer.java:119)
at org.apache.maven.reporting.AbstractMavenReportRenderer.render (AbstractMavenReportRenderer.java:93)
at org.apache.maven.plugins.surefire.report.AbstractSurefireReport.executeReport (AbstractSurefireReport.java:159)
at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:354)
at org.apache.maven.reporting.AbstractMavenReport.reportToSite (AbstractMavenReport.java:262)
at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:208)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867)
at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87)
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runUnitTests (DevMojo.java:1267)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:595)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
[INFO] Waiting up to 30 seconds to find the application start up or update message...
[INFO] CWWKM2010I: Searching for (CWWKZ0001I:|CWWKZ0003I:) in /Users/vaisakht/Documents/DEVEX/intellij/testing/24.0.9-testing/new-release-driver/maven-first/app-maven-first/target/liberty/wlp/usr/servers/defaultServer/logs/messages.log. This search will timeout after 30 seconds.
[INFO] CWWKM2015I: Match number: 1 is [13/09/24, 17:50:55:657 IST] 0000002b com.ibm.ws.app.manager.AppMessageHelper A CWWKZ0001I: Application app-maven-first started in 0.821 seconds..
[INFO] Running integration tests...
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running PropertiesEndpointIT
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.017 s <<< FAILURE! -- in PropertiesEndpointIT
[ERROR] PropertiesEndpointIT.testGetProperties -- Time elapsed: 0.009 s <<< ERROR!
java.lang.RuntimeException: java.lang.ClassNotFoundException: Provider for jakarta.ws.rs.client.ClientBuilder cannot be found
at jakarta.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:77)
at jakarta.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:88)
at PropertiesEndpointIT.testGetProperties(PropertiesEndpointIT.java:21)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
Caused by: java.lang.ClassNotFoundException: Provider for jakarta.ws.rs.client.ClientBuilder cannot be found
at jakarta.ws.rs.client.FactoryFinder.find(FactoryFinder.java:168)
at jakarta.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:62)
... 72 more
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] PropertiesEndpointIT.testGetProperties:21 » Runtime java.lang.ClassNotFoundException: Provider for jakarta.ws.rs.client.ClientBuilder cannot be found
[INFO]
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] Rendering content with org.apache.maven.skins:maven-fluido-skin:jar:2.0.0-M9 skin
[ERROR] Failed to run integration tests
io.openliberty.tools.common.plugins.util.PluginExecutionException: Failed to run integration tests
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runIntegrationTests (DevMojo.java:1290)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:673)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:122)
at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867)
at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87)
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runIntegrationTests (DevMojo.java:1283)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:673)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution null of goal org.apache.maven.plugins:maven-surefire-report-plugin:3.5.0:failsafe-report-only failed: Cannot invoke "Object.toString()" because "value" is null
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:133)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867)
at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87)
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runIntegrationTests (DevMojo.java:1283)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:673)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
Caused by: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "value" is null
at org.apache.maven.doxia.sink.impl.SinkUtils.getAttributeString (SinkUtils.java:188)
at org.apache.maven.doxia.sink.impl.AbstractXmlSink.writeStartTag (AbstractXmlSink.java:126)
at org.apache.maven.doxia.sink.impl.Xhtml5BaseSink.writeStartTag (Xhtml5BaseSink.java:1647)
at org.apache.maven.doxia.sink.impl.AbstractXmlSink.writeStartTag (AbstractXmlSink.java:95)
at org.apache.maven.doxia.sink.impl.Xhtml5BaseSink.anchor (Xhtml5BaseSink.java:1204)
at org.apache.maven.doxia.sink.impl.AbstractSink.anchor (AbstractSink.java:354)
at org.apache.maven.reporting.AbstractMavenReportRenderer.startSection (AbstractMavenReportRenderer.java:132)
at org.apache.maven.reporting.AbstractMavenReportRenderer.startSection (AbstractMavenReportRenderer.java:116)
at org.apache.maven.plugins.surefire.report.SurefireReportRenderer.renderSectionPackages (SurefireReportRenderer.java:220)
at org.apache.maven.plugins.surefire.report.SurefireReportRenderer.renderBody (SurefireReportRenderer.java:119)
at org.apache.maven.reporting.AbstractMavenReportRenderer.render (AbstractMavenReportRenderer.java:93)
at org.apache.maven.plugins.surefire.report.AbstractSurefireReport.executeReport (AbstractSurefireReport.java:159)
at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:354)
at org.apache.maven.reporting.AbstractMavenReport.reportToSite (AbstractMavenReport.java:262)
at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:208)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867)
at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87)
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runIntegrationTests (DevMojo.java:1283)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:673)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
[INFO] To run tests on demand, press Enter.
NOTE : I found something interesting: I am able to run the tests and view the generated test report using the sample project in our repository https://github.com/OpenLiberty/liberty-tools-intellij/tree/main/src/test/resources/projects/maven/singleModMavenMP . I ran the UI test locally, and it was successful. Similarly, I checked the GHA builds, and they are also passing. However, the problem arises with the new project we generated in openliberty.io. I tested it with the same project that I ran on my previous Mac machine (where the .m2 folder wasn't cleared), and I'm encountering same failures on my new Mac machine as well.
Similar issue has been observed with Windows machine as well while testing for maven project , below is the error log
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.363 s <<< FAILURE! -- in PropertiesEndpointIT [ERROR] PropertiesEndpointIT.testGetProperties -- Time elapsed: 2.255 s <<< FAILURE! org.opentest4j.AssertionFailedError: Incorrect response code from http://localhost:9080/mavenapptwo ==> expected: <200> but was: <404> at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150) at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:563) at PropertiesEndpointIT.testGetProperties(PropertiesEndpointIT.java:42) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[INFO] [INFO] Results: [INFO] [ERROR] Failures: [ERROR] PropertiesEndpointIT.testGetProperties:42 Incorrect response code from http://localhost:9080/mavenapptwo ==> expected: <200> but was: <404> [INFO] [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 [INFO] [INFO] Rendering content with org.apache.maven.skins:maven-fluido-skin:jar:2.0.0-M9 skin [ERROR] Failed to run integration tests io.openliberty.tools.common.plugins.util.PluginExecutionException: Failed to run integration tests at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runIntegrationTests (DevMojo.java:1290) at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:673) at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635) at java.lang.Thread.run (Thread.java:842) Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:122) at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867) at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87) at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runIntegrationTests (DevMojo.java:1283) at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:673) at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635) at java.lang.Thread.run (Thread.java:842) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution null of goal org.apache.maven.plugins:maven-surefire-report-plugin:3.5.0:failsafe-report-only failed: Cannot invoke "Object.toString()" because "value" is null at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:133) at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120) at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867) at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87) at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runIntegrationTests (DevMojo.java:1283) at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:673) at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635) at java.lang.Thread.run (Thread.java:842) Caused by: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "value" is null at org.apache.maven.doxia.sink.impl.SinkUtils.getAttributeString (SinkUtils.java:188) at org.apache.maven.doxia.sink.impl.AbstractXmlSink.writeStartTag (AbstractXmlSink.java:126) at org.apache.maven.doxia.sink.impl.Xhtml5BaseSink.writeStartTag (Xhtml5BaseSink.java:1647) at org.apache.maven.doxia.sink.impl.AbstractXmlSink.writeStartTag (AbstractXmlSink.java:95) at org.apache.maven.doxia.sink.impl.Xhtml5BaseSink.anchor (Xhtml5BaseSink.java:1204) at org.apache.maven.doxia.sink.impl.AbstractSink.anchor (AbstractSink.java:354) at org.apache.maven.reporting.AbstractMavenReportRenderer.startSection (AbstractMavenReportRenderer.java:132) at org.apache.maven.reporting.AbstractMavenReportRenderer.startSection (AbstractMavenReportRenderer.java:116) at org.apache.maven.plugins.surefire.report.SurefireReportRenderer.renderSectionPackages (SurefireReportRenderer.java:220) at org.apache.maven.plugins.surefire.report.SurefireReportRenderer.renderBody (SurefireReportRenderer.java:119) at org.apache.maven.reporting.AbstractMavenReportRenderer.render (AbstractMavenReportRenderer.java:93) at org.apache.maven.plugins.surefire.report.AbstractSurefireReport.executeReport (AbstractSurefireReport.java:159) at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:354) at org.apache.maven.reporting.AbstractMavenReport.reportToSite (AbstractMavenReport.java:262) at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:208) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120) at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867) at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87) at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runIntegrationTests (DevMojo.java:1283) at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:673) at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635) at java.lang.Thread.run (Thread.java:842) [INFO] To run tests on demand, press Enter.
@TrevCraw , @turkeylurkey Just for confirmation, I am getting the same exception even for a successful test case when executing Liberty: run tests
(There are no tests with errors or failed cases.)
logs:
[INFO] Running unit tests...
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running JUnit5ExampleTest
This test method should be run
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 s -- in JUnit5ExampleTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] Rendering content with org.apache.maven.skins:maven-fluido-skin:jar:2.0.0-M9 skin
[ERROR] Failed to run unit tests
io.openliberty.tools.common.plugins.util.PluginExecutionException: Failed to run unit tests
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runUnitTests (DevMojo.java:1273)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:595)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:122)
at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867)
at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87)
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runUnitTests (DevMojo.java:1267)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:595)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution null of goal org.apache.maven.plugins:maven-surefire-report-plugin:3.5.0:report-only failed: Cannot invoke "Object.toString()" because "value" is null
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:133)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867)
at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87)
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runUnitTests (DevMojo.java:1267)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:595)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
Caused by: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "value" is null
at org.apache.maven.doxia.sink.impl.SinkUtils.getAttributeString (SinkUtils.java:188)
at org.apache.maven.doxia.sink.impl.AbstractXmlSink.writeStartTag (AbstractXmlSink.java:126)
at org.apache.maven.doxia.sink.impl.Xhtml5BaseSink.writeStartTag (Xhtml5BaseSink.java:1647)
at org.apache.maven.doxia.sink.impl.AbstractXmlSink.writeStartTag (AbstractXmlSink.java:95)
at org.apache.maven.doxia.sink.impl.Xhtml5BaseSink.anchor (Xhtml5BaseSink.java:1204)
at org.apache.maven.doxia.sink.impl.AbstractSink.anchor (AbstractSink.java:354)
at org.apache.maven.reporting.AbstractMavenReportRenderer.startSection (AbstractMavenReportRenderer.java:132)
at org.apache.maven.reporting.AbstractMavenReportRenderer.startSection (AbstractMavenReportRenderer.java:116)
at org.apache.maven.plugins.surefire.report.SurefireReportRenderer.renderSectionPackages (SurefireReportRenderer.java:220)
at org.apache.maven.plugins.surefire.report.SurefireReportRenderer.renderBody (SurefireReportRenderer.java:119)
at org.apache.maven.reporting.AbstractMavenReportRenderer.render (AbstractMavenReportRenderer.java:93)
at org.apache.maven.plugins.surefire.report.AbstractSurefireReport.executeReport (AbstractSurefireReport.java:159)
at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:354)
at org.apache.maven.reporting.AbstractMavenReport.reportToSite (AbstractMavenReport.java:262)
at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:208)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.DevMojo.runTestMojo (DevMojo.java:1867)
at io.openliberty.tools.maven.server.DevMojo.access$7200 (DevMojo.java:87)
at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.runUnitTests (DevMojo.java:1267)
at io.openliberty.tools.common.plugins.util.DevUtil.runTests (DevUtil.java:595)
at io.openliberty.tools.common.plugins.util.DevUtil$TestJob.run (DevUtil.java:5318)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:840)
[INFO] Waiting up to 30 seconds to find the application start up or update message...
[INFO] CWWKM2010I: Searching for (CWWKZ0001I:|CWWKZ0003I:) in /Users/vaisakht/Documents/DEVEX/intellij/testing/24.0.9-testing/24.0.9-smoke-test/maven-parent/maven-second/app-name-maven-second/target/liberty/wlp/usr/servers/defaultServer/logs/messages.log. This search will timeout after 30 seconds.
[INFO] CWWKM2015I: Match number: 1 is [18/09/24, 15:32:37:676 IST] 00000036 com.ibm.ws.app.manager.AppMessageHelper A CWWKZ0001I: Application app-name-maven-second started in 0.728 seconds..
[INFO] Running integration tests...
[INFO] Skipping org.apache.maven.plugins:maven-surefire-report-plugin:RELEASE:failsafe-report-only report goal
[INFO] No tests to run.
[INFO] Integration tests finished.
[INFO]
[INFO] To run tests on demand, press Enter.
@vaisakhkannan what project are you using? What version of the Liberty Maven Plugin (LMP)? What version of Java?
It looks like the exception is coming from the maven-surefire-report-plugin
, which is showing in the logs as version 3.5.0
.
@TrevCraw Maven project generated from https://openliberty.io/start/ with below configuration
Java 17, Jakarta EE 9 and MicroProfile 5
Version of the Liberty Maven Plugin - 3.10.3
Version of java
openjdk 17.0.12 2024-07-16
OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode)
When I searched for the error in the terminal logs, I found an issue https://issues.apache.org/jira/browse/SUREFIRE-2257 that appears to have been fixed, and the fix will be available in version 3.5.1.
The exception happens due to the surefire-report-parser version 3.5.0, downgrading this to 3.4.0 as a workaround can avoid this exception. The complete fix will be available once the version 3.5.1 is out .
You will just need to add the below plugin to the pom that will force maven to download the surefire-report-parser with version 3.4.0
@TrevCraw @JoshwinThomasIBM
After the release of the latest Maven-Surefire-Report plugin version 3.5.1
, I cleared all the files and folders within the 'surefire'
folder located in the .m2
directory. Then, I tested a new OpenLiberty
project, added tests to the project, and ran the tests using Liberty-tools-Intellij
plugin version 24.0.9
. I no longer encountered the exception I had previously reported in this issue. I noticed that the 'surefire'
folder now contains a subfolder named surefire-report-parser
with version 3.5.1
, indicating that the devmode run tests action automatically pulls the latest version of the Maven Surefire Report plugin
for new machines (and with a cleared .m2 directory machines).
I tested with Liberty-tools-vscode
as well, and it also pulls the latest version (3.5.1) of the maven-surefire-report plugin.
When i tested this in my local it always pulled the 3.5.0 version if i don't explicitly specify which version to download , and also got the exception because of this . This can be an issue with my local setup .
When I tested with my
new Mac laptop
, I saw that theRun Tests
action failed, and the test reports were not generated.Environment
macOS Sonoma 14.4 Chip Apple M3 Pro LTI version : 24.0.9 release candidate driver LSP4IJ : 0.5.0 Maven project
Screen recording of the issue
https://github.com/user-attachments/assets/b1037d53-9685-460c-85d8-e4ae335d5ac6