Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-111739

Directory indexing can not be worded and the console got "FreeMarker template error"

    Description

    Steps to reproduce:

    1. Add an asset library
    2. Configure the AL and enable the "Directory Indexing"
    3. Go to the asset library> Documents and Media
    4. Add a document
    5. Try to browse the document at "http://localhost:8080/documents/test-depot-name"

    Actual result
    The requested resource could not be found and the console got an error "FreeMarker template error"

    Expected result
    The user can browse the document through the link

     

    Console error: 

     2020-04-10 01:53:50.005 ERROR [http-nio-8080-exec-12][status_jsp:853] Unable to process template com/liferay/portal/webserver/dependencies/template.ftl
    2020-04-10 01:54:24.715 ERROR [http-nio-8080-exec-3][runtime:59] Error executing FreeMarker template
    FreeMarker template error:
    Denied access to method or field format of class org.apache.commons.lang.time.FastDateFormat----
    FTL stack trace ("~" means nesting-related):
            - Failed at: ${dateFormat.format(entry.modifiedDate)}  [in template "com/liferay/portal/webserver/dependencies/template.ftl" at line 30, column 33]
    ----Java stack trace (for programmers):
    ----
    freemarker.ext.beans.InvalidPropertyException: [... Exception message was already printed; see it above ...]
            at com.liferay.portal.template.freemarker.internal.LiferayFreeMarkerStringModel.get(LiferayFreeMarkerStringModel.java:42)
            at freemarker.core.Dot._eval(Dot.java:43)
            at freemarker.core.Expression.eval(Expression.java:101)
            at freemarker.core.MethodCall._eval(MethodCall.java:55)
            at freemarker.core.Expression.eval(Expression.java:101)
            at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:100)
            at freemarker.core.DollarVariable.accept(DollarVariable.java:63)
            at freemarker.core.Environment.visit(Environment.java:331)
            at freemarker.core.Environment.visit(Environment.java:373)
            at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:321)
            at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271)
            at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:244)
            at freemarker.core.Environment.visitIteratorBlock(Environment.java:643)
            at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:108)
            at freemarker.core.IteratorBlock.accept(IteratorBlock.java:94)
            at freemarker.core.Environment.visit(Environment.java:331)
            at freemarker.core.Environment.visit(Environment.java:337)
            at freemarker.core.Environment.process(Environment.java:310)
            at freemarker.template.Template.process(Template.java:383)
            at com.liferay.portal.template.freemarker.internal.FreeMarkerTemplate.processTemplate(FreeMarkerTemplate.java:154)
            at com.liferay.portal.template.BaseTemplate.processTemplate(BaseTemplate.java:135)
            at com.liferay.portal.webserver.WebServerServlet.sendHTML(WebServerServlet.java:1254)
            at com.liferay.portal.webserver.WebServerServlet.sendDocumentLibrary(WebServerServlet.java:935)
            at com.liferay.portal.webserver.WebServerServlet.lambda$_createFileServingCallable$0(WebServerServlet.java:1570)
            at com.liferay.portal.spring.transaction.BaseTransactionExecutor.execute(BaseTransactionExecutor.java:37)
            at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:39)
            at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
            at com.liferay.portal.webserver.WebServerServlet.service(WebServerServlet.java:311)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
            at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.servlet.filters.lockout.LockoutFilter.processFilter(LockoutFilter.java:58)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
            at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:264)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.remote.cors.internal.servlet.filter.CORSServletFilter.doFilter(CORSServletFilter.java:63)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
            at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
            at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:312)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
            at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
            at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
            at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
            at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
            at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
            at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
            at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
            at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
            at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
            at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
            at java.lang.Thread.run(Thread.java:745)
    

      Attachments

        Activity

          People

          Assignee:
          jeremy.chen Jeremy Chen
          Reporter:
          jeremy.chen Jeremy Chen
          Participants of an Issue:
          Recent user:
          Yunlin "Steven" Sun
          Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

            Dates

            Created:
            Updated:
            Resolved:
            Days since last comment:
            1 year, 21 weeks, 6 days ago

              Packages

              Version Package
              7.0.0 DXP FP92
              7.0.10.14 DXP SP14
              7.0.X
              7.1.10 DXP FP18
              7.1.10.5 SP5
              7.1.X
              7.2.10 DXP FP6
              7.2.X
              7.3.10 DXP GA1
              Master