My project at work uses H2 v1.2.135 with dbUnit 2.4.1 in a test-util
in-memory database junit test suite that had worked just fine. I am
using a Spring (v2.5.6) configuration file to make all the calls as
the database code is autowired in via a class called "DatabaseHelper"
I was finally able to upgrade H2 to v1.3.166 (have to go through a
bunch of hoops get approvals for upgrades) and ran my maven install
with the upgrade and get this error trace for most, but not all, the
junit tests that call the H2 in-memory test suite. No other changes
to the environment have been made
[stack trace begins]
04-18 10:01:00 jdbc[260]: java.lang.Exception: Open Stack Trace
at org.h2.util.CloseWatcher.register(CloseWatcher.java:93)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:122)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94)
at org.h2.Driver.connect(Driver.java:72)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at
org.dbunit.JdbcDatabaseTester.getConnection(JdbcDatabaseTester.java:
116)
....
[stack trace ends]
here's a small code snippet from DatabaseHelper (I can't show more
than this):
[code snippet begins]
// Note: cleanUpDataset simply flushes out any previous DatabaseHelper
call's data
public void cleanInsert() throws Exception {
init();
setReferentialIntegrity(false);
DatabaseOperation.DELETE_ALL.execute(connection, cleanUpDataset);
DatabaseOperation.INSERT.execute(connection, dataset);
setReferentialIntegrity(true);
}
private void init() {
try
{
IDatabaseTester tester = new JdbcDatabaseTester(driver, url,
username, password);
connection = tester.getConnection();
}
catch (ClassNotFoundException e)
{
log.error("init() ClassNotFoundException: ", e);
e.printStackTrace();
return;
}
catch (Exception e)
{
log.error("init() Exception: ", e);
e.printStackTrace();
return;
}
...
[code snippet ends]
Note: none of the log.error() messages show up in my console.
Placing the trace into the Error Analyzer doesn't give any helpful
messages (lists all the errors), here's what I get (notice, I'm
actually on v1.3.166)
[Error Analyzer begin]
Error Code:
Product Version: 1.3.260
Message:
04-18 10:01:00 jdbc
More Information:
[Error Analyzer ends]
Neither Google nor StackOverflow have any information relating to the
CloseWatcher class and whatever "Open Stack Trace" is supposed to
mean. No search results when searching on dbunit and h2 together
either.
I realize this is a shot in the dark, but has anyone else come across
this error trace when using dbunit and has a solution or at least push
in the right direction?
TIA
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.