为什么我在OFboz中收到以下错误?

时间:2013-09-16 04:39:31

标签: ofbiz

我使用ofbiz开发了一个网上商店。每次加载页面时我都会在提示中看到这个错误。帮助我了解这个错误

Servlet.service() for servlet CatalogUrlServlet threw exception    java.lang.NullPointerException
            at org.ofbiz.webapp.website.WebSiteWorker.getWebSite(WebSiteWorker.java:52)
            at org.ofbiz.product.catalog.CatalogWorker.getWebSite(CatalogWorker.java:56)
            at org.ofbiz.product.store.ProductStoreWorker.getProductStoreId(ProductStoreWorker.java:83)
            at org.ofbiz.product.catalog.CatalogWorker.getStoreCatalogs(CatalogWorker.java:77)
            at org.ofbiz.product.catalog.CatalogWorker.getCatalogIdsAvailable(CatalogWorker.java:208)
            at org.ofbiz.product.catalog.CatalogWorker.getCurrentCatalogId(CatalogWorker.java:194)
            at org.ofbiz.product.category.CatalogUrlServlet.doGet(CatalogUrlServlet.java:141)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.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.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
            at org.ofbiz.catalina.container.CrossSubdomainSessionValve.invoke(CrossSubdomainSessionValve.java:62)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)

1 个答案:

答案 0 :(得分:0)

什么是OFboz? 您是否在web.xml中设置了与组件/网站关联的websiteId?

<context-param>
    <param-name>webSiteId</param-name>
    <param-value>WebStore</param-value>
    <description>A unique ID used to look up the WebSite entity</description>
</context-param>