From derby-user-return-11017-apmail-db-derby-user-archive=db.apache.org@db.apache.org Fri May 22 17:36:00 2009 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 95762 invoked from network); 22 May 2009 17:35:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 May 2009 17:35:59 -0000 Received: (qmail 79355 invoked by uid 500); 22 May 2009 17:36:12 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 79303 invoked by uid 500); 22 May 2009 17:36:12 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 79295 invoked by uid 99); 22 May 2009 17:36:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 17:36:12 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of francois.orsini@gmail.com designates 74.125.92.25 as permitted sender) Received: from [74.125.92.25] (HELO qw-out-2122.google.com) (74.125.92.25) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 17:36:02 +0000 Received: by qw-out-2122.google.com with SMTP id 5so1358558qwd.13 for ; Fri, 22 May 2009 10:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=dZTYV+ZdD6i8tVv/zRwwYV+2D457NfgWB1cEGMlw+CA=; b=b19y0T0bdj0nXxKr7816BmFoJVxsNTDLCeUlWeNZSmAnpc0yfvhYRAShH1DHCRlz6G g39U12m87zUp7vetFUy8QOvhVK2/Qi36X056/1GdE4fucpBcAU+h6TVR2NQ1h4+yxcSJ zlcRDVEQzGniGtbLbOvulrmwa7EXaQNPtBWMA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=kdmpTV+j+V7QmZV/2tltTjuOlfRyA2pEbquea88ZvuFkzHWtpOmNnYXw++uMYF5LkN oEFr8xWwUU5/vcsotIEwn4PFFcGG2rc4NiUgnv4mmk4Tdx0rGkCfDEFGNimR3GAl/SAJ WDC+RFYEL+3KsoLMAu6ylObBXpE2OZyXejTWc= MIME-Version: 1.0 Received: by 10.229.84.201 with SMTP id k9mr1561272qcl.84.1243013741063; Fri, 22 May 2009 10:35:41 -0700 (PDT) In-Reply-To: <5627810d0905211746m45eaa7b7gf591ece7e843d0b5@mail.gmail.com> References: <95b72a290905211053u64739f7q5695aa78207f2de8@mail.gmail.com> <5627810d0905211746m45eaa7b7gf591ece7e843d0b5@mail.gmail.com> Date: Fri, 22 May 2009 10:35:40 -0700 Message-ID: <7921d3e40905221035t32ab03e1xfd6438178ccdd95a@mail.gmail.com> Subject: Re: Embedded Derby w/Hibernate From: Francois Orsini To: Derby Discussion Content-Type: multipart/alternative; boundary=0016364ee2ea7cbf53046a83b05e X-Virus-Checked: Checked by ClamAV on apache.org --0016364ee2ea7cbf53046a83b05e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 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 > 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. > --0016364ee2ea7cbf53046a83b05e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Actually you can have Hibernate take care of the DDL via the 'hibernate= .hbm2ddl.auto=3Dcreate-drop' property.

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

Cheers

On Thu, May 21, 2009 at 5:46 P= M, 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@gm= ail.com> wrote:
> Hello, I am attempting to use an embedded Derby instance wrapped with<= br> > Hibernate and Hibernate Annotations. =A0However, after the tables are<= br> > initialized by Hibernate, the first time that I attempt to access the<= br> > tables Derby throws exceptions that claims the tables and views do not=
> exist. =A0When I restart the application everything works fine (becaus= e
> the tables already exist in the database on load). =A0How can I possib= ly
> 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.

--0016364ee2ea7cbf53046a83b05e--