You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Deepak Dixit (Jira)" <ji...@apache.org> on 2021/07/19 19:06:00 UTC

[jira] [Closed] (OFBIZ-12285) Unable to parse XML-Files

     [ https://issues.apache.org/jira/browse/OFBIZ-12285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepak Dixit closed OFBIZ-12285.
--------------------------------
    Resolution: Duplicate

> Unable to parse XML-Files
> -------------------------
>
>                 Key: OFBIZ-12285
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12285
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework/base
>    Affects Versions: 17.12.03
>            Reporter: Maximilian Sonneborn
>            Priority: Blocker
>
> Dear OFBiz-Team,
> while trying to start our application today we got the following error message:
> {code:java}
>  Created OFBiz log dir [C:\projekte_ofbiz\ofbiz_future_crm\core-17.12.0.3-1.1.4-SNAPSHOT\runtime\logs]
> 2021-07-19 09:39:21,121 |main                 |ContainerLoader               |I| [Startup] Loading containers...
> 2021-07-19 09:39:21,530 |main                 |UtilXml                       |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema with publicId [null] and the file/resource is [ofbiz-containers.xsd]
> org.apache.ofbiz.base.start.StartupException: org.apache.ofbiz.base.container.ContainerException: Error reading the container config file: file:/C:/projekte_ofbiz/ofbiz_future_crm/core-17.12.0.3-1.1.4-SNAPSHOT/framework/base/config/ofbiz-containers.xml (Premature end of file.) (Error reading the container config file: file:/C:/projekte_ofbiz/ofbiz_future_crm/core-17.12.0.3-1.1.4-SNAPSHOT/framework/base/config/ofbiz-containers.xml (Premature end of file.))
>         at org.apache.ofbiz.base.container.ContainerLoader.retrieveOfbizContainers(ContainerLoader.java:84)
>         at org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:64)
>         at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(StartupControlPanel.java:218)
>         at org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:71)
>         at org.apache.ofbiz.base.start.Start.main(Start.java:85)
> Caused by: org.apache.ofbiz.base.container.ContainerException: Error reading the container config file: file:/C:/projekte_ofbiz/ofbiz_future_crm/core-17.12.0.3-1.1.4-SNAPSHOT/framework/base/config/ofbiz-containers.xml (Premature end of file.)
>         at org.apache.ofbiz.base.container.ContainerConfig.getConfigurationPropsFromXml(ContainerConfig.java:149)
>         at org.apache.ofbiz.base.container.ContainerConfig.getConfigurations(ContainerConfig.java:79)
>         at org.apache.ofbiz.base.container.ContainerConfig.getConfigurations(ContainerConfig.java:72)
>         at org.apache.ofbiz.base.container.ContainerLoader.retrieveOfbizContainers(ContainerLoader.java:82)
>         ... 4 more
> Caused by: org.xml.sax.SAXParseException; Premature end of file.
>         at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>         at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>         at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
>         at org.apache.ofbiz.base.util.UtilXml.readXmlDocument(UtilXml.java:457)
>         at org.apache.ofbiz.base.util.UtilXml.readXmlDocument(UtilXml.java:396)
>         at org.apache.ofbiz.base.container.ContainerConfig.getConfigurationPropsFromXml(ContainerConfig.java:147)
>         ... 7 more
> 2021-07-19 09:39:21,610 |Thread-0             |ContainerLoader               |I| Shutting down containers> Task :ofbizDebug  --start FAILEDFAILURE: Build failed with an exception.
> {code}
> While looking into this issue we found out that the following urls does not exist anymore:
> {code:java}
> /* Standard JAXP (mostly), but doesn't seem to be doing XML Schema validation, so making sure that is on... */
>         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
>         factory.setValidating(validate);
>         factory.setNamespaceAware(true);
>         factory.setAttribute("http://xml.org/sax/features/validation", validate);
>         factory.setAttribute("http://apache.org/xml/features/validation/schema", validate);
>         factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
>         factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
>         factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
>         factory.setXIncludeAware(false);
>         factory.setExpandEntityReferences(false);
>         // with a SchemaUrl, a URL object
> {code}
> This above mentioned code snippet is found on lines 433-448 in the UtilXML.java file.
>  
> Best regards
>  
> Max Sonneborn



--
This message was sent by Atlassian Jira
(v8.3.4#803005)