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

Dan Haywood updated ISIS-1745:
------------------------------
    Fix Version/s:     (was: 2.0.0)
                   1.16.0

> isis maven plugin (validate) swallows NPEs from DN.
> ---------------------------------------------------
>
>                 Key: ISIS-1745
>                 URL: https://issues.apache.org/jira/browse/ISIS-1745
>             Project: Isis
>          Issue Type: Improvement
>            Reporter: Dan Haywood
>             Fix For: 1.16.0
>
>
> To reproduce:
> due to an error in DN annotations, running mvn validate plugin just gave a 
> very minimal exception:
> {code}
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 18.576 s
> [INFO] Finished at: 2017-10-11T14:53:44+01:00
> [INFO] Final Memory: 206M/710M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.isis.tool:isis-maven-plugin:1.15.0.20170915-1224:validate 
> (default) on project estatio-app: Execution default of goal 
> org.apache.isis.tool:isis-maven-plugin:1.15.0.20170915-1224:validate failed: 
> java.lang.NullPointerException -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> {code}
> running with -X indicated the problem was in DN annotations somewhere:
> {code}
> [ERROR] Failed to execute goal 
> org.apache.isis.tool:isis-maven-plugin:1.15.0.20170915-1224:validate 
> (default) on project estatio-app: Execution default of goal 
> org.apache.isis.tool:isis-maven-plugin:1.15.0.20170915-1224:validate failed: 
> java.lang.NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.isis.tool:isis-maven-plugin:1.15.0.20170915-1224:validate 
> (default) on project estatio-app: Execution default of goal 
> org.apache.isis.tool:isis-maven-plugin:1.15.0.20170915-1224:validate failed: 
> java.lang.NullPointerException
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
>         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:498)
>         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.PluginExecutionException: Execution 
> default of goal 
> org.apache.isis.tool:isis-maven-plugin:1.15.0.20170915-1224:validate failed: 
> java.lang.NullPointerException
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>         ... 20 more
> Caused by: org.datanucleus.exceptions.NucleusException: 
> java.lang.NullPointerException
>         at 
> org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2930)
>         at 
> org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:119)
>         at 
> org.datanucleus.store.rdbms.RDBMSStoreManager.createSchemaForClasses(RDBMSStoreManager.java:3855)
>         at 
> org.apache.isis.core.runtime.system.persistence.DataNucleusApplicationComponents.createSchema(DataNucleusApplicationComponents.java:194)
>         at 
> org.apache.isis.core.runtime.system.persistence.DataNucleusApplicationComponents.createPmfAndSchemaIfRequired(DataNucleusApplicationComponents.java:1
> {code}
> It would be nice if the default validation error could provide more guidance 
> here, ie to catch an NPE from DN and convert it into a suitable validation 
> error.
> to reproduce:
> for https://github.com/estatio/estatio
> {code}
> git checkout 46739ac06
> {code}
> then
> {code}
> mvn clean install -DskipTests
> {code}
> or (to rerun subsequently):
> {code}
> mvn install -DskipTests -pl estatioapp/app 
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to