You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2015/10/23 14:47:27 UTC

[jira] [Commented] (OAK-3409) CompositeRegistration.unregister diagnostics not helpful

    [ https://issues.apache.org/jira/browse/OAK-3409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14970910#comment-14970910 ] 

Alex Parvulescu commented on OAK-3409:
--------------------------------------

an alternative is (because this is OSGi related) to provide a smarter OSGi wrapper that would catch this error and possibly log a warning. [0]
So options: just wrap the _registration.unregister();_ call in a try/catch. and/or add a _unregistered_ flag and based on that skip the call altogether.


[0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiWhiteboard.java#L70

> CompositeRegistration.unregister diagnostics not helpful
> --------------------------------------------------------
>
>                 Key: OAK-3409
>                 URL: https://issues.apache.org/jira/browse/OAK-3409
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.0.19
>            Reporter: Julian Reschke
>
> See in the real-world:
> {code}
> 14.09.2015 14:54:11.610 *INFO* [FelixStartLevel] com.adobe.granite.repository.impl.SlingRepositoryManager stop: Uncaught problem disposing the repository
> java.lang.IllegalStateException: Service already unregistered.
>         at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:124)
>         at org.apache.jackrabbit.oak.osgi.OsgiWhiteboard$1.unregister(OsgiWhiteboard.java:75)
>         at org.apache.jackrabbit.oak.spi.whiteboard.CompositeRegistration.unregister(CompositeRegistration.java:43)
>         at org.apache.jackrabbit.oak.Oak$6.close(Oak.java:568)
> ...
> {code}
> Problems:
> 1) There is no information which registration failed, and maybe:
> 2) Is it ok for the code to give up on the first problem? 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)