Alexander Nöhrer created FELIX-5464:
---------------------------------------

             Summary: java.lang.NullPointerException at 
org.apache.felix.scrplugin.helper.ClassScanner.processClass(ClassScanner.java:207)
                 Key: FELIX-5464
                 URL: https://issues.apache.org/jira/browse/FELIX-5464
             Project: Felix
          Issue Type: Bug
          Components: SCR Tooling
    Affects Versions: scr generator 1.15.0
         Environment: Jenkins
Maven 3.3.9
Java 1.7.0_79
            Reporter: Alexander Nöhrer


I am encountering this problem on and off again only within our Jenkins build 
environment, I cannot reproduce it locally with the same java and maven 
version. Also after some code changes not related to SCR annotated classes it 
works again then it doesn't.

Unfortunately I also was not able to produce a minimum example to reproduce 
this.

Basically I guess what would already help is to check against null and log the 
'pathToClassFile' that caused the input to be 'null'.

By the way I wanted to do this myself just to get more information what is 
wrong in my environment, however the http://felix.apache.org/downloads.cgi 
links for the generator sources return 404...

Here the output on Jenkins:

[ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.23.0:scr 
(generate-scr-scrdescriptor) on project XXX: Execution 
generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.23.0:scr 
failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.felix:maven-scr-plugin:1.23.0:scr (generate-scr-scrdescriptor) on 
project inew-commons-rest-exporter-rest: Execution generate-scr-scrdescriptor 
of goal org.apache.felix:maven-scr-plugin:1.23.0:scr failed.
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at 
org.jvnet.hudson.maven3.launcher.Maven33Launcher.main(Maven33Launcher.java:129)
        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.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
        at jenkins.maven3.agent.Maven33Main.launch(Maven33Main.java:176)
        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 hudson.maven.Maven3Builder.call(Maven3Builder.java:133)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:68)
        at hudson.remoting.UserRequest.perform(UserRequest.java:153)
        at hudson.remoting.UserRequest.perform(UserRequest.java:50)
        at hudson.remoting.Request$2.run(Request.java:336)
        at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.23.0:scr 
failed.
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 31 more
Caused by: java.lang.NullPointerException
        at 
org.apache.felix.scrplugin.helper.ClassScanner.processClass(ClassScanner.java:207)
        at 
org.apache.felix.scrplugin.helper.ClassScanner.getDescription(ClassScanner.java:433)
        at 
org.apache.felix.scrplugin.SCRDescriptorGenerator.createComponent(SCRDescriptorGenerator.java:398)
        at 
org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:161)
        at 
org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:238)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        ... 32 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to