1 Reply Latest reply: Feb 5, 2009 11:37 AM by 807575 RSS

    getUploadedFile() return nullexception

    807575
      Just trying to upload a file and I get NullPointer exception. Im missing something really stupid. Any help?
      Added a fileUpload component and in the chooseLocalButton_action I get the Null exception. Thanks!

      public String chooseLocalButton_action() {

      UploadedFile uploadedFile = localfileUpload.getUploadedFile();
      //This is where the exception occurs
      String uploadedFileName = uploadedFile.getOriginalName();

      if (uploadedFileName.equals("")){
      error("No file was uploaded");
      return null;
      } .....



      Stack trace.

      Exception Details: java.lang.NullPointerException
      null

      Possible Source of Error:
      Class Name: cytosolve.LocalSolver
      File Name: LocalSolver.java
      Method Name: chooseLocalButton_action
      Line Number: 849

      Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.

      Stack Trace begining

      cytosolve.LocalSolver.chooseLocalButton_action(LocalSolver.java:849)
      sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)....