[2023-11-27T10:29:56.712-0400] [Payara 5.2022.3] [WARNING] [] [edu.harvard.iq.dataverse.sitemap.SiteMapUtil] [tid: _ThreadID=211 _ThreadName=__ejb-thread-pool7] [timeMillis: 1701095396712] [levelValue: 900] [[
Unable to update sitemap! Exception caught while checking XML staged file (/var/opt/payara5/glassfish/domains/domain1/docroot/sitemap/sitemap.xml.staged ) against XML schema: schema_reference.4: Failed to read schema document 'https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.]]
Not sure exactly why the schema doc can't be found or how to get around this error.
Hey, Brian. It's been a while. Anything interesting in /var/opt/payara5/glassfish/domains/domain1/docroot/sitemap/sitemap.xml.staged?
https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd seems to be up. Downloadable.
(Hey Phil! :)
Seems pretty straight-forward.
Your file looks fine.
Was it possibly a transient error?
I've done it 3 times. The 3rd time just now gives the same error.
I'm also able to just grab the schema doc while on the host:
> curl https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
elementFormDefault="qualified">
<xsd:annotation>
<xsd:documentation>
XML Schema for Sitemap files.
Last Modifed 2008-03-26
</xsd:documentation>
</xsd:annotation>
[SNIP]
Can we verify the XML against the XSD? Maybe with a command line tool?
i've installed xmllint. never used it before though...
> xmllint --valid sitemap.xml
sitemap.xml:2: validity error : Validation failed: no DTD found !
www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"
ah. got some hints from another post
> xmllint --noout --schema https://www.sitemaps.org/schemas/sitemap/0.9 sitemap.xml
warning: failed to load external entity "https://www.sitemaps.org/schemas/sitemap/0.9"
Schemas parser error : Failed to locate the main schema resource at 'https://www.sitemaps.org/schemas/sitemap/0.9'.
WXS schema https://www.sitemaps.org/schemas/sitemap/0.9 failed to compile
I get "sitemap.xml.staged validates" when I run this:
xmllint --schema sitemap.xsd sitemap.xml.staged
See also https://stackoverflow.com/questions/42809088/how-to-validate-a-xml-file-with-xsd-through-xmllint
What if you move sitemap.xml.staged aside? Does that help?
No, that doesn't change anything, unfortunately. I can get it to validate when i download the schema locally, like you've done. but remote just doesn't work.
I inserted your sitemap manually into SiteMapUtil.java but it's fine.
Not sure what's going on.
I'm not sure why you're seeing this: schema_reference.4: Failed to read schema document 'https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
@Brian Cassidy please feel free to create a GitHub issue. I'm out of ideas. :sweat_smile:
No easy way to turn off validation, eh? :)
I've put this in https://github.com/IQSS/dataverse/issues/10143 and renamed my sitemap file for now. I'll have to revisit this later. Thanks for your help debugging things, @Philip Durbin
Brian Cassidy said:
No easy way to turn off validation, eh? :)
Nope.
Thanks for creating that issue.
@Don Sizemore Thank you. All good now. :)
Brian Cassidy has marked this topic as resolved.
Last updated: Oct 30 2025 at 06:21 UTC