Wildfly 26: Issue in parsing tld files in struts jar.

420 views
Skip to first unread message

Pradeep Muniswamaiah

unread,
Mar 17, 2022, 10:18:12 AM3/17/22
to WildFly
Hi,

I am currently trying to upgrade the wildfly from 12 to 26. There is constant error when deploying.

CAUSED BY: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYUT0027: Failed to parse XML descriptor "C:/wildfly-26.0.0.Final/standalone/deployments/***.ear/***.war/WEB-INF/lib/struts-taglib-1.3.10.jar/META-INF/tld/struts-html.tld" at (2161, 19)

CAUSED BY: javax.xml.stream.XMLStreamException: ParseError at [row,col]  : [2161, 19] Message: The element type "description" must be terminated by the matching end-tag "</desription>"

It seems that the XML parser has changed and I am not sure how to fix this issue. One of the solution is to make changes in the XML file as suggested, but since that being inside the third party jar I don't want to make the change in the jar.

Can someone please let me know how to fix this issue.

NOTE: The deployment is successful in wildfly 12, 18 and 19.

Wolfgang

unread,
Mar 17, 2022, 4:44:35 PM3/17/22
to WildFly
Hi,

my guess is that this is caused by the fact that some elements in "struts-html.tld" contain mixed content (HTML formatting tags). The TLD does not define a XSD/DTD. Thus, WildFly probably defaults to e.g. to https://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd. And this file defines that the description may only be a plain string, not containing any other XML/HTML tags.
So, you will probably have to "fix" the TLD file and repackage the WAR file.

For Struts 2, this was changed - here all descriptions seem to be CDATA sections.

I don't know whether it is possible to disable XSD validation in WildFly, but this would probably cause other problems.

Best regards

Wolfgang
Reply all
Reply to author
Forward
0 new messages