question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NullPointerException on ScanResultObject.getClassInfo(ScanResultObject.java:47)

See original GitHub issue

When using the Scanner from a maven plugin, executed in a project with several module, when the scanner is executed on a module, I get the NPE : io.github.lukehutch.fastclasspathscanner.ScanResultObject.getClassInfo(ScanResultObject.java:47)

Full log :

2018-07-26T09:55:24.722+0200    FastClasspathScanner    Exception thrown
2018-07-26T09:55:24.722+0200    FastClasspathScanner    -- java.util.concurrent.ExecutionException: java.lang.NullPointerException
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.InterruptionChecker.executionException(InterruptionChecker.java:86)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.WorkQueue.runWorkLoop(WorkQueue.java:199)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.WorkQueue.runWorkQueue(WorkQueue.java:108)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.WorkQueue.runWorkQueue(WorkQueue.java:122)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.Scanner.call(Scanner.java:559)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.Scanner.call(Scanner.java:64)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at java.lang.Thread.run(Thread.java:748)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    -- Caused by: java.lang.NullPointerException
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.ScanResultObject.getClassInfo(ScanResultObject.java:47)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.AnnotationInfo.getClassInfo(AnnotationInfo.java:112)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.AnnotationInfo.getParameterValues(AnnotationInfo.java:140)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.AnnotationInfo.toString(AnnotationInfo.java:234)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.AnnotationInfo.toString(AnnotationInfo.java:255)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at java.lang.String.valueOf(String.java:2994)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at java.lang.StringBuilder.append(StringBuilder.java:131)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.Join.join(Join.java:57)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.ClassInfoUnlinked.logTo(ClassInfoUnlinked.java:171)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.ClasspathElement.parseClassfiles(ClasspathElement.java:270)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.Scanner$5.processWorkUnit(Scanner.java:563)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.Scanner$5.processWorkUnit(Scanner.java:560)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.WorkQueue.runWorkLoop(WorkQueue.java:187)
2018-07-26T09:55:24.722+0200    FastClasspathScanner    --      ... 8 more
2018-07-26T09:55:24.747+0200    FastClasspathScanner    Unexpected exception during scan
2018-07-26T09:55:24.747+0200    FastClasspathScanner    -- java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at java.util.concurrent.FutureTask.report(FutureTask.java:122)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at java.util.concurrent.FutureTask.get(FutureTask.java:192)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.scan(FastClasspathScanner.java:1008)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.scan(FastClasspathScanner.java:1060)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.scan(FastClasspathScanner.java:1076)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at com.michelin.mojo.MyMojo.execute(MyMojo.java:61)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at java.lang.reflect.Method.invoke(Method.java:498)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    -- Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.InterruptionChecker.executionException(InterruptionChecker.java:86)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.WorkQueue.runWorkLoop(WorkQueue.java:199)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.WorkQueue.runWorkQueue(WorkQueue.java:108)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.WorkQueue.runWorkQueue(WorkQueue.java:122)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.Scanner.call(Scanner.java:559)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.Scanner.call(Scanner.java:64)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at java.lang.Thread.run(Thread.java:748)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    -- Caused by: java.lang.NullPointerException
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.ScanResultObject.getClassInfo(ScanResultObject.java:47)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.AnnotationInfo.getClassInfo(AnnotationInfo.java:112)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.AnnotationInfo.getParameterValues(AnnotationInfo.java:140)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.AnnotationInfo.toString(AnnotationInfo.java:234)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.AnnotationInfo.toString(AnnotationInfo.java:255)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at java.lang.String.valueOf(String.java:2994)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at java.lang.StringBuilder.append(StringBuilder.java:131)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.Join.join(Join.java:57)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.ClassInfoUnlinked.logTo(ClassInfoUnlinked.java:171)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.ClasspathElement.parseClassfiles(ClasspathElement.java:270)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.Scanner$5.processWorkUnit(Scanner.java:563)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.Scanner$5.processWorkUnit(Scanner.java:560)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      at io.github.lukehutch.fastclasspathscanner.utils.WorkQueue.runWorkLoop(WorkQueue.java:187)
2018-07-26T09:55:24.747+0200    FastClasspathScanner    --      ... 8 more

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rgoncalves-Bibcommented, Jul 27, 2018

Thanks for your quick fixes !

1reaction
giacgbjcommented, Jul 27, 2018

@lukehutch Now it works, thanks 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found