You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mikolaj Izdebski (JIRA)" <ji...@apache.org> on 2014/01/23 15:54:42 UTC
[jira] [Created] (LOGGING-156) SecurityAllowedTestCase is failing
Mikolaj Izdebski created LOGGING-156:
----------------------------------------
Summary: SecurityAllowedTestCase is failing
Key: LOGGING-156
URL: https://issues.apache.org/jira/browse/LOGGING-156
Project: Commons Logging
Issue Type: Bug
Affects Versions: 2.0
Environment: Maven 3.1.1, OpenJDK 1.7 (IcedTea 2.4.4), Linux
Reporter: Mikolaj Izdebski
{{SecurityAllowedTestCase}} fails randomly, which could indicate either a bug in the test case or in the implementation.
On some random condition the call to {{log.info("testing");}} in the test case results in security exceptions, which are recorded by {{MockSecurityManager}} causing the test case to fail. Adding a call to {{Thread.sleep}} just before or just after the call to {{log.info}} helps with reproducing the problem.
The path leading to SecurityException being thrown is:
{code:a=none}
java.lang.SecurityException: Untrusted code [testcase] found
at org.apache.commons.logging.security.MockSecurityManager.checkPermission(MockSecurityManager.java:126)
at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1529)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:305)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.util.ResourceBundle$RBClassLoader.loadClass(ResourceBundle.java:450)
at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2566)
at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1436)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1400)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1296)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:721)
at java.util.logging.Level.getLocalizedLevelName(Level.java:259)
at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:161)
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:610)
at java.util.logging.Logger.doLog(Logger.java:631)
at java.util.logging.Logger.logp(Logger.java:747)
at org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:87)
at org.apache.commons.logging.impl.Jdk14Logger.info(Jdk14Logger.java:176)
at org.apache.commons.logging.security.SecurityAllowedTestCase.testAllAllowed(SecurityAllowedTestCase.java:115)
{code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)