Announcement Announcement Module
Collapse
No announcement yet.
Mulltipart file fails on 2nd upload, but works if log4j is in debug mode Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mulltipart file fails on 2nd upload, but works if log4j is in debug mode

    Hi,
    I am working with spring 3.0.1 (The latest had spring security bugs (documented) and I had to downgrade).

    I am working on a restore function which essentially uploads a zip file and processes it. This function works by getting the inputstream of the uploaded multipartfile and processing it via zipInputStream.

    The function works well when log4j is in DEBUG mode. However, when I switch log4j to any other mode (WARN, OFF e.t.c), it only works once. It fails on second upload attempt with "IllegalStateException File has been moved - cannot be read again"

    The thing is, logs show details of the uploaded file, however, it fails on calling mutipartFile.getInputStream(). Question is does log4j affect multipartfiles, and how can I make it work with other log4j settings?
Working...
X