WildFly adds implicitly to each new deployment, which uses JAX-RS annotations, the JAX-RS subsystem that includes Jackson dependencies (see here).
The version of the implicitly added Jackson dependencies do not match with the version of the Jackson dependency,
which is used by Camunda Spin. This leads to problems with the usage of variable serialization and the usage of Jackson annotations (like @JsonIgnore
for example).
This example demonstrates how to configure the own application together with WildFly to use Jackson annotations and json serialization.
- Checkout the git repository
- Build the project with maven
- Deploy the created war on latest Camunda WildFly distribution
- Open Cockpit and take a look into the process 'waitingProcess'
- Look at the variable called
variable
, only the propertiesproperty1
andproperty3
are shown.
The important part is the jboss-deployment-structure.xml
with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<exclude-subsystems>
<!-- exclude jaxrs subsystem, which are added implicit by WildFly -->
<subsystem name="jaxrs"/>
</exclude-subsystems>
<dependencies>
<!-- Add jackson dependencies with the version which is used by spin. -->
<module name="com.fasterxml.jackson.core.jackson-annotations" slot="${version}" export="true"/>
<module name="com.fasterxml.jackson.core.jackson-core" slot="${version}" export="true"/>
<module name="com.fasterxml.jackson.core.jackson-databind" slot="${version}" export="true"/>
<!-- Add other modules, which are needed by your application and part of the jaxrs subsystem -->
</dependencies>
</deployment>
</jboss-deployment-structure>
It excludes the JAX-RS subsystem and adds the Jackson dependencies with the correct version. These version corresponds to the version which is used by Camunda Spin for de-/serialization.
See the Camunda forum post and the documentation for more information.