directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kiran Ayyagari (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DIRSERVER-1855) java.lang.IllegalStateException: Can't overwrite cause at org.apache.directory.server.core.authz.GroupCache.initialize(GroupCache.java:190)
Date Thu, 20 Feb 2014 11:56:25 GMT

     [ https://issues.apache.org/jira/browse/DIRSERVER-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kiran Ayyagari resolved DIRSERVER-1855.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0-M16
         Assignee: Emmanuel Lecharny

Marking as fixed.

> java.lang.IllegalStateException: Can't overwrite cause at org.apache.directory.server.core.authz.GroupCache.initialize(GroupCache.java:190)
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1855
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1855
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0.0-M12
>            Reporter: Konrad Windszus
>            Assignee: Emmanuel Lecharny
>            Priority: Critical
>             Fix For: 2.0.0-M16
>
>
> We got the following exception stack trace after trying to start ApacheDS from a backup:
> {code}
> 14:37:15] ERROR [org.apache.directory.server.wrapper.ApacheDsTanukiWrapper] - Failed
to start the service.
> java.lang.IllegalStateException: Can't overwrite cause
>         at java.lang.Throwable.initCause(Throwable.java:456)
>         at org.apache.directory.server.core.authz.GroupCache.initialize(GroupCache.java:190)
>         at org.apache.directory.server.core.authz.GroupCache.<init>(GroupCache.java:122)
>         at org.apache.directory.server.core.authz.AciAuthorizationInterceptor.init(AciAuthorizationInterceptor.java:295)
>         at org.apache.directory.server.core.DefaultDirectoryService.initInterceptors(DefaultDirectoryService.java:726)
>         at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1863)
>         at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:1272)
>         at org.apache.directory.server.ApacheDsService.initDirectoryService(ApacheDsService.java:316)
>         at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:180)
>         at org.apache.directory.server.wrapper.ApacheDsTanukiWrapper.start(ApacheDsTanukiWrapper.java:72)
>         at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
> {code}
> The problem here really is, that this exception hides the real problem here. I see that
even in the trunk you try to set the cause in http://svn.apache.org/repos/asf/directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
in the initializeMethod. That is not allowed and leads to that exception if the original exception
already has a cause set (http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Throwable.html#initCause%28java.lang.Throwable%29).
Rather just wrap the original exception and leave out the initCause or at least check first,
if the initCause is allowed at that point. Also please remove the e.printStackTrace as it
will land in the standard error stream rather than in the log.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message