wood burning stoves
The moose likes Tomcat and the fly likes Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Error" Watch "Error" New topic


Moses Herrada

Joined: Jan 22, 2005
Posts: 11
Hi guys , i wrote a jsp and when i run on tomcat , it gives me a 500 error :

org.apache.jasper.JasperException: Unable to compile class for JSP

No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and access path.


Do i need write my xml or anything?
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Did you read the errormessage?
It contains instructions to implement a likely cure for the error.

Moses Herrada

Joined: Jan 22, 2005
Posts: 11
but i still dont understand wheres the error?
help somebody?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

First: this is a Tomcat question. Ask in the Tomcat forum and you will get more enthusiastic help.
Second: Make sure to give them as much information as possible.
- What version of Tomcat are you running?
- What JDK are you using?
- What OS are you running on?
- If Windows, did you install it as a service and are you running that way?

I've seen this happen when the windows installer for Tomcat finds the wrong Java installation. Unistalling and then reinstalling fixes the problem.
I've also heard that having the JAVA_HOME environment variable set before running the Tomcat install helps but, having never looked at the code or tried it, I can't say for sure if it's true. Can't hurt though.
[ February 06, 2005: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
Also, if you're running Tomcat using a JRE (doesn't have the compiler in it) as opposed to a JDK, you can have this problem.

James Carman, President<br />Carman Consulting, Inc.
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Moving to the Apache Tomcat forum...

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link: http://aspose.com/file-tools
subject: Error
It's not a secret anymore!