Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException during report creation #33

Open
jmini opened this issue Sep 25, 2017 · 0 comments
Open

NullPointerException during report creation #33

jmini opened this issue Sep 25, 2017 · 0 comments

Comments

@jmini
Copy link
Contributor

jmini commented Sep 25, 2017

I am not sure why, but sometimes I get null pointer exceptions at positions where they do not make sense at all.

Here a stacktrace example:

Error dynamically creating reporter
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at com.selesse.jxlint.report.Reporters.createReporter(Reporters.java:112)
        at com.selesse.jxlint.actions.LintHandler.reportLintErrors(LintHandler.java:65)
        at com.selesse.jxlint.actions.LintHandler.lintAndReportAndExit(LintHandler.java:55)
        at com.selesse.jxlint.model.AbstractDispatcher.handleLint(AbstractDispatcher.java:176)
        at com.selesse.jxlint.model.AbstractDispatcher.doDispatch(AbstractDispatcher.java:168)
        at com.selesse.jxlint.maven.MojoDispatcher.dispatch(MojoDispatcher.java:18)
        at com.selesse.jxlint.maven.AbstractJxlintMojo.execute(AbstractJxlintMojo.java:206)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
        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:309)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        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:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.NullPointerException
        at com.selesse.jxlint.report.HtmlTemplatedReporter.<init>(HtmlTemplatedReporter.java:46)
        ... 33 more

In this typical case I let the maven Build run a second time, and without changing anything, there was no issue and I got my report. My guess is that something is not 100% correct with concurrency, but it is not easy to reproduce.

Sometimes I see another issue: something with comparison; also a NullPointerException somewhere totally unexpected. I will post the second stacktrace here, when I see it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant