|
|
|
Here are the recreate steps in order to recreate the issue
1.) Using the maven archetype appfuse-core create the core type project 2.) Afterwards, create the entity: package com.mycompany.app.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table (name="person") public class Person { private Long id; private String lastName; private String firstName; @Column(name="last_name") public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } @Column(name="first_name") public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } @Id @Column(name="id") public Long getId() { return id; } public void setId(Long id) { this.id = id; } } 3.) From the command line, type the 'appfuse:gen' 4.) When prompted, enter the pojo 'Person' 5.) Then you will receive the following stacktrace. [INFO] Trace java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:394) at java.util.Properties.setProperty(Properties.java:143) at org.appfuse.mojo.exporter.AppFuseGeneratorMojo.configureExporter(AppF useGeneratorMojo.java:237) at org.appfuse.mojo.HibernateExporterMojo.doExecute(HibernateExporterMoj o.java:228) at org.appfuse.mojo.exporter.AppFuseGeneratorMojo.doExecute(AppFuseGener atorMojo.java:261) at org.appfuse.mojo.HibernateExporterMojo.execute(HibernateExporterMojo. java:138) at org.appfuse.mojo.exporter.AppFuseGeneratorMojo.execute(AppFuseGenerat orMojo.java:210) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:447) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:493) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:463) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) at org.apache.maven.cli.MavenCli.main(MavenCli.java:282) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.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) Thanks Carlus After looking at the source code, I did find this entry...
// AppFuse-specific values exporter.getProperties().setProperty("basepackage", getProject().getGroupId()); exporter.getProperties().setProperty("daoframework", getProject().getProperties().getProperty("dao.framework")); exporter.getProperties().setProperty("webframework", getProject().getProperties().getProperty("web.framework")); exporter.getProperties().setProperty("packaging", getProject().getPackaging()); The NPE is being thrown when looking up the "web.framework" property from the project properties. Sounds like a real bug. If you get a chance to provide a patch, that'd be great.
Working on it as we speak...er...type
:) Carlus Here is the patch that resolves the issue.
Thanks Carlus |
|||||||||||||||||||||||||||||||||||||||||||||
Thanks,
Matt