Stream: troubleshooting

Topic: โœ” Sitemap generation error


view this post on Zulip Brian Cassidy (Nov 27 2023 at 14:33):

[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.

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 14:34):

Hey, Brian. It's been a while. Anything interesting in /var/opt/payara5/glassfish/domains/domain1/docroot/sitemap/sitemap.xml.staged?

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 14:36):

https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd seems to be up. Downloadable.

view this post on Zulip Brian Cassidy (Nov 27 2023 at 14:36):

sitemap.xml.staged

view this post on Zulip Brian Cassidy (Nov 27 2023 at 14:36):

(Hey Phil! :)

view this post on Zulip Brian Cassidy (Nov 27 2023 at 14:38):

Seems pretty straight-forward.

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 14:38):

Your file looks fine.

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 14:38):

Was it possibly a transient error?

view this post on Zulip Brian Cassidy (Nov 27 2023 at 14:39):

I've done it 3 times. The 3rd time just now gives the same error.

view this post on Zulip Brian Cassidy (Nov 27 2023 at 14:41):

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]

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 14:42):

Can we verify the XML against the XSD? Maybe with a command line tool?

view this post on Zulip Brian Cassidy (Nov 27 2023 at 14:47):

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"

view this post on Zulip Brian Cassidy (Nov 27 2023 at 14:51):

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

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 14:51):

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

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 14:54):

What if you move sitemap.xml.staged aside? Does that help?

view this post on Zulip Brian Cassidy (Nov 27 2023 at 15:01):

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.

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 15:11):

I inserted your sitemap manually into SiteMapUtil.java but it's fine.

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 15:11):

Not sure what's going on.

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 15:11):

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>.

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 15:14):

@Brian Cassidy please feel free to create a GitHub issue. I'm out of ideas. :sweat_smile:

view this post on Zulip Brian Cassidy (Nov 27 2023 at 15:23):

No easy way to turn off validation, eh? :)

view this post on Zulip Brian Cassidy (Nov 27 2023 at 15:29):

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

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 15:32):

Brian Cassidy said:

No easy way to turn off validation, eh? :)

Nope.

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 27 2023 at 15:32):

Thanks for creating that issue.

view this post on Zulip Brian Cassidy (Nov 27 2023 at 16:03):

@Don Sizemore Thank you. All good now. :)

view this post on Zulip Notification Bot (Nov 27 2023 at 16:03):

Brian Cassidy has marked this topic as resolved.


Last updated: Oct 30 2025 at 06:21 UTC