percussion / percussioncms

Percussion CMS - Content Management System
https://percussioncmshelp.intsof.com/percussioncms
Apache License 2.0
12 stars 9 forks source link

During 5.4/8.0.x/7.3.2 upgrade - Error: Element type "Configure" must be declared. C:com.percussion.xml.PSXmlDocumentBuilder:L:506 #425

Closed natechadwick closed 2 years ago

natechadwick commented 2 years ago

Describe the bug During the upgrade from any 5.4/8.0.x/rx 7.3.2 instance, the error:

Error: Element type "Configure" must be declared. C:com.percussion.xml.PSXmlDocumentBuilder:L:506

Is getting reported during the install. There is then an entry further down in the logs stating that the data source file perc-ds.xml could not be parsed:

[PSConfigurePort] 15:58:59.005 [main] WARN com.percussion.utils.container.adapters.JettyDatasourceConfigurationAdapter - Could not parse or update jetty datasource configuration, so **recreating** /opt/Percussion/jetty/base/etc/perc-ds.xml Error: Element type "Configure" must be declared. C:com.percussion.xml.PSXmlDocumentBuilder:L:506

To Reproduce Steps to reproduce the behavior:

  1. Upgrade any of the specified versions with a scriptable jar install.
  2. You'll see the errors in the console.

Expected behavior There shouldn't be any issues parsing the existing datasource configuration from jetty/base/etc on upgrade.

Impact It seems like this could cause instances with multiple datasource defined to lose some of that configuration post upgrade.

Additional context I think this is probably caused because we do not overwrite this file on upgrade, and most instances have had jetty updated from multiple versions 9.3 to 9.4 etcs but the old dtd declaration is there. The fix should be to add a step in either the ant upgrade script, or in the Java task that is trying to parse it, to strip the DTD from that file before it is processed or turn off xml/dtd validation.

natechadwick commented 2 years ago

Closing issue. If it tests ok, please remove the Ready for QA label. If there is still a problem, please re-open and remove the Ready For QA label - label - Re-Opened.

mariosm1 commented 1 year ago

Upgraded from 8.0.3 to 8.1, the error doesn't come up in the install.log - install.log