-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE upon closing connections in DbUnitRunner after tests have run #140
Comments
Sorry for the delay. The NullPointerException is caused by no connection being available in the test context.
Could you use the same name in both and retry please? In the meantime, I will adjust the code to avoid the NPE and log a proper message instead. |
My bean "dbUnitDatabaseConnection" is a factory (badly named I agree), not a connection.
Messing up with the name gives the following exception at start :
Messing up with the type of the bean gives that error :
So I think the cause is somewhere else.
|
… have run * Fixed errors in the tests
Issue #140 - NPE upon closing connections in DbUnitRunner after tests have run
Hello,
First, thanks for your contribution to the community.
I get the following error :
Adding a test
if (testContext.getConnections() != null)
solves the problem, but I guess the cause is somewhere else.
I'm using :
Here is my code :
dbunit-context.xml :
Test class Java :
If you can't find the cause, can you at least turn the error into a warning ?
Thank you in advance.
The text was updated successfully, but these errors were encountered: