tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26270] New: - ClassNotFoundException when instantiating class of normal "-classpath" (using Bootstrap directly)
Date Tue, 20 Jan 2004 08:50:06 GMT
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=26270>.
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=26270

ClassNotFoundException when instantiating class of normal "-classpath" (using Bootstrap directly)

           Summary: ClassNotFoundException when instantiating class of
                    normal "-classpath" (using Bootstrap directly)
           Product: Tomcat 5
           Version: 5.0.16
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: i.hessing@laudert.de
                CC: i.hessing@laudert.de


A ClassNotFoundException is thrown when instantiating a class defined via "-
classpath" and when using "org.apache.catalina.startup.Bootstrap start" 
directly from the command line (instead of running Tomcat via startup.bat).

The following example shows a reproducible case in which a class of the Struts 
framework fails to get instantiated. Exactly the same configuration works 
without any problems in Tomcat 4.1.27/29.

1.) Command line I use to startup Tomcat 5.0.16:

C:\j2sdk1.4.1_02\bin\java.exe
 -Djava.endorsed.dirs=C:\jakarta-tomcat-5.0.16\bin;C:\jakarta-tomcat-5.0.16
\common\endorsed 
 -Dcatalina.base=C:/work/projects/test_webapp
 -Dcatalina.home=C:\jakarta-tomcat-5.0.16 
 -Djava.io.tmpdir=C:\jakarta-tomcat-5.0.16\temp
 -Djava.security.manager 
 -Djava.security.policy=C:/work/projects/test_webapp/conf/catalina.policy 
 -Djava.naming.security.credentials=password 
 -classpath (...)
 org.apache.catalina.startup.Bootstrap start

(Classpath includes all necessary jars including all of "C:\jakarta-tomcat-
5.0.16\common\lib" and "C:\jakarta-tomcat-5.0.16\server\lib" plus the jars for 
Struts framework.)

2.) JSP source that does not work then in Tomcat 5.0.16:

<%@ page %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html>
<head>
    <title>test</title>
</head>
<body>
    <p><%= "Hello, World!" %></p>
</body>
</html>

(If I comment the taglib line like this "<%--<%@ taglib uri="/WEB-INF/struts-
html.tld" prefix="html" %>--%>" it works.)

3.) Exception report when requesting above JSP is:

org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo 
class: org.apache.struts.taglib.html.MessagesTei
	org.apache.jasper.compiler.DefaultErrorHandler.jspError
(DefaultErrorHandler.java:94)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch
(ErrorDispatcher.java:404)
	org.apache.jasper.compiler.ErrorDispatcher.jspError
(ErrorDispatcher.java:319)
	org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo
(TagLibraryInfoImpl.java:453)
	org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD
(TagLibraryInfoImpl.java:290)
	org.apache.jasper.compiler.TagLibraryInfoImpl.
(TagLibraryInfoImpl.java:204)
	org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)
	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)
	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
	org.apache.jasper.compiler.Parser.parse(Parser.java:171)
	org.apache.jasper.compiler.ParserController.parse
(ParserController.java:247)
	org.apache.jasper.compiler.ParserController.parse
(ParserController.java:149)
	org.apache.jasper.compiler.ParserController.parse
(ParserController.java:135)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
	org.apache.jasper.JspCompilationContext.compile
(JspCompilationContext.java:552)
	org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:291)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:324)
	org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
	java.security.AccessController.doPrivileged(Native Method)
	javax.security.auth.Subject.doAsPrivileged(Subject.java:499)
	org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
	org.apache.catalina.security.SecurityUtil.doAsPrivilege
(SecurityUtil.java:200)
root cause 
java.lang.ClassNotFoundException: org.apache.struts.taglib.html.MessagesTei
	org.apache.catalina.loader.WebappClassLoader.loadClass
(WebappClassLoader.java:1366)
	org.apache.catalina.loader.WebappClassLoader.loadClass
(WebappClassLoader.java:1213)
	org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo
(TagLibraryInfoImpl.java:450)
	org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD
(TagLibraryInfoImpl.java:290)
	org.apache.jasper.compiler.TagLibraryInfoImpl.
(TagLibraryInfoImpl.java:204)
	org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)
	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)
	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
	org.apache.jasper.compiler.Parser.parse(Parser.java:171)
	org.apache.jasper.compiler.ParserController.parse
(ParserController.java:247)
	org.apache.jasper.compiler.ParserController.parse
(ParserController.java:149)
	org.apache.jasper.compiler.ParserController.parse
(ParserController.java:135)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
	org.apache.jasper.JspCompilationContext.compile
(JspCompilationContext.java:552)
	org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:291)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:324)
	org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
	java.security.AccessController.doPrivileged(Native Method)
	javax.security.auth.Subject.doAsPrivileged(Subject.java:499)
	org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
	org.apache.catalina.security.SecurityUtil.doAsPrivilege
(SecurityUtil.java:200)

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


Mime
View raw message