Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12016

DiskFileItem as request attribute creates problems

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk, 18.12.01
    • 18.12.01
    • None
    • None

    Description

      Hi,

      while working on a custom project based on the 18.12.01 version, I noticed a problem with the request handling during a request-redirect-noparam if a DiskFileItem was involved.

      So the situation for me is as follows: during the first request a file is uploaded. I choose a wrong format on purpose, which results in an error respond for that event. Nevertheless the DiskFileItem is set as request attribute together with the error message.

      The request is finished and based on the controller configurations redirected to a second request.

      While handling the second request the previous request's attributes get restored (RequestHandler.java line 733ff). This goes down into SafeObjectInfo.resolveClass() where an Incompatible class exception is thrown. I compared my custom project with the current development status and worked in the changes from commit 3f60efb343a11723aa56c1bc1f5afac3a2f26e9f in OFBIZ-10837.

      While this fixes the issue with the incompatible class exception it also makes it impossible to retrieve any attributes from the first request. Therefore my error message cannot be shown.

      Is there a way to fix it or is it otherwise necessary to always set "fileItems" as request attribute as added in OFBIZ-11246?

      Attachments

        1. OFBIZ-12016.patch
          3 kB
          Jacques Le Roux

        Activity

          People

            jleroux Jacques Le Roux
            sberg Sebastian Berg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: