Solved

Error Help

Posted on 2006-11-02
1
167 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 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