DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13999>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13999

Tomcat 4.1.12's classloader can't find non-packaged .class-files in 
$CATALINA_HOME/webapps/<Web-Application>/WEB-INF/classes

           Summary: Tomcat 4.1.12's classloader can't find non-packaged
                    .class-files in $CATALINA_HOME/webapps/<Web-
                    Application>/WEB-INF/classes
           Product: Tomcat 4
           Version: 4.1.12
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I use Tomcat 4.1.12-LE-jdk14 with Windows 2000 and J2SDK 1.4.1_01

I installed a third-party WEB-Application, called
WebAccess, by copying the file WebAccess.war in
$CATALINA_HOME/webapps. After that, I started Tomcat
on my local machine. Then, I started the application
WebAccess with the URL

   http://127.0.01:8080/WebAccess

fom my local machine.

Since index.jsp is the welcome-file, this JSP-page is
the first, that Jasper compiled. During this, I got an
org.apache.jasper.JasperException-exception with the
following message (see details at the end):

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

   An error occurred at line: 8 in the jsp file: /index.jsp
   
   Generated servlet error:
       [javac] Compiling 1 source file
   
   D:\Programme\Apache Group\Tomcat 4.1
\work\Standalone\localhost\WebAccess\index_jsp.java:8: '.' expected
   import RGWBundle;
                   ^

The problem ist, that index.jsp contains the following
page-directive, that couldn't be resolved properly:

   <%@ page language="java" import="java.util.*,RGWBundle"%>

This directive is translated in the sevlet index_jsp.java
to:

   package org.apache.jsp;
   
   import javax.servlet.*;
   import javax.servlet.http.*;
   import javax.servlet.jsp.*;
   import org.apache.jasper.runtime.*;
   import java.util.*;
   import RGWBundle;

   ...

This could not be compiled into a class file, because the
class RGWBundle.class couldn't be found, as indicated by
the above message. Obviously, the classloader expects
import-statements, that refer classes with package-
qualifiers. Since the class file RGWBundle.class
is located in WebAccess.war in directory WEB-INF/classes,
the above import-statement should be legal. Therefore,
I assume, that Jasper's classloader is buggy in Tomcat
4.1.12.

Note, that the corresponding RGWBundle.java-file in
$CATALINA_HOME/webapps/WebAccess/WEB-INF/src contains no
package-statement.

Hint: The same application works fine with Tomcat 4.0.6,
installed on the same computer, i.e., index$jsp.java could
be compiled to index$jsp.class without problems. The file
index$jsp.java in the $CATALINA_HOME/work/WebAccess
directory contins the following:

   package org.apache.jsp;
   
   import java.util.*;
   import RGWBundle;
   import javax.servlet.*;
   import javax.servlet.http.*;
   import javax.servlet.jsp.*;
   import org.apache.jasper.runtime.*;
   
   ...

What follows, ist the whole content of the error page,
that was issued, wenn I tried to start the application:

HTTP Status 500 - 

--------------------------------------------------------------------------------

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

An error occurred at line: 8 in the jsp file: /index.jsp

Generated servlet error:
    [javac] Compiling 1 source file

D:\Programme\Apache Group\Tomcat 4.1
\work\Standalone\localhost\WebAccess\index_jsp.java:8: '.' expected
import RGWBundle;
                ^
D:\Programme\Apache Group\Tomcat 4.1
\work\Standalone\localhost\WebAccess\index_jsp.java:55: cannot resolve symbol
symbol  : class RGWBundle 
location: class org.apache.jsp.index_jsp
   RGWBundle res = new RGWBundle();
   ^



An error occurred at line: 8 in the jsp file: /index.jsp

Generated servlet error:
D:\Programme\Apache Group\Tomcat 4.1
\work\Standalone\localhost\WebAccess\index_jsp.java:55: cannot resolve symbol
symbol  : class RGWBundle 
location: class org.apache.jsp.index_jsp
   RGWBundle res = new RGWBundle();
                       ^
3 errors


        at org.apache.jasper.compiler.DefaultErrorHandler.javacError
(DefaultErrorHandler.java:120)
        at org.apache.jasper.compiler.ErrorDispatcher.javacError
(ErrorDispatcher.java:293)
        at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:313)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:324)
        at org.apache.jasper.JspCompilationContext.compile
(JspCompilationContext.java:474)
        at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:184)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:289)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
        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:260)
        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:2396)
        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:170)
        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:405)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:380)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:508)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:533)
        at java.lang.Thread.run(Thread.java:536)



--------------------------------------------------------------------------------

Apache Tomcat/4.1.12-LE-jdk14

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>

Reply via email to