tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Henkel <thomas.hen...@triwdata.com>
Subject Error Compiling JSP (JasperException, generated servlet has invalid syntax)
Date Mon, 16 Jun 2003 08:22:03 GMT
Hi!

I encounter the 'org.apache.jasper.JasperException: Unable to compile class for 
JSP
' error when trying to display a simple JSP.

The JSP is just the 'Hello World' thing to ensure my installation is working. 
So no beans to be imported etc.

All workarounds I read so far do not help.
I made sure that the JDK is used, not the JRE (setting PATH, CATALINA_HOME, 
JAVA_HOME and editing registry entries).

>From the error message it is clear that something is compiled, so the classes 
and the compiler are found. But The generated source code of the corresponding 
servlet is wrong.

My configuration:
Tomcat 2.1.24
Eclipse 2.1.0 Build id: 200303272130
Tomcat plugin
Win XP Professional

The error message:
-----------------------snip--------------------
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] C:\Development\eclipse\workspace\TestTomcat1
\work\org\apache\jsp\test_jsp.java:60: 'catch' without 'try'
    [javac]     } catch (Throwable t) {
    [javac]       ^
    [javac] C:\Development\eclipse\workspace\TestTomcat1
\work\org\apache\jsp\test_jsp.java:30: 'try' without 'catch' or 'finally'
    [javac]     try {
    [javac]     ^
    [javac] C:\Development\eclipse\workspace\TestTomcat1
\work\org\apache\jsp\test_jsp.java:69: '}' expected
    [javac] }
    [javac]  ^
    [javac] 3 errors



	at org.apache.jasper.compiler.DefaultErrorHandler.javacError
(DefaultErrorHandler.java:130)
	at org.apache.jasper.compiler.ErrorDispatcher.javacError
(ErrorDispatcher.java:293)
	at org.apache.jasper.compiler.Compiler.generateClass
(Compiler.java:353)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
	at org.apache.jasper.JspCompilationContext.compile
(JspCompilationContext.java:508)
	at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:190)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:256)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2415)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:171)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:594)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:392)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:565)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:619)
	at java.lang.Thread.run(Thread.java:536)

-------------------------snip-----------------------------

Any help is appreciated.

Thanks.
Tom.

-- 
  Business Solutions, Relationale Datenbanken, Inter- und Intranet
--
Tri-W-Data GmbH                E-Mail: thomas.henkel@triwdata.com
Dr. Thomas Henkel              WWW     http://www.triwdata.com
Postfach 65                    Tel:    +41 (0)52 / 235 19 99
CH-8442 Hettlingen             Fax:    +41 (0)52 / 235 19 98
(Switzerland)                  Mobile: +41 (0)79 / 431 3772

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message