Solved

Error Help

Posted on 2006-11-02
1
161 Views
Last Modified: 2010-03-04
I get following error when trying to run my jsp page. Its says javac compiler error. I do have CLASSPATH value = . and PATH=C:\Sun\AppServer\bin;C:\Sun\AppServer\jdk\bin;C:\jboss-4.0.0\bin\run.jar;C:>set PATH=%PATH%;%JAVA_HOME%\bin

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:810)
      com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExternalContextImpl.java:320)
      com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


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:105)
      org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:929)
      org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
      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:810)
      com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExternalContextImpl.java:320)
      com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


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

0
Comment
Question by:suketu9
1 Comment
 
LVL 19

Accepted Solution

by:
ramazanyich earned 250 total points
ID: 17869592
To be able to compile JSP pages you need an JDK (not JRE). On download page (http://java.sun.com/javase/downloads/index.jsp) of Sun look for JDK 5 download.
Then install it and point JAVA_HOME variable to the root directpry of your installation.
For example you installed JDK to C:\jdk1.5.0 then you should set JAVA_HOME variable like that:
>set JAVA_HOME=c:\jdk1.5.0
or you can put it in catalina.bat file in TOMCAT_HOME/bin directory.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now