tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@jboss.org>
Subject Re: Problem compiling JSP under TOMCAT 5.0.18
Date Tue, 03 Feb 2004 14:40:00 GMT
De Toffoli Garry wrote:

> De Toffoli Garry ha scritto:
> 
>> Hi to all,
>>
>>   I would like to pass from tomcat 3.2.x to tomcat 5.0.18;
>>
>>   under tomcat 3.2.x I have some package under the WEB-INF/classes of 
>> all my sites, and run OK;
>>
>>   passing to tomcat 5.0.18 I have changed only tomcat, leaving 
>> untouched all the directory where resides the sites; but when I call a 
>> .jsp that use a package, I have this error:
>>
>> org.apache.jasper.JasperException: Unable to compile class for JSP
>>
>> An error occurred at line: 6 in the jsp file: /tst_sitengine/testDB.jsp
>>
>> Generated servlet error:
>>   [javac] Compiling 1 source file
>>
>> /usr/jakarta-tomcat-5.0.18/work/Catalina/www.test.it/_/org/apache/jsp/tst_005fsitengine/testDB_jsp.java:7:

>> package db does not exist
>> import db.*;
>> ^
>>
>> On catalina.log I have a detail about the error, where is reported the 
>> classpath where jasper is looking for, and doesn't appear WEB-INF;
>> I think that this is why I have the error;
>>
>> but How can I correct this?
>>
>> Please, could someone help me? I have the same error with tomcat 5.0.16;
>>
>> here there is the content of catalina.log
>> 2-feb-2004 17.50.46 org.apache.jasper.compiler.Compiler generateClass
>> GRAVE: Javac exception
>> Compile failed; see the compiler error output for details.
>>       at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:978)
>>       at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:799)
>>       at 
>> org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:390)
>>       at org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
>>       at 
>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)        
>> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>>       at 
>> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552) 
>>
>>       at 
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291) 
>>
>>       at 
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
>>       at 
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
>>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>       at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)

>>
>>       at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)

>>
>>       at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)

>>
>>       at 
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)

>>
>>       at 
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) 
>>
>>       at 
>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)

>>
>>       at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)

>>
>>       at 
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)

>>
>>       at 
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:509)

>>
>>       at 
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)

>>
>>       at 
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)     
  
>> at 
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)

>>
>>       at 
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) 
>>
>>       at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195) 
>>
>>       at 
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)

>>
>>       at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) 
>>
>>       at 
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)

>>
>>       at 
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) 
>>
>>       at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)

>>
>>       at 
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)

>>
>>       at 
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) 
>>
>>       at 
>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
>>       at 
>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
>>       at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) 
>>
>>       at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)

>>
>>       at 
>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) 
>>
>>       at 
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
       
>> at 
>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) 
>>
>>       at 
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

>>
>>       at java.lang.Thread.run(Thread.java:534)
>> 2-feb-2004 17.50.46 org.apache.jasper.compiler.Compiler generateClass
>> GRAVE: Env: Compile: 
>> javaFileName=/usr/jakarta-tomcat-5.0.18/work/Catalina/www.test.it/_//org/apache/jsp/tst_005fsitengine/testDB_jsp.java

>>
>>   
>> classpath=/usr/jakarta-tomcat-5.0.18/work/Catalina/www.test.it/_:/usr/jakarta-tomcat-5.0.18/shared/classes/:/usr/jakarta-tomcat-5.0.18/common/classes/:/usr/jakarta-tomcat-5.0.18/common/endorsed/xercesImpl.jar:/usr/jakarta-tomcat-5.0.18/common/endorsed/xmlParserAPIs.jar:/usr/jakarta-tomcat-5.0.18/common/lib/ant.jar:/usr/jakarta-tomcat-5.0.18/common/lib/commons-collections.jar:/usr/jakarta-tomcat-5.0.18/common/lib/commons-dbcp-1.1.jar:/usr/jakarta-tomcat-5.0.18/common/lib/commons-el.jar:/usr/jakarta-tomcat-5.0.18/common/lib/commons-pool-1.1.jar:/usr/jakarta-tomcat-5.0.18/common/lib/jasper-compiler.jar:/usr/jakarta-tomcat-5.0.18/common/lib/jasper-runtime.jar:/usr/jakarta-tomcat-5.0.18/common/lib/jmx-remote-tools.jar:/usr/jakarta-tomcat-5.0.18/common/lib/jmx-remote.jar:/usr/jakarta-tomcat-5.0.18/common/lib/jmx.jar:/usr/jakarta-tomcat-5.0.18/common/lib/jsp-api.jar:/usr/jakarta-tomcat-5.0.18/common/lib/naming-common.jar:/usr/jakarta-tomcat-5.0.18/common/lib/naming-factory.jar:/
usr/jakarta-tomcat-5.0.18/common/lib/naming-java.jar:/usr/jakarta-tomcat-5.0.18/common/lib/naming-resources.jar:/usr/jakarta-tomcat-5.0.18/common/lib/servlet-api.jar:/usr/j2sdk1.4.2_02/lib/tools.jar:/usr/jakarta-tomcat-5.0.18/bin/bootstrap.jar:/usr/jakarta-tomcat-5.0.18/bin/commons-logging-api.jar:/usr/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar:/usr/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar:/usr/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar:/usr/j2sdk1.4.2_02/jre/lib/ext/localedata.jar

>>
>>   
>> cp=/usr/java/lib/tools.jar:/usr/tomcat/bin/bootstrap.jar:/usr/tomcat/bin/commons-logging-api.jar

>>
>>   cp=/usr/jakarta-tomcat-5.0.18/work/Catalina/www.test.it/_
>>   cp=/usr/jakarta-tomcat-5.0.18/shared/classes    
>> cp=/usr/jakarta-tomcat-5.0.18/work/Catalina/www.test.it/_
>>   cp=/usr/jakarta-tomcat-5.0.18/shared/classes
>>   cp=/usr/jakarta-tomcat-5.0.18/common/classes
>>   cp=/usr/jakarta-tomcat-5.0.18/common/endorsed/xercesImpl.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/endorsed/xmlParserAPIs.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/ant.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/commons-collections.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/commons-dbcp-1.1.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/commons-el.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/commons-pool-1.1.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/jasper-compiler.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/jasper-runtime.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/jmx-remote-tools.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/jmx-remote.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/jmx.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/jsp-api.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/naming-common.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/naming-factory.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/naming-java.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/naming-resources.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/common/lib/servlet-api.jar
>>   cp=/usr/j2sdk1.4.2_02/lib/tools.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/bin/bootstrap.jar
>>   cp=/usr/jakarta-tomcat-5.0.18/bin/commons-logging-api.jar
>>   cp=/usr/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar
>>   cp=/usr/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar
>>   cp=/usr/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar
>>   cp=/usr/j2sdk1.4.2_02/jre/lib/ext/localedata.jar
>>   work dir=/usr/jakarta-tomcat-5.0.18/work/Catalina/www.test.it/_
>>   extension dir=/usr/j2sdk1.4.2_02/jre/lib/ext
>>   srcDir=/usr/jakarta-tomcat-5.0.18/work/Catalina/www.test.it/_    
>> extension dir=/usr/j2sdk1.4.2_02/jre/lib/ext
>>   srcDir=/usr/jakarta-tomcat-5.0.18/work/Catalina/www.test.it/_
>>   include=org/apache/jsp/tst_005fsitengine/testDB_jsp.java
>>  2-feb-2004 17.50.46 org.apache.jasper.compiler.Compiler generateClass
>> GRAVE: Error compiling file: 
>> /usr/jakarta-tomcat-5.0.18/work/Catalina/www.test.it/_//org/apache/jsp/tst_005fsitengine/testDB_jsp.java
    
>> [javac] Compiling 1 source file
>>  
>> /usr/jakarta-tomcat-5.0.18/work/Catalina/www.test.it/_/org/apache/jsp/tst_005fsitengine/testDB_jsp.java:7:

>> package db does not exist
>> import db.*;
>> ^
>>
>> Thank  you very much.
>>
> I have found!
> 
> my WEB-INF/classes is a symlink;
> so, adding to <Context ... allowLinking="true"> I have resolve my problem;
> 
> thank you to all that has helped me.

You can use <DefaultContext allowLinking="true" /> to avoid having 
Context elements for each webapp.

-- 
xxxxxxxxxxxxxxxxxxxxxxxxx
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
xxxxxxxxxxxxxxxxxxxxxxxxx

---------------------------------------------------------------------
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