I have a number of unit tests, which use Apache Derby in memory.
My connection url is: jdbc:derby:memory:srf.derby;create=true
I discovered that each time, when a method marked as @Transactional
is finishing, I receive a Derby warning
12:53:28:5328 [org.hibernate.util.JDBCExceptionReporter] [main] WARN - SQL Warning: 10000, SQLState: 01J01
12:53:28:5328 [org.hibernate.util.JDBCExceptionReporter] [main] WARN - Database 'memory:srf.derby' not created, connection made to existing database instead.
Why is it? What I'm doing wrong?
Thank you
You're not doing anything wrong. You're passing ';create=true' each time, but the database is only created the first time your program accesses it. Since it's in-memory, the database then hangs around until your program exits, at which point it disappears.
You could avoid the warning by passing ';create=true' only on the first test in your test suite, and then subsequent tests do not need to pass that value.
Or, you could just not worry about the warning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With