You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason Dillon (JIRA)" <ji...@codehaus.org> on 2006/03/17 00:24:32 UTC

[jira] Created: (MSUREFIRE-80) systemProperties and NPE

systemProperties and NPE
------------------------

         Key: MSUREFIRE-80
         URL: http://jira.codehaus.org/browse/MSUREFIRE-80
     Project: Maven 2.x Surefire Plugin
        Type: Bug

    Reporter: Jason Dillon
    Priority: Blocker


I've got in my pom:

{code}
<properties>
        <jdbc.schema></jdbc.schema>
</properties>
{code}

And then configured the surefire plugin to set a system property:

{code}
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <dbunit.connection.schema>${jdbc.schema}</dbunit.connection.schema>
                    </systemProperties>
                </configuration>
            </plugin>
{code}

Which ends up resulting in:

{noformat}
[DEBUG]   (f) systemProperties = {dbunit.connection.schema=null}
...
[DEBUG] Trace
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:393)
        at java.util.Properties.setProperty(Properties.java:102)
        at java.lang.System.setProperty(System.java:656)
        at org.apache.maven.test.SurefirePlugin.processSystemProperties(SurefirePlugin.java:408)
        at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:335)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        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:324)
        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)          
{noformat}

If I put any value into the property, like

{code}
<properties>
        <jdbc.schema>foo</jdbc.schema>
</properties>
{code}

Then it works as expected, no NPE and the property gets set.

But I need to set the property to an empty string... why on earth does this get turned into a null?

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


[jira] Commented: (MSUREFIRE-80) systemProperties and NPE

Posted by "Dan Tran (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSUREFIRE-80?page=comments#action_61305 ] 

Dan Tran commented on MSUREFIRE-80:
-----------------------------------

jason, did you result MSUREFIRE-79 ? I still see you are using the wrong systemProperties configuration syntax

> systemProperties and NPE
> ------------------------
>
>          Key: MSUREFIRE-80
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-80
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Reporter: Jason Dillon
>     Priority: Blocker

>
>
> I've got in my pom:
> {code}
> <properties>
>         <jdbc.schema></jdbc.schema>
> </properties>
> {code}
> And then configured the surefire plugin to set a system property:
> {code}
> <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <configuration>
>                     <systemProperties>
>                         <dbunit.connection.schema>${jdbc.schema}</dbunit.connection.schema>
>                     </systemProperties>
>                 </configuration>
>             </plugin>
> {code}
> Which ends up resulting in:
> {noformat}
> [DEBUG]   (f) systemProperties = {dbunit.connection.schema=null}
> ...
> [DEBUG] Trace
> java.lang.NullPointerException
>         at java.util.Hashtable.put(Hashtable.java:393)
>         at java.util.Properties.setProperty(Properties.java:102)
>         at java.lang.System.setProperty(System.java:656)
>         at org.apache.maven.test.SurefirePlugin.processSystemProperties(SurefirePlugin.java:408)
>         at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:335)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         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:324)
>         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)          
> {noformat}
> If I put any value into the property, like
> {code}
> <properties>
>         <jdbc.schema>foo</jdbc.schema>
> </properties>
> {code}
> Then it works as expected, no NPE and the property gets set.
> But I need to set the property to an empty string... why on earth does this get turned into a null?

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


[jira] Updated: (SUREFIRE-81) systemProperties and NPE

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated SUREFIRE-81:
---------------------------------

    Fix Version/s: 2.0 (2.2 plugin)

> systemProperties and NPE
> ------------------------
>
>                 Key: SUREFIRE-81
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-81
>             Project: Maven Surefire
>          Issue Type: Bug
>            Reporter: Jason Dillon
>         Assigned To: Brett Porter
>            Priority: Blocker
>             Fix For: 2.0 (2.2 plugin)
>
>
> I've got in my pom:
> {code}
> <properties>
>         <jdbc.schema></jdbc.schema>
> </properties>
> {code}
> And then configured the surefire plugin to set a system property:
> {code}
> <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <configuration>
>                     <systemProperties>
>                         <dbunit.connection.schema>${jdbc.schema}</dbunit.connection.schema>
>                     </systemProperties>
>                 </configuration>
>             </plugin>
> {code}
> Which ends up resulting in:
> {noformat}
> [DEBUG]   (f) systemProperties = {dbunit.connection.schema=null}
> ...
> [DEBUG] Trace
> java.lang.NullPointerException
>         at java.util.Hashtable.put(Hashtable.java:393)
>         at java.util.Properties.setProperty(Properties.java:102)
>         at java.lang.System.setProperty(System.java:656)
>         at org.apache.maven.test.SurefirePlugin.processSystemProperties(SurefirePlugin.java:408)
>         at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:335)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         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:324)
>         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)          
> {noformat}
> If I put any value into the property, like
> {code}
> <properties>
>         <jdbc.schema>foo</jdbc.schema>
> </properties>
> {code}
> Then it works as expected, no NPE and the property gets set.
> But I need to set the property to an empty string... why on earth does this get turned into a null?

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

        

[jira] Updated: (MSUREFIRE-80) systemProperties and NPE

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSUREFIRE-80?page=all ]

Brett Porter updated MSUREFIRE-80:
----------------------------------

    Fix Version: 2.2

> systemProperties and NPE
> ------------------------
>
>          Key: MSUREFIRE-80
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-80
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Reporter: Jason Dillon
>     Priority: Blocker
>      Fix For: 2.2

>
>
> I've got in my pom:
> {code}
> <properties>
>         <jdbc.schema></jdbc.schema>
> </properties>
> {code}
> And then configured the surefire plugin to set a system property:
> {code}
> <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <configuration>
>                     <systemProperties>
>                         <dbunit.connection.schema>${jdbc.schema}</dbunit.connection.schema>
>                     </systemProperties>
>                 </configuration>
>             </plugin>
> {code}
> Which ends up resulting in:
> {noformat}
> [DEBUG]   (f) systemProperties = {dbunit.connection.schema=null}
> ...
> [DEBUG] Trace
> java.lang.NullPointerException
>         at java.util.Hashtable.put(Hashtable.java:393)
>         at java.util.Properties.setProperty(Properties.java:102)
>         at java.lang.System.setProperty(System.java:656)
>         at org.apache.maven.test.SurefirePlugin.processSystemProperties(SurefirePlugin.java:408)
>         at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:335)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         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:324)
>         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)          
> {noformat}
> If I put any value into the property, like
> {code}
> <properties>
>         <jdbc.schema>foo</jdbc.schema>
> </properties>
> {code}
> Then it works as expected, no NPE and the property gets set.
> But I need to set the property to an empty string... why on earth does this get turned into a null?

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


[jira] Closed: (MSUREFIRE-80) systemProperties and NPE

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSUREFIRE-80?page=all ]
     
Brett Porter closed MSUREFIRE-80:
---------------------------------

     Assign To: Brett Porter
    Resolution: Fixed

no longer npe's when misconfigured, but note correct syntax is name/value elements.

> systemProperties and NPE
> ------------------------
>
>          Key: MSUREFIRE-80
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-80
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Reporter: Jason Dillon
>     Assignee: Brett Porter
>     Priority: Blocker
>      Fix For: 2.2

>
>
> I've got in my pom:
> {code}
> <properties>
>         <jdbc.schema></jdbc.schema>
> </properties>
> {code}
> And then configured the surefire plugin to set a system property:
> {code}
> <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <configuration>
>                     <systemProperties>
>                         <dbunit.connection.schema>${jdbc.schema}</dbunit.connection.schema>
>                     </systemProperties>
>                 </configuration>
>             </plugin>
> {code}
> Which ends up resulting in:
> {noformat}
> [DEBUG]   (f) systemProperties = {dbunit.connection.schema=null}
> ...
> [DEBUG] Trace
> java.lang.NullPointerException
>         at java.util.Hashtable.put(Hashtable.java:393)
>         at java.util.Properties.setProperty(Properties.java:102)
>         at java.lang.System.setProperty(System.java:656)
>         at org.apache.maven.test.SurefirePlugin.processSystemProperties(SurefirePlugin.java:408)
>         at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:335)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         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:324)
>         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)          
> {noformat}
> If I put any value into the property, like
> {code}
> <properties>
>         <jdbc.schema>foo</jdbc.schema>
> </properties>
> {code}
> Then it works as expected, no NPE and the property gets set.
> But I need to set the property to an empty string... why on earth does this get turned into a null?

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


[jira] Commented: (MSUREFIRE-80) systemProperties and NPE

Posted by "Dan Tran (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSUREFIRE-80?page=comments#action_61350 ] 

Dan Tran commented on MSUREFIRE-80:
-----------------------------------

It appears that you are using the snapshot copy of the plugin based on what you show me in your local repo.  To use the officiall release,
you need to specify the version in you pom, but you will lose the new added feature in the snapshot.

I, personally, cut the release internally ( after testing it) so that changes in maven snapshot do not affect my team.

If you get the latest from svn and build, this problem will go away.

I also notice that maven plugin snapshot repo has the latest one ( http://svn.apache.org/maven-snapshot-repository )
not sure if it is permanent since there are lots of work going on to reorganize the snapshots  repo locations

Hope it helps





> systemProperties and NPE
> ------------------------
>
>          Key: MSUREFIRE-80
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-80
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Reporter: Jason Dillon
>     Priority: Blocker

>
>
> I've got in my pom:
> {code}
> <properties>
>         <jdbc.schema></jdbc.schema>
> </properties>
> {code}
> And then configured the surefire plugin to set a system property:
> {code}
> <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <configuration>
>                     <systemProperties>
>                         <dbunit.connection.schema>${jdbc.schema}</dbunit.connection.schema>
>                     </systemProperties>
>                 </configuration>
>             </plugin>
> {code}
> Which ends up resulting in:
> {noformat}
> [DEBUG]   (f) systemProperties = {dbunit.connection.schema=null}
> ...
> [DEBUG] Trace
> java.lang.NullPointerException
>         at java.util.Hashtable.put(Hashtable.java:393)
>         at java.util.Properties.setProperty(Properties.java:102)
>         at java.lang.System.setProperty(System.java:656)
>         at org.apache.maven.test.SurefirePlugin.processSystemProperties(SurefirePlugin.java:408)
>         at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:335)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         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:324)
>         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)          
> {noformat}
> If I put any value into the property, like
> {code}
> <properties>
>         <jdbc.schema>foo</jdbc.schema>
> </properties>
> {code}
> Then it works as expected, no NPE and the property gets set.
> But I need to set the property to an empty string... why on earth does this get turned into a null?

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


[jira] Commented: (MSUREFIRE-80) systemProperties and NPE

Posted by "Jason Dillon (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSUREFIRE-80?page=comments#action_61320 ] 

Jason Dillon commented on MSUREFIRE-80:
---------------------------------------

So <property><name>...</name><value>...</value></property> is the right/perfered syntax to refer to properties?  Are other property elements going to change to this too?  This seems very inconsistent, and only makes the pom more verbose, when it is already too verbose.

Anyways... I'm just trying to make this work... and by this I mean Maven2... I'm really regretting having suggested to my group to start using it, as it is way too buggy, and way to unpredictable out of the box... 

I was just following directions on how to use surefire, and somehow I ended up using an unstable/development version?  How on earth did that happen?  Why is my build being affected by changes that developers working on plugins do.  I had a few developers come by with broken builds and it just turned out that someone accidentally released a broken plugin.

I'm soo frustrated :-(

So, how do I use the "official released version" of the surefire plugin... if I do that then I can change to this overly verbose syntax to simply delegate properties to junit, which should have already been delegated.  Stuff like this makes me miss Jelly, where I could have just written a snip to "do the right thing" in my master project and be done with it.

> systemProperties and NPE
> ------------------------
>
>          Key: MSUREFIRE-80
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-80
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>     Reporter: Jason Dillon
>     Priority: Blocker

>
>
> I've got in my pom:
> {code}
> <properties>
>         <jdbc.schema></jdbc.schema>
> </properties>
> {code}
> And then configured the surefire plugin to set a system property:
> {code}
> <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <configuration>
>                     <systemProperties>
>                         <dbunit.connection.schema>${jdbc.schema}</dbunit.connection.schema>
>                     </systemProperties>
>                 </configuration>
>             </plugin>
> {code}
> Which ends up resulting in:
> {noformat}
> [DEBUG]   (f) systemProperties = {dbunit.connection.schema=null}
> ...
> [DEBUG] Trace
> java.lang.NullPointerException
>         at java.util.Hashtable.put(Hashtable.java:393)
>         at java.util.Properties.setProperty(Properties.java:102)
>         at java.lang.System.setProperty(System.java:656)
>         at org.apache.maven.test.SurefirePlugin.processSystemProperties(SurefirePlugin.java:408)
>         at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:335)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         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:324)
>         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)          
> {noformat}
> If I put any value into the property, like
> {code}
> <properties>
>         <jdbc.schema>foo</jdbc.schema>
> </properties>
> {code}
> Then it works as expected, no NPE and the property gets set.
> But I need to set the property to an empty string... why on earth does this get turned into a null?

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