Hi The file used for inputFile component is an xhtml file (JSF 2.0 Facelet environment). So cannot specify encoding as in xml file. Also in the tag encoding is specified as "multipart/form-data" - this is as per instructions for using trinidad file upload component thanks Sandeep On 6/6/2013 12:41 PM, Krebs Roland / BWO Systems AG wrote: > Hello Sandeep > > The core dump says that no encoding has been set, so try to add on top of your xhtml file your encoding, so for example: > > or > > > Regards, > Roland > > -----Ursprüngliche Nachricht----- > Von: Sandeep Gupta [mailto:sgupta@anantadvantages.com] > Gesendet: Donnerstag, 6. Juni 2013 08:04 > An: users@myfaces.apache.org > Betreff: Trinidad: Null pointer exception in trinidad > > Hi > > I am using trinidad 2.0 in Jboss AS7 environment (JSF builtin Jboss) on windows . I am trying to upload a file to server using trinidad fileupload (tr:inputFile) component. > > When the form is submitted to server on pressing a commandButton, I get Nullpointer exception. I have tried using tomahawk inputFileUpload component instaed of trinidad component for inputfile but the NPE remains same. > > Any help/pointers to resolve this issue will be greatly appreciated. > > rgds > > Sandeep Gupta > > java.lang.NullPointerException > org.apache.myfaces.trinidadinternal.config.upload.UploadRequestWrapper.setCharacterEncoding(UploadRequestWrapper.java:83) > com.sun.faces.context.ExternalContextImpl.setRequestCharacterEncoding(ExternalContextImpl.java:212) > javax.faces.context.ExternalContextWrapper.setRequestCharacterEncoding(ExternalContextWrapper.java:561) > javax.faces.context.ExternalContextWrapper.setRequestCharacterEncoding(ExternalContextWrapper.java:561) > javax.faces.application.ViewHandler.initView(ViewHandler.java:488) > com.sun.faces.application.view.MultiViewHandler.initView(MultiViewHandler.java:111) > javax.faces.application.ViewHandlerWrapper.initView(ViewHandlerWrapper.java:274) > javax.faces.application.ViewHandlerWrapper.initView(ViewHandlerWrapper.java:274) > com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:115) > com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) > javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) > > > > Here is my attachFile.xhtml > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > xmlns:f="http://java.sun.com/jsf/core" > xmlns:h="http://java.sun.com/jsf/html" > xmlns:ui="http://java.sun.com/jsf/facelets" > xmlns:tr="http://myfaces.apache.org/trinidad" > xmlns:t="http://myfaces.apache.org/tomahawk" > > > > > Choose File > > > > > > > > > > > > inlineStyle="width:100%;"> > > inlineStyle="width:100%;"> > action="#{PackageJSFBean.doneAttachFile}"> > action="#{PackageJSFBean.cancelAttachFile}" > immediate="true"> > > > > > > > > label="Identifers file" > valueChangeListener="#{PackageJSFBean.onSelecthlIdFile}"> > > > > > > > > > > > > > > > > > Here is relevant portions of web.xml > > > trinidad > org.apache.myfaces.trinidad.webapp.TrinidadFilter > > > > > trinidad > faces > > > > > > Faces Servlet javax.faces.webapp.FacesServlet > 1 > > > > faces > javax.faces.webapp.FacesServlet > > > > resources > org.apache.myfaces.trinidad.webapp.ResourceServlet > > > > > > Faces Servlet > *.xhtml > > > > Faces Servlet > *.jsf > > > > resources > /adf/* > >