glassfish
glassfish copied to clipboard
glassfish-acc.xml contains invalid doctype declaration
Environment Details
- GlassFish Version: master branch
Problem Description
- Cannot process glassfish-acc.xml using XSLT due to invalid doctype declaration: The declared document URL http://glassfish.org/dtds/glassfish-application-client-container_1_3.dtd is not existing anymore.
Steps to reproduce
- Process glassfish-acc.xml using XSLT with strict dtd checks enabled
Impact of Issue
- Cannot automatically reconfigure ACC using XSLT anymore
This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment
Hmm, documentation needs an update too: https://glassfish.org/docs/SNAPSHOT/application-deployment-guide.html#the-sun-acc-xml-file I'm not sure if the file is still usable, then we should probably release a new descriptor (xsd?) which should be deployed somewhere ...
- DTDs are distributed with glassfish.
$ ./bin/asadmin version
Version string could not be obtained from Server [localhost:4848].
(Turn debugging on e.g. by setting AS_DEBUG=true in your environment, to see the details.)
Using locally retrieved version string from version class.
Version = Eclipse GlassFish 7.0.0 (build master-b1025-g4d110bb 2022-09-30T13:16:04+0000)
Command version executed successfully.
$ xmlstarlet val -d ./glassfish/lib/dtds/glassfish-application-client-container_1_3.dtd ./glassfish/domains/domain1/config/glassfish-acc.xml
./glassfish/domains/domain1/config/glassfish-acc.xml - valid
- I'm not sure it's required for DTD to be available online. I imagine setting up XML catalog should be possible. Unclear what's the tool used for XSLT. For example, with
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
w/o catalog:
$ xmlstarlet tr --val xsl.xsl ./glassfish/domains/domain1/config/glassfish-acc.xml
Unknown IO error: Not a valid HTTP URI
./glassfish/domains/domain1/config/glassfish-acc.xml:27.200: failed to load external entity "http://glassfish.org/dtds/glassfish-application-client-container_1_3.dtd"
//EN" "http://glassfish.org/dtds/glassfish-application-client-container_1_3.dtd"
^
<?xml version="1.0"?>
...
and with one like this:
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<public publicId="-//GlassFish.org//DTD GlassFish Application Server 3.1 Application Client Container//EN" uri="glassfish/lib/dtds/glassfish-application-client-container_1_3.dtd"/>
</catalog>
no error is reported:
$ XML_CATALOG_FILES=catalog xmlstarlet tr --val xsl.xsl ./glassfish/domains/domain1/config/glassfish-acc.xml
<?xml version="1.0"?>
...
I fail to see the issue in GF here.
That is true, but when you want to work with that file somehow locally, ... first what you try is to download it from the provided URL. Ie. Eclipse does validations, it was always an issue with GlassFish, so I had to create some local catalog and save those files there. It is not something with high priority, but it would be nice to make everything easy as possible :-)
This issue is related to: https://github.com/eclipse-ee4j/glassfish/issues/23014#issuecomment-860504292
I also think that they should be deployed on Eclipse public web server. Though, I'm not familiar with the Eclipse infra..
Can someone please simply publish that file at the location mentioned in http://glassfish.org/dtds/glassfish-application-client-container_1_3.dtd? That would make my life easier and would never be wrong. Thanks.
Hi @mkarg , here's a present from me: https://github.com/eclipse-ee4j/glassfish/pull/24436 ;-)
@OndroMih You are my personal hero! Thanks a lot! ❤️
This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment