Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-13118

Bug in AjaxBreadcrumbs.groovy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Upcoming Branch
    • 18.12.15
    • ecommerce
    • None

    Description

      I found this bug in trunk demo error.log

      2024-06-12 09:30:20,219 |-0.0.0.0-8009-exec-8 |ControlServlet                |E| Error in request handler:
      java.lang.IllegalArgumentException: Error running script at location [component://ecommerce/groovyScripts/catalog/AjaxBreadcrumbs.groovy]: java.lang.NullPointerException
          at org.apache.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:348) ~[ofbiz.jar:?]
          at org.apache.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:324) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.model.AbstractModelAction$Script.runAction(AbstractModelAction.java:634) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.model.AbstractModelAction.runSubActions(AbstractModelAction.java:143) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:278) ~[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:204) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.model.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:797) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:103) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:285) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:103) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:299) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:103) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:285) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:140) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:102) ~[ofbiz.jar:?]
          at org.apache.ofbiz.widget.renderer.macro.MacroScreenViewHandler.render(MacroScreenViewHandler.java:113) ~[ofbiz.jar:?]
          at org.apache.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:1068) ~[ofbiz.jar:?]
          at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:743) ~[ofbiz.jar:?]
          at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:212) ~[ofbiz.jar:?]
          at org.apache.ofbiz.product.category.SeoControlServlet.doGet(SeoControlServlet.java:89) ~[ofbiz.jar:?]
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:645) ~[javax.servlet-api-4.0.1.jar:4.0.1]
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:750) ~[javax.servlet-api-4.0.1.jar:4.0.1]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat-embed-websocket-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.ofbiz.product.category.SeoContextFilter.doFilter(SeoContextFilter.java:229) ~[ofbiz.jar:?]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.ofbiz.product.category.SeoContentUrlFilter.doFilter(SeoContentUrlFilter.java:101) ~[ofbiz.jar:?]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.ofbiz.product.category.CatalogUrlFilter.doFilter(CatalogUrlFilter.java:337) ~[ofbiz.jar:?]
          at org.apache.ofbiz.product.category.CatalogUrlSeoFilter.doFilter(CatalogUrlSeoFilter.java:68) ~[ofbiz.jar:?]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:191) ~[ofbiz.jar:?]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) ~[log4j-web-2.17.2.jar:2.17.2]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:670) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346) ~[tomcat-catalina-9.0.86.jar:9.0.86]
          at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:424) ~[tomcat-coyote-9.0.86.jar:9.0.86]
          at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-coyote-9.0.86.jar:9.0.86]
          at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) ~[tomcat-coyote-9.0.86.jar:9.0.86]
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794) ~[tomcat-coyote-9.0.86.jar:9.0.86]
          at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-coyote-9.0.86.jar:9.0.86]
          at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-util-9.0.86.jar:9.0.86]
          at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-util-9.0.86.jar:9.0.86]
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) ~[tomcat-util-9.0.86.jar:9.0.86]
          at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_412]
      Caused by: java.lang.NullPointerException
          at org.apache.ofbiz.product.category.CategoryContentWrapper.get(CategoryContentWrapper.java:83) ~[ofbiz.jar:?]
          at org.apache.ofbiz.content.content.ContentWrapper$get.call(Unknown Source) ~[?:?]
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) ~[groovy-all-2.4.13.jar:2.4.13]
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) ~[groovy-all-2.4.13.jar:2.4.13]
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) ~[groovy-all-2.4.13.jar:2.4.13]
          at AjaxBreadcrumbs.run(AjaxBreadcrumbs.groovy:48) ~[?:?]
          at org.apache.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:209) ~[ofbiz.jar:?]
          at org.apache.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:342) ~[ofbiz.jar:?]
          ... 61 more
      2024-06-12 09:30:20,223 |-0.0.0.0-8009-exec-8 |ControlServlet                |E| An error occurred, going to the errorPage: /error/error.jsp

      I don't know how to reproduce locally and I did not check error.log in 18.12 (stable) demo. So I consider it a minor bug, though I will backport if it makes sense there.

      Attachments

        Activity

          People

            jleroux Jacques Le Roux
            jleroux Jacques Le Roux
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: