struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: Null Pointer Exception when i use execand Wait with file upload
Date Sat, 16 Mar 2013 01:04:34 GMT
Not much anyone can do here if we cant see the code for employee.SingleFileUploadAction.java

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist
unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet
keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
wir keine Haftung fuer den Inhalt uebernehmen.
 

 > Date: Sat, 16 Mar 2013 10:21:08 +1100
> Subject: Null Pointer Exception when i use execand Wait with file upload
> From: stalin.pranava@gmail.com
> To: user@struts.apache.org
> 
> Hello I am trying to use execandWait interceptor with fileUpload
> interceptor as below. i tried completestack in place of default and i get
> Null pointer exception.
> 
> 
> <action name="File_singleUpload" class="employee.SingleFileUploadAction"
> method="upload">
>             <interceptor-ref name="fileUpload">
>                 <param name="maximumSize">1000000000</param>
>                 <param name="allowedTypes">
>                     image/gif,image/jpeg,image/png
>                 </param>
>             </interceptor-ref>
>             <interceptor-ref name="defaultStack"/>
>             <interceptor-ref name="execAndWait">
>                 <param name="delay">1500</param>
>             </interceptor-ref>
>             <result name="wait">/jsp/wait.jsp</result>
>             <result name="success">/jsp/SingleUpload.jsp</result>
>         </action>
> 
> 
> java.lang.NullPointerException
> 	org.apache.struts2.ServletActionContext.getServletContext(ServletActionContext.java:139)
> 	employee.SingleFileUploadAction.upload(SingleFileUploadAction.java:58)
> 	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	java.lang.reflect.Method.invoke(Method.java:597)
> 	com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:446)
> 	com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:285)
> 	org.apache.struts2.interceptor.BackgroundProcess$1.run(BackgroundProcess.java:57)
> 	java.lang.Thread.run(Thread.java:680)
> 
> 
> 
> Please advise what i can do.
> 
> 
> -- 
> Warm Regards
> Pranava S Balugari
> 
> "Keep Looking Don't Settle"
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message