jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. B. Rainsberger" <jbra...@rogers.com>
Subject Re: java.lang.NullPointer Exception in Junit
Date Sat, 27 Mar 2004 18:18:35 GMT
Dinesh N wrote:

> Hi All,
> 
> I am gettting the above mentioned exception i tried to reun test method.
> 
> What may the problem ?

The problem is that you have not given us any information about the 
problem that we can use to determine the cause.

I will, however, guess: your test case class constructor looks like this --

public MyTestCase(String name) {
}

Notice that this constructor does not invoke super(name), which makes 
the test name null, which would cause your problem.

If this is the cause of the problem, then use the default, no-argument 
constructor for your test case class instead. If not, then we have to 
see code and a stack trace.
-- 
J. B. Rainsberger,
Diaspar Software Services
http://www.diasparsoftware.com :: +1 416 791-8603
Let's write software that people understand

Mime
View raw message