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 25819] New: - java.lang.NoClassDefFoundError: org/apache/tomcat/util/buf/C2BConverter
Date Tue, 30 Dec 2003 09:08:37 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=25819>.
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=25819

java.lang.NoClassDefFoundError: org/apache/tomcat/util/buf/C2BConverter

           Summary: java.lang.NoClassDefFoundError:
                    org/apache/tomcat/util/buf/C2BConverter
           Product: Tomcat 5
           Version: 5.0.16
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Connector:Coyote
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: dario.bonino@rgi.it


Exception on first http request. (Low priority)
    If I push the "reload button" the html page is OK.
    If I send more request this Exception never happen.
    
    In attachment:
    1) Stack trace
    2) Piece on source in stack trace
"it.rgi.webapp.admin.htmlwriter.HtmlWriter.printConclusione(HtmlWriter.java:194)"
    3) My catalina.policy (Enabled!)

    thank you,
    bye.


############################################################################################################
############################################################################################################

java.lang.NoClassDefFoundError: org/apache/tomcat/util/buf/C2BConverter
	at org.apache.jk.server.JkCoyoteHandler.appendHead(JkCoyoteHandler.java:333)
	at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:402)
	at org.apache.coyote.Response.action(Response.java:226)
	at org.apache.coyote.Response.sendHeaders(Response.java:418)
	at org.apache.jk.server.JkCoyoteHandler.doWrite(JkCoyoteHandler.java:240)
	at org.apache.coyote.Response.doWrite(Response.java:586)
	at org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:405)
	at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:428)
	at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:348)
	at org.apache.coyote.tomcat5.OutputBuffer.writeBytes(OutputBuffer.java:438)
	at org.apache.coyote.tomcat5.OutputBuffer.write(OutputBuffer.java:425)
	at org.apache.coyote.tomcat5.CoyoteOutputStream.write(CoyoteOutputStream.java:108)
	at java.io.PrintStream.write(Unknown Source)
	at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(Unknown Source)
	at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(Unknown Source)
	at sun.nio.cs.StreamEncoder.flushBuffer(Unknown Source)
	at java.io.OutputStreamWriter.flushBuffer(Unknown Source)
	at java.io.PrintStream.write(Unknown Source)
	at java.io.PrintStream.print(Unknown Source)
	at java.io.PrintStream.println(Unknown Source)
	at it.rgi.webapp.admin.htmlwriter.HtmlWriter.printConclusione(HtmlWriter.java:194)
	at it.rgi.webapp.admin.utility.RgiWebAdminLogin.doLogout(RgiWebAdminLogin.java:231)
	at
it.rgi.webapp.admin.utility.RgiWebAdminLogin.testIfAuthenticationRequiredAdSendLoginPage(RgiWebAdminLogin.java:152)
	at it.rgi.webapp.admin.ServletAdmin.doGet(ServletAdmin.java:109)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
	at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:278)
	at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:97)
	at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:187)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:183)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
	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.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:211)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
	at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
	at java.lang.Thread.run(Unknown Source)



############################################################################################################
############################################################################################################

package it.rgi.webapp.admin.htmlwriter;

 ......

public class HtmlWriter {

public static void printConclusione(...) throws IOException {
    final PrintStream out = new PrintStream(response.getOutputStream());
    ....
    out.println("<TR><TD nowrap width=\"100%\"><Font "+FSTYLE_NORMAL+">"+CR);
/*LINE 194 */ out.println("&nbsp; <A
HREF=\"javascript:window.resizeTo(800,720);\"><IMG
src=\""+RgiIcon.URLNAME+"?duke\" ALIGN=\"bottom\" BORDER=0 ALT=\"Resize browser
to 800x720 pixel.\"></A> 100% pure Java technology.");
    out.println("&nbsp; Copyright © 2001 <B>RGI SpA</B>");
    ....
    } // printConclusione
    
.......

############################################################################################################
############################################################################################################

// ============================================================================
// catalina.corepolicy - Security Policy Permissions for Tomcat 5
//
// This file contains a default set of security policies to be enforced (by the
// JVM) when Catalina is executed with the "-security" option.  In addition
// to the permissions granted here, the following additional permissions are
// granted to the codebase specific to each web application:
//
// * Read access to the document root directory
//
// $Id: catalina.policy,v 1.10 2003/09/10 18:47:18 remm Exp $
// ============================================================================


// ========== SYSTEM CODE PERMISSIONS =========================================


// These permissions apply to javac
grant codeBase "file:${java.home}/lib/-" {
        permission java.security.AllPermission;
};

// These permissions apply to all shared system extensions
grant codeBase "file:${java.home}/jre/lib/ext/-" {
        permission java.security.AllPermission;
};

// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
grant codeBase "file:${java.home}/../lib/-" {
        permission java.security.AllPermission;
};

// These permissions apply to all shared system extensions when
// ${java.home} points at $JAVA_HOME/jre
grant codeBase "file:${java.home}/lib/ext/-" {
        permission java.security.AllPermission;
};


// ========== CATALINA CODE PERMISSIONS =======================================


// These permissions apply to the launcher code
grant codeBase "file:${catalina.home}/bin/commons-launcher.jar" {
        permission java.security.AllPermission;
};

// These permissions apply to the daemon code
grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
        permission java.security.AllPermission;
};

// These permissions apply to the commons-logging API
grant codeBase "file:${catalina.home}/bin/commons-logging-api.jar" {
        permission java.security.AllPermission;
};

// These permissions apply to the server startup code
grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
        permission java.security.AllPermission;
};

// These permissions apply to the servlet API classes
// and those that are shared across all class loaders
// located in the "common" directory
grant codeBase "file:${catalina.home}/common/-" {
        permission java.security.AllPermission;
};

// These permissions apply to the container's core code, plus any additional
// libraries installed in the "server" directory
grant codeBase "file:${catalina.home}/server/-" {
        permission java.security.AllPermission;
};

// ========== WEB APPLICATION PERMISSIONS =====================================


// These permissions are granted by default to all web applications
// In addition, a web application will be given a read FilePermission
// and JndiPermission for all files and directories in its document root.
grant { 
    // Required for JNDI lookup of named JDBC DataSource's and
    // javamail named MimePart DataSource used to send mail
    permission java.util.PropertyPermission "java.home", "read";
    permission java.util.PropertyPermission "java.naming.*", "read";
    permission java.util.PropertyPermission "javax.sql.*", "read";

    // OS Specific properties to allow read access
    permission java.util.PropertyPermission "os.name", "read";
    permission java.util.PropertyPermission "os.version", "read";
    permission java.util.PropertyPermission "os.arch", "read";
    permission java.util.PropertyPermission "file.separator", "read";
    permission java.util.PropertyPermission "path.separator", "read";
    permission java.util.PropertyPermission "line.separator", "read";

    // JVM properties to allow read access
    permission java.util.PropertyPermission "java.version", "read";
    permission java.util.PropertyPermission "java.vendor", "read";
    permission java.util.PropertyPermission "java.vendor.url", "read";
    permission java.util.PropertyPermission "java.class.version", "read";
	permission java.util.PropertyPermission "java.specification.version", "read";
	permission java.util.PropertyPermission "java.specification.vendor", "read";
	permission java.util.PropertyPermission "java.specification.name", "read";

	permission java.util.PropertyPermission "java.vm.specification.version", "read";
	permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
	permission java.util.PropertyPermission "java.vm.specification.name", "read";
	permission java.util.PropertyPermission "java.vm.version", "read";
	permission java.util.PropertyPermission "java.vm.vendor", "read";
	permission java.util.PropertyPermission "java.vm.name", "read";

    // Required for OpenJMX
    permission java.lang.RuntimePermission "getAttribute";

	// Allow read of JAXP compliant XML parser debug
	permission java.util.PropertyPermission "jaxp.debug", "read";

    // Precompiled JSPs need access to this package.
    permission java.lang.RuntimePermission
"accessClassInPackage.org.apache.jasper.runtime";
    permission java.lang.RuntimePermission
"accessClassInPackage.org.apache.jasper.runtime.*";
    
};


// You can assign additional permissions to particular web applications by
// adding additional "grant" entries here, based on the code base for that
// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
//
// Different permissions can be granted to JSP pages, classes loaded from
// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
//
// For instance, assume that the standard "examples" application
// included a JDBC driver that needed to establish a network connection to the
// corresponding database and used the scrape taglib to get the weather from
// the NOAA web server.  You might create a "grant" entries like this:
//
// The permissions granted to the context root directory apply to JSP pages.
// grant codeBase "file:${catalina.home}/webapps/examples/-" {
//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// };
//
// The permissions granted to the context WEB-INF/classes directory
// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
// };
//
// The permission granted to your JDBC driver
// grant codeBase
"jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
// };
// The permission granted to the scrape taglib
// grant codeBase
"jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// };

// ##################### AGGIUNTE MANUALI EFFETTUATE DA BONINO DARIO
#####################

// These permissions apply to the servlet API classes and those that are shared
across
// all class loaders located in the "RGI/lib/common" OR "RGI/lib/shared" directory
grant codeBase "file:${catalina.home}/RGI/lib/-" {
    permission java.security.AllPermission;
    };

// Web applications permission, J2EE Specification 1.4
// Minimum set of permissions that Web Components components can expect. 
grant {
	permission java.lang.RuntimePermission  "loadLibrary.*";
	permission java.lang.RuntimePermission  "queuePrintJob";
	permission java.net.SocketPermission    "*", "connect";
	permission java.io.FilePermission       "<<ALL FILES>>", "read,write";
	permission java.util.PropertyPermission "*", "read";
    };

// RGI JBasis and PassCompagnia requirements
grant {
    permission java.util.PropertyPermission "user.language", "write"; //
OPTIONAL, per poter cambiare i "Regional Settings"
    permission java.net.SocketPermission "*:1024-65535", "connect,accept,listen";
    // permission java.lang.RuntimePermission "accessDeclaredMembers"; // REFLECTION
    // permission java.security.AllPermission; // DEBUG
    };



############################################################################################################
############################################################################################################

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