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

Null pointer in IPojoTask

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: iPOJO
    • Labels:
      None
    • Environment:
      Tried with ant 1.8.2 and 1.9.4 using org.apache.felix.ipojo.ant-1.12.0.jar

      Description

      Received a Null Pointer exception when trying to run ipojo task:
      java.lang.NullPointerException
      at org.apache.felix.ipojo.task.IPojoTask.execute(IPojoTask.java:236)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.Target.execute(Target.java:435)
      at org.apache.tools.ant.Target.performTasks(Target.java:456)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
      at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
      at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.Target.execute(Target.java:435)
      at org.apache.tools.ant.Target.performTasks(Target.java:456)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
      at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
      at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.Target.execute(Target.java:435)
      at org.apache.tools.ant.Target.performTasks(Target.java:456)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
      at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
      at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
      at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
      at net.sf.antcontrib.logic.ForEach.executeSequential(ForEach.java:181)
      at net.sf.antcontrib.logic.ForEach.execute(ForEach.java:259)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.Target.execute(Target.java:435)
      at org.apache.tools.ant.Target.performTasks(Target.java:456)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
      at org.apache.tools.ant.Main.runBuild(Main.java:851)
      at org.apache.tools.ant.Main.startAnt(Main.java:235)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

      The ant task definition is:
      <taskdef name="ipojo" classname="org.apache.felix.ipojo.task.IPojoTask">
      <classpath>
      <pathelement location="${build_support.basedir}/ant-lib/felix/org.apache.felix.ipojo.ant-1.12.0.jar"/>
      <pathelement location="${build_support.basedir}/ant-lib/felix/org.apache.felix.ipojo.annotations-1.12.0.jar"/>
      </classpath>
      </taskdef>

      The actual target is:

      <target name="ipojo" if="invoke.ipojobuild" description="Run Felix iPojo for OSGi deployment" depends="felix_bnd">
      <ipojo
      input="${build.jar.dir}/${jar.name}.jar"
      metadata="${src.ipojo.dir}/metadata.xml"
      />
      </target>

      The metadata.xml file is:

      <ipojo>
      <instance component="com.healthsense.bundles.agent.impl.AgentImpl"/>
      </ipojo>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dean.anderson Dean S. Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: