tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 58199] New: java.lang.ClassCircularityError java/security/Permission using custom Security Manager
Date Fri, 31 Jul 2015 15:02:03 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=58199

            Bug ID: 58199
           Summary: java.lang.ClassCircularityError
                    java/security/Permission using custom Security Manager
           Product: Tomcat 8
           Version: 8.0.20
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: kencosgrove@live.com

I'm not sure if this is related to the fix that just went in for:
https://bz.apache.org/bugzilla/show_bug.cgi?id=58125

I'm getting this error on Tomcat 8 startup when using my own custom security
manager:
java.lang.ClassCircularityError: java/security/Permission
    at com.mytest.MySecurityManager.checkPermission(MySecurityManager.java:15)
    at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1298)
    at java.lang.System.getProperty(System.java:708)
    at sun.security.action.GetPropertyAction.run(GetPropertyAction.java:84)
    at sun.security.action.GetPropertyAction.run(GetPropertyAction.java:49)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.io.PrintWriter.<init>(PrintWriter.java:116)
    at java.io.PrintWriter.<init>(PrintWriter.java:100)
    at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:155)
    at java.util.logging.StreamHandler.publish(StreamHandler.java:196)
    at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:105)
    at java.util.logging.Logger.log(Logger.java:616)
    at java.util.logging.Logger.doLog(Logger.java:641)
    at java.util.logging.Logger.logp(Logger.java:841)
    at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:167)
    at org.apache.juli.logging.DirectJDKLog.fatal(DirectJDKLog.java:143)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:627)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at
org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

Note that I'm using tc Server with Tocmat 8.0.20 rather than Tomcat 8 directly.
 Not sure if that's relevant.

It works fine with tc Server with Tomcat 7.0.59.

Here's a sample MySecurityManager:
package com.mytest;

public class MySecurityManager extends SecurityManager
{ 
  public MySecurityManager()
  {
    super();
  }

  @Override
  public void checkPermission(java.security.Permission perm)
  {
    if (perm == null) {
      throw new NullPointerException("permission can't be null");
    }

    String propertyName = perm.getName();
  }

  @Override
  public void checkPermission(java.security.Permission perm, Object context)
  {
    checkPermission(perm);
  }
}

It seems to blow up when I get to the perm.getName() check.

Any ideas?

Thanks,

Ken

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


Mime
View raw message