Hi James, It's difficult to help you here without looking at the code under test and at the tests themselves. Could you send them as attachement to the list?
Thanks -Vincent > -----Original Message----- > From: James Childers [mailto:[EMAIL PROTECTED]] > Sent: 30 August 2002 04:54 > To: 'Cactus Users List' > Subject: Inconsistent NullPointerException > > Hi all, > > I have two servlets that I am testing, UserDAO and LoginServlet. UserDAO > is (obviously) a Data Access Object that gets some info from a database, > puts it in a bean, and stores it in session scope. I have three tests in > my TestUserDAO class, all of which pass: testGoodLogin, testBadLogin, > and testNonExistentLogin. > > Here's where it gets weird. Since the UserDAO class does most of the > work, my LoginServlet does a RequestDispatcher.forward to UserDAO. The > tests I have in my TestLoginServlet class are exactly the same as those > for TestUserDAO, but the final test -- testNonExistentLogin -- fails > with a NullPointerException every single time. > > This wouldn't be so odd where it not that (a) All the tests work in > TestUserDAO, (b) the first two tests pass in TestLoginServlet, which > tells me I'm probably not having a configuration issue, and (c) the > servlets behave as they should when I do manual testing from the > browser. > > Any ideas? > > -= James > > > > -- > To unsubscribe, e-mail: <mailto:cactus-user- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:cactus-user- > [EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
