0

After upgrading our application to spring boot 2.6.6 in combination with JBoss 7.3 we get on every xml validation the following warnings:

2022-04-13 14:18:39,433 WARN  [org.springframework.xml.validation.Jaxp15ValidatorFactory] (default task-2) http://javax.xml.XMLConstants/property/accessExternalDTD property not supported by org.apache.xerces.jaxp.validation.ValidatorImpl
2022-04-13 14:18:39,433 WARN  [org.springframework.xml.validation.Jaxp15ValidatorFactory] (default task-1) http://javax.xml.XMLConstants/property/accessExternalSchema property not supported by org.apache.xerces.jaxp.validation.ValidatorImpl

Due to the intensive number of validations, the JBoss disk was filled with a log warnings resulting in a full disk.

The most obvious solution is not to use JBoss, but unfortunately that is not possible in our production environment.

Gerard
  • 25
  • 6

2 Answers2

0

The reason for the warning is that JBoss 7.3 is using an old Xerces library (2.2.12.0.SP03) which does not support the properties: accessExternalDTD and accessExternalSchema and spring-boot (2.6.6) expect support for this and log a warning when it is not supported.

Normally you should update to a newer version of the Xerces library but in the case of JBoss this is not possible because the Xerces library is packaged with JBoss.

The solution for this is to change the logging settings in JBoss to the error level for this particular logging. This can be done with the following commands:

${JBOSS_HOME}/bin/jboss-cli.sh --connect controller=localhost:9990 --user=<admin user> --password=<password> --command="/subsystem=logging/logger=org.springframework.xml.validation.Jaxp15ValidatorFactory:add"
${JBOSS_HOME}/bin/jboss-cli.sh --connect controller=localhost:9990 --user=<admin user> --password=<password> --command="/subsystem=logging/logger=org.springframework.xml.validation.Jaxp15ValidatorFactory:write-attribute(name=level, value=ERROR)"
Gerard
  • 25
  • 6
0

The provided implementation of the ValidatorFactory doesn't support the mentioned property.

As it's mentioned in the answer of @Gerard, JBoss org.apache.xerces dependency provides its implementation.

You can configure your program to use the implementation that supports or ignores the mentioned property.

I elaborated on the details in another similar answer.

Ed Gomoliako
  • 991
  • 1
  • 8
  • 18