Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore Tomcat 10 Failing Tests for 7.22 #4434

Closed
4 tasks done
Tracked by #2471
psavidis opened this issue Jun 12, 2024 · 6 comments
Closed
4 tasks done
Tracked by #2471

Restore Tomcat 10 Failing Tests for 7.22 #4434

psavidis opened this issue Jun 12, 2024 · 6 comments
Assignees
Labels
type:task Issues that are a change to the project that is neither a feature nor a bug fix. version:7.22.0-alpha4 version:7.22.0

Comments

@psavidis
Copy link
Contributor

psavidis commented Jun 12, 2024

Acceptance Criteria (Required on creation)

The integration-tests-engine-jakarta tests incompatible with Tomcat 10, Arquillian and weld-servlet-shaded are restored and pass the CI for camunda-bpm-platform 7.22 .

Here is the commit that demonstrates the exclusion.

Hints

File: qa/integration-tests-engine-jakarta/pom.xml
Profile: tomcat
Maven-plugin: maven-surefire-plugin
Prerequisite: The issue with Tomcat10,Arquillian and weld-servlet-shaded is fixed.
Action Needed: Delete the TODO and all the exclusions of the Tomcat 10 failing tests after.

Analytical Test Classes List
  • CallActivityContextSwitchTest
  • TestMultipleClasspathRoots
  • TestResourceName
  • TestWarDeploymentDeployChangedOnlyWithJarAsLib
  • TestWarDeploymentWithDiagram
  • TestWarDeploymentWithoutDiagram
  • TestWarDeploymentWithoutProcessDefinitions
  • TestWarDeploymentWithoutProcessesXml
  • CdiBeanCallActivityResolutionTest
  • CdiBeanCaseTaskResolutionTest
  • CallActivityContextSwitchTest
  • FailingJobBoundaryTimerWithDelegateVariablesTest
  • SignalEventCatchBoundaryWithVariablesTest
  • TimerRecalculationTest
  • CdiProcessApplicationEventSupportTest

Links

Breakdown

Pull Requests

  1. ci:all-as
    tasso94
  2. ci:tomcat ci:webapp-integration
    psavidis
  3. psavidis
@psavidis psavidis self-assigned this Jun 12, 2024
@psavidis psavidis added version:7.22.0 type:subtask Issues that are subtasks of another issue. Must always be part of the breakdown of the parent issue. type:task Issues that are a change to the project that is neither a feature nor a bug fix. and removed type:subtask Issues that are subtasks of another issue. Must always be part of the breakdown of the parent issue. labels Jun 27, 2024
tasso94 added a commit that referenced this issue Jul 18, 2024
@tasso94
Copy link
Member

tasso94 commented Jul 18, 2024

Hi @psavidis,

I was able to restore most of the integration tests for Tomcat 10. The fix is to add the WELD library to the Tomcat 10 server libs folder.

Please have a look at the linked pull request. You might also want to look at how to fix the two remaining tests, CallActivityContextSwitchTest and CdiBeanCallActivityResolutionTest. I guess the fix looks similar to what I did for the other tests.

We should document this in the migration guide/patch level guide under which circumstances users cannot embed the WELD library in their WARs and instead need to add it to the server libs folder.

Can you please drive this topic forward (including backports for 7.21) in my absence?

I also informed the customer about this in the following support case:

Can you please keep an eye on them in case there are follow-up questions?

Best,
Tassilo

@psavidis
Copy link
Contributor Author

psavidis commented Jul 22, 2024

Progress Update

Test: CdiBeanCallActivityResolutionTest
Approaches that didn't work:

  • Replace addContainerSpecificResourcesForNonPa with addContainerSpecificResourcesForNonPaEmbedCdiLib

    • Unknown property used in expression: ${conditionalFlowBean.shouldTakeFlow()}. Cause: Cannot resolve identifier 'conditionalFlowBean'
  • Inline the war creation as done in other tests and add web-servlet-shaded to the libs folder

    • Code here
    • [ERROR] testResolveBeanInBpmnProcess(org.camunda.bpm.integrationtest.functional.cdi.CdiBeanCallActivityResolutionTest) Time elapsed: 0.165 s <<< ERROR! org.camunda.bpm.engine.ProcessEngineException: Error while evaluating expression: ${processVariableBean.newValue}. Cause: class org.camunda.bpm.engine.ProcessEngine$ProcessEngineServices$1435462394$Proxy$_$$_WeldClientProxy cannot be cast to class org.jboss.weld.bean.proxy.ProxyObject (org.camunda.bpm.engine.ProcessEngine$ProcessEngineServices$1435462394$Proxy$_$$_WeldClientProxy is in unnamed module of loader java.net.URLClassLoader @4f063c0a; org.jboss.weld.bean.proxy.ProxyObject is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @7a88085a) at org.camunda.bpm.integrationtest.functional.cdi.CdiBeanCallActivityResolutionTest.testResolveBeanInBpmnProcess(CdiBeanCallActivityResolutionTest.java:111) Caused by: java.lang.ClassCastException: class org.camunda.bpm.engine.ProcessEngine$ProcessEngineServices$1435462394$Proxy$_$$_WeldClientProxy cannot be cast to class org.jboss.weld.bean.proxy.ProxyObject (org.camunda.bpm.engine.ProcessEngine$ProcessEngineServices$1435462394$Proxy$_$$_WeldClientProxy is in unnamed module of loader java.net.URLClassLoader @4f063c0a; org.jboss.weld.bean.proxy.ProxyObject is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @7a88085a) at org.camunda.bpm.integrationtest.functional.cdi.CdiBeanCallActivityResolutionTest.testResolveBeanInBpmnProcess(CdiBeanCallActivityResolutionTest.java:111)

Test: CallActivityContextSwitchTest
Approaches that didn't work:

  • Inline the war creation as done in other tests and add weld-servlet-shaded to the libs folder
    • Code here
    • [ERROR] testMainASyncCalledASync(org.camunda.bpm.integrationtest.functional.context.CallActivityContextSwitchTest) Time elapsed: 0.347 s <<< ERROR! org.camunda.bpm.engine.ProcessEngineException: Error while evaluating expression: ${delegateBefore}. Cause: class org.camunda.bpm.engine.ProcessEngine$ProcessEngineServices$886788125$Proxy$_$$_WeldClientProxy cannot be cast to class org.jboss.weld.bean.proxy.ProxyObject (org.camunda.bpm.engine.ProcessEngine$ProcessEngineServices$886788125$Proxy$_$$_WeldClientProxy is in unnamed module of loader java.net.URLClassLoader @4f063c0a; org.jboss.weld.bean.proxy.ProxyObject is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @184cdb9b) at org.camunda.bpm.integrationtest.functional.context.CallActivityContextSwitchTest.testMainASyncCalledASync(CallActivityContextSwitchTest.java:284) Caused by: java.lang.ClassCastException: class org.camunda.bpm.engine.ProcessEngine$ProcessEngineServices$886788125$Proxy$_$$_WeldClientProxy cannot be cast to class org.jboss.weld.bean.proxy.ProxyObject (org.camunda.bpm.engine.ProcessEngine$ProcessEngineServices$886788125$Proxy$_$$_WeldClientProxy is in unnamed module of loader java.net.URLClassLoader @4f063c0a; org.jboss.weld.bean.proxy.ProxyObject is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @184cdb9b) at org.camunda.bpm.integrationtest.functional.context.CallActivityContextSwitchTest.testMainASyncCalledASync(CallActivityContextSwitchTest.java:284)

@psavidis
Copy link
Contributor Author

psavidis commented Jul 23, 2024

Update

Test: CdiBeanCallActivityResolutionTest

Debugging revealed that when adding weld-servlet-shaded using the addContainerSpecificResourcesEmbedCdiLib method in cases where there is a process deployment with a call activity that calls a bean (ConditionalFlowBean),

a) the bean is created
b) when the spin expression tries to call the ${conditionalFlowBean.shouldTakeFlow()}, the test testResolveBeanInBpmnProcessConditionalFlow fails.

The above looks related to the call activity setup.

psavidis pushed a commit that referenced this issue Jul 24, 2024
Context: Tomcat 10, CDI and Weld Tests
Fix: This commit includes a fix for the tests to load weld under the Tomcat lib folder instead of placing it into the WEB-INF/lib folder of the individual wars used by the tests.

Related-to: #4434
@psavidis
Copy link
Contributor Author

psavidis commented Jul 24, 2024

To avoid losing time, the fix is merged.
This ticket can remain open until the last 2 tests are either

a) accepted without a fix
b) a fix is found for them as well

@psavidis
Copy link
Contributor Author

psavidis commented Jul 24, 2024

Added a message to migration guide + patch level section to notice users of the classloading issue workaround (PR)

Assigning to @danielkelemen for review.

PS: When the above is finalised and merged, will proceed with the backport.

@psavidis
Copy link
Contributor Author

psavidis commented Jul 26, 2024

All test failures for CE/EE latest code are passing.

Opened up a new ticket for tracking the last 2 remaining tests that are not yet fixed CallActivityContextSwitchTest, CdiBeanCallActivityResolutionTest.

Closing this ticket.

psavidis added a commit to camunda/camunda-docs-manual that referenced this issue Jul 29, 2024
Co-authored-by: Petros Savvidis <[email protected]>
Co-authored-by: Daniel Kelemen <[email protected]>

Related-to: camunda/camunda-bpm-platform#4434
psavidis added a commit to camunda/camunda-docs-manual that referenced this issue Jul 29, 2024
Co-authored-by: Petros Savvidis <[email protected]>
Co-authored-by: Daniel Kelemen <[email protected]>

Related-to: camunda/camunda-bpm-platform#4434
hauptmedia added a commit to hauptmedia/operaton that referenced this issue Nov 2, 2024
Context: Tomcat 10, CDI and Weld Tests
Fix: This commit includes a fix for the tests to load weld under the Tomcat lib folder instead of placing it into the WEB-INF/lib folder of the individual wars used by the tests.

Related-to: camunda/camunda-bpm-platform#4434
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:task Issues that are a change to the project that is neither a feature nor a bug fix. version:7.22.0-alpha4 version:7.22.0
Projects
None yet
Development

No branches or pull requests

4 participants