Return-Path: X-Original-To: apmail-empire-db-user-archive@www.apache.org Delivered-To: apmail-empire-db-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 14BBBDDBE for ; Thu, 9 Aug 2012 12:16:50 +0000 (UTC) Received: (qmail 26539 invoked by uid 500); 9 Aug 2012 12:16:49 -0000 Delivered-To: apmail-empire-db-user-archive@empire-db.apache.org Received: (qmail 26408 invoked by uid 500); 9 Aug 2012 12:16:46 -0000 Mailing-List: contact user-help@empire-db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@empire-db.apache.org Delivered-To: mailing list user@empire-db.apache.org Received: (qmail 26344 invoked by uid 99); 9 Aug 2012 12:16:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2012 12:16:43 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.17.9] (HELO moutng.kundenserver.de) (212.227.17.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2012 12:16:38 +0000 Received: from [10.200.118.235] (tmo-096-70.customers.d1-online.com [80.187.96.70]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MGVBU-1Sv1p70auG-00Dsbp; Thu, 09 Aug 2012 14:16:13 +0200 Subject: Re: Drop tables References: <03E491A3-CDB3-4079-97A1-85334256C945@j-b-s.de> <20120808134220.GE5272@localhost> <26F34DB4-7F89-4B94-8D67-F1E5F939AB97@j-b-s.de> <20120809104327.GA4762@ithaka.local> From: "mailinglist@j-b-s.de" Content-Type: text/plain; charset=us-ascii X-Mailer: iPhone Mail (8J2) In-Reply-To: <20120809104327.GA4762@ithaka.local> Message-Id: <91E64ADE-0CD0-47F8-A1D2-41749518B49C@j-b-s.de> Date: Thu, 9 Aug 2012 14:17:04 +0200 To: "user@empire-db.apache.org" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (iPhone Mail 8J2) X-Provags-ID: V02:K0:8eZL/py3+icMOhfq6jsvKfMv3t5m1GxqslpCzGFclOc WqjDxLif92cHpytRr4fdfGsPRfMUgggIG+lKgqm8LHSOv3P8ys bgQkVpV8jX7CvMoq4VP6RqzXsveSNrIiKSPDI0LFhJieuGpaUG P7XqppBbuQhNuCldYg3Z2v7rW0mwjaOk1XS5OOXWOyWuUV+mAF +KOx/XnYNB+Ffc4MwlPQzoF2xaFV/ZuE1hqwH46/oMAkjSDKvA PQIGTlLVMpR/QHr2X08CTjk6ev+WmDvwrO/plOzGeChd0o64X9 NENORze7dgv2PPoABuTiLl3/phjgrdCWwqkF6Vt2mGh8yC1qdt g7io9hRWunCHhBj+MLmiXo+MU5P/M3G646GeWCE3Qu/OBJ7cj/ cD7oCDz6rdD9w== X-Virus-Checked: Checked by ClamAV on apache.org Hi Eike, hi Francis! A) sorry, I did not mention clearly I use Empire in a spring env based on th= e sample. B) I am not dropping tables (this works, but misses to drop sequences, index= es and other constraints), I am dropping a Database. See DBDDLGenerator:218.= In case the HSQL DDL generator executes "DROP SCHEMA PUBLIC CASCADE" this m= ight be a workaround. Or maybe the schema name is set to "PUBLIC" on creatio= n time (did not try this honestly) C) code: driver.getDDLScript(DBCmdType.DROP, db, script); // db is a DBDatab= ase D) I will download the latest 2.4 and retest.=20 Jens Sent from my iPhone On 09.08.2012, at 12:43, Eike Kettner wrote: > Hi all, >=20 > I'm looking into this today and a few questions popped up :) >=20 > At first, I thought it got forgotten to set the schema name into the > driver in the EmpireDriverFactory class (as most drivers support this). > But I found out that the HSql-driver does not. Unfortunately I don't > have any knowledge about HSQL, so I cannot comment this any further. Is > it correct for HSQL that its driver is not using a schema name? >=20 > I then added DROP TABLE code to the spring example project and started > it using HSQL driver. It worked nicely (using the same lines of code > Francis showed in his last mail from the DBDatabaseDriverHSqlTest). >=20 > @Jens, as Francis already asked, could you provide any stack-trace > and/or a bit of code that shows this behaviour? >=20 > Best regards > Eike >=20 > On [Wed, 08.08.2012 22:36], Francis De Brabandere wrote: >> Hi Jens, >>=20 >> Would you mind creating an issue for this on >> https://issues.apache.org/jira/browse/EMPIREDB - so we make sure this >> is fixed and tracked in the release notes? >>=20 >> Thanks, >> Francis >>=20 >> On 8 August 2012 16:57, mailinglist@j-b-s.de wrote= : >>> HI Eike! >>>=20 >>> I buy this! I started with this sample and in the meantime figured out w= e can use "DROP SCHEMA PUBLIC CASCADE" in the driver in case it is HSQL and d= ropping a database is needed. >>>=20 >>> A fix will be nice. But I can also try to write my own driver factory cl= ass... >>>=20 >>> Sent from my iPhone >>>=20 >>> On 08.08.2012, at 15:42, Eike Kettner wrote: >>>=20 >>>> Hi, >>>>=20 >>>> I think that's a bug in the EmpireDriverFactory class. This class is >>>> part of the sample project and was created as an example on how it coul= d >>>> work with spring. Well..., do you actually mean this class from the >>>> example-spring project? >>>>=20 >>>> If so, I would recommend to not depend on this jar file but rather >>>> create a new DriverFactory (without that bug :)) class in your project.= >>>> But, of course, the EmpireDriverFactory class in the samples should be >>>> fixed. I can do that the next days. >>>>=20 >>>> best regards >>>> Eike >>>>=20 >>>> On [Wed, 08.08.2012 14:51], mailinglist@j-b-s.de wrote: >>>>> Hi Francis! >>>>>=20 >>>>> I digged a bit deeper: the schema name is avail as param in the Empire= DriverFactory, but not used at all in case of HSQL (see :65 in the factory).= This at least explains the IllegalArgumentEx. Any ideas? >>>>>=20 >>>>> Jens >>>>>=20 >>>>> Sent from my iPhone >>>>>=20 >>>>> On 07.08.2012, at 11:44, Francis De Brabandere w= rote: >>>>>=20 >>>>>> Hi Jens, >>>>>>=20 >>>>>> In DBDatabaseDriverHSqlTest this code is in use: >>>>>>=20 >>>>>> script =3D new DBSQLScript(); >>>>>> db.getDriver().getDDLScript(DBCmdType.DROP, db.EMPLOYEE, script)= ; >>>>>> db.getDriver().getDDLScript(DBCmdType.DROP, db.DEPARTMENT, scrip= t); >>>>>> script.run(db.getDriver(), conn, true); >>>>>>=20 >>>>>> As far as I know this is working correctly, would you mind providing >>>>>> us with some stacktrace or test to reproduce your issue? What sources= >>>>>> are you talking about? >>>>>>=20 >>>>>> Cheers, >>>>>> Francis >>>>>>=20 >>>>>> On 6 August 2012 15:15, mailinglist@j-b-s.de w= rote: >>>>>>> Hi All! >>>>>>>=20 >>>>>>> I am working with empire 2.3.0 + spring and got everything working i= ncl >>>>>>> transactions. For testing purposes I want to drop my database (hsql i= n >>>>>>> memory) between test runs. The "database" getCreateDDLScript method c= reates >>>>>>> all tables and I am looking for a DropDDLScript method but can't fig= ure it >>>>>>> out. The method exists on the driver (OracleDDLGenerator for example= ) and I >>>>>>> can call it like: >>>>>>> db.getDriver().getDDLScript(DBCmdType.DROP,..) but this fails with a= n >>>>>>> exception "Invalid Argument null for parameter name". =46rom the sou= rces a >>>>>>> schema name is missing so I am a little confused.., >>>>>>>=20 >>>>>>> Can you point me to the right direction? >>>>>>> Thx in advance >>>>>>>=20 >>>>>>> Jens >>>>>=20 >>>>=20 >>>> -- >>>> email: eike@eknet.org https://eknet.org pgp: 481161A0 >>=20 >=20 > --=20 > email: eike@eknet.org https://eknet.org pgp: 481161A0