maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé Boutemy (JIRA) <j...@apache.org>
Subject [jira] [Updated] (DOXIA-537) NullPointerException parsing table cell with single space
Date Sat, 23 Jan 2016 16:57:39 GMT

     [ https://issues.apache.org/jira/browse/DOXIA-537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hervé Boutemy updated DOXIA-537:
--------------------------------
    Description: 
I have chosen to use Confluence format to generate my maven site, primarily because of good
table support.

I have found that doxia-module-confluence falls over with a NullPointerException if an empty
cell is represented as a single space.

Confluence tables usually require this empty space, or they collapse the cell to be non-existant.

Information pertaining to this failure is below.

Let me know what more I can usefully provide.

Kind regards, Robin.



File: src/site/confluence/tables.confluence

Here is a 3 column table with headers, one row, and data in every column:

||One||Two||Three||
|1|2|3|

Now there is no data in column Two

||One||Two||Three||
|1||3|

Now there is a space in column Two 

||One||Two||Three||
|1| |3|


pom.xml excerpt

{code:xml}</build>
...
    </plugins>
...
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.4</version>
            <dependencies>
                <dependency>
                    <groupId>org.apache.maven.doxia</groupId>
                    <artifactId>doxia-module-confluence</artifactId>
                    <version>1.6</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.maven.doxia</groupId>
                    <artifactId>doxia-module-markdown</artifactId>
                    <version>1.6</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>{code}


{noformat}mvn -X clean site


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site)
on project fitnesse-calypso: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null: ParseException: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site
(default-site) on project fitnesse-calypso: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null
        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.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        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: org.apache.maven.plugin.MojoExecutionException: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null
        at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:146)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more
Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:406)
        at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:51)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:311)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:129)
        at org.apache.maven.plugins.site.render.SiteMojo.renderDoxiaDocuments(SiteMojo.java:261)
        at org.apache.maven.plugins.site.render.SiteMojo.renderLocale(SiteMojo.java:172)
        at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:141)
        ... 22 more
Caused by: org.apache.maven.doxia.parser.ParseException
        at org.apache.maven.doxia.module.confluence.ConfluenceParser.parse(ConfluenceParser.java:133)
        at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:65)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:398)
        ... 28 more
Caused by: java.lang.NullPointerException
        at org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock.traverse(AbstractFatherBlock.java:72)
        at org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock.traverse(AbstractFatherBlock.java:72)
        at org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock.traverse(AbstractFatherBlock.java:72)
        at org.apache.maven.doxia.module.confluence.ConfluenceParser.parse(ConfluenceParser.java:125)
        ... 30 more{noformat}

  was:
I have chosen to use Confluence format to generate my maven site, primarily because of good
table support.

I have found that doxia-module-confluence falls over with a NullPointerException if an empty
cell is represented as a single space.

Confluence tables usually require this empty space, or they collapse the cell to be non-existant.

Information pertaining to this failure is below.

Let me know what more I can usefully provide.

Kind regards, Robin.



File: src/site/confluence/tables.confluence

Here is a 3 column table with headers, one row, and data in every column:

||One||Two||Three||
|1|2|3|

Now there is no data in column Two

||One||Two||Three||
|1||3|

Now there is a space in column Two 

||One||Two||Three||
|1| |3|


pom.xml excerpt

</build>
...
    </plugins>
...
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.4</version>
            <dependencies>
                <dependency>
                    <groupId>org.apache.maven.doxia</groupId>
                    <artifactId>doxia-module-confluence</artifactId>
                    <version>1.6</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.maven.doxia</groupId>
                    <artifactId>doxia-module-markdown</artifactId>
                    <version>1.6</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>


mvn -X clean site


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site)
on project fitnesse-calypso: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null: ParseException: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site
(default-site) on project fitnesse-calypso: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null
        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.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        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: org.apache.maven.plugin.MojoExecutionException: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null
        at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:146)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more
Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:406)
        at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:51)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:311)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:129)
        at org.apache.maven.plugins.site.render.SiteMojo.renderDoxiaDocuments(SiteMojo.java:261)
        at org.apache.maven.plugins.site.render.SiteMojo.renderLocale(SiteMojo.java:172)
        at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:141)
        ... 22 more
Caused by: org.apache.maven.doxia.parser.ParseException
        at org.apache.maven.doxia.module.confluence.ConfluenceParser.parse(ConfluenceParser.java:133)
        at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:65)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:398)
        ... 28 more
Caused by: java.lang.NullPointerException
        at org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock.traverse(AbstractFatherBlock.java:72)
        at org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock.traverse(AbstractFatherBlock.java:72)
        at org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock.traverse(AbstractFatherBlock.java:72)
        at org.apache.maven.doxia.module.confluence.ConfluenceParser.parse(ConfluenceParser.java:125)
        ... 30 more




> NullPointerException parsing table cell with single space
> ---------------------------------------------------------
>
>                 Key: DOXIA-537
>                 URL: https://issues.apache.org/jira/browse/DOXIA-537
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Module - Confluence
>    Affects Versions: 1.6
>            Reporter: Robin Roos
>
> I have chosen to use Confluence format to generate my maven site, primarily because of
good table support.
> I have found that doxia-module-confluence falls over with a NullPointerException if an
empty cell is represented as a single space.
> Confluence tables usually require this empty space, or they collapse the cell to be non-existant.
> Information pertaining to this failure is below.
> Let me know what more I can usefully provide.
> Kind regards, Robin.
> File: src/site/confluence/tables.confluence
> Here is a 3 column table with headers, one row, and data in every column:
> ||One||Two||Three||
> |1|2|3|
> Now there is no data in column Two
> ||One||Two||Three||
> |1||3|
> Now there is a space in column Two 
> ||One||Two||Three||
> |1| |3|
> pom.xml excerpt
> {code:xml}</build>
> ...
>     </plugins>
> ...
>         <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-site-plugin</artifactId>
>             <version>3.4</version>
>             <dependencies>
>                 <dependency>
>                     <groupId>org.apache.maven.doxia</groupId>
>                     <artifactId>doxia-module-confluence</artifactId>
>                     <version>1.6</version>
>                 </dependency>
>                 <dependency>
>                     <groupId>org.apache.maven.doxia</groupId>
>                     <artifactId>doxia-module-markdown</artifactId>
>                     <version>1.6</version>
>                 </dependency>
>             </dependencies>
>         </plugin>
>     </plugins>
> </build>{code}
> {noformat}mvn -X clean site
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site)
on project fitnesse-calypso: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null: ParseException: NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site
(default-site) on project fitnesse-calypso: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null
>         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.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
>         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: org.apache.maven.plugin.MojoExecutionException: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null
>         at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:146)
>         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
>         ... 20 more
> Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error parsing '/Users/robin/tmp3/fitnesse-calypso/src/site/confluence/tables.confluence':
line [15] null
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:406)
>         at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:51)
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:311)
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:129)
>         at org.apache.maven.plugins.site.render.SiteMojo.renderDoxiaDocuments(SiteMojo.java:261)
>         at org.apache.maven.plugins.site.render.SiteMojo.renderLocale(SiteMojo.java:172)
>         at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:141)
>         ... 22 more
> Caused by: org.apache.maven.doxia.parser.ParseException
>         at org.apache.maven.doxia.module.confluence.ConfluenceParser.parse(ConfluenceParser.java:133)
>         at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:65)
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:398)
>         ... 28 more
> Caused by: java.lang.NullPointerException
>         at org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock.traverse(AbstractFatherBlock.java:72)
>         at org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock.traverse(AbstractFatherBlock.java:72)
>         at org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock.traverse(AbstractFatherBlock.java:72)
>         at org.apache.maven.doxia.module.confluence.ConfluenceParser.parse(ConfluenceParser.java:125)
>         ... 30 more{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message