Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
org.apache.jasper.JasperException: Unable to compile class for JSP

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

2004-05-21       - By aiye4686@(protected)

 Back
Reply:     1     2     3     4     5     6     7  



Hi, and thanks for reading this query - it isn't (at least to me) anything
to do with putting tools.jar into web-inf/lib, or anywhere else, for that
matter.

Here is the problem:

2004-05-22 02:25:00 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception
org.apache.jasper.JasperException Source code of 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.

  at
org.apache.jasper.compiler.DefaultErrorHandler Source code of org.apache.jasper.compiler.DefaultErrorHandler(DefaultErrorHandler
.java:127)
  at
org.apache.jasper.compiler.ErrorDispatcher Source code of org.apache.jasper.compiler.ErrorDispatcher(ErrorDispatcher.java:351)
  at org.apache.jasper.compiler.Compiler Source code of org.apache.jasper.compiler.Compiler(Compiler.java:415)
  at org.apache.jasper.compiler.Compiler Source code of org.apache.jasper.compiler.Compiler(Compiler.java:458)
  at org.apache.jasper.compiler.Compiler Source code of org.apache.jasper.compiler.Compiler(Compiler.java:439)
  at
org.apache.jasper.JspCompilationContext Source code of org.apache.jasper.JspCompilationContext(JspCompilationContext.java:552)
  at
org.apache.jasper.servlet.JspServletWrapper Source code of org.apache.jasper.servlet.JspServletWrapper(JspServletWrapper.java:291)
  at
org.apache.jasper.servlet.JspServlet Source code of org.apache.jasper.servlet.JspServlet(JspServlet.java:301)
  at org.apache.jasper.servlet.JspServlet Source code of org.apache.jasper.servlet.JspServlet(JspServlet.java:248)
  at javax.servlet.http.HttpServlet Source code of javax.servlet.http.HttpServlet(HttpServlet.java:856)
  at
org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:284)
  at
org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain(ApplicationFilterChain
.java:204)
  at
org.apache.catalina.core.StandardWrapperValve Source code of org.apache.catalina.core.StandardWrapperValve(StandardWrapperValve.java
:256)
  at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext
.java:151)
  at
org.apache.catalina.core.StandardPipeline Source code of org.apache.catalina.core.StandardPipeline(StandardPipeline.java:564)
  at
org.apache.catalina.core.StandardContextValve Source code of org.apache.catalina.core.StandardContextValve
(StandardContextValve.java:245)
  at
org.apache.catalina.core.StandardContextValve Source code of org.apache.catalina.core.StandardContextValve(StandardContextValve.java
:199)
  at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext
.java:151)
  at
org.apache.catalina.core.StandardPipeline Source code of org.apache.catalina.core.StandardPipeline(StandardPipeline.java:564)
  at
org.apache.catalina.core.StandardHostValve Source code of org.apache.catalina.core.StandardHostValve(StandardHostValve.java:195)
  at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext
.java:151)
  at
org.apache.catalina.valves.ErrorReportValve Source code of org.apache.catalina.valves.ErrorReportValve(ErrorReportValve.java:164)
  at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext
.java:149)
  at
org.apache.catalina.valves.AccessLogValve Source code of org.apache.catalina.valves.AccessLogValve(AccessLogValve.java:578)
  at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext
.java:149)
  at
org.apache.catalina.core.StandardPipeline Source code of org.apache.catalina.core.StandardPipeline(StandardPipeline.java:564)
  at
org.apache.catalina.core.StandardEngineValve Source code of org.apache.catalina.core.StandardEngineValve(StandardEngineValve.java
:156)
  at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext
.java:151)
  at
org.apache.catalina.core.StandardPipeline Source code of org.apache.catalina.core.StandardPipeline(StandardPipeline.java:564)
  at org.apache.catalina.core.ContainerBase Source code of org.apache.catalina.core.ContainerBase(ContainerBase.java:972)
  at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
  at
org.apache.coyote.http11.Http11Processor Source code of org.apache.coyote.http11.Http11Processor(Http11Processor.java:805)
  at
org.apache.coyote.http11.Http11Protocol Source code of org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler
.processConnection(Http11Protocol.java:696)
  at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
  at
org.apache.tomcat.util.threads.ThreadPool Source code of org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java
:677)
  at java.lang.Thread Source code of java.lang.Thread(Thread.java:536)

Here is what has been happening:

I am doing a thesis involving using tomcat+hibernate+mysql to create a
web-site that auto-marks web applications.

Using Tomcat ver. 5.

Until yesterday I could fire up tomcat, run my code, make changes to .jsp
and .java files and, without restarting tomcat, see the changes. Yes,
tools.jar, and in fact ALL the necessary jar files for rinning my app are
in the right place. The application has been running smoothly for about 2
months now.

Today I began to use ant (in a java file - by importing
org.apache.tools.ant.*) to deploy .war files in a particular directory
when I wanted to.
To do so appeared to require the use of a manager setting, so I made on up,
and added it to TOMCAT_HOME\conf\tomcat-users.xml. Here is the entry:

 <user username="andrew" password="iyer" roles="manager"/>

Which was put with the other entries.

NOW when I went to the website 1.jsp in TOMCAT_HOME\webapps\thesis
(contents as follows) I got the above "org.apache.jasper.JasperException Source code of org.apache.jasper.JasperException:
Unable to compile class for JSP" error.

1.jsp:
<%@ page language="java" contentType = "text/html"%>
<%@ page import="org.apache.tools.ant.*" %>
<%@ page import="org.apache.catalina.ant.*" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

<%
  DeployTask deployer = new DeployTask();
  deployer.setUsername("andrew");
  deployer.setPassword("iyer");
  deployer.setUrl("http://localhost:8080/manager")
  deployer.setPath("/demo");
  deployer.setLocalWar("C:/struts-blank.war");
  deployer.execute();
%>

Not being sure what the problem is, I made 2.jsp, to see if everything was
going ok, put it in the same dir as 1.jsp, and visited it. Same error as
above, and here are the contents for 2.jsp:

<html>
<body>
  moomoo!
</body>
</html>

Which is odd, because if I call the file 2.html and no error appears.

Finally, I started loading my application files to see if anything else had
gone wrong - my application worked fine. To do so, I go to index.jsp to
log in, log in, play around and exit. No dramas.

I then edited index.jsp (this file worked fine 2 min ago) by hitting enter
once at the top of the page, and then saving the file. Go  to index.jsp
and I get the above error.

It appears to me that this is something to do with a tomcat config problem
- it might be having trouble recognising .jar files, but I've checked and
all my jar files are where they should be! I suspect it might have
something to do with me adding the manager into tomcat-users, but that
seems pretty tenuous, as this hasn't been noted anywhere else on the web.
I can't see any other possibiliby except maybe timestamp issues?

Before any .jar questions are asked, here is my .jar file list:

 .JAR Files in TOMCAT_HOME\common\lib:
  ant.jar;
       catalina-ant.jar
  commons-collections.jar;
  commons-el.jar;
  commons-pool-1 (See http://ool-1.ora-code.com).1.jar;
  jasper-compiler.jar;
  jasper-runtime.jar;
  jmx.jar;
  jmx-remote.jar;
  jmx-remote-tools.jar;
  jsp-api.jar;
  mysql-connector-jave-3 (See http://ave-3.ora-code.com).1.1-alpha-bin.jar;
  mysql-resourcefactory.jar;
  naming-common.jar;
  naming-factory.jar;
  naming-java.jar;
  naming-resources.jar;
  serlvet.jar;
  tools.jar;

 .JAR files in TOMCAT_HOME\webapps\thesis\WEB-INF\lib:
       cglib-full-2 (See http://ull-2.ora-code.com).0.1.jar;
  commons-collections-2 (See http://ons-2.ora-code.com).1.jar;
  commons0logging-1 (See http://ing-1.ora-code.com).0.3.jar;
  dom.jar;
  dom4j-1.4.jar;
  ehcache-0 (See http://che-0.ora-code.com).7.jar;
  hibernate2.jarl
  jaxen-full.jar;
  jstl.jar;
  jta.jar;
  jaxp-api.jar;
  jdbc-2 (See http://dbc-2.ora-code.com)_0-stdext.jar;
  log4j-1.2.8.jar;
  odmg-3 (See http://dmg-3.ora-code.com).0.jar;
  sax.jar;
  saxpath.jar;
  standard.jar;
  xalan-2 (See http://lan-2.ora-code.com).4.0.jar;
  xerces-2 (See http://ces-2.ora-code.com).4.0.jar;

Any help would be greatly appreciated, I really have no idea why my
application is no longer running.

Cheers
Andrew


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
This message was sent using IMP, the Internet Messaging Program.

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)