I am migrating a jboss 4.2 app to wildfly 17 At the runtime I got
java.lang.VerifyError: (class: org/apache/velocity/tools/view/VelocityView, method: createContext signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/velocity/tools/view/ViewToolContext;) Incompatible argument to function
which apprently means that the version of velocity-tools running is incompatible with the velocity version (1.7) The problem was not present in jboss and my app.ear seems to have the right versions in the lib folder
It looks like the wrong version comes from another module, imported by my app.ear in the jboss deployment structure
here's more details about my wildfly architecture :
I want to exclude velocity-tools 1.0 from app_a and app_b in my app.ear's jboss deployment structure to keep only velocity tools 2.0, how can i do ?
Here's what i got for now in my jboss deployment structure.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<dependencies>
<module export="true" name="deployment.other_app-ear.ear"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
EDIT : solved by changing version of velocity 1.0 for 2.0, no other solution found