java.lang.ClassCastException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When stopping tomcat wich hosts only Jira, there is always such stack trace in tomcat logs: {code} 2008-02-18 19:25:32,767: [ERROR] [Thread-33] - org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jira].release() - ApplicationFilterConfig.doAsPrivilege java.lang.ClassCastException: java.lang.IllegalAccessException at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:277) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:177) at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:249) at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3669) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4349) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:892) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1164) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1135) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:312) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1054) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1066) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:447) at org.apache.catalina.core.StandardService.stop(StandardService.java:512) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:743) at org.apache.catalina.startup.Catalina.stop(Catalina.java:601) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:644) {code} These errors occur only after turning on log4j logging on tomcat instead of standard logging. The procedure is described here: http://tomcat.apache.org/tomcat-5.5-doc/logging.html As we are sending error logs of tomcat to our system administrator's mail, we also had to remove all javamail related libraries from jira webapp, and put them in {{$TOMCAT_HOME/common/lib}} directory. Remote debug of this tomcat instance shows such error as a cause of the above stack trace: {code} Class org.apache.catalina.security.SecurityUtil$1 can not access a member of class com.atlassian.gzipfilter.AbstractFilter with modifiers "public" {code}
    via by Kazimierz Pogoda,
  • When stopping tomcat wich hosts only Jira, there is always such stack trace in tomcat logs: {code} 2008-02-18 19:25:32,767: [ERROR] [Thread-33] - org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jira].release() - ApplicationFilterConfig.doAsPrivilege java.lang.ClassCastException: java.lang.IllegalAccessException at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:277) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:177) at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:249) at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3669) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4349) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:892) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1164) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1135) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:312) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1054) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1066) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:447) at org.apache.catalina.core.StandardService.stop(StandardService.java:512) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:743) at org.apache.catalina.startup.Catalina.stop(Catalina.java:601) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:644) {code} These errors occur only after turning on log4j logging on tomcat instead of standard logging. The procedure is described here: http://tomcat.apache.org/tomcat-5.5-doc/logging.html As we are sending error logs of tomcat to our system administrator's mail, we also had to remove all javamail related libraries from jira webapp, and put them in {{$TOMCAT_HOME/common/lib}} directory. Remote debug of this tomcat instance shows such error as a cause of the above stack trace: {code} Class org.apache.catalina.security.SecurityUtil$1 can not access a member of class com.atlassian.gzipfilter.AbstractFilter with modifiers "public" {code}
    via by Kazimierz Pogoda,
    • java.lang.ClassCastException: java.lang.IllegalAccessException at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:277) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:177) at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:249) at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3669) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4349) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:892) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1164) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1135) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:312) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1054) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1066) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:447) at org.apache.catalina.core.StandardService.stop(StandardService.java:512) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:743) at org.apache.catalina.startup.Catalina.stop(Catalina.java:601) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:644)
    No Bugmate found.