org.apache.ofbiz.widget.renderer.ScreenRenderException:呈现屏幕时出错

时间:2017-06-12 09:13:23

标签: java ofbiz

我在Windows 10 Pro x64上使用最新的OFBiz(16.11.02)。 我运行命令

gradlew ofbiz --info

然后尝试访问 {{3}}

我在GUI上看到错误

:ERROR MESSAGE:
org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://webtools/widget/CommonScreens.xml#main]: org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://webtools/widget/CommonScreens.xml#main-decorator]: org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty) (Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)) (Error rendering screen [component://webtools/widget/CommonScreens.xml#main-decorator]: org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty) (Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)))

我在cmd(控制台屏幕)上看到错误

2017-06-12 16:16:32,961 |http-nio-8443-exec-7 |TransactionUtil               |I| Transaction rolled back
2017-06-12 16:16:32,961 |http-nio-8443-exec-7 |ControlServlet                |E| Error in request handler:
org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://webtools/widget/CommonScreens.xml#main]: org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://webtools/widget/CommonScreens.xml#main-decorator]: org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty) (Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)) (Error rendering screen [component://webtools/widget/CommonScreens.xml#main-decorator]: org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty) (Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)))
        at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:179) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:136) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:98) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.renderer.macro.MacroScreenViewHandler.render(MacroScreenViewHandler.java:157) ~[ofbiz.jar:?]
        at org.apache.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:984) ~[ofbiz.jar:?]
        at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:648) ~[ofbiz.jar:?]
        at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210) [ofbiz.jar:?]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [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.ContextFilter.doFilter(ContextFilter.java:209) [ofbiz.jar:?]
        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) [ofbiz.jar:?]
        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(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
        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(Thread.java:748) [?:1.8.0_131]
Caused by: org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://webtools/widget/CommonScreens.xml#main-decorator]: org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty) (Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty))
        at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:179) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:860) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) ~[ofbiz.jar:?]
        ... 35 more
Caused by: org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)
        at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:179) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:780) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:860) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) ~[ofbiz.jar:?]
        ... 35 more
Caused by: java.lang.IllegalArgumentException: Template location is empty
        at org.apache.ofbiz.widget.model.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:149) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:215) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.HtmlWidget.renderWidgetString(HtmlWidget.java:140) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:1321) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:780) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:860) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) ~[ofbiz.jar:?]
        at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) ~[ofbiz.jar:?]
        ... 35 more
2017-06-12 16:16:32,969 |http-nio-8443-exec-7 |ControlServlet                |E| An error occurred, going to the errorPage: /error/error.jsp
2017-06-12 16:16:32,969 |http-nio-8443-exec-7 |ControlServlet                |E| Including errorPage: /error/error.jsp
2017-06-12 16:16:33,940 |http-nio-8443-exec-7 |ServerHitBin                  |W| The datamodel data has not been loaded; cannot find hitTypeId 'REQUEST not storing ServerHit.
2017-06-12 16:16:33,941 |http-nio-8443-exec-7 |ControlServlet                |T| [[[main(Domain:https://localhost)] Request Done- total:5.026,since last([main(Domain:http...):5.026]]
> Building 91% > :ofbiz

如何解决?

2 个答案:

答案 0 :(得分:2)

我猜想缺少视觉主题数据。您应首先运行

,使用演示数据填充安装

视窗:

gradlew cleanAll loadDefault

Linux的:

./gradlew cleanAll loadDefault

请参阅README.MD以了解快速入门部分。

答案 1 :(得分:1)

在Windows上

gradlew cleanAll loadDefault ofbiz --info

对于* nix系统(Linux,macOS)

./gradlew cleanAll loadDefault ofbiz --info