felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Sauthier (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-3836) NPE when calling InstanceDescription.getDescription() ; // HandlerDescription is missing for org.apache.felix.ipojo.handlers.event:subscriber handler
Date Thu, 04 Jul 2013 15:47:49 GMT

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

Guillaume Sauthier commented on FELIX-3836:
-------------------------------------------

Browsing the code yesterday, I think I found a good suspect: InstanceManager.getHandler()
When something goes wrong (Exception thrown) in an instance's handler creation, this method
log the error and return null.
The null value is then stored in the handler's array and the process continue ...

                
> NPE when calling InstanceDescription.getDescription() ; //  HandlerDescription is missing
for org.apache.felix.ipojo.handlers.event:subscriber handler
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3836
>                 URL: https://issues.apache.org/jira/browse/FELIX-3836
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Jérémy Cazaux
>            Assignee: Clement Escoffier
>             Fix For: ipojo-eventadmin-handler-1.8.2
>
>         Attachments: bug.png
>
>
> java.lang.NullPointerException
> 	at org.apache.felix.ipojo.architecture.InstanceDescription.getDescription(InstanceDescription.java:164)
> 	at org.apache.felix.ipojo.PrimitiveInstanceDescription.getDescription(PrimitiveInstanceDescription.java:165)
> NPE when executing this line in the InstanceDescription :    instance.addElement(m_handlers[i].getHandlerInfo()); 
> My component has 4 handlers : [org.ow2.jonas.ipojo.interceptor:interceptor, org.apache.felix.ipojo:provides,
org.apache.felix.ipojo.handlers.event:subscriber, org.apache.felix.ipojo:architecture]
> cazauxj@jonas$ inspect service capability 103
> JOnAS :: Services :: JOnAS report :: Extensions :: Deployables (103) provides services:
> ---------------------------------------------------------------------------------------
> component.class = org.ow2.jonas.report.extensions.deployables.internal.DeployablesReportExtension
> component.description = factory name="DeployablesReportExtension" bundle="103" state="valid"
implementation-class="org.ow2.jonas.report.extensions.deployables.internal.DeployablesReportExtension"
>         requiredhandlers list="[org.ow2.jonas.ipojo.interceptor:interceptor, org.apache.felix.ipojo:provides,
org.apache.felix.ipojo.handlers.event:subscriber, org.apache.felix.ipojo:architecture]"
>         missinghandlers list="[]"
>         provides specification="org.ow2.jonas.report.api.IReportExtension"
>         property name="namespace" type="java.lang.String" value="http://jonas.ow2.org/report/deployables/1.0"
>         property name="event.topics" type="java.util.Dictionary" value="{}"
>         property name="event.filter" type="java.util.Dictionary" value="{}"
>         inherited interfaces="[org.ow2.jonas.report.api.IReportExtension]" superclasses="[]"
> component.properties = [Lorg.apache.felix.ipojo.architecture.PropertyDescription;@19c59085
> component.providedServiceSpecifications = org.ow2.jonas.report.api.IReportExtension
> factory.name = DeployablesReportExtension
> factory.state = 1
> objectClass = org.apache.felix.ipojo.Factory, org.osgi.service.cm.ManagedServiceFactory
> service.id = 299
> service.pid = DeployablesReportExtension
> ----
> factory.name = DeployablesReportExtension
> instance.name = DeployablesReportExtension-0
> namespace = http://jonas.ow2.org/report/deployables/1.0
> objectClass = org.ow2.jonas.report.api.IReportExtension
> service.id = 303
> When debugging, it looks like that the array of HandlerDescription does contain the correct
number of element (4) but the element with index 2 is NULL. So the HandlerDescription is missing
for org.apache.felix.ipojo.handlers.event:subscriber handler. However, all HandlerManager
 are available from the InstanceManager (the HandlerManager associated to the subscriber handler
is not null). I have attached a picture to illustrate this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message