Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-15154

Using @Persistable leads to WARN "Failed to logout persistableSession"

    XMLWordPrintable

Details

    • Flagged
    • Orion
    • Orion.Cycle8.Sprint
    • Small (1-2)

    Description

      Using @Persistable in a REST resource, and probably also in an HST Component, as described at https://xmdocumentation.bloomreach.com/library/concepts/component-development/hstcomponent-persistable-annotation-and-workflow.html leads to

      WARN  http-nio-8080-exec-7 [PersistableAnnotationInvokerPostprocessor.postprocoess:62] Failed to logout persistableSession
      java.lang.IllegalStateException: Invalid session which is already returned to the pool! 
      at org.hippoecm.hst.core.jcr.pool.PooledSessionDecoratorProxyFactoryImpl$PooledSessionInterceptor.intercept(PooledSessionDecoratorProxyFactoryImpl.java:106) ~[hst-session-pool-14.7.4.jar:?]
      ...
      at com.sun.proxy.$Proxy221.logout(Unknown Source) ~[?:?]
      at org.hippoecm.hst.jaxrs.cxf.PersistableAnnotationInvokerPostprocessor.postprocoess(PersistableAnnotationInvokerPostprocessor.java:60) [hst-jaxrs-14.7.8.jar:14.7.8]
      

      Reproduction
      See myproject14.7.8-persistable.zip

      • 14.7.8 project, add Simple Content and manual REST resource
      • in ContentDocumentResource, add 
            @POST
            @Path("/doPost")
            @Persistable
            public void doPost(@Context final HttpServletRequest request,
                                                 @Context HttpServletResponse servletResponse) {
        
                System.out.println("HIT org.example.rest.ContentDocumentResource.doPost");
            }
        

      Result: WARN "Failed to logout persistableSession" with stack trace

      Analysis

      This is a result of CMS-14930 (14.7.4, 15.0.0)

      • PersistableAnnotationInvokerPostprocessor#postprocoess (sic!) calls both requestContext.setSession and persistableSession.logout()
      • the change in CMS-14930 already does a log out by calling disposeResource in HstRequestContextImpl#setSession

       

       

      Attachments

        Issue Links

          Activity

            People

              jhoffman Jeroen Hoffman
              jhoffman Jeroen Hoffman
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: