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

JcrItemModel.writeObject() throws Exception when Application is not available

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 14.4.0
    • None
    • None

    Description

      Probably due to a Wicket upgrade (have not verified it yet) when a JcrItemModel is serialized while still being attached (which is a developer error), it will try to get a reference to the current Application, which is not available at that point. This results in lot's of stacktraces in the console.

      To fix this, we should simply not do any operation that require the Wicket Application and/or Session.

      This means that we can't determine whether we are running in PRODUCTION or DEVELOPMENT mode, which was used to execute #detach() on production environments. This is fixed by simply always call #detach().

      A second thing is that the current usage of the TraceMonitor is not really helpful (this is a tool to help pinpoint the code that created the JcrItemModel, so that a developer can fix the warning by properly detaching.

      Attachments

        Activity

          People

            ntrajkovski Nikola Trajkovski
            abogaart Arthur Bogaart
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: