Details

    • Type: Sub Task Sub Task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 2.3.0-m3, 2.3
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-1752Remove uneccessary calls to GlobalResourceLoader.stop()
      KULRICE-7834Freemarker is formatting non-string types
      KULRICE-9047Term maintenance freemarker exception
      KULRICE-7751Remove publishHeight script function call from timer
      KULRICE-8928Improve initialization of FreeMarker Parser
      KULRICE-12658MultiFileUpload freemarker templates for component and row templates
      KULRICE-10679Check freemarker fix in trunk
      KULRICE-6311.size() calls in ToString() methods trigger JDBC calls and should be removed
      KULRICE-2400Remove uses of KimGroup API calls on Person
      KULRICE-9477Freemarker error with column calculation and submit of maintenance document
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      UIF Component
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      The freemarker interpret calls used to dynamically invoke the macro is very expensive in terms of performance.

      Requires a customization to the freemarker lib for a directive that will accept a variable macro name.

        Activity

        Hide
        Mark Fyffe (Inactive) added a comment -

        Jerry,

        FYI - I came across the error below in KSAP My Plan development, related to this issue. This is after verifying that freemarker-2.3.19-patch1.jar is in my classpath, and that the checksum matches the version uploaded to Kuali Nexus yesterday afternoon.

        There seems to be some work yet to-do on the freemarker patch. Reversing ftl changes from commit 39736 corrects the error, but perhaps I am missing something

        I'm excited about the potential speed-up related to this issue. Keep me posted.

        Best,
        Mark

        Caused by: freemarker.template.TemplateException: Error parsing included template krad/WEB-INF/ftl/lib/template.ftl
        Encountered "<#dyncall " at line 87, column 13 in krad/WEB-INF/ftl/lib/template.ftl.
        Was expecting one of:
            <ATTEMPT> ...
            <IF> ...
            <LIST> ...
            <FOREACH> ...
            <SWITCH> ...
            <ASSIGN> ...
            <GLOBALASSIGN> ...
            <LOCALASSIGN> ...
            <_INCLUDE> ...
            <IMPORT> ...
            <FUNCTION> ...
            <MACRO> ...
            <TRANSFORM> ...
            <VISIT> ...
            <STOP> ...
            <RETURN> ...
            <CALL> ...
            <SETTING> ...
            <COMPRESS> ...
            <COMMENT> ...
            <TERSE_COMMENT> ...
            <NOPARSE> ...
            <END_IF> ...
            <BREAK> ...
            <SIMPLE_RETURN> ...
            <HALT> ...
            <FLUSH> ...
            <TRIM> ...
            <LTRIM> ...
            <RTRIM> ...
            <NOTRIM> ...
            <SIMPLE_NESTED> ...
            <NESTED> ...
            <SIMPLE_RECURSE> ...
            <RECURSE> ...
            <FALLBACK> ...
            <ESCAPE> ...
            <NOESCAPE> ...
            <UNIFIED_CALL> ...
            <WHITESPACE> ...
            <PRINTABLE_CHARS> ...
            <FALSE_ALERT> ...
            "${" ...
            "#{" ...
            
                at freemarker.core.Include.accept(Include.java:162)
                at freemarker.core.Environment.visit(Environment.java:221)
                at freemarker.core.MixedContent.accept(MixedContent.java:92)
                at freemarker.core.Environment.visit(Environment.java:221)
                at freemarker.core.Environment.include(Environment.java:1508)
                at freemarker.core.Environment.importLib(Environment.java:1580)
                at freemarker.core.LibraryLoad.accept(LibraryLoad.java:124)
                at freemarker.core.Environment.visit(Environment.java:221)
                at freemarker.core.MixedContent.accept(MixedContent.java:92)
                at freemarker.core.Environment.visit(Environment.java:221)
                at freemarker.core.Environment.include(Environment.java:1508)
                at freemarker.core.Include.accept(Include.java:169)
                at freemarker.core.Environment.visit(Environment.java:221)
                at freemarker.core.MixedContent.accept(MixedContent.java:92)
                at freemarker.core.Environment.visit(Environment.java:221)
                at freemarker.core.Environment.process(Environment.java:199)
                at freemarker.template.Template.process(Template.java:259)
                at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:366)
                at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:283)
                at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:233)
                at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
                at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
                at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1157)
                at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:927)
                at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
                at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
                ... 87 more
        Caused by: freemarker.core.ParseException: Encountered "<#dyncall " at line 87, column 13 in krad/WEB-INF/ftl/lib/template.ftl.
        Was expecting one of:
            <ATTEMPT> ...
            <IF> ...
            <LIST> ...
            <FOREACH> ...
            <SWITCH> ...
            <ASSIGN> ...
            <GLOBALASSIGN> ...
            <LOCALASSIGN> ...
            <_INCLUDE> ...
            <IMPORT> ...
            <FUNCTION> ...
            <MACRO> ...
            <TRANSFORM> ...
            <VISIT> ...
            <STOP> ...
            <RETURN> ...
            <CALL> ...
            <SETTING> ...
            <COMPRESS> ...
            <COMMENT> ...
            <TERSE_COMMENT> ...
            <NOPARSE> ...
            <END_IF> ...
            <BREAK> ...
            <SIMPLE_RETURN> ...
            <HALT> ...
            <FLUSH> ...
            <TRIM> ...
            <LTRIM> ...
            <RTRIM> ...
            <NOTRIM> ...
            <SIMPLE_NESTED> ...
            <NESTED> ...
            <SIMPLE_RECURSE> ...
            <RECURSE> ...
            <FALLBACK> ...
            <ESCAPE> ...
            <NOESCAPE> ...
            <UNIFIED_CALL> ...
            <WHITESPACE> ...
            <PRINTABLE_CHARS> ...
            <FALSE_ALERT> ...
            "${" ...
            "#{" ...
            
                at freemarker.core.FMParser.generateParseException(FMParser.java:4718)
                at freemarker.core.FMParser.jj_consume_token(FMParser.java:4589)
                at freemarker.core.FMParser.If(FMParser.java:1211)
                at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2393)
                at freemarker.core.FMParser.Content(FMParser.java:2639)
                at freemarker.core.FMParser.OptionalBlock(FMParser.java:2807)
                at freemarker.core.FMParser.If(FMParser.java:1177)
                at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2393)
                at freemarker.core.FMParser.Content(FMParser.java:2639)
                at freemarker.core.FMParser.OptionalBlock(FMParser.java:2807)
                at freemarker.core.FMParser.Compress(FMParser.java:1880)
                at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2417)
                at freemarker.core.FMParser.Content(FMParser.java:2639)
                at freemarker.core.FMParser.OptionalBlock(FMParser.java:2807)
                at freemarker.core.FMParser.Macro(FMParser.java:1851)
                at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2414)
                at freemarker.core.FMParser.Content(FMParser.java:2639)
                at freemarker.core.FMParser.OptionalBlock(FMParser.java:2807)
                at freemarker.core.FMParser.Root(FMParser.java:2979)
                at freemarker.template.Template.<init>(Template.java:171)
                at freemarker.cache.TemplateCache.loadTemplate(TemplateCache.java:447)
                at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:360)
                at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:235)
                at freemarker.template.Configuration.getTemplate(Configuration.java:578)
                at freemarker.core.Environment.getTemplateForInclusion(Environment.java:1490)
                at freemarker.core.Include.accept(Include.java:157)
                ... 112 more
        
        
        Show
        Mark Fyffe (Inactive) added a comment - Jerry, FYI - I came across the error below in KSAP My Plan development, related to this issue. This is after verifying that freemarker-2.3.19-patch1.jar is in my classpath, and that the checksum matches the version uploaded to Kuali Nexus yesterday afternoon. There seems to be some work yet to-do on the freemarker patch. Reversing ftl changes from commit 39736 corrects the error, but perhaps I am missing something I'm excited about the potential speed-up related to this issue. Keep me posted. Best, Mark Caused by: freemarker.template.TemplateException: Error parsing included template krad/WEB-INF/ftl/lib/template.ftl Encountered "<#dyncall " at line 87, column 13 in krad/WEB-INF/ftl/lib/template.ftl. Was expecting one of: <ATTEMPT> ... <IF> ... <LIST> ... <FOREACH> ... <SWITCH> ... <ASSIGN> ... <GLOBALASSIGN> ... <LOCALASSIGN> ... <_INCLUDE> ... <IMPORT> ... <FUNCTION> ... <MACRO> ... <TRANSFORM> ... <VISIT> ... <STOP> ... <RETURN> ... <CALL> ... <SETTING> ... <COMPRESS> ... <COMMENT> ... <TERSE_COMMENT> ... <NOPARSE> ... <END_IF> ... <BREAK> ... <SIMPLE_RETURN> ... <HALT> ... <FLUSH> ... <TRIM> ... <LTRIM> ... <RTRIM> ... <NOTRIM> ... <SIMPLE_NESTED> ... <NESTED> ... <SIMPLE_RECURSE> ... <RECURSE> ... <FALLBACK> ... <ESCAPE> ... <NOESCAPE> ... <UNIFIED_CALL> ... <WHITESPACE> ... <PRINTABLE_CHARS> ... <FALSE_ALERT> ... "${" ... "#{" ... at freemarker.core.Include.accept(Include.java:162) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.Environment.include(Environment.java:1508) at freemarker.core.Environment.importLib(Environment.java:1580) at freemarker.core.LibraryLoad.accept(LibraryLoad.java:124) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.Environment.include(Environment.java:1508) at freemarker.core.Include.accept(Include.java:169) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.Environment.process(Environment.java:199) at freemarker.template.Template.process(Template.java:259) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:366) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:283) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:233) at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1157) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:927) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) ... 87 more Caused by: freemarker.core.ParseException: Encountered "<#dyncall " at line 87, column 13 in krad/WEB-INF/ftl/lib/template.ftl. Was expecting one of: <ATTEMPT> ... <IF> ... <LIST> ... <FOREACH> ... <SWITCH> ... <ASSIGN> ... <GLOBALASSIGN> ... <LOCALASSIGN> ... <_INCLUDE> ... <IMPORT> ... <FUNCTION> ... <MACRO> ... <TRANSFORM> ... <VISIT> ... <STOP> ... <RETURN> ... <CALL> ... <SETTING> ... <COMPRESS> ... <COMMENT> ... <TERSE_COMMENT> ... <NOPARSE> ... <END_IF> ... <BREAK> ... <SIMPLE_RETURN> ... <HALT> ... <FLUSH> ... <TRIM> ... <LTRIM> ... <RTRIM> ... <NOTRIM> ... <SIMPLE_NESTED> ... <NESTED> ... <SIMPLE_RECURSE> ... <RECURSE> ... <FALLBACK> ... <ESCAPE> ... <NOESCAPE> ... <UNIFIED_CALL> ... <WHITESPACE> ... <PRINTABLE_CHARS> ... <FALSE_ALERT> ... "${" ... "#{" ... at freemarker.core.FMParser.generateParseException(FMParser.java:4718) at freemarker.core.FMParser.jj_consume_token(FMParser.java:4589) at freemarker.core.FMParser.If(FMParser.java:1211) at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2393) at freemarker.core.FMParser.Content(FMParser.java:2639) at freemarker.core.FMParser.OptionalBlock(FMParser.java:2807) at freemarker.core.FMParser.If(FMParser.java:1177) at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2393) at freemarker.core.FMParser.Content(FMParser.java:2639) at freemarker.core.FMParser.OptionalBlock(FMParser.java:2807) at freemarker.core.FMParser.Compress(FMParser.java:1880) at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2417) at freemarker.core.FMParser.Content(FMParser.java:2639) at freemarker.core.FMParser.OptionalBlock(FMParser.java:2807) at freemarker.core.FMParser.Macro(FMParser.java:1851) at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2414) at freemarker.core.FMParser.Content(FMParser.java:2639) at freemarker.core.FMParser.OptionalBlock(FMParser.java:2807) at freemarker.core.FMParser.Root(FMParser.java:2979) at freemarker.template.Template.<init>(Template.java:171) at freemarker.cache.TemplateCache.loadTemplate(TemplateCache.java:447) at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:360) at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:235) at freemarker.template.Configuration.getTemplate(Configuration.java:578) at freemarker.core.Environment.getTemplateForInclusion(Environment.java:1490) at freemarker.core.Include.accept(Include.java:157) ... 112 more
        Hide
        Mark Fyffe (Inactive) added a comment -

        FYI - confirmed that patch3 corrects the error encountered yesterday.

        Show
        Mark Fyffe (Inactive) added a comment - FYI - confirmed that patch3 corrects the error encountered yesterday.

          People

          • Assignee:
            Jerry Neal (Inactive)
            Reporter:
            Jerry Neal (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Structure Helper Panel