camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.12k stars 1.56k forks source link

Migrate `spring-boot-starter` modules to Spring Boot 3.1 #3441

Closed yanavasileva closed 1 year ago

yanavasileva commented 1 year ago

Acceptance Criteria (Required on creation)

Hints

Links

Breakdown

yanavasileva commented 1 year ago

Consider adding enforcer definition for jdk 17

yanavasileva commented 1 year ago

If https://github.com/camunda/camunda-bpm-platform/issues/3439 is not merged when starting the implementation. The PR branch must be based on 3439-engine-spring-6 from PR #3485

yanavasileva commented 1 year ago

RequestScopeIT: conflict of logging dependencies version

Stacktrace ``` [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.559 s <<< FAILURE! - in org.camunda.bpm.springboot.project.qa.simple.RequestScopeIT [ERROR] shouldEvaluateScript{CapturedOutput} Time elapsed: 0.013 s <<< ERROR! java.lang.IllegalStateException: Failed to load ApplicationContext for [WebMergedContextConfiguration@2eee3069 testClass = org.camunda.bpm.springboot.project.qa.simple.RequestScopeIT, locations = [], classes = [org.camunda.bpm.springboot.project.qa.simple.Application], contextInitializerClasses = [], activeProfiles = [], propertySourceLocations = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true", "server.port=0"], contextCustomizers = [org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@58d75e99, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@6fd83fc1, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@194bcebf, org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@d9345cd, org.springframework.boot.test.context.SpringBootTestAnnotation@a41f1e19], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:142) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:127) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:141) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:97) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:241) at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:138) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:377) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:382) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:377) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310) at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:376) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:289) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:288) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:278) at java.base/java.util.Optional.orElseGet(Optional.java:364) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:277) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:105) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:104) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:68) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) 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.DefaultLauncher.execute(DefaultLauncher.java:220) at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188) at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:150) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418) Caused by: java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.helpers.NOPLoggerFactory loaded from file:/C:/Users/Yana.Vasileva/.m2/repository/org/slf4j/slf4j-api/2.0.7/slf4j-api-2.0.7.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.helpers.NOPLoggerFactory at org.springframework.util.Assert.instanceCheckFailed(Assert.java:713) at org.springframework.util.Assert.isInstanceOf(Assert.java:632) at org.springframework.boot.logging.logback.LogbackLoggingSystem.getLoggerContext(LogbackLoggingSystem.java:381) at org.springframework.boot.logging.logback.LogbackLoggingSystem.beforeInitialize(LogbackLoggingSystem.java:122) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationStartingEvent(LoggingApplicationListener.java:238) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:220) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131) at org.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136) at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:75) at org.springframework.boot.SpringApplicationRunListeners.lambda$starting$0(SpringApplicationRunListeners.java:54) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118) at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:54) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1405) at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:545) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:184) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:118) ... 67 more ```

Solution: remove internal-dependencies from dependencyManagement in the pom.xml as our logback dependency version cause conflict with those coming from Spring Boot. And the test uses CapturedOutput that is Spring Boot implementation using the dependencies with high version than the defined in internal-dependencies.

yanavasileva commented 1 year ago

Current failures:

CE

java.lang.NoClassDefFoundError: org/apache/http/conn/HttpClientConnectionManager
    at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402)
    at java.base/java.lang.Class.getMethodsRecursive(Class.java:3543)
    at java.base/java.lang.Class.getMethod0(Class.java:3529)
    at java.base/java.lang.Class.getMethod(Class.java:2225)
    at org.apache.maven.surefire.util.ReflectionUtils.tryGetMethod(ReflectionUtils.java:60)
    at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isSuiteOnly(JUnit3TestChecker.java:66)
    at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isValidJUnit3Test(JUnit3TestChecker.java:61)
    at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.accept(JUnit3TestChecker.java:56)
    at org.apache.maven.surefire.common.junit4.JUnit4TestChecker.accept(JUnit4TestChecker.java:53)
    at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:102)
    at org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:309)
    at org.apache.maven.surefire.junit4.JUnit4Provider.setTestsToRun(JUnit4Provider.java:189)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:132)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
    at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.HttpClientConnectionManager
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    ... 18 more

testTaskFilterResultContentType(org.camunda.bpm.rest.RestIT)  Time elapsed: 5.494 s  <<< ERROR!
java.lang.NoSuchFieldError: APPLICATION_HAL_JSON_TYPE
        at org.camunda.bpm.rest.RestIT.assertMediaTypesOfResource(RestIT.java:308)
        at org.camunda.bpm.rest.RestIT.testTaskFilterResultContentType(RestIT.java:174)

[ERROR] testSingleTaskContentType(org.camunda.bpm.rest.RestIT)  Time elapsed: 5.245 s  <<< ERROR!
java.lang.NoSuchFieldError: APPLICATION_HAL_JSON_TYPE
        at org.camunda.bpm.rest.RestIT.assertMediaTypesOfResource(RestIT.java:308)
        at org.camunda.bpm.rest.RestIT.testSingleTaskContentType(RestIT.java:150)

[ERROR] testTaskQueryContentType(org.camunda.bpm.rest.RestIT)  Time elapsed: 5.178 s  <<< ERROR!
java.lang.NoSuchFieldError: APPLICATION_HAL_JSON_TYPE
        at org.camunda.bpm.rest.RestIT.assertMediaTypesOfResource(RestIT.java:308)
        at org.camunda.bpm.rest.RestIT.testTaskQueryContentType(RestIT.java:140)

Error ``` [INFO] Running org.camunda.bpm.LoginIT [ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.095 s <<< FAILURE! - in org.camunda.bpm.LoginIT [ERROR] org.camunda.bpm.LoginIT Time elapsed: 0.095 s <<< ERROR! java.lang.NoSuchMethodError: 'void org.openqa.selenium.remote.service.DriverCommandExecutor.(org.openqa.selenium.remote.service.DriverService, java.util.Map, org.openqa.selenium.remote.http.ClientConfig)' [ERROR] org.camunda.bpm.LoginIT Time elapsed: 0.095 s <<< ERROR! java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.WebDriver.quit()" because "org.camunda.bpm.AbstractWebappUiIntegrationTest.driver" is null ```

EE

Stacktrace

``` 2023-06-15T18:25:22.028+02:00 WARN 13480 --- [o-auto-1-exec-1] org.glassfish.jersey.internal.Errors : The following warnings have been detected: WARNING: Unknown HK2 failure detected: MultiException stack 1 of 2 java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.(JaxbAnnotationIntrospector.java:137) at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.(JaxbAnnotationIntrospector.java:124) at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.(JaxbAnnotationIntrospector.java:116) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128) at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347) at java.base/java.lang.Class.newInstance(Class.java:645) at org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.JsonMapperConfigurator._resolveIntrospector(JsonMapperConfigurator.java:113) at org.glassfish.jersey.jackson.internal.JacksonMapperConfigurator._resolveIntrospector(JacksonMapperConfigurator.java:76) at org.glassfish.jersey.jackson.internal.JacksonMapperConfigurator._resolveIntrospectors(JacksonMapperConfigurator.java:43) at org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.MapperConfiguratorBase._setAnnotations(MapperConfiguratorBase.java:123) at org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.JsonMapperConfigurator.getDefaultMapper(JsonMapperConfigurator.java:47) at org.glassfish.jersey.jackson.internal.DefaultJacksonJaxbJsonProvider.findAndRegisterModules(DefaultJacksonJaxbJsonProvider.java:55) 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:568) at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1268) at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:363) at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:411) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:466) at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:59) at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:47) at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:74) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:131) at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:176) at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:98) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2109) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67) at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.lambda$getAllServiceHolders$0(AbstractHk2InjectionManager.java:136) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1242) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.getAllServiceHolders(AbstractHk2InjectionManager.java:140) at org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.getAllServiceHolders(ImmediateHk2InjectionManager.java:30) at org.glassfish.jersey.internal.inject.Providers.getServiceHolders(Providers.java:307) at org.glassfish.jersey.internal.inject.Providers.getCustomProviders(Providers.java:151) at org.glassfish.jersey.message.internal.MessageBodyFactory.initialize(MessageBodyFactory.java:219) at org.glassfish.jersey.message.internal.MessageBodyFactory$MessageBodyWorkersConfigurator.postInit(MessageBodyFactory.java:114) at org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$2(ApplicationHandler.java:366) at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4204) at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:366) at org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(ApplicationHandler.java:310) at org.glassfish.jersey.internal.Errors.process(Errors.java:292) at org.glassfish.jersey.internal.Errors.process(Errors.java:274) at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:232) at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:309) at org.glassfish.jersey.server.ApplicationHandler.(ApplicationHandler.java:274) at org.glassfish.jersey.servlet.WebComponent.(WebComponent.java:311) at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:154) at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:338) at jakarta.servlet.GenericServlet.init(GenericServlet.java:143) at jakarta.servlet.http.HttpServlet.init(HttpServlet.java:121) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:944) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:901) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:649) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:114) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlElement at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ... 81 more MultiException stack 2 of 2 java.lang.IllegalStateException: Unable to perform operation: post construct on org.glassfish.jersey.jackson.internal.DefaultJacksonJaxbJsonProvider at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:429) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:466) at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:59) at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:47) at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:74) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:131) at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:176) at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:98) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2109) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67) at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.lambda$getAllServiceHolders$0(AbstractHk2InjectionManager.java:136) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1242) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.getAllServiceHolders(AbstractHk2InjectionManager.java:140) at org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.getAllServiceHolders(ImmediateHk2InjectionManager.java:30) at org.glassfish.jersey.internal.inject.Providers.getServiceHolders(Providers.java:307) at org.glassfish.jersey.internal.inject.Providers.getCustomProviders(Providers.java:151) at org.glassfish.jersey.message.internal.MessageBodyFactory.initialize(MessageBodyFactory.java:219) at org.glassfish.jersey.message.internal.MessageBodyFactory$MessageBodyWorkersConfigurator.postInit(MessageBodyFactory.java:114) at org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$2(ApplicationHandler.java:366) at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4204) at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:366) at org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(ApplicationHandler.java:310) at org.glassfish.jersey.internal.Errors.process(Errors.java:292) at org.glassfish.jersey.internal.Errors.process(Errors.java:274) at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:232) at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:309) at org.glassfish.jersey.server.ApplicationHandler.(ApplicationHandler.java:274) at org.glassfish.jersey.servlet.WebComponent.(WebComponent.java:311) at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:154) at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:338) at jakarta.servlet.GenericServlet.init(GenericServlet.java:143) at jakarta.servlet.http.HttpServlet.init(HttpServlet.java:121) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:944) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:901) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:649) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:114) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) ```

Error ``` expected: 200 OK but was: 404 NOT_FOUND at org.camunda.bpm.spring.boot.starter.webapp.WebappEeTest.testEeResourceAvailable(WebappEeTest.java:38) ```
yanavasileva commented 1 year ago

There is a warning when some of the test applications are started:

WARN 28528 --- [io-58080-exec-1] o.g.jersey.server.wadl.WadlFeature       : JAXBContext implementation could not be found. WADL feature is disabled.

Camunda do not use WADL (Web Application Description Language), users must take care of adjusting their app in case they want to use the feature (adding jaxb dependency). jersey.config.server.wadl.disableWadl property can be used to disable the feature.

No action required from our side.

yanavasileva commented 1 year ago

Most of the version updates can be found here: link or here.

EE: Added

commons-logging:commons-logging:jar:1.2: Apache 2
io.micrometer:micrometer-commons:jar:1.11.1: Apache 2
 io.micrometer:micrometer-observation:jar:1.11.1: Apache 2
 jakarta.activation:jakarta.activation-api:jar:2.1.2: EDL 1
 jakarta.inject:jakarta.inject-api:jar:2.0.1: Apache 2
 javax.activation:javax.activation-api:jar:1.2.0: CDDL 1.1 or GPL 2
 javax.xml.bind:jaxb-api:jar:2.3.1: CDDL 1.1 or GPL 2
 com.sun.xml.bind:jaxb-core:jar:4.0.3: EDL 1
 com.sun.xml.bind:jaxb-impl:jar:4.0.3:EDL 1
 org.eclipse.angus:angus-activation:jar:2.0.1: Apache 2

javax.xml.bind:jaxb-api (CDDL 1.1)has been approved already for testing purposes: https://jira.camunda.com/browse/OB-25

yanavasileva commented 1 year ago

Released today: https://github.com/spring-projects/spring-boot/releases/tag/v3.1.1

yanavasileva commented 1 year ago

In Assert, assertj version is resolved via the spring-boot-dependencies defined in the dependencyManagement section (CAM-14459). After bumping to Spring Boot 3, Assert had failures with JDK <17 due to Spring 6 dependency coming from spring-boot-dependencies. To remove the restriction, I added spring-framework-bom at the top of dependencyManagement to resolve Spring 5 instead of Spring for the spring-bean transitive dependency.

yanavasileva commented 1 year ago

camunda-bpm-assert-qa fails on JDK 11 with ClassNotFoundException: org.junit.platform.launcher.core.LauncherFactory only after camunda-bpm-junit5 is built before that.

Details ``` # Created at 2023-06-28T14:20:11.478 org.apache.maven.surefire.util.SurefireReflectionException: java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory at org.apache.maven.surefire.util.ReflectionUtils.instantiateOneArg(ReflectionUtils.java:139) at org.apache.maven.surefire.booter.ForkedBooter.createProviderInCurrentClassloader(ForkedBooter.java:403) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418) Caused by: java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.(JUnitPlatformProvider.java:86) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.apache.maven.surefire.util.ReflectionUtils.instantiateOneArg(ReflectionUtils.java:135) ... 5 more Caused by: java.lang.ClassNotFoundException: org.junit.platform.launcher.core.LauncherFactory 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:522) ... 11 more ```

Issue can be reproduce with JDK 11 and the following command: mvn8 clean install -pl 'test-utils/assert/,test-utils/assert/core,test-utils/assert/qa,test-utils/junit5-extension,test-utils/junit5-extension-dmn'

Adding the junit-platform-launcher dependency resolves the ClassNotFoundException. In addition, I bumped the assertj and junit5 version in camunda-bpm-junit5 and camunda-dmn-junit5 modules aligned with the ones in Assert.

yanavasileva commented 1 year ago

Handover DEV to QA

Standard regression testing of Spring Boot Starter after upgrade to Spring Boot 3.

Documentation

Know limitations (edge cases).

Spring Boot Starter can be used only with Java 17.

Examples

Environments.

gbetances089 commented 1 year ago

Tested based on the Handover to QA and test regression.

Test run - herehttps://camunda.testrail.com/index.php?/plans/view/23108

filyyyp commented 1 year ago

Can i ask you why camunda-bpm-spring-boot-starter-external-task-client version 7.20 is using javax packages instead of jakarta ? For example in org.camunda.bpm.client.variable.impl.format.xml.DomXmlDataFormat When i am trying to start external task client with minimal setup Archive.zip I am getting error Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at org.camunda.bpm.client.variable.impl.format.xml.DomXmlDataFormatProvider.createInstance(DomXmlDataFormatProvider.java:31) ~[camunda-external-task-client-7.20.0.jar:7.20.0]

Why i should to use this dependency javax.xml.bind.jaxb-api as is in your example ? https://github.com/camunda/camunda-bpm-examples/blob/7.20/spring-boot-starter/external-task-client/loan-granting-spring-boot-webapp/pom.xml

yanavasileva commented 1 year ago

@filyyyp,

Thank you for reaching out to us with this. I created https://github.com/camunda/camunda-bpm-platform/issues/3829 where you can track the progress of the issue.