NullPointer Exception on aggregate

198 views
Skip to first unread message

JP O'Neill

unread,
Jul 3, 2013, 5:02:06 AM7/3/13
to thucydid...@googlegroups.com
Hi,

I'm experiencing the following NullPointer Exception during aggregate. The same code compiles and runs test fin on colleagues machine so I'm stumped, has anyone else come across this?

[ERROR] Failed to execute goal net.thucydides.maven.plugins:maven-thucydides-plugin:0.9.125:aggregate (thucydides-reports) on project sports-acceptance-test: Execution thucydides-reports of goal net.thucydides.maven.plugins:maven-thucydides-plugin:0.9.125:aggregate failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.thucydides.maven.plugins:maven-thucydides-plugin:0.9.125:aggregate (thucydides-reports) on project sports-acceptance-test: Execution thucydides-reports of goal net.thucydides.maven.plugins:maven-thucydides-plugin:0.9.125:aggregate failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution thucydides-reports of goal net.thucydides.maven.plugins:maven-thucydides-plugin:0.9.125:aggregate failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.NullPointerException
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3020)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
at org.xmlpull.mxp1.MXParser.parseStartTag(MXParser.java:1738)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1479)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:103)
at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:63)
at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:58)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:895)
at net.thucydides.core.reports.history.TestHistory.getHistory(TestHistory.java:176)
at net.thucydides.core.reports.html.HtmlAggregateStoryReporter.generateHistoryReportFor(HtmlAggregateStoryReporter.java:293)
at net.thucydides.core.reports.html.HtmlAggregateStoryReporter.generateReportsForTestResultsIn(HtmlAggregateStoryReporter.java:127)
at net.thucydides.core.reports.html.HtmlAggregateStoryReporter.generateReportsForTestResultsFrom(HtmlAggregateStoryReporter.java:112)
at net.thucydides.maven.plugins.ThucydidesAggregatorMojo.generateHtmlStoryReports(ThucydidesAggregatorMojo.java:198)
at net.thucydides.maven.plugins.ThucydidesAggregatorMojo.execute(ThucydidesAggregatorMojo.java:177)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more



JP O'Neill

unread,
Jul 4, 2013, 7:15:18 AM7/4/13
to thucydid...@googlegroups.com
I was able to resolve this by cleaning out the .thucydides/default folder. There must have been some .outcome file that was corrupt. It there any reason why these temporary files aren't cleaned out at the start of each run?

John Smart

unread,
Jul 4, 2013, 7:30:16 AM7/4/13
to JP O'Neill, thucydid...@googlegroups.com
The .thucydides directory is where the statistics database goes, but this is scheduled to be deprecated for a JSON-based solution in a release in the near future.


--
You received this message because you are subscribed to the Google Groups "Thucydides Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send an email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
___________________________________________________
John Smart | Wakaleo Consulting  |  +61 407 247 642
Optimizing your software development process
http://www.wakaleo.com  |  john....@wakaleo.com

JP O'Neill

unread,
Jul 4, 2013, 11:34:15 AM7/4/13
to thucydid...@googlegroups.com, JP O'Neill
If interested the way to reproduce is to introduce an outcome file in the .thucydides/defaults directory with only opening and closing tags:

<net.thucydides.core.reports.history.TestResultSnapshot>
</net.thucydides.core.reports.history.TestResultSnapshot>

now running any any maven build that uses thucydides will fail.

I'm not sure how exactly the corrupted file was introduced, but it took a long time to diagnose the issue as it's not clear that files outside of the test folders are being referenced 
Reply all
Reply to author
Forward
0 new messages