[Geoserver-users] How to Fix GeoServer Logging XML Validation Errors

Hello,

I am running GeoServer Version 2.20.1. I’m not sure if it is important or not, but I’m running GeoServer as a .war file in JBoss EAP 7.4. When I create and update Image Mosaics using the REST api the following errors are logged.

2023-05-23 16:42:43,980 ERROR [stderr] - Warning: validation was turned on but an org.xml.sax.ErrorHandler was not

2023-05-23 16:42:43,995 ERROR [stderr] - set, which is probably not what is desired. Parser will use a default

2023-05-23 16:42:44,006 ERROR [stderr] - ErrorHandler to print the first 10 errors. Please call

2023-05-23 16:42:44,010 ERROR [stderr] - the ‘setErrorHandler’ method to fix this.

2023-05-23 16:42:44,025 ERROR [stderr] - Error: URI=null Line=1: Document root element “coverageStores”, must match DOCTYPE root “null”.

2023-05-23 16:42:44,037 ERROR [stderr] - Error: URI=null Line=1: Document is invalid: no grammar found.

2023-05-23 16:42:44,055 ERROR [stderr] - Warning: validation was turned on but an org.xml.sax.ErrorHandler was not

2023-05-23 16:42:44,075 ERROR [stderr] - set, which is probably not what is desired. Parser will use a default

I don’t ever pass in XML with coverageStores in it so I am fairly confident it is not an input data issue.

Is there a configuration change that I can make to turn on an ErrorHandler? Is there another way to fix/prevent these errors?

Thank you,

Jennifer

It was suggested on StaxExchange that this could be related to Log4j. Any suggestions on troubleshooting this?

Thanks,

Jennifer

···

From: Coston, Jennifer N RTX
Sent: Wednesday, June 7, 2023 1:59 PM
To: geoserver-users@lists.sourceforge.net
Subject: How to Fix GeoServer Logging XML Validation Errors

Hello,

I am running GeoServer Version 2.20.1. I’m not sure if it is important or not, but I’m running GeoServer as a .war file in JBoss EAP 7.4. When I create and update Image Mosaics using the REST api the following errors are logged.

2023-05-23 16:42:43,980 ERROR [stderr] - Warning: validation was turned on but an org.xml.sax.ErrorHandler was not

2023-05-23 16:42:43,995 ERROR [stderr] - set, which is probably not what is desired. Parser will use a default

2023-05-23 16:42:44,006 ERROR [stderr] - ErrorHandler to print the first 10 errors. Please call

2023-05-23 16:42:44,010 ERROR [stderr] - the ‘setErrorHandler’ method to fix this.

2023-05-23 16:42:44,025 ERROR [stderr] - Error: URI=null Line=1: Document root element “coverageStores”, must match DOCTYPE root “null”.

2023-05-23 16:42:44,037 ERROR [stderr] - Error: URI=null Line=1: Document is invalid: no grammar found.

2023-05-23 16:42:44,055 ERROR [stderr] - Warning: validation was turned on but an org.xml.sax.ErrorHandler was not

2023-05-23 16:42:44,075 ERROR [stderr] - set, which is probably not what is desired. Parser will use a default

I don’t ever pass in XML with coverageStores in it so I am fairly confident it is not an input data issue.

Is there a configuration change that I can make to turn on an ErrorHandler? Is there another way to fix/prevent these errors?

Thank you,

Jennifer

We do not have any active developers using JBoss, so you are the best person to help on this one!

The errors are coming from the XML parser configured by the environment (in this case JBoss and Java).

GeoServer is asking for an XML parser so validate a file; and is upset that the environment is providing an XML parser that has not been configured to listen to any problems found.

Have a look on the internet for other applications running in JBoss that have the same concern?

···


Jody Garnett