Thank you, Kristian, I'm pretty sure that I receive this warning even on the first creation of the database. For example if I create the Spring bean of session factory in @BeforeStatic of unit test.
And, what is very strange for me, I receive this warning again and again on every exit from @Transactional method. ---------- Forwarded message ---------- From: Kristian Waagan <[email protected]> To: [email protected] Date: Thu, 24 Mar 2011 14:02:38 +0100 Subject: 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 -- Pavel Bernshtam, Software Architect, Cadence Design Systems +972-54-5583675,[email protected]
