Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4175

AbstractTransformerBehavior: java.io.NotSerializableException: org.apache.wicket.protocol.http.BufferedWebResponse

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: 1.5.3
    • Component/s: wicket, wicket-devutils
    • Labels:
      None

      Description

      AbstractTransformerBehavior#originalResponse is not serializable what causes the following exception while trying to use DebugBar component (sizeOf(object)).

      WARN - WicketObjects - Unable to determine object size: [Page class = com.mycompany.HomePage, id = 0, render count = 1]
      java.io.NotSerializableException: org.apache.wicket.protocol.http.BufferedWebResponse
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)

      ...
      at org.apache.wicket.util.lang.WicketObjects$SerializingObjectSizeOfStrategy.sizeOf(WicketObjects.java:124)
      at org.apache.wicket.util.lang.WicketObjects.sizeof(WicketObjects.java:416)

      The simplest solution would be to add 'transient'

      private transient Response originalResponse;

        Attachments

        1. myproject.tgz
          17 kB
          Zbigniew Ruchała

          Activity

            People

            • Assignee:
              mgrigorov Martin Tzvetanov Grigorov
              Reporter:
              zbigniewruchala Zbigniew Ruchała
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: