File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes exception in uploading the file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "exception in uploading the file" Watch "exception in uploading the file" New topic
Author

exception in uploading the file

ashwini hikulkarni
Greenhorn

Joined: Jun 16, 2008
Posts: 25
I am getting the exception while uploading
please help me in fixing this exception


HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


root cause

java.lang.NullPointerException
com.MyPack.Datamatics.UploadAction.execute(UploadAction.java:27)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.


--------------------------------------------------------------------------------

Apache Tomcat/5.5



John Robert
Ranch Hand

Joined: Jun 17, 2008
Posts: 39
from what you posted i only can think for some reason your form is giving null, did you try to find out if anything in the form is null?
ashwini hikulkarni
Greenhorn

Joined: Jun 16, 2008
Posts: 25
Ok i will post the source code
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61221
    
  66

"nash",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ashwini hikulkarni
Greenhorn

Joined: Jun 16, 2008
Posts: 25
My task is to upload the file using struts


1>LoginAction.java
2>LoginForm.java
3>UploadForm.java
4>UploadAction.java
5>struts-config.xml
6>web.xml
7>upload.jsp
8>login.jsp

1>login.jsp



2>upload.jsp



3>LoginAction.java


5>LoginForm.java



6>UploadAction.java



7>struts-config.xml



8>web.xml






Kindly help me in fixing the error mentioned in the above post
regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exception in uploading the file