NPE in at 
org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance(OpenJpaEnhancerMojo.java:200),
 if configuration is wrong
------------------------------------------------------------------------------------------------------------------------

                 Key: MOJO-1165
                 URL: http://jira.codehaus.org/browse/MOJO-1165
             Project: Mojo
          Issue Type: Bug
          Components: openjpa
            Reporter: Michael Vorburger


If you do e.g. only:

                                                <configuration>
                                                        
<classpathElements>${project.testClasspathElements}</classpathElements>
                                                </configuration>

instead of:

                                                <configuration>
                                                        
<classpathElements>${project.testClasspathElements}</classpathElements>
                                                        <toolProperties>
                                                                <property>
                                                                        
<name>addDefaultConstructor</name>
                                                                        
<value>false</value>
                                                                </property>
                                                                <property>
                                                                        
<name>enforcePropertyRestrictions</name>
                                                                        
<value>false</value>
                                                                </property>
                                                        </toolProperties>
                                                </configuration>

then you get a:

java.lang.NullPointerException
        at 
org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance(OpenJpaEnhancerMojo.java:200)
        at 
org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute(OpenJpaEnhancerMojo.java:105)
        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:585)
        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)

An NPE is always a shame - a clear message "invalid configuration, missing 
tada, bla bla" would be great.

PS: I don't seem to be the only one who ran into this, see 
http://markmail.org/message/ymugqol7drewuo5c !


-- 
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

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to