| Author |
NoClassDefFoundError
|
ravindra patil
Ranch Hand
Joined: Sep 01, 2006
Posts: 196
|
|
i am getting error while running servlet used to upload file i am using framework of jakarta project i am using eclipse it shows that DiskFileUpload is deprecated so what to do ? the error is java.lang.NoClassDefFoundError: org/apache/commons/fileupload/DiskFileUpload at uploadServlet.doPost(uploadServlet.java:28) at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
The jar required is not there in the runtime path. Deprecation would not cause ClassNotFoundExeception.
|
Rahul Bhattacharjee
LinkedIn - Blog
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
|
Check the javadoc.The alternate method to do the required job should there.
|
 |
ravindra patil
Ranch Hand
Joined: Sep 01, 2006
Posts: 196
|
|
Originally posted by Rahul Bhattacharjee: The jar required is not there in the runtime path. Deprecation would not cause ClassNotFoundExeception.
Mr Rahool its not classNot foundError its about ClassDefinition i am using eclipse if my jar file is not on class path then eclipse doesn't provide you Quick help but my eclipse is showing every Thing so problem is not about class path
|
 |
satishkumar janakiraman
Ranch Hand
Joined: May 03, 2004
Posts: 334
|
|
Hi, Check your class is available in your class path. At run time , your class is missing in the class path. Or check your file name, it may be misspelled. At run time, your compiler looks for the original class bye for now sat
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8212
|
|
Originally posted by ravindra patil: Mr Rahool its not classNot foundError its about ClassDefinition i am using eclipse if my jar file is not on class path then eclipse doesn't provide you Quick help but my eclipse is showing every Thing so problem is not about class path
You are right when you say its not a ClassNotFoundException. Its a NoClassDefFoundError for org/apache/commons/fileupload/DiskFileUpload. However it still is a classpath issue. Eclipse might be finding the jar in its classpath but that jar may not be present in the server's classpath where you have deployed the application
|
[My Blog] [JavaRanch Journal]
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
Originally posted by ravindra patil: Mr Rahool its not classNot foundError its about ClassDefinition
Oh! that was a typo. buildpath is having the jar but at runtime its not able to find the classes.If that's a web application try putting the jar at /WEB-INF/lib folder. [BPSouther: fixed UBB tags] [ November 21, 2006: Message edited by: Ben Souther ]
|
 |
 |
|
|
subject: NoClassDefFoundError
|
|
|