面对org / dom4j / DocumentException

时间:2014-09-10 08:22:25

标签: java saxparseexception

调用java类时我遇到了这个问题。如果有人知道这意味着什么,那对我来说非常有帮助。

2014-09-06 00:03:35,213 WARN  [com.eu.interflow.livesite.pagetokens.PageTokenVariableUniqTagsCollection] Could not parse headInjection
org.dom4j.DocumentException: Error on line 1 of document  : The element type "META" must be terminated by the matching end-tag "</META>". Nested exception: The element type "META" must be terminated by the matching end-tag "</META>".
        at org.dom4j.io.SAXReader.read(SAXReader.java:482)
        at com.eu.interflow.livesite.pagetokens.PageTokenVariableUniqTagsCollection.parsePageScopeData(PageTokenVariableUniqTagsCollection.java:60)
        at com.eu.interflow.livesite.pagetokens.PageTokenVariableUniqTagsCollection.render(PageTokenVariableUniqTagsCollection.java:107)
        at com.interwoven.livesite.runtime.page.PageTokenContainer.render(PageTokenContainer.java:277)
        at com.interwoven.livesite.runtime.model.page.RuntimePage.transformAndOutput(RuntimePage.java:464)
        at com.interwoven.livesite.runtime.model.page.RuntimePage.transformAndOutput(RuntimePage.java:444)
        at com.interwoven.livesite.runtime.rendering.RenderingManager.doOutputPage(RenderingManager.java:1316)
        at com.interwoven.livesite.runtime.rendering.RenderingManager.renderPageGoal(RenderingManager.java:386)
        at com.interwoven.livesite.runtime.rendering.RenderingManager.render(RenderingManager.java:256)
        at com.interwoven.livesite.runtime.filter.LiveSiteFilter.doFilter(LiveSiteFilter.java:136)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
        at com.new.portablepower.framework.friendlyurl.rules.ErrorRewriteMatch.execute(ErrorRewriteMatch.java:45)
        at org.tuckey.web.filters.urlrewrite.RewrittenUrlClass.doRewrite(RewrittenUrlClass.java:61)
        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.new.portablepower.framework.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:44)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.new.portablepower.framework.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:44)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at eu.old.livesite.external.authorization.filter.AuthorizationFilter.doFilter(AuthorizationFilter.java:74)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
Nested exception:
org.xml.sax.SAXParseException: The element type "META" must be terminated by the matching end-tag "</META>".
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(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.XMLScanner.reportFatalError(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(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.dom4j.io.SAXReader.read(SAXReader.java:465)
        at com.eu.interflow.livesite.pagetokens.PageTokenVariableUniqTagsCollection.parsePageScopeData(PageTokenVariableUniqTagsCollection.java:60)
        at com.eu.interflow.livesite.pagetokens.PageTokenVariableUniqTagsCollection.render(PageTokenVariableUniqTagsCollection.java:107)
        at com.interwoven.livesite.runtime.page.PageTokenContainer.render(PageTokenContainer.java:277)
        at com.interwoven.livesite.runtime.model.page.RuntimePage.transformAndOutput(RuntimePage.java:464)
        at com.interwoven.livesite.runtime.model.page.RuntimePage.transformAndOutput(RuntimePage.java:444)
        at com.interwoven.livesite.runtime.rendering.RenderingManager.doOutputPage(RenderingManager.java:1316)
        at com.interwoven.livesite.runtime.rendering.RenderingManager.renderPageGoal(RenderingManager.java:386)
        at com.interwoven.livesite.runtime.rendering.RenderingManager.render(RenderingManager.java:256)
        at com.interwoven.livesite.runtime.filter.LiveSiteFilter.doFilter(LiveSiteFilter.java:136)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
        at com.new.portablepower.framework.friendlyurl.rules.ErrorRewriteMatch.execute(ErrorRewriteMatch.java:45)
        at org.tuckey.web.filters.urlrewrite.RewrittenUrlClass.doRewrite(RewrittenUrlClass.java:61)
        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.new.portablepower.framework.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:44)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.new.portablepower.framework.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:44)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at eu.old.livesite.external.authorization.filter.AuthorizationFilter.doFilter(AuthorizationFilter.java:74)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)

1 个答案:

答案 0 :(得分:0)

异常消息非常清楚:

The element type "META" must be terminated by the matching end-tag "</META>"

您正在尝试解析除XML之外的任何内容(我认为您尝试使用XML-Parse来解析HTML)。

使用正确的工具解析HTML。