Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-3836

NPE when calling InstanceDescription.getDescription() ; // HandlerDescription is missing for org.apache.felix.ipojo.handlers.event:subscriber handler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • ipojo-runtime-1.12.1
    • iPOJO
    • None

    Description

      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.

      Attachments

        1. bug.png
          116 kB
          Jérémy Cazaux

        Activity

          People

            clement.escoffier Clement Escoffier
            cazauxj Jérémy Cazaux
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: