[ 
https://issues.apache.org/jira/browse/OFBIZ-11240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16945745#comment-16945745
 ] 

Jacques Le Roux edited comment on OFBIZ-11240 at 10/7/19 9:51 AM:
------------------------------------------------------------------

Yes Samuel,

We had that already 4 times and no real solution yet. As you said fortunately 
it's only polluting the log, closing.


was (Author: jacques.le.roux):
Yes Samuel,

We had that already 4 times and not real solution yet. As you said fortunately 
it's only polluting the log, closing.

> 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)
>  
> To fix it we should replace `web-app` xml tag declaration:
> replace
>  
> {{<web-app version="3.0">}}
>  with
>  
> {{<web-app xmlns="http://java.sun.com/xml/ns/javaee"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee  
> http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; version="3.0">}}



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

Reply via email to