You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Kristian Waagan <kr...@oracle.com> on 2011/03/24 14:02:38 UTC
Re: Warning when using Apache Derby
On 24.03.11 14:49, Pavel Bernshtam wrote:
> Hi, 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?
Hello Pavel,
You get this warning because you have specified "create=true" in the
connection URL when connecting to an existing database.
You can:
a) Ignore the warning.
b) Create the database once, and then have the unit tests connect to
the existing database without specifying "create=true".
c) Delete the in-memory database and re-create it for each unit test.
Deleting it is done by specifying "drop=true".
See also http://wiki.apache.org/db-derby/InMemoryBackEndPrimer [1].
Regards,
--
Kristian
[1] May be down at the moment, but will hopefully be back online any time.
> Thank you
>