我能够成功设置ofbiz16.11和postgres9.6,大部分功能都可以使用。但是,当我访问https://127.0.0.1:8443/ecommerce/control/main并点击类别时:
我收到以下错误:
java.lang.Exception: Error rendering screen [component://ecommerce/widget/CatalogScreens.xml#newbreadcrumbs]: java.lang.NullPointerException
at org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:361) [bin/:?]
at org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:302) [bin/:?]
at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:171) [bin/:?]
at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) [bin/:?]
at org.apache.ofbiz.widget.model.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:780) [bin/:?]
at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [bin/:?]
at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [bin/:?]
at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [bin/:?]
at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:294) [bin/:?]
at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [bin/:?]
at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [bin/:?]
at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [bin/:?]
at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:136) [bin/:?]
at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:98) [bin/:?]
at org.apache.ofbiz.widget.renderer.macro.MacroScreenViewHandler.render(MacroScreenViewHandler.java:157) [bin/:?]
at org.apache.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:984) [bin/:?]
at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:648) [bin/:?]
at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210) [bin/:?]
at org.apache.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:85) [bin/:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.39.jar:8.0.39]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:156) [bin/:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.ofbiz.content.content.ContentUrlFilter.doFilter(ContentUrlFilter.java:100) [bin/:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.ofbiz.product.category.CatalogUrlFilter.doFilter(CatalogUrlFilter.java:336) [bin/:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:196) [bin/:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104) [tomcat-coyote-8.0.42.jar:8.0.42]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) [tomcat-coyote-8.0.42.jar:8.0.42]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1519) [tomcat-coyote-8.0.42.jar:8.0.42]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1475) [tomcat-coyote-8.0.42.jar:8.0.42]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_161]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-8.0.42.jar:8.0.42]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_161]
如何解决此错误?
答案 0 :(得分:0)
也许默认是数据没有加载到DB中。所以首先你需要正确加载默认数据。 尝试下面的命令。
MS Windows: gradlew cleanAll loadDefault
类Unix操作系统: ./gradlew cleanAll loadDefault