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

Tom Watson commented on FELIX-6552:
-----------------------------------

An error should have been logged with the LogService, but the service component 
must not be prevented from being activated according to the specification:  
https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#service.component-binding.services

> In case of class-cast exception, a component is still activated
> ---------------------------------------------------------------
>
>                 Key: FELIX-6552
>                 URL: https://issues.apache.org/jira/browse/FELIX-6552
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>            Reporter: Christoph Läubrich
>            Priority: Major
>
> I recently found a very strange behavior with one of my components:
>  # there is a static bound setter for a service X
>  # in case of injection of X I call a method an perform some action on it
>  # if it now happens that a ClassCastException is thrown this seems to be 
> silently ignored
>  # my activate method is called and the service seems to be registered 
> sucessfully
> This is very bad, because I only noticed that something was wrong because it 
> failed then later on and everything looks "normal" (no entry in the OSGi log 
> for example, component seems to be activated...)
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to