Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-48

RedScreen (NPE) in ContactForm if attachment upload failed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.0
    • Fix Version/s: 8.0
    • Component/s: Framework
    • Labels:
    • Environment:

      fxLogAnalyzerPattern : 25

      Description

      if "moveUploadFileTo" fails for some reason, the following "attachment.getName()" throws a NPE
      ( in OpenOLAT 8, its Line 314 )

      RedScreen on 7.R2.2
      2012-01-09 20:12:26,676 [TP-Processor26] ERROR OLATRuntimeException - OLAT::ERROR % N2-E249 % org.olat.core.logging % % *** % https://***/auth/1%3A1%3A0%3A0%3A0/?o_winrndo=1 % Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) % *RedScreen* null ::::<dispatchinfo> <componentinfo> <compname>ffo_main_null</compname> <compclass>org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer</compclass> <extendedinfo></extendedinfo> <event> <class>org.olat.core.gui.components.form.flexible.impl.FormEvent</class> <command>ONCHANGE</command> <tostring>com:ONCHANGE,org.olat.core.gui.components.form.flexible.impl.FormEvent@a30cee6e</tostring> </event> </componentinfo> <controllerinfo> <controllername>org.olat.modules.co.ContactForm</controllername> <controllername>org.olat.group.ui.run.BusinessGroupMainRunController</controllername> <controllername>org.olat.core.commons.fullWebApp.BaseFullWebappController</controllername> <controllername>org.olat.core.commons.chiefcontrollers.controller.simple.SimpleBaseController</controllername> <controllername>org.olat.core.commons.chiefcontrollers.BaseChiefController</controllername> </controllerinfo></dispatchinfo> :::: %
      >>> stack of 1.cause::org.olat.core.logging.OLATRuntimeException: null -> at org.olat.core.gui.exception.ExceptionWindowController.<init>(ExceptionWindowController.java:102) at org.olat.core.gui.exception.MsgFactory.createMessageChiefController(MsgFactory.java:52) at org.olat.core.gui.exception.MsgFactory.createMessageChiefController(MsgFactory.java:41) at org.olat.core.gui.components.Window.dispatchRequest(Window.java:523) at org.olat.core.gui.components.Window.doDispatchRequest(Window.java:215) at org.olat.core.gui.components.Component.dispatchRequest(Component.java:124) at org.olat.dispatcher.AuthenticatedDispatcher.execute(AuthenticatedDispatcher.java:331) at org.olat.core.dispatcher.DispatcherAction.execute(DispatcherAction.java:154) at org.olat.core.servlets.OLATServlet.doPost(OLATServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      >>> stack of 2.cause::java.lang.NullPointerException: null -> at org.olat.modules.co.ContactForm.formInnerEvent(ContactForm.java:310) at org.olat.core.gui.components.form.flexible.impl.FormBasicController.event(FormBasicController.java:301) at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:198) at org.olat.core.gui.components.Component$1.run(Component.java:168) at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:84) at org.olat.core.gui.components.Component.fireEvent(Component.java:165) at [...]

      — right before that, the save failed with:
      Could not read uploaded file >BA 31 Beratungsprozesse LN Definitiv.pptx< from stream. Possibly an attempt to upload a directory instead of a file (happens on Mac) % >>>stack of 1.cause::org.olat.core.logging.OLATRuntimeException: could not save stream to file::/srv/***/olatdata/tmp/upload-***_2_84869018439091 -> at org.olat.core
      .util.FileUtils.save(FileUtils.java:666) [...]

        Attachments

          Activity

            People

            Assignee:
            strentini Sergio Trentini
            Reporter:
            strentini Sergio Trentini
            Tester:
            Stéphane Rossé
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 30 minutes Original Estimate - 30 minutes
                30m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h