ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-6993) Cannot find the declaration of element 'web-app' in version 3.0 files.
Date Thu, 19 Dec 2019 06:52:00 GMT

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

ASF subversion and git services commented on OFBIZ-6993:
--------------------------------------------------------

Commit 20a82a959808fef728caa93180427f50e03e238f in ofbiz-plugins's branch refs/heads/release18.12
from Mathieu Lirzin
[ https://gitbox.apache.org/repos/asf?p=ofbiz-plugins.git;h=20a82a9 ]

Fixed: Add XML declaration in “web.xml” files (OFBIZ-6993)

These declarations avoid SAXParseException traceback when parsing web.xml
the first time in WebappUtil.parseWebXmlFile

A schema conformance issue has been fixed in ecommerce “web.xml”.

(cherry picked from commit 1158664ba37264fa6b8429033bad768175ff10d5)

# Conflicts handled by hand
#	msggateway/webapp/msggateway/WEB-INF/web.xml


> Cannot find the declaration of element 'web-app' in version 3.0 files.
> ----------------------------------------------------------------------
>
>                 Key: OFBIZ-6993
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6993
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL COMPONENTS
>    Affects Versions: Trunk, Release Branch 15.12
>            Reporter: Forrest Rae
>            Assignee: Jacques Le Roux
>            Priority: Major
>             Fix For: Release Branch 17.12, Release Branch 18.12
>
>         Attachments: 0001-Fixed-when-it-comes-to-web.xml-we-should-rely-solely.patch,
web-app.patch
>
>
> Been seeing the error below in the logs.  Strangely, I've not been able to catch the
exception in a debugger, but was able to isolate it to the definition of the web-app with
version 3.0.  The error disapears when you change the definition from 
> {code:xml}
> <web-app version="3.0">
> {code}
> to this:
> {code:xml}
> <web-app version="3.0"
>          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">
> {code}
> I only tested on 15.12 and Trunk, but it probably affects any release running Tomcat
7.0.48 or higher.  Here is the error:
> {noformat}
>      [java] Apr 07, 2016 4:06:29 PM org.apache.tomcat.util.digester.Digester error
>      [java] SEVERE: Parse Error at line 22 column 24: cvc-elt.1.a: Cannot find the declaration
of element 'web-app'.
>      [java] org.xml.sax.SAXParseException; lineNumber: 22; columnNumber: 24; cvc-elt.1.a:
Cannot find the declaration of element 'web-app'.
>      [java] 	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
>      [java] 	at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
>      [java] 	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>      [java] 	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>      [java] 	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>      [java] 	at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
Source)
>      [java] 	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
>      [java] 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElementAfterName(Unknown
Source)
>      [java] 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source)
>      [java] 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
>      [java] 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
>      [java] 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>      [java] 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>      [java] 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>      [java] 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>      [java] 	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
>      [java] 	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1555)
>      [java] 	at org.ofbiz.webapp.WebAppUtil.parseWebXmlFile(WebAppUtil.java:160)
>      [java] 	at org.ofbiz.webapp.WebAppUtil.getWebXml(WebAppUtil.java:131)
>      [java] 	at org.ofbiz.webapp.WebAppUtil.getControlServletPath(WebAppUtil.java:67)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:498)
>      [java] 	at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:1458)
>      [java] 	at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:71)
>      [java] 	at freemarker.core.MethodCall._eval(MethodCall.java:62)
>      [java] 	at freemarker.core.Expression.eval(Expression.java:78)
>      [java] 	at freemarker.core.Assignment.accept(Assignment.java:70)
>      [java] 	at freemarker.core.Environment.visit(Environment.java:312)
>      [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:62)
>      [java] 	at freemarker.core.Environment.visitByHiddingParent(Environment.java:333)
>      [java] 	at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:148)
>      [java] 	at freemarker.core.Environment.visitIteratorBlock(Environment.java:559)
>      [java] 	at freemarker.core.IteratorBlock.accept(IteratorBlock.java:67)
>      [java] 	at freemarker.core.Environment.visit(Environment.java:312)
>      [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:62)
>      [java] 	at freemarker.core.Environment.visitByHiddingParent(Environment.java:333)
>      [java] 	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
>      [java] 	at freemarker.core.Environment.visit(Environment.java:312)
>      [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:62)
>      [java] 	at freemarker.core.Environment.visit(Environment.java:312)
>      [java] 	at freemarker.core.Environment.process(Environment.java:290)
>      [java] 	at org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:257)
>      [java] 	at org.ofbiz.widget.model.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:167)
>      [java] 	at org.ofbiz.widget.model.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:216)
>      [java] 	at org.ofbiz.widget.model.HtmlWidget.renderWidgetString(HtmlWidget.java:140)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:1319)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:294)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280)
>      [java] 	at org.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164)
>      [java] 	at org.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:211)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:780)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280)
>      [java] 	at org.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164)
>      [java] 	at org.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:211)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:860)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98)
>      [java] 	at org.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280)
>      [java] 	at org.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164)
>      [java] 	at org.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:136)
>      [java] 	at org.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:98)
>      [java] 	at org.ofbiz.widget.renderer.macro.MacroScreenViewHandler.render(MacroScreenViewHandler.java:157)
>      [java] 	at org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:1023)
>      [java] 	at org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:675)
>      [java] 	at org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:213)
>      [java] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
>      [java] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>      [java] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>      [java] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>      [java] 	at org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:323)
>      [java] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>      [java] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>      [java] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>      [java] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>      [java] 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
>      [java] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
>      [java] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>      [java] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>      [java] 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
>      [java] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
>      [java] 	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
>      [java] 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
>      [java] 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
>      [java] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>      [java] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>      [java] 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>      [java] 	at java.lang.Thread.run(Thread.java:745)
> {noformat}



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

Mime
View raw message