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-2487) Failed to compile iPOJO 1.6.0 project with NPE (related to annotation computation)
Date Thu, 29 Jul 2010 07:17:15 GMT

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

Guillaume Sauthier commented on FELIX-2487:
-------------------------------------------

Do you describe your component using XML *and* annotations ? I mean a part in the metadata.xml
and some annotations in the code ?

If so, you have to choose where you describe your component: either in the metadata.xml or
using annotations, but not both.
The iPOJO manipulation process does not merge XML metadata and annotations for a given component
type.

In any case, I agree that the NPE is not really nice ;)

> Failed to compile iPOJO 1.6.0 project with NPE (related to annotation computation)
> ----------------------------------------------------------------------------------
>
>                 Key: FELIX-2487
>                 URL: https://issues.apache.org/jira/browse/FELIX-2487
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.6.0
>         Environment: JRE 1.6, maven-bundle-plugin 2.1.0, maven-ipojo-plugin 1.6.0
>            Reporter: YANG, BongYeol
>            Priority: Blocker
>
> When I add any custom annotation(s) above my POJO class, and if there is no iPOJO @Component
declaration, compile failed with following messages:
> java.lang.NullPointerException
> 	at org.apache.felix.ipojo.manipulation.annotations.MetadataCollector.visitEnd(MetadataCollector.java:215)
> 	at org.objectweb.asm.ClassReader.accept(Unknown Source)
> 	at org.objectweb.asm.ClassReader.accept(Unknown Source)
> 	at org.apache.felix.ipojo.manipulator.Pojoization.computeAnnotations(Pojoization.java:294)
> 	at org.apache.felix.ipojo.manipulator.Pojoization.manipulateComponents(Pojoization.java:484)
> 	at org.apache.felix.ipojo.manipulator.Pojoization.manipulateJarFile(Pojoization.java:335)
> 	at org.apache.felix.ipojo.manipulator.Pojoization.pojoization(Pojoization.java:194)
> 	at org.apache.felix.ipojo.plugin.ManipulatorMojo.execute(ManipulatorMojo.java:199)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
> 	at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
> 	at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
> 	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
> 	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
> 	at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
> If I uses @Component annotation instead of metadata.xml configuration, compile succeeded.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message