Search code examples
springjbosswildflyjboss-eap-7

Is there any way to disable TLD Validation in JBOSS EAP 7.2?


I am trying to migrate my project from jboss-eap-6.4 to jboss-eap-7.2.

When I try to deploy my war file, I get following error:

Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYUT0027: Failed to parse XML descriptor \"/C:/jboss-eap-7.2/standalone/deployments/my.war/WEB-INF/lib/spring-modules-validation-1.0.0.jar/META-INF/valang.tld\" at [13,23]

Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[13,23]

Message: Unexpected value 'body-content' encountered"}}

I tried searching about this and I got to know that this is common issue. And I got one of the solution as,

changing <body-content>None</body-content> to  <body-content>empty</body-content> in valang.tld

in this redhat link: https://access.redhat.com/solutions/910833

as body-content is present at line 13 and I read the documentation for jboss eap 7.2 in which it has written that the value should be empty.

I saw another solution as making this as dependency in maven pom.xml or excluding it.

But I can't do any of this things.

I am using JBOSS EAP 7.2 with gradle, So is there any thing I can do by making changes in gradle or JBOSS's configuration files to solve this issue?

Please help me on this :)


Solution

  • I finally made the same change in the spring-modules-calidation.jar. My concern was to after making this change does it affect my other server, as I was running this on jboss as well as tomcat. So now I am providing the updated jar to JBOSS EAP 7 and the original one to tomcat.