Re: nullpointer exception on deployment

"Frank Wilson" <[email protected]> Wed, 19 May 2010 15:06:30 +0100
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <[email protected]>
Here's the full stack trace:

SmartFrogException:: java.lang.NullPointerException, SmartFrog 3.17.014
(2009-07-28 16:40:51 BST)
	at
org.smartfrog.sfcore.common.SmartFrogException.forward(SmartFrogException.ja
va:92)
	at
org.smartfrog.sfcore.common.ActionDeploy.Deploy(ActionDeploy.java:192)
	at
org.smartfrog.sfcore.common.ActionDeploy.doDeploy(ActionDeploy.java:297)
	at
org.smartfrog.sfcore.common.ActionDeploy.execute(ActionDeploy.java:272)
	at
org.smartfrog.sfcore.common.ConfigurationAction.execute(ConfigurationAction.
java:110)
	at
org.smartfrog.sfcore.common.ConfigurationDescriptor.execute(ConfigurationDes
criptor.java:1076)
	at
org.smartfrog.SFSystem.runConfigurationDescriptor(SFSystem.java:353)
	at
org.smartfrog.test.DeployingTestBase$ApplicationLoaderThread.execute(Deployi
ngTestBase.java:215)
	at
org.smartfrog.sfcore.utils.SmartFrogThread.run(SmartFrogThread.java:279)
Caused by: java.lang.NullPointerException
	at
org.smartfrog.sfcore.common.ActionDeploy.Deploy(ActionDeploy.java:155)
	... 7 more
Stack Trace of Cause
java.lang.NullPointerException
	at
org.smartfrog.sfcore.common.ActionDeploy.Deploy(ActionDeploy.java:155)
	at
org.smartfrog.sfcore.common.ActionDeploy.doDeploy(ActionDeploy.java:297)
	at
org.smartfrog.sfcore.common.ActionDeploy.execute(ActionDeploy.java:272)
	at
org.smartfrog.sfcore.common.ConfigurationAction.execute(ConfigurationAction.
java:110)
	at
org.smartfrog.sfcore.common.ConfigurationDescriptor.execute(ConfigurationDes
criptor.java:1076)
	at
org.smartfrog.SFSystem.runConfigurationDescriptor(SFSystem.java:353)
	at
org.smartfrog.test.DeployingTestBase$ApplicationLoaderThread.execute(Deployi
ngTestBase.java:215)
	at
org.smartfrog.sfcore.utils.SmartFrogThread.run(SmartFrogThread.java:279)

Thanks,

Frank

-----Original Message-----
From: Steve Loughran [mailto:[email protected]] 
Sent: 19 May 2010 14:41
To: Frank Wilson; smartfrog-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [Smartfrog-users] nullpointer exception on deployment

Frank Wilson wrote:
> It turns out the reason for this NullPointerException is because I
overrode 
> setup() and tearDown() in my subclass of DeployingTestCase without calling

> super for each method.
> 
> Frank
> 
> -----Original Message-----
> From: Frank Wilson [mailto:[email protected]] 
> Sent: 19 May 2010 11:36
> To: smartfrog-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: [Smartfrog-users] nullpointer exception on deployment
> 
> In a TestCase that extends DeployingTestBase I am getting a
> NullPointerException when trying to
> do a deployment using expectSuccessfulTestRun(package,"script").
> 
> SmartFrogException:: java.lang.NullPointerException, SmartFrog 3.17.014
> (2009-07-28 16:40:51 BST)
> 	at
>
org.smartfrog.sfcore.common.SmartFrogException.forward(SmartFrogException.ja
> va:92)
> 	at
> org.smartfrog.sfcore.common.ActionDeploy.Deploy(ActionDeploy.java:192)
> 	at
> org.smartfrog.sfcore.common.ActionDeploy.doDeploy(ActionDeploy.java:297)
> 	at
> org.smartfrog.sfcore.common.ActionDeploy.execute(ActionDeploy.java:272)
> 	at
>
org.smartfrog.sfcore.common.ConfigurationAction.execute(ConfigurationAction.
> java:110)
> 	at
>
org.smartfrog.sfcore.common.ConfigurationDescriptor.execute(ConfigurationDes
> criptor.java:1076)
> 	at
> org.smartfrog.SFSystem.runConfigurationDescriptor(SFSystem.java:353)
> 	at
>
org.smartfrog.test.DeployingTestBase$ApplicationLoaderThread.execute(Deployi
> ngTestBase.java:215)
> 	at
> org.smartfrog.sfcore.utils.SmartFrogThread.run(SmartFrogThread.java:279)
> Caused by: java.lang.NullPointerException
> 	at
> org.smartfrog.sfcore.common.ActionDeploy.Deploy(ActionDeploy.java:155)
> 	... 7 more
> 
> Any idea what's causing this? A week ago this happened to me, when I
renamed
> the test class it went away.
> Now the error is back again.

Even though it sounds like you've fixed it, NPEs are always wrong and 
should be handled better. Can you send me the full stack trace and I 
will see if I can do more to replace the error with something more useful

-steve


------------------------------------------------------------------------------