Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-97920

Clicking on the "Saved for Later" option under profiles , leads to system error

      Summary

      Clicking on the "Saved for Later" option in the Profile dropdown leads to errors if there are any pages that are marked as Favourites using "Save for Later" option

      When no page is marked as favourite

      Reproduction Steps

      1. Install Confluence version 8.5.14 
      2. Create a Page
      3. Mark it as Favourites ("Save for Later")
      4. Now click on Profiles and click "Saved for Later"
        Issue can be replicated for both Java 11 and Java 17

      Actual Result

      Error in the Logs

      2024-09-10 07:57:02,427 INFO [http-nio-8090-exec-23 url: /confluence/500page.jsp; user: admin] [atlassian.confluence.status.SystemErrorInformationLogger] writeToLog \nRequest Unique ID : f01002c5-49c9-4e5f-bb40-0aeddd48d12d\n---------
      -----------------\nJVM Stats\n--------------------------\nxmx = 2147483648\nusedNonHeap = 618595448\navailableHeap = 1404665856\navailableNonHeap = -1\nallocatedHeap = 2147483648\nfreeAllocatedHeap = 1404665856\nmaxNonHeap = -1\navail
      ablePermGen = 0\nmaxPermGen = -1\nmaxHeap = 2147483648\nusedHeap = 742817792\nusedPermGen = -1\nxms = 2147483648\n--------------------------\nRequest Information\n--------------------------\nURL: https://linux-80343.prod.atl-cd.net/co
      nfluence/500page.jsp\nScheme: https\nServer: linux-80343.prod.atl-cd.net\nPort: 443\nURI: /confluence/500page.jsp\nContext Path: /confluence\nServlet Path: /500page.jsp\nPath Info: null\nQuery String: null\n--------------------------\
      nAttributes\n--------------------------\njavax.servlet.forward.request_uri: /confluence/users/viewmyfavourites.action\njavax.servlet.forward.context_path: /confluence\njavax.servlet.forward.servlet_path: /users/viewmyfavourites.action
      \njavax.servlet.forward.mapping: org.apache.catalina.core.ApplicationMapping$MappingImpl@74aa8e3f\n__prepare_recursion_counter: 1\nstruts.actionMapping: noActionMapping\njavax.servlet.error.status_code: 500\nbrave.SpanCustomizer: Span
      Customizer(RealSpan(a6797bc3bb7a4e7d/a6797bc3bb7a4e7d))\ncom.atlassian.confluence.impl.profiling.DecoratorTimings: com.atlassian.confluence.impl.profiling.DecoratorTimings@163768d\norg.apache.struts2.dispatcher.filter.StrutsPrepareFil
      ter.REQUEST_EXCLUDED_FROM_ACTION_MAPPING: false\ncom.opensymphony.sitemesh.APPLIED_ONCE: true\natlas.webInterfaceContext: com.atlassian.confluence.plugin.descriptor.web.DefaultWebInterfaceContext@7ed0a765\ncom.atlassian.confluence.uti
      l.message.MessagesDecoratorFilter__already_filtered__: true\n__wrap_recursion_counter: 1\ncom.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter_already_filtered: true\natlassian.core.seraph.original.url: /500p
      age.jsp\ncom.atlassian.labs.botkiller.BotKillerFilter: true\ncom.atlassian.gzipfilter.GzipFilter_already_filtered: true\nConfluence-Request-Time: 1725955022404\nstruts.valueStack: com.opensymphony.xwork2.ognl.OgnlValueStack@70102243\n
      com.atlassian.confluence.web.ConfluenceJohnsonFilter_already_filtered: true\ncom.atlassian.seraph.auth.LoginReason: OK\nsitemesh.secondaryStorageLimit: -1\nconfluence.messages: {websudo-message=com.atlassian.confluence.security.websud
      o.WebSudoMessage@506b9108}\nconfluence.themecontext: com.atlassian.confluence.themes.ThemeContext@4aa65296\njavax.servlet.error.message: Invocation of method 'after' in  class java.sql.Timestamp threw exception java.lang.NullPointerEx
      ception: Cannot invoke \"java.sql.Timestamp.getTime()\" because \"ts\" is null at /users/myfavourites.vm[line 34, column 78]\njavax.servlet.error.servlet_name: default\nbrave.propagation.TraceContext: a6797bc3bb7a4e7d/a6797bc3bb7a4e7d
      \nbrave.servlet.TracingFilter$SendHandled: true\ncom.opensymphony.sitemesh.USINGSTREAM: false\nB3-TraceId: 1fa6e984efcc89\nloginfilter.already.filtered: true\njavax.servlet.jsp.jspException: org.apache.velocity.exception.MethodInvocat
      ionException: Invocation of method 'after' in  class java.sql.Timestamp threw exception java.lang.NullPointerException: Cannot invoke \"java.sql.Timestamp.getTime()\" because \"ts\" is null at /users/myfavourites.vm[line 34, column 78
      ]\njavax.servlet.error.request_uri: /confluence/users/viewmyfavourites.action\ncom.atlassian.core.filters.HeaderSanitisingFilter_already_filtered: true\ncom.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFixupFilter: true\njavax.servle
      t.error.exception: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'after' in  class java.sql.Timestamp threw exception java.lang.NullPointerException: Cannot invoke \"java.sql.Timestamp.getTime()\" becau
      se \"ts\" is null at /users/myfavourites.vm[line 34, column 78]\nos_securityfilter_already_filtered: true\ncom.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFilter: true\n--------------------------\nParameters\n-----------------------
      ---\ncaused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'after' in  class java.sql.Timestamp threw exception java.lang.NullPointerException: Cannot invoke \"java.sql.Timestamp.getTime()\" because
      \"ts\" is null at /users/myfavourites.vm[line 34, column 78]\nat org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:342)\ncaused by: java.lang.NullPointerException: Cannot invoke \"java.sql.Time
      stamp.getTime()\" because \"ts\" is null\nat java.sql/java.sql.Timestamp.compareTo(Timestamp.java:427)\n
      2024-09-10 07:57:02,427 ERROR [http-nio-8090-exec-23 url: /confluence/500page.jsp; user: admin] [atlassian.confluence.status.SystemErrorInformationLogger] logException Unhandled exception f01002c5-49c9-4e5f-bb40-0aeddd48d12d: Invocati
      on of method 'after' in  class java.sql.Timestamp threw exception java.lang.NullPointerException: Cannot invoke \"java.sql.Timestamp.getTime()\" because \"ts\" is null at /users/myfavourites.vm[line 34, column 78]
       -- traceId: a6797bc3bb7a4e7d
      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'after' in  class java.sql.Timestamp threw exception java.lang.NullPointerException: Cannot invoke "java.sql.Timestamp.getTime()" because "ts" is null at /u
      sers/myfavourites.vm[line 34, column 78]
              at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:342)
              at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
              at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
      

       

          Form Name

            [CONFSERVER-97920] Clicking on the "Saved for Later" option under profiles , leads to system error

            A fix for this issue is available in Confluence Server and Data Center 9.3.1. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Akshay Kumar added a comment - A fix for this issue is available in Confluence Server and Data Center 9.3.1. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Quan Pham added a comment -

            A fix for this issue is available in Confluence Server and Data Center 9.1.1. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Quan Pham added a comment - A fix for this issue is available in Confluence Server and Data Center 9.1.1. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Quan Pham added a comment -

            A fix for this issue is available in Confluence Server and Data Center 8.9.8. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Quan Pham added a comment - A fix for this issue is available in Confluence Server and Data Center 8.9.8. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Quan Pham added a comment -

            A fix for this issue is available in Confluence Server and Data Center 8.5.17. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Quan Pham added a comment - A fix for this issue is available in Confluence Server and Data Center 8.5.17. Upgrade now or check out the Release Notes to see what other issues are resolved.

            This fix needs to be included in the upcoming LTS version 9.2 as well. Please see that the resolution makes it to LTS.

            David Patterson added a comment - This fix needs to be included in the upcoming LTS version 9.2 as well. Please see that the resolution makes it to LTS.

            When no previousLoginDate exists the error appears.

            We could fix the problem with errorhandling regarding the previousLogindate.

             

            Other places where a fix would be more appropriate is that a login truly sets the previous login time stamp so it is availabe at this place

            Tim Fiernkranz added a comment - When no previousLoginDate exists the error appears. We could fix the problem with errorhandling regarding the previousLogindate.   Other places where a fix would be more appropriate is that a login truly sets the previous login time stamp so it is availabe at this place

            We are also affected by this issue. Understanding Atlassian's Server bug fix policy, if this bug is only resolved in 9.0.x, it will necessitate a breaking upgrade in our custom developed plugin. Our migration to 9.x is scheduled for the 9.2 LTS version. Request this fix be back-ported within a 8.9.x release.

            David Patterson added a comment - We are also affected by this issue. Understanding Atlassian's Server bug fix policy, if this bug is only resolved in 9.0.x, it will necessitate a breaking upgrade in our custom developed plugin. Our migration to 9.x is scheduled for the 9.2 LTS version. Request this fix be back-ported within a 8.9.x release.

            Robert Wolf added a comment - - edited

            This is copy of my comment in CONFSERVER-94126:


            We have this bug on confluence 8.5.14 and 8.5.15 with Java 11. There is an error

            2024-09-09 08:48:21,596 ERROR [http-nio-8080-exec-2378] [views.velocity.result.VelocityResult] doExecute Unable to render velocity template: '/users/myfavourites.vm'                                                                             
            org.apache.velocity.exception.MethodInvocationException: Invocation of method 'after' in  class java.sql.Timestamp threw exception java.lang.NullPointerException at /users/myfavourites.vm[line 34, column 78]                                   
            

            The line 34 in /users/myfavourites.vm contains:

            "lastModificationDateafter": "$page.lastModificationDate.after($previousLoginDate)",
            

            If I remove this line from the myfavourites.vm, then the page can be rendered.

            If our error the same error as reported and has been again introduced in some update? Or it is new bug? Is there already report for this bug? Or should I create support request?

            We use Java 11 and there is a line 385 in the file confluence/includes/soy/pagelist.soy with content

            {if $user}
            

            So both workaround do not work for us.

            Thank you for final fix.

            update: I have now saved the same pages as the other user, who gets Ooops Page and I can still see my favorites but he cannot see his favorites.

            Regards,

            Robert Wolf.

            Robert Wolf added a comment - - edited This is copy of my comment in CONFSERVER-94126 : We have this bug on confluence 8.5.14 and 8.5.15 with Java 11. There is an error 2024-09-09 08:48:21,596 ERROR [http-nio-8080-exec-2378] [views.velocity.result.VelocityResult] doExecute Unable to render velocity template: '/users/myfavourites.vm' org.apache.velocity.exception.MethodInvocationException: Invocation of method 'after' in class java.sql.Timestamp threw exception java.lang.NullPointerException at /users/myfavourites.vm[line 34, column 78] The line 34 in /users/myfavourites.vm contains: "lastModificationDateafter": "$page.lastModificationDate.after($previousLoginDate)", If I remove this line from the myfavourites.vm, then the page can be rendered. If our error the same error as reported and has been again introduced in some update? Or it is new bug? Is there already report for this bug? Or should I create support request? We use Java 11 and there is a line 385 in the file confluence/includes/soy/pagelist.soy with content {if $user} So both workaround do not work for us. Thank you for final fix. update: I have now saved the same pages as the other user, who gets Ooops Page and I can still see my favorites but he cannot see his favorites. Regards, Robert Wolf.

            Mohan Rao added a comment -

            ok

            Mohan Rao added a comment - ok

              f9221957a5e4 Akshay Rai
              d51fc966722f Shivangi Nayak
              Affected customers:
              5 This affects my team
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: