[ http://jira.codehaus.org/browse/DOXIA-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=134812#action_134812 ]
Lukas Theussl commented on DOXIA-240: ------------------------------------- With additional info from IRC I could reproduce it, testcase is submitted [1]. There is a problem with the toc macro in xdoc: the macroParameters HashMap in XdocParser is initialized with an opening <param> tag only, but it is accessed without a null check when closing <macro> so you get an NPE with something like <macro name="toc"/>. [1] http://svn.apache.org/viewvc?view=rev&revision=656273 > NPE when building documentation > ------------------------------- > > Key: DOXIA-240 > URL: http://jira.codehaus.org/browse/DOXIA-240 > Project: Maven Doxia > Issue Type: Bug > Environment: linux, java 6_10 > Reporter: Matthew Pocock > > I'm getting NPE when building site docs, with no indication in the > stack-trace as to what has gone wrong. Different things happen if I build > from clean or build again on top of a failed build. > In the site directory, I type: mvn site > This builds some archives for child modules and then starts chewing on the > dox files. It fails part way with a NPE. You can get the code that triggers > this from subversion: > http://metagenome.ncl.ac.uk/subversion/instantsoap/trunk/instantsoap/site/ > revision 598 > The stack-trace looks like this: > [INFO] [site:site] > [INFO] > ------------------------------------------------------------------------ > [ERROR] FATAL ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] null > [INFO] > ------------------------------------------------------------------------ > [INFO] Trace > java.lang.NullPointerException > at > org.apache.maven.doxia.module.xdoc.XdocParser.handleEndTag(XdocParser.java:467) > at > org.apache.maven.doxia.parser.AbstractXmlParser.parseXml(AbstractXmlParser.java:92) > at > org.apache.maven.doxia.parser.AbstractXmlParser.parse(AbstractXmlParser.java:53) > at > org.apache.maven.doxia.module.xdoc.XdocParser.parse(XdocParser.java:99) > at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:59) > at > org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:342) > at > org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:46) > at > org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269) > at > org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101) > at > org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:129) > at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:96) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) > 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.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira