db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Myrna van Lunteren <m.v.lunte...@gmail.com>
Subject Re: Embedded Derby w/Hibernate
Date Sun, 24 May 2009 14:45:28 GMT
On Sat, May 23, 2009 at 9:07 PM, Nicola DiPasquale
<nicholas.dipasquale@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.
> I want Hibernate to create the tables automatically for me.  I do not
> have a SQL schema designed for the data I am trying to store, I have
> POJOs with EJB3 persistence annotations.
>> Actually you can have Hibernate take care of the DDL via the 'hibernate.hbm2ddl.auto=create-drop'
> I already have Hibernate properly configured to use Derby and to
> create the tables for me, that is not the issue.  The issue that I am
> having is that Derby is throwing an exception after creating the
> tables claiming that the tables and views it just created do not
> exist.  This only happens the first time that I run the application.
> If I restart the application with the same setting, since the DB
> already exists I do not have a problem.  It would however be in poor
> form to require that I start the application twice every time that I
> want to do something with it, so I am looking for a potential
> fix/workaround other than restarting the app for this situation.
> Thanks.
> -Nicola DiPasquale


I don't use Hibernate, so I'm not sure how much you can tweak the
process - but I wonder if you can make hibernate issue a 'create
schema'? And/or fully qualify the table names?


View raw message