Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5999771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:35:58+00:00 2026-05-23T00:35:58+00:00

I am trying to implement a File Uploader until the PF 3.X FileUpload becomes

  • 0

I am trying to implement a File Uploader until the PF 3.X FileUpload becomes stable. I am leveraging an IFrame inside a composite component to perform the file upload. Essentially this…

<p:layout position="center">
   <p:outputPanel layout="block">
        <iframe src="excel_uploader.xhtml" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="100%" height="300">
            <p style="font-size:12px">Your browser does not support iframes.</p>
        </iframe>
   </p:outputPanel>
</p:layout>

Note that the included file, excel_uploader.xhtml, is…

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:p="http://primefaces.prime.com.tr/ui"
  xmlns:nova="http://novartis.net/jsf/html">
<h:head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />

    <link href="./resources/app/css/master.css" rel="stylesheet" type="text/css" />
</h:head>
<h:body>
    <h:form enctype="multipart/form-data">
        <div style="width:750px">
              <p:messages />
              <div style="font-size:12px;padding-top:15px">
                  <nova:inputFile id="file" value="#{excelUploader.file}" validator="excelFileValidator" />
                  <p:commandButton ajax="false" actionListener="#{excelUploader.onUploadExcelFile}" value="Attach Smart Sheet" styleClass="input_datagrid_button" style="color:#ffffff;margin-left:0" />
              </div>
              <div style="font-size:12px;padding-top:10px">
                  Smart Sheet:&nbsp;<h:outputText styleClass="app_input_lbl_bold" value="#{excelUploader.fileName}" />
              </div>
              <h:inputHidden id="upload_file_name" value="#{excelUploader.fileName}" />
        </div>
     </h:form>
</h:body>
</html>

And request-scoped backing bean, ExcelUploader.java, is…

@ManagedBean
@RequestScoped
public class ExcelUploader {

// <editor-fold desc="Class-Level Variables">
private File _File;
private String _FileName;
// </editor-fold>

// <editor-fold desc="Properties">
public String getFileName() {
    return _FileName;
}

public void setFileName(String value) {}

public File getFile() {
    return _File;
}

public void setFile(File file) {
    this._File = file;
}
// </editor-fold>

// <editor-fold desc="Methods">
public void onUploadExcelFile() {
    if (this._File != null && this._File.length() > 0)
        this._FileName = this._File.getName();
}
// </editor-fold>

}

When I navigate to the composite component, which is one in a series of wizard-like components, I get the following error:

WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at com.sun.faces.lifecycle.RestoreViewPhase.notifyAfter(RestoreViewPhase.java:288)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at Novartis.OTM.Http.MultipartFilter.doFilter(MultipartFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)

Can someone elaborate as to why the Faces Servlet is throwing the nullException at the RestoreViewPhase event? I am using Primefaces + Mojarra 2.0.3. Is this a bug in Mojarra? Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:35:59+00:00Added an answer on May 23, 2026 at 12:35 am

    As per issue 1764, this has been fixed in Mojarra 2.1.1. Upgrade accordingly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While trying to implement an MVC file upload example on Scott Hanselman's blog. I
So Im trying to implement a file upload functionality where when a user uploads
I'm trying to implement file upload functionality in the iPhone app. Server code is
I am trying to implement a multiple file upload where I am right now
I am trying to implement file upload functionality on my site. I have created
I'm trying to implement this method of making a nice form upload: www.kavoir.com/2009/02/styling-file-upload-select-input-control-input-typefile.html/ which
I am trying to implement a multiple file upload script to codeigniter. the script
I am trying to implement Gmail style drag-and-drop file upload in ASP.NET MVC. I
I am trying to implement some WCF and REST services to upload a file
I am trying to implement a file upload to a pre-existing form that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.