OFBiz
  1. OFBiz
  2. OFBIZ-2836

ModelNotification is not serializable

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Release Branch 4.0
    • Fix Version/s: None
    • Component/s: framework
    • Labels:
      None
    • Environment:

      All

      Description

      request-redirect fails after submitting a form that does not meet the associated service's requirements.

      Steps to reproduce:

      Controller.xml entry looks as follows:

      <request-map uri="CreateItem">
      <security auth="true" https="true"/>
      <event type="service" path="" invoke="createItem" />
      <response name="success" type="request-redirect-noparam" value="ListItems"/>
      <response name="error" type="request-redirect" value="CreateItemForm"/>
      </request-map>

      The createItem service should contain at least one mandatory field. When submitting a form that calls the service with this field absent, RequestHandler generates a serialization exception with the message 'ModelNotification: Object is not serializable'. This appears to be generated by the callRedirect() method of the RequestHandler class, which would suggest that ModelNotification passes the 'instanceof Serializable' test, even though it actually isn't.

      Looking at the ModelNotification.java, making it Serializable is a trivial task, though I'm not sure whether this is needed or whether it should just not be added to the request attributes in the first place.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Tony Noble
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development