You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (Updated) (JIRA)" <ji...@apache.org> on 2011/09/27 14:22:11 UTC

[jira] [Updated] (FELIX-3117) NullPointerException when not implementing interface that is defined with @Service

     [ https://issues.apache.org/jira/browse/FELIX-3117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated FELIX-3117:
------------------------------------

    Affects Version/s: maven-scr-plugin-1.7.2
                       scr ant task 1.1.2
                       scr generator 1.1.2
        Fix Version/s: scr generator 1.1.4
                       scr ant task 1.1.4
                       maven-scr-plugin-1.7.4

Thanks for reporting this. I'Ve fixed this in revision 1176353

This is considered an error, therefore the build fails with an error (instead of a warning)
                
> NullPointerException when not implementing interface that is defined with @Service
> ----------------------------------------------------------------------------------
>
>                 Key: FELIX-3117
>                 URL: https://issues.apache.org/jira/browse/FELIX-3117
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.7.0, maven-scr-plugin-1.7.2, scr ant task 1.1.2, scr generator 1.1.2
>            Reporter: Jan Volckaert
>            Assignee: Carsten Ziegeler
>             Fix For: maven-scr-plugin-1.7.4, scr ant task 1.1.4, scr generator 1.1.4
>
>
> REPO: 
> 1) Create a class like following
> @Component
> @Service({EventHandler.class})
> public class HelloWorld {
> }
> 2) Compile class with maven-scr-plugin.
> EXPECTED:
> A warning or error message that tells me that HelloWorld.class does not implement EventHandler interface.
> ACTUAL:
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> 	at org.apache.felix.scrplugin.tags.cl.ClassLoaderJavaClassDescription.isA(ClassLoaderJavaClassDescription.java:245)
> 	at org.apache.felix.scrplugin.tags.qdox.QDoxJavaClassDescription.isA(QDoxJavaClassDescription.java:309)
> 	at org.apache.felix.scrplugin.om.Interface.validate(Interface.java:68)
> 	at org.apache.felix.scrplugin.om.Service.validate(Service.java:99)
> 	at org.apache.felix.scrplugin.om.Component.validate(Component.java:327)
> 	at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:342)
> 	at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:192)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> 	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> 	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:616)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira