Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

Tomcat won't compile JSP

Thread view: 
sciolist@gmail.com - 12 Jun 2006 18:51 GMT
I've installed my Java libraries, and I am successfully able to compile
and run Jave files from the command line. However, when I attempt to
load a JSP file from my Apache Tomcat server I get the error below.

Does Tomcat have any unique references to the JRE, such that I need to
specify its location in Tomcat?

Thanks in advance.

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

HTTP Status 500 -

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

type Exception report

message

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
    org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
    org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
    org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

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

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

Apache Tomcat/5.0.28
steen - 12 Jun 2006 19:50 GMT
> I've installed my Java libraries, and I am successfully able to compile
> and run Jave files from the command line. However, when I attempt to
[quoted text clipped - 57 lines]
>
> Apache Tomcat/5.0.28

Just out of curiosity, is JAVA_HOME set ?
"Perhaps JAVA_HOME does not point to the JDK"

/Steen
sciolist@gmail.com - 12 Jun 2006 19:59 GMT
We've discovered that the path locations that we found on the net were
not correct... It works now!

Here are our paths:

CLASSPATH:  C:\j2sdk1.4.2_12\bin\;C:\WINDOWS\system32\QTJava.zip
JAVA_HOME: C:\j2sdk1.4.2_12\
QTJAVA: "C:\WINDOWS\system32\QTJava.zip"

After updating the paths we uninstalled and reinstalled Tomcat.
Apparently Tomcat was not dynamically checking for changes in the path
locations and required a fresh install.

> > I've installed my Java libraries, and I am successfully able to compile
> > and run Jave files from the command line. However, when I attempt to
[quoted text clipped - 62 lines]
>
> /Steen
Jeff Kish - 12 Jun 2006 21:26 GMT
>We've discovered that the path locations that we found on the net were
>not correct... It works now!
[quoted text clipped - 8 lines]
>Apparently Tomcat was not dynamically checking for changes in the path
>locations and required a fresh install.

<snip>
Just a newbie here, but that just doesn't sound correct. I'm sure the java
location is 'dynamic' and just requires setting of an environmental pointer or
two, or possibly update of some .xml file along with stopping and starting the
Tomcat service (if it is a service).

glad its working though.

Can someone tell me if I'm right or wrong?
Jeff Kish


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.