felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clement Escoffier (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4531) Null pointer in IPojoTask
Date Thu, 12 Jun 2014 13:55:01 GMT

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

Clement Escoffier commented on FELIX-4531:
------------------------------------------

The new Ant task requires a classpath or a classpath ref such as in:
https://github.com/apache/felix/blob/trunk/ipojo/runtime/distributions/ten-minutes-tutorial/src/main/skeleton/spell.english/build.xml
(line 71).

This classpath is required to compute bytecode frames correctly.

> Null pointer in IPojoTask
> -------------------------
>
>                 Key: FELIX-4531
>                 URL: https://issues.apache.org/jira/browse/FELIX-4531
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>         Environment: Tried with ant 1.8.2 and 1.9.4 using org.apache.felix.ipojo.ant-1.12.0.jar
>            Reporter: Dean S. Anderson
>
> 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>



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message