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

Samuel Trégouët updated OFBIZ-11240:
------------------------------------
    Attachment: debug-webapp.groovy

> parsing web.xml via WebAppUtil is reporting error
> -------------------------------------------------
>
>                 Key: OFBIZ-11240
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11240
>             Project: OFBiz
>          Issue Type: Bug
>            Reporter: Samuel Trégouët
>            Priority: Major
>         Attachments: debug-webapp.groovy
>
>
> when parsing `web.xml` with WebAppUtil to get webSiteId or control servlet 
> path we can see the following trace in log:
>  
> org.xml.sax.SAXParseException; lineNumber: 22; columnNumber: 24; cvc-elt.1: 
> Cannot find the declaration of element 'web-app'.
>  at 
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
> Source) 
>  at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) 
>  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) 
>  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) 
>  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) 
>  at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown 
> Source) 
>  at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) 
>  at 
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElementAfterName(Unknown
>  Source) 
>  at 
> org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
>  Source)
>  at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>  Source)
>  at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
> Source) 
>  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) 
>  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) 
>  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) 
>  at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) 
>  at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) 
>  at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1431)
>  at org.apache.ofbiz.webapp.WebAppUtil.parseWebXmlFile(WebAppUtil.java:260)
>  at org.apache.ofbiz.webapp.WebAppUtil.getWebXml(WebAppUtil.java:232) 
>  at 
> org.apache.ofbiz.webapp.WebAppUtil.getControlServletPath(WebAppUtil.java:82) 
>  at org.apache.ofbiz.webapp.WebAppUtil$getControlServletPath.call(Unknown 
> Source)
>  
> This not "really"  a problem since it is not an error but just a report, but 
> it pollutes log a lot when you are trying to setBaseUrl in an email and code 
> is scanning all webapp.
> I'm attaching a groovy script which produces the above report error (the 
> report error is not really easy to produce in real ofbiz application)
>  



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

Reply via email to