Actually you can have Hibernate take care of the DDL via the 'hibernate.hbm2ddl.auto=create-drop' property.

You'll find more infor here:
http://indiwiz.com/2009/01/05/unit-testing-hibernate-code-with-derby/

Cheers

On Thu, May 21, 2009 at 5:46 PM, Donald McLean <dmclean62@gmail.com> wrote:
Did you create the tables? You have to use regular SQL to actually
create the tables in the database before you can access them with
Hibernate.

On Thu, May 21, 2009 at 1:53 PM, Nicola DiPasquale
<nicholas.dipasquale@gmail.com> wrote:
> Hello, I am attempting to use an embedded Derby instance wrapped with
> Hibernate and Hibernate Annotations.  However, after the tables are
> initialized by Hibernate, the first time that I attempt to access the
> tables Derby throws exceptions that claims the tables and views do not
> exist.  When I restart the application everything works fine (because
> the tables already exist in the database on load).  How can I possibly
> alleviate this problem (without pulling Derby out into server mode)?
-------------------------------------------------------------
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.