• OFBIZ bug_ControlServlet.java:239:ERROR


    错误日志:

    [java] 2014-09-23 00:11:34,877 (http-bio-0.0.0.0-8080-exec-4) [     ControlServlet.java:141:INFO ] [[[main(Domain:http://localhost)] Request Begun, encoding=[UTF-8]- total:0.0,since last(Begin):0.0]]
         [java] 2014-09-23 00:11:34,877 (http-bio-0.0.0.0-8080-exec-4) [     ControlServlet.java:164:ERROR] [ControlServlet] ERROR: delegator not found in ServletContext
         [java] 2014-09-23 00:11:34,878 (http-bio-0.0.0.0-8080-exec-4) [     ControlServlet.java:176:ERROR] [ControlServlet] ERROR: dispatcher not found in ServletContext
         [java] 2014-09-23 00:11:34,878 (http-bio-0.0.0.0-8080-exec-4) [     ControlServlet.java:185:ERROR] [ControlServlet] ERROR: authorization not found in ServletContext
         [java] 2014-09-23 00:11:34,878 (http-bio-0.0.0.0-8080-exec-4) [     ControlServlet.java:194:ERROR] [ControlServlet] ERROR: security not found in ServletContext
         [java] 2014-09-23 00:11:34,878 (http-bio-0.0.0.0-8080-exec-4) [       VisitHandler.java:217:ERROR] Could not find delegator in request or with delegatorName [null] in session, not creating/getting Visitor entity
         [java] 2014-09-23 00:11:34,879 (http-bio-0.0.0.0-8080-exec-4) [       VisitHandler.java:273:WARN ] 
         [java] ---- exception report ----------------------------------------------------------
         [java] Could not find or create the visitor...
         [java] Exception: java.lang.Exception
         [java] Message: null
         [java] ---- stack trace ---------------------------------------------------------------
         [java] java.lang.Exception
         [java] org.ofbiz.webapp.stats.VisitHandler.getVisitor(VisitHandler.java:273)
         [java] org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:205)
         [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
         [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         [java] org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
         [java] org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
         [java] org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
         [java] org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
         [java] org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
         [java] org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
         [java] org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
         [java] org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
         [java] org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
         [java] org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
         [java] org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
         [java] org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
         [java] org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
         [java] java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         [java] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         [java] org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
         [java] java.lang.Thread.run(Thread.java:662)
         [java] --------------------------------------------------------------------------------
         [java] 2014-09-23 00:11:34,879 (http-bio-0.0.0.0-8080-exec-4) [       VisitHandler.java:118:ERROR] Could not find delegator with delegatorName [null] in session, or a delegator attribute in the ServletContext, not creating Visit entity
         [java] 2014-09-23 00:11:34,879 (http-bio-0.0.0.0-8080-exec-4) [       VisitHandler.java:192:WARN ] Could not find or create the visit...
         [java] 2014-09-23 00:11:34,889 (http-bio-0.0.0.0-8080-exec-4) [    ConfigXMLReader.java:120:INFO ] controller loaded: 0.0s, 1 requests, 1 views in jndi:/0.0.0.0/practice/WEB-INF/controller.xml
         [java] 2014-09-23 00:11:34,907 (http-bio-0.0.0.0-8080-exec-4) [    ConfigXMLReader.java:120:INFO ] controller loaded: 0.0020s, 36 requests, 19 views in file:/F:/workspace/opensource/apache-obiz/apache-ofbiz-12.04.05/framework/common/webcommon/WEB-INF/common-controller.xml
         [java] 2014-09-23 00:11:34,908 (http-bio-0.0.0.0-8080-exec-4) [     RequestHandler.java:766:INFO ] Rendering View [main], sessionId=956C87DAFBAFC4B436EECA4886069E86.jvm1
         [java] 2014-09-23 00:11:34,909 (http-bio-0.0.0.0-8080-exec-4) [     ControlServlet.java:239:ERROR] 
         [java] ---- runtime exception report --------------------------------------------------
         [java] Error in request handler: 
         [java] Exception: java.lang.NullPointerException
         [java] Message: null
         [java] ---- stack trace ---------------------------------------------------------------
         [java] java.lang.NullPointerException
         [java] org.ofbiz.base.util.UtilHttp.getServletContextMap(UtilHttp.java:378)
         [java] org.ofbiz.base.util.UtilHttp.getCombinedMap(UtilHttp.java:90)
         [java] org.ofbiz.widget.screen.ScreenRenderer.populateContextForRequest(ScreenRenderer.java:197)
         [java] org.ofbiz.widget.screen.ScreenRenderer.populateContextForRequest(ScreenRenderer.java:188)
         [java] org.ofbiz.widget.screen.ScreenWidgetViewHandler.render(ScreenWidgetViewHandler.java:94)
         [java] org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:868)
         [java] org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:582)
         [java] org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:224)
         [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
         [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         [java] org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
         [java] org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
         [java] org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
         [java] org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
         [java] org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
         [java] org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
         [java] org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
         [java] org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
         [java] org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
         [java] org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
         [java] org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
         [java] org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
         [java] org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
         [java] java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         [java] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         [java] org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
         [java] java.lang.Thread.run(Thread.java:662)
         [java] --------------------------------------------------------------------------------
         [java] 2014-09-23 00:11:34,909 (http-bio-0.0.0.0-8080-exec-4) [     ControlServlet.java:250:ERROR] An error occurred, going to the errorPage: /error/error.jsp
         [java] 2014-09-23 00:11:34,909 (http-bio-0.0.0.0-8080-exec-4) [     ControlServlet.java:257:ERROR] Including errorPage: /error/error.jsp
         [java] 2014-09-23 00:11:34,910 (http-bio-0.0.0.0-8080-exec-4) [       VisitHandler.java:217:ERROR] Could not find delegator in request or with delegatorName [null] in session, not creating/getting Visitor entity
         [java] 2014-09-23 00:11:34,911 (http-bio-0.0.0.0-8080-exec-4) [       VisitHandler.java:273:WARN ] 
         [java] ---- exception report ----------------------------------------------------------
         [java] Could not find or create the visitor...
         [java] Exception: java.lang.Exception
         [java] Message: null
         [java] ---- stack trace ---------------------------------------------------------------
         [java] java.lang.Exception
         [java] org.ofbiz.webapp.stats.VisitHandler.getVisitor(VisitHandler.java:273)
         [java] org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:323)
         [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
         [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         [java] org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
         [java] org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
         [java] org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
         [java] org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
         [java] org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
         [java] org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
         [java] org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
         [java] org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
         [java] org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
         [java] org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
         [java] org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
         [java] org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
         [java] org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
         [java] java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         [java] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         [java] org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
         [java] java.lang.Thread.run(Thread.java:662)
         [java] --------------------------------------------------------------------------------
         [java] 2014-09-23 00:11:34,912 (http-bio-0.0.0.0-8080-exec-4) [       VisitHandler.java:118:ERROR] Could not find delegator with delegatorName [null] in session, or a delegator attribute in the ServletContext, not creating Visit entity
         [java] 2014-09-23 00:11:34,912 (http-bio-0.0.0.0-8080-exec-4) [       VisitHandler.java:192:WARN ] Could not find or create the visit...
         [java] 2014-09-23 00:11:34,912 (http-bio-0.0.0.0-8080-exec-4) [       ServerHitBin.java:626:WARN ] Could not find a visitId, so not storing ServerHit. This is probably a configuration error. If you turn off persistance of visits you should also turn off persistence of hits.
         [java] 2014-09-23 00:11:34,913 (http-bio-0.0.0.0-8080-exec-4) [     ControlServlet.java:331:INFO ] [[[main(Domain:http://localhost)] Request Done- total:0.036,since last([main(Domain:http...):0.036]]

    问题解决:

    由于web.xml没有配置ContextFilter,加上此配置即可解决该问题。

    <filter>
            <filter-name>ContextFilter</filter-name>
            <display-name>ContextFilter</display-name>
            <filter-class>org.ofbiz.webapp.control.ContextFilter</filter-class>
            <init-param><param-name>disableContextSecurity</param-name><param-value>N</param-value></init-param>
            <init-param>
                <param-name>allowedPaths</param-name>
                <param-value>/error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
            </init-param>
            <init-param>
                <param-name>errorCode</param-name>
                <param-value>403</param-value>
            </init-param>
            <init-param>
                <param-name>redirectPath</param-name>
                <param-value>/control/main</param-value>
            </init-param>
        </filter>
        <filter-mapping>
            <filter-name>ContextFilter</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
  • 相关阅读:
    Codeforces Round #319 (Div. 2) D
    因为网络请求是 异步的,
    ios真蛋疼,
    单例模式的两种实现,
    jump, jump,
    一点 误删,
    关于代理,
    button上的两个手势,
    数据,
    header 的蓝色,
  • 原文地址:https://www.cnblogs.com/yanchuanblog/p/3987391.html
Copyright © 2020-2023  润新知