Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML schemas not found #8446

Open
gregw opened this issue Aug 11, 2022 · 7 comments
Open

XML schemas not found #8446

gregw opened this issue Aug 11, 2022 · 7 comments
Labels
Bug For general bugs on Jetty side

Comments

@gregw
Copy link
Contributor

gregw commented Aug 11, 2022

Jetty version(s)
12

Description
#8406 broke XML validation. Running the demos I get:

2022-08-11 13:52:48.603:WARN :oatud.DigesterFactory:main: The XML schema [XMLSchema.dtd] could not be found. This is very likely to break XML validation if XML validation is enabled.
2022-08-11 13:52:48.603:WARN :oatud.DigesterFactory:main: The XML schema [datatypes.dtd] could not be found. This is very likely to break XML validation if XML validation is enabled.
2022-08-11 13:52:48.603:WARN :oatud.DigesterFactory:main: The XML schema [xml.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
2022-08-11 13:52:48.606:WARN :oatud.DigesterFactory:main: The XML schema [web-jsptaglibrary_3_1.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
2022-08-11 13:52:48.606:WARN :oatud.DigesterFactory:main: The XML schema [jakartaee_10.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
2022-08-11 13:52:48.606:WARN :oatud.DigesterFactory:main: The XML schema [jsp_3_1.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
@gregw gregw added the Bug For general bugs on Jetty side label Aug 11, 2022
@gregw gregw added this to To do in Jetty 12.0.ALPHA1 via automation Aug 11, 2022
@janbartel
Copy link
Contributor

These warnings are coming from jasper. When it initializes, it tries to load various schemas, so it can parse jsps, tlds etc. It does not use our xml schema setup in XmlParser/Catalog etc etc. It finds these .xsds and .dtds by asking the classloader that loaded the jakarta.servlet.ServletContext class to get those resources.

The issue is that the 6.0.0 version of the jakarta.servlet-api.jar in fact does not contain the following .xsds and .dtds. I don't know if that was a deliberate omission or not:

2022-08-11 13:52:48.603:WARN :oatud.DigesterFactory:main: The XML schema [XMLSchema.dtd] could not be found. This is very likely to break XML validation if XML validation is enabled.
2022-08-11 13:52:48.603:WARN :oatud.DigesterFactory:main: The XML schema [datatypes.dtd] could not be found. This is very likely to break XML validation if XML validation is enabled.
2022-08-11 13:52:48.603:WARN :oatud.DigesterFactory:main: The XML schema [xml.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.

I can't reproduce your errors for the other schemas. They are present in the 6.0.0 jar, and when I run the demos from a fresh build of 12.0.x they are found.

@joakime
Copy link
Contributor

joakime commented Aug 11, 2022

Can we submit our Catalogs or EntityResolver to their handling?

@janbartel
Copy link
Contributor

@joakime no, they look for these schemas/dtds in a static code block.

@joakime
Copy link
Contributor

joakime commented Jan 25, 2023

Closing, fixed in PR #8406

@joakime joakime closed this as completed Jan 25, 2023
@joakime joakime reopened this Jul 24, 2023
@joakime
Copy link
Contributor

joakime commented Jul 24, 2023

This is still happening in Jetty Demos.
It's a warning, seems harmless, but it should be addressed.

2023-07-24 15:25:12.331:WARN :oejshC.ee10_demo_jaas:main: The test-jaas webapp is deployed. DO NOT USE IN PRODUCTION!
2023-07-24 15:25:12.375:WARN :oatud.DigesterFactory:main: The XML schema [XMLSchema.dtd] could not be found. This is very likely to break XML validation if XML validation is enabled.
2023-07-24 15:25:12.376:WARN :oatud.DigesterFactory:main: The XML schema [datatypes.dtd] could not be found. This is very likely to break XML validation if XML validation is enabled.
2023-07-24 15:25:12.376:WARN :oatud.DigesterFactory:main: The XML schema [xml.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
2023-07-24 15:25:12.494:INFO :oejsh.ContextHandler:main: Started oeje10w.WebAppContext@70d2e40b{EE10 Demo JAAS WebApp,/ee10-test-jaas,b=file:///home/joakim/code/jetty/distros/bases/demos-12/work/jetty-0_0_0_0-8443-ee10-demo-jaas_war-_ee10-test-jaas-any-/webapp/,a=AVAILABLE,h=oeje10s.SessionHandler@6ecd665{STARTED}}{/home/joakim/code/jetty/distros/bases/demos-12/webapps/ee10-demo-jaas.war}

@ludoch
Copy link

ludoch commented Apr 4, 2024

Same for AppEngine GoogleCloudPlatform/appengine-java-standard#107

Should I move these 3 dtd/xsd under a package that is used for resolution?
I see them in jetty-xml jar file, but not in the same package as they are in javax....

@joakime
Copy link
Contributor

joakime commented Apr 5, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
No open projects
Development

No branches or pull requests

4 participants