File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes class not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "class not found" Watch "class not found" New topic
Author

class not found

deep raj
Ranch Hand

Joined: Dec 11, 2009
Posts: 186
javax.servlet.ServletFileUpload class not find in my pc
while
javax.servlet.Servlet find
i am using fileupload 1.2.1.jar file

what should i do?
Amol Nayak
Ranch Hand

Joined: Oct 26, 2006
Posts: 218
there is no such class javax.servlet.ServletFileUpload in servlet API.

However any classes you are not able to find from javax.servlet package is due to same problem you have in the post
package apache.commons not exists
deep raj
Ranch Hand

Joined: Dec 11, 2009
Posts: 186
actually it is written by mistaken
the problem is that
javax.servlet.servletinputstream class not found
error is
noclassdefifoundexcepttion
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

There's no class "javax.servlet.servletinputstream", either.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Please try to be concise when reporting errors. Copying them can save wasted time
Did you mean that the class javax.servlet.ServletInputStream (note capitalisation) throws a NoClassDefFoundError (note capitalisation)?
deep raj
Ranch Hand

Joined: Dec 11, 2009
Posts: 186
means
i saw in servlet-api package there is this class
deep raj
Ranch Hand

Joined: Dec 11, 2009
Posts: 186

David O'Meara
yes this class throw this exception
how can i remove it?
Amol Nayak
Ranch Hand

Joined: Oct 26, 2006
Posts: 218
Hi Amrita,
I have communicated in my previous post what your problem might be. Your tomcat installation looks to be messed up (based on what your have posted in your other post). As suggested in other forum try reinstalling tomcat and both of your problems will be sorted out.

Also NoClassDefFoundError is an Error as the name suggests, not an Exception
deep raj
Ranch Hand

Joined: Dec 11, 2009
Posts: 186
how can it be messed?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Have the class on your classpath when you run your application.

I'll repeat: at this point it would be quickest to reinstall Tomcat; since you haven't answered the library location questions you've been asked, it's impossible to know what you're done to break it.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

amrita singhal wrote:how can it be messed?

Because you're trying random things to get it to work.
deep raj
Ranch Hand

Joined: Dec 11, 2009
Posts: 186
in my app WEB-INF/lib contains the following jar files
1. jstl
2. standard
3. cataline-root
4. commons-fileupload-1.2.1
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Aaaand in your Tomcat lib directory? Would it really be too much trouble to just reinstall Tomcat?
deep raj
Ranch Hand

Joined: Dec 11, 2009
Posts: 186
means

what should i do now?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

REINSTALL TOMCAT.
deep raj
Ranch Hand

Joined: Dec 11, 2009
Posts: 186
no effect after reinstall
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

why is catalina-root in your lib directory?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: class not found