[
https://issues.apache.org/jira/browse/FELIX-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224288#comment-16224288
]
ASF GitHub Bot commented on FELIX-5464:
---------------------------------------
GitHub user sjhiggs opened a pull request:
https://github.com/apache/felix/pull/126
FELIX-5464: NPE in org.apache.felix.scrplugin.helper.ClassScanner
Couldn't make this happen by invoking public method in a unit test, but
checked for null InputStream before closing, logged debug message otherwise.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sjhiggs/felix FELIX-5464
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/felix/pull/126.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #126
----
commit fb55f8043dd06501803aa1028102d7affea2f186
Author: Stephen Higgs <[email protected]>
Date: 2017-10-30T01:12:17Z
FELIX-5464: NPE in org.apache.felix.scrplugin.helper.ClassScanner
----
> 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 2.36
> 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.4.14#64029)