From derby-user-return-12502-apmail-db-derby-user-archive=db.apache.org@db.apache.org Sun Mar 21 11:11:10 2010 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 23211 invoked from network); 21 Mar 2010 11:11:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Mar 2010 11:11:07 -0000 Received: (qmail 47408 invoked by uid 500); 21 Mar 2010 11:11:07 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 47388 invoked by uid 500); 21 Mar 2010 11:11:07 -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 47381 invoked by uid 99); 21 Mar 2010 11:11:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Mar 2010 11:11:07 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.220.225] (HELO mail-fx0-f225.google.com) (209.85.220.225) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Mar 2010 11:10:58 +0000 Received: by fxm25 with SMTP id 25so864474fxm.7 for ; Sun, 21 Mar 2010 04:10:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.73.82 with SMTP id p18mr3697429faj.34.1269169837827; Sun, 21 Mar 2010 04:10:37 -0700 (PDT) X-Originating-IP: [193.206.186.101] In-Reply-To: <1f5d398f1003210159lbe23cc0xa5f49db238d46022@mail.gmail.com> References: <1f5d398f1003011116n663ac9e1i151c26601215cf83@mail.gmail.com> <1f5d398f1003190828q1b844075yc518d5a2c5b1ced8@mail.gmail.com> <1f5d398f1003200505h3025c000hb8405be01d3451b2@mail.gmail.com> <4d2670741003200513s4b4059ata63874e750d473e5@mail.gmail.com> <1f5d398f1003200807n2e4366e8qf67423faded7ade1@mail.gmail.com> <1f5d398f1003201019o27fff3a0k78a0916b7c0767e3@mail.gmail.com> <1f5d398f1003201040q3284ec81i9a0357959c36d56@mail.gmail.com> <1f5d398f1003201101o50bbfa9drf99069c78fe13c4c@mail.gmail.com> <1f5d398f1003201559j38089137y1e12e099fd5ba5ab@mail.gmail.com> <1f5d398f1003210159lbe23cc0xa5f49db238d46022@mail.gmail.com> Date: Sun, 21 Mar 2010 12:10:37 +0100 Message-ID: <1f5d398f1003210410y25407d95rd9035afbf1e34280@mail.gmail.com> Subject: Re: cleaning database between test cases From: Gabriele Kahlout To: Derby Discussion Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org If I execute each test, one a time (so the VM quits) everything works. However, what a pain to comment each test, but the one I want to execute. 2010/3/21, Gabriele Kahlout : > There is definetely some problem with Junit tests and apache derby. > > I've pasted the same code but as an exe file (where I do the setup and > teardown) and there it works flawlessly. > > Consider: > > /* > * To change this template, choose Tools | Templates > * and open the template in the editor. > */ > > package com.mysimpatico.memorizeasy; > import static org.junit.Assert.*; > > import java.io.File; > import java.sql.*; > import junit.extensions.PrivilegedAccessor; > import org.junit.*; > import com.mysimpatico.memorizeasy.engine.Database; > import com.mysimpatico.memorizeasy.executables.Setup; > import com.mysimpatico.sqlwrapper.*; > > > /** > * > * @author simpatico > */ > public class DatabaseTest1 { > > private static final int n =3D 3; //should be less than 4000, 100= 0 > public final static String getConnection =3D "getConnection(final > boolean autoCommit) throws Exception"; > public final static String publish =3D "publish(final int cycleNo)"; > public final static String getMaxLastPubBatch =3D "getMaxLastPubBatch= ()"; > public final static String getMaxBatch =3D "getMaxBatch()"; > public final static String init =3D "init"; > > public final static String refTable =3D "refTable"; > public final static String expTable =3D "expTable"; > public final static String objTable =3D "objTable"; > public final static String batColumn =3D "batColumn"; > public final static String lastPubColumn =3D "lastPubColumn"; > public final static String batTable =3D "batTable"; > public final static String expColumn =3D "expColumn"; > public final static String wColumn =3D "wColumn"; > public final static String genderColumn =3D "genderColumn"; > public final static String testMaterial =3D "testMaterial"; > private final static File csv =3D new File(testMaterial + > File.separatorChar + "dict.csv"); > private static File dir; > public static String test =3D "test"; > > static void deleteDir(File f) { > if (f.isDirectory()) { > for (File sf : f.listFiles()) { > deleteDir(sf); > } > } > f.delete(); > } > > public DatabaseTest1() { > } > > @BeforeClass > public static void setUpClass() throws Exception { > } > > @AfterClass > public static void tearDownClass() throws Exception { > } > > @Before > public void setUp() { > dir =3D new File(test + System.currentTimeMillis()); > dir.mkdir(); > Setup.main(new String[]{Setup.test, dir.getAbsolutePath()}); > // Database.init(dir); > } > > @After > public void tearDown() { > SqlWrapper.shutDownDerby(); > // new File(dir, "derby.properties").delete(); > deleteDir(dir); > } > > // TODO add test methods here. > // The methods must be annotated with annotation @Test. For example: > // > @Test > public void testGetMaxLastPubBatch() { > > try { > final Table batTable =3D (Table) > PrivilegedAccessor.getValue(Database.class, DatabaseTest.batTable); > final int unwanted =3D (Integer) > PrivilegedAccessor.getValue(Database.class, "unwanted"); > int ret =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > assertEquals(unwanted, ret); // empty batTable returns unwant= ed > > final Connection con =3D (Connection) > PrivilegedAccessor.invokeMethod(Database.class, getConnection, true); > final Statement st =3D con.createStatement(); > int res =3D st.executeUpdate(SqlWrapper.insert(batTable)); > assertEquals(1, res); > ret =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > assertEquals(SqlWrapper.index - 1, ret); // batTable with > single unpublished batch returns SqlWrapper.index-1; > assertEquals(0, SqlWrapper.index - 1); > PrivilegedAccessor.invokeMethod(Database.class, publish, > 1); //publish batch > ret =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > assertEquals(1, ret); // batTable with single published > batch returns 1 > > int res2 =3D st.executeUpdate(SqlWrapper.deleteAll(batTable))= ; > assertEquals(1, res2); > > for (int i =3D SqlWrapper.index; i <=3D n; i++) { > int res1 =3D st.executeUpdate(SqlWrapper.insert(batTable)= ); > assertEquals(1, res1); > final int ret1 =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > assertEquals(0, ret1); //batTable with n batch not > published should return 0 > } > > int res3 =3D st.executeUpdate(SqlWrapper.deleteAll(batTable))= ; > assertEquals(n, res3); > con.close(); > } catch (Exception e) { > e.printStackTrace(); > SqlWrapper.printHistory(); > fail(); > } > } > > @Test > public void testGetMaxLastPubBatch1() { > try { > final Table batTable =3D (Table) > PrivilegedAccessor.getValue(Database.class, DatabaseTest.batTable); > final int unwanted =3D (Integer) > PrivilegedAccessor.getValue(Database.class, "unwanted"); > int ret =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > assertEquals(unwanted, ret); // empty batTable returns unwant= ed > > final Connection con =3D (Connection) > PrivilegedAccessor.invokeMethod(Database.class, getConnection, true); > final Statement st =3D con.createStatement(); > int res =3D st.executeUpdate(SqlWrapper.insert(batTable)); > assertEquals(1, res); > ret =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > assertEquals(SqlWrapper.index - 1, ret); // batTable with > single unpublished batch returns SqlWrapper.index-1; > assertEquals(0, SqlWrapper.index - 1); > PrivilegedAccessor.invokeMethod(Database.class, publish, > 1); //publish batch > ret =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > assertEquals(1, ret); // batTable with single published > batch returns 1 > > int res2 =3D st.executeUpdate(SqlWrapper.deleteAll(batTable))= ; > assertEquals(1, res2); > > for (int i =3D SqlWrapper.index; i <=3D n; i++) { > int res1 =3D st.executeUpdate(SqlWrapper.insert(batTable)= ); > assertEquals(1, res1); > final int ret1 =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > assertEquals(0, ret1); //batTable with n batch not > published should return 0 > } > > int res3 =3D st.executeUpdate(SqlWrapper.deleteAll(batTable))= ; > assertEquals(n, res3); > con.close(); > } catch (Exception e) { > e.printStackTrace(); > SqlWrapper.printHistory(); > fail(); > } > } > > } > > ------ and now the exec file: -------- > > > import com.mysimpatico.memorizeasy.engine.Database; > import com.mysimpatico.memorizeasy.executables.Setup; > > import com.mysimpatico.sqlwrapper.*; > import java.io.File; > import java.sql.*; > import junit.extensions.PrivilegedAccessor; > > /* > * To change this template, choose Tools | Templates > * and open the template in the editor. > */ > /** > * > * @author simpatico > */ > public class DbDeletionTest { > > public final static String getConnection =3D "getConnection(final > boolean autoCommit) throws Exception"; > public final static String publish =3D "publish(final int cycleNo)"; > public final static String getMaxLastPubBatch =3D "getMaxLastPubBatch= ()"; > public final static String getMaxBatch =3D "getMaxBatch()"; > public final static String init =3D "init"; > > public final static String refTable =3D "refTable"; > public final static String expTable =3D "expTable"; > public final static String objTable =3D "objTable"; > public final static String batColumn =3D "batColumn"; > public final static String lastPubColumn =3D "lastPubColumn"; > public final static String batTable =3D "batTable"; > public final static String expColumn =3D "expColumn"; > public final static String wColumn =3D "wColumn"; > public final static String genderColumn =3D "genderColumn"; > public final static String testMaterial =3D "testMaterial"; > private final static File csv =3D new File(testMaterial + > File.separatorChar + "dict.csv"); > > /* public static boolean deleteDir(File dir) { > if (dir.isDirectory()) { > String[] children =3D dir.list(); > > for (int i =3D 0; i < children.length; i++) { > boolean success =3D deleteDir(new File(dir, children[i])); > if (!success) { > return false; > } > } // The directory is now empty so delete it return dir.delete(); } > } > return dir.delete(); > }*/ > static void deleteDir(File f) { > if (f.isDirectory()) { > for (File sf : f.listFiles()) { > deleteDir(sf); > } > } > f.delete(); > } > > > static void test() throws Exception { > final File dir =3D new File("test" + System.currentTimeMillis()); > dir.mkdir(); > Setup.main(new String[]{"test", dir.getAbsolutePath()}); > > int n =3D 3; > try { > final Table batTable =3D (Table) > PrivilegedAccessor.getValue(Database.class, DbDeletionTest.batTable); > final int unwanted =3D (Integer) > PrivilegedAccessor.getValue(Database.class, "unwanted"); > int ret =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > // assertEquals(unwanted, ret); // empty batTable returns > unwanted > > final Connection con =3D (Connection) > PrivilegedAccessor.invokeMethod(Database.class, getConnection, true); > final Statement st =3D con.createStatement(); > int res =3D st.executeUpdate(SqlWrapper.insert(batTable)); > // assertEquals(1, res); > ret =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > // assertEquals(SqlWrapper.index - 1, ret); // batTable > with single unpublished batch returns SqlWrapper.index-1; > // assertEquals(0, SqlWrapper.index - 1); > PrivilegedAccessor.invokeMethod(Database.class, publish, > 1); //publish batch > ret =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > // assertEquals(1, ret); // batTable with single published > batch returns 1 > > int res2 =3D st.executeUpdate(SqlWrapper.deleteAll(batTable))= ; > // assertEquals(1, res2); > > for (int i =3D SqlWrapper.index; i <=3D n; i++) { > int res1 =3D st.executeUpdate(SqlWrapper.insert(batTable)= ); > // assertEquals(1, res1); > final int ret1 =3D (Integer) > PrivilegedAccessor.invokeMethod(Database.class, getMaxLastPubBatch); > > //assertEquals(0, ret1); //batTable with n batch not > published should return 0 > } > > int res3 =3D st.executeUpdate(SqlWrapper.deleteAll(batTable))= ; > // assertEquals(n, res3); > con.close(); > } catch (Exception e) { > e.printStackTrace(); > SqlWrapper.printHistory(); > // fail(); > } > > SqlWrapper.shutDownDerby(); > deleteDir(dir); > System.out.println("test executed."); > > } > > public static void main(String[] args) { > try { > test(); > test(); > } catch (Exception e) { > e.printStackTrace(); > } > } > } > > > 2010/3/20, Gabriele Kahlout : >> Why does the exception say what is this File on which this >> OverlappingFileLockException is occuring, so that I can sort it out? >> >> 2010/3/20, Gabriele Kahlout : >>> not really, commenting the derby.properties code still results in the >>> same exception. >>> >>> 2010/3/20, Gabriele Kahlout : >>>> It looks like the problem is with the derby.properties file, as it >>>> sticks in the file system. >>>> Should I delete them, in a special way/order? >>>> >>>> 2010/3/20, Gabriele Kahlout : >>>>> I quick solution (and actually not dirty) solution I came up with to >>>>> break the symmetry is add the timestamp to the name of the testfolder= , >>>>> where the File variable is shared btw the setUp and tearDown methods. >>>>> So the folders still disappear from my file system. >>>>> >>>>> However, it'd still be interesting to investigate why the above SSCCE >>>>> insists on the presence of the db, as the exception indicates. >>>>> >>>>> However, running it into my code I get a new exception: >>>>> >>>>> ava.sql.SQLException: Failed to create database '/Volumes/STORE N GO >>>>> 1/ws/MemorizEasy/test1269105407561/db.sqlwrapper', see the next >>>>> exception for details. >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unkn= own >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.EmbedConnection30.(Unknow= n >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.EmbedConnection40.(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown >>>>> Source) >>>>> at org.apache.derby.jdbc.InternalDriver.connect(Unknown >>>>> Source) >>>>> at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown >>>>> Source) >>>>> at >>>>> java.sql.DriverManager.getConnection(DriverManager.java:582) >>>>> at >>>>> java.sql.DriverManager.getConnection(DriverManager.java:207) >>>>> at >>>>> com.mysimpatico.sqlwrapper.SqlWrapper.connectToDerby(SqlWrapper.java:= 174) >>>>> at >>>>> com.mysimpatico.memorizeasy.engine.Database.init(Database.java:477) >>>>> at >>>>> com.mysimpatico.memorizeasy.executables.Setup.main(Setup.java:70) >>>>> at >>>>> com.mysimpatico.memorizeasy.DatabaseTest.setUp(DatabaseTest.java:111) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method= ) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.= java:39) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces= sorImpl.java:25) >>>>> at java.lang.reflect.Method.invoke(Method.java:597) >>>>> at >>>>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(Framework= Method.java:44) >>>>> at >>>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCal= lable.java:15) >>>>> at >>>>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMe= thod.java:41) >>>>> at >>>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.= java:27) >>>>> at >>>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.ja= va:31) >>>>> at >>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun= ner.java:73) >>>>> at >>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun= ner.java:46) >>>>> at >>>>> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) >>>>> at >>>>> org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) >>>>> at >>>>> org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) >>>>> at >>>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.= java:28) >>>>> at >>>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.ja= va:31) >>>>> at org.junit.runners.ParentRunner.run(ParentRunner.java:220) >>>>> at >>>>> junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) >>>>> at >>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUni= tTestRunner.java:515) >>>>> at >>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(J= UnitTestRunner.java:1031) >>>>> at >>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUn= itTestRunner.java:888) >>>>> Caused by: java.sql.SQLException: Failed to create database >>>>> '/Volumes/STORE N GO >>>>> 1/ws/MemorizEasy/test1269105407561/db.sqlwrapper', see the next >>>>> exception for details. >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransport= AcrossDRDA(Unknown >>>>> Source) >>>>> ... 37 more >>>>> Caused by: java.sql.SQLException: Startup failed due to an exception. >>>>> See next exception for details. >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransport= AcrossDRDA(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unkn= own >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException= (Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Un= known >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown >>>>> Source) >>>>> ... 34 more >>>>> Caused by: java.sql.SQLException: Java exception: ': >>>>> java.nio.channels.OverlappingFileLockException'. >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransport= AcrossDRDA(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unkn= own >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.Util.javaException(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException= (Unknown >>>>> Source) >>>>> ... 37 more >>>>> Caused by: java.nio.channels.OverlappingFileLockException >>>>> at >>>>> sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelI= mpl.java:1170) >>>>> at >>>>> sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.ja= va:1072) >>>>> at >>>>> sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:878) >>>>> at java.nio.channels.FileChannel.tryLock(FileChannel.java:962= ) >>>>> at >>>>> org.apache.derby.impl.io.DirFile4.getExclusiveFileLock(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.privGetJBMSL= ockOnDB(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.run(Unknown >>>>> Source) >>>>> at java.security.AccessController.doPrivileged(Native Method) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.getJBMSLockO= nDB(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn= own >>>>> Source) >>>>> at org.apache.derby.impl.store.raw.RawStore.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn= own >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn= own >>>>> Source) >>>>> at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source= ) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentSe= rvice(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.createPersistentServic= e(Unknown >>>>> Source) >>>>> ... 34 more >>>>> java.sql.SQLException: Startup failed due to an exception. See next >>>>> exception for details. >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unkn= own >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException= (Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Un= known >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.EmbedConnection30.(Unknow= n >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.EmbedConnection40.(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown >>>>> Source) >>>>> at org.apache.derby.jdbc.InternalDriver.connect(Unknown >>>>> Source) >>>>> at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown >>>>> Source) >>>>> at >>>>> java.sql.DriverManager.getConnection(DriverManager.java:582) >>>>> at >>>>> java.sql.DriverManager.getConnection(DriverManager.java:207) >>>>> at >>>>> com.mysimpatico.sqlwrapper.SqlWrapper.connectToDerby(SqlWrapper.java:= 174) >>>>> at >>>>> com.mysimpatico.memorizeasy.engine.Database.init(Database.java:477) >>>>> at >>>>> com.mysimpatico.memorizeasy.executables.Setup.main(Setup.java:70) >>>>> at >>>>> com.mysimpatico.memorizeasy.DatabaseTest.setUp(DatabaseTest.java:111) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method= ) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.= java:39) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces= sorImpl.java:25) >>>>> at java.lang.reflect.Method.invoke(Method.java:597) >>>>> at >>>>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(Framework= Method.java:44) >>>>> at >>>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCal= lable.java:15) >>>>> at >>>>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMe= thod.java:41) >>>>> at >>>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.= java:27) >>>>> at >>>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.ja= va:31) >>>>> at >>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun= ner.java:73) >>>>> at >>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun= ner.java:46) >>>>> at >>>>> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) >>>>> at >>>>> org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) >>>>> at >>>>> org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) >>>>> at >>>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.= java:28) >>>>> at >>>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.ja= va:31) >>>>> at org.junit.runners.ParentRunner.run(ParentRunner.java:220) >>>>> at >>>>> junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) >>>>> at >>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUni= tTestRunner.java:515) >>>>> at >>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(J= UnitTestRunner.java:1031) >>>>> at >>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUn= itTestRunner.java:888) >>>>> Caused by: java.sql.SQLException: Startup failed due to an exception. >>>>> See next exception for details. >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransport= AcrossDRDA(Unknown >>>>> Source) >>>>> ... 40 more >>>>> Caused by: java.sql.SQLException: Java exception: ': >>>>> java.nio.channels.OverlappingFileLockException'. >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransport= AcrossDRDA(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unkn= own >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.Util.javaException(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException= (Unknown >>>>> Source) >>>>> ... 37 more >>>>> Caused by: java.nio.channels.OverlappingFileLockException >>>>> at >>>>> sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelI= mpl.java:1170) >>>>> at >>>>> sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.ja= va:1072) >>>>> at >>>>> sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:878) >>>>> at java.nio.channels.FileChannel.tryLock(FileChannel.java:962= ) >>>>> at >>>>> org.apache.derby.impl.io.DirFile4.getExclusiveFileLock(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.privGetJBMSL= ockOnDB(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.run(Unknown >>>>> Source) >>>>> at java.security.AccessController.doPrivileged(Native Method) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.getJBMSLockO= nDB(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn= own >>>>> Source) >>>>> at org.apache.derby.impl.store.raw.RawStore.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn= own >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn= own >>>>> Source) >>>>> at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source= ) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentSe= rvice(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.createPersistentServic= e(Unknown >>>>> Source) >>>>> ... 34 more >>>>> java.sql.SQLException: Java exception: ': >>>>> java.nio.channels.OverlappingFileLockException'. >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unkn= own >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.Util.javaException(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException= (Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException= (Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Un= known >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.EmbedConnection30.(Unknow= n >>>>> Source) >>>>> at org.apache.derby.impl.jdbc.EmbedConnection40.(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown >>>>> Source) >>>>> at org.apache.derby.jdbc.InternalDriver.connect(Unknown >>>>> Source) >>>>> at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown >>>>> Source) >>>>> at >>>>> java.sql.DriverManager.getConnection(DriverManager.java:582) >>>>> at >>>>> java.sql.DriverManager.getConnection(DriverManager.java:207) >>>>> at >>>>> com.mysimpatico.sqlwrapper.SqlWrapper.connectToDerby(SqlWrapper.java:= 174) >>>>> at >>>>> com.mysimpatico.memorizeasy.engine.Database.init(Database.java:477) >>>>> at >>>>> com.mysimpatico.memorizeasy.executables.Setup.main(Setup.java:70) >>>>> at >>>>> com.mysimpatico.memorizeasy.DatabaseTest.setUp(DatabaseTest.java:111) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method= ) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.= java:39) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces= sorImpl.java:25) >>>>> at java.lang.reflect.Method.invoke(Method.java:597) >>>>> at >>>>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(Framework= Method.java:44) >>>>> at >>>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCal= lable.java:15) >>>>> at >>>>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMe= thod.java:41) >>>>> at >>>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.= java:27) >>>>> at >>>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.ja= va:31) >>>>> at >>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun= ner.java:73) >>>>> at >>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun= ner.java:46) >>>>> at >>>>> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) >>>>> at >>>>> org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) >>>>> at >>>>> org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) >>>>> at >>>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.= java:28) >>>>> at >>>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.ja= va:31) >>>>> at org.junit.runners.ParentRunner.run(ParentRunner.java:220) >>>>> at >>>>> junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) >>>>> at >>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUni= tTestRunner.java:515) >>>>> at >>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(J= UnitTestRunner.java:1031) >>>>> at >>>>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUn= itTestRunner.java:888) >>>>> Caused by: java.sql.SQLException: Java exception: ': >>>>> java.nio.channels.OverlappingFileLockException'. >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransport= AcrossDRDA(Unknown >>>>> Source) >>>>> ... 41 more >>>>> Caused by: java.nio.channels.OverlappingFileLockException >>>>> at >>>>> sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelI= mpl.java:1170) >>>>> at >>>>> sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.ja= va:1072) >>>>> at >>>>> sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:878) >>>>> at java.nio.channels.FileChannel.tryLock(FileChannel.java:962= ) >>>>> at >>>>> org.apache.derby.impl.io.DirFile4.getExclusiveFileLock(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.privGetJBMSL= ockOnDB(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.run(Unknown >>>>> Source) >>>>> at java.security.AccessController.doPrivileged(Native Method) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.getJBMSLockO= nDB(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn= own >>>>> Source) >>>>> at org.apache.derby.impl.store.raw.RawStore.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn= own >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn= own >>>>> Source) >>>>> at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown >>>>> Source) >>>>> at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source= ) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknow= n >>>>> Source) >>>>> at >>>>> org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentSe= rvice(Unknown >>>>> Source) >>>>> at >>>>> org.apache.derby.iapi.services.monitor.Monitor.createPersistentServic= e(Unknown >>>>> Source) >>>>> ... 34 more >>>>> Sat Mar 20 18:16:53 Gabriele-Kahlouts-MacBook.local java[6566] >>>>> : kCGErrorIllegalArgument: CGSOrderWindowList >>>>> Sat Mar 20 18:16:53 Gabriele-Kahlouts-MacBook.local java[6566] >>>>> : kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to >>>>> catch errors as they are logged. >>>>> Test com.mysimpatico.memorizeasy.DatabaseTest FAILED (crashed) >>>>> /Volumes/STORE N GO 1/ws/MemorizEasy/nbproject/build-impl.xml:706: >>>>> Some tests failed; see details above. >>>>> >>>>> Any clues? >>>>> >>>>> >>>>> >>>>> 2010/3/20, Gabriele Kahlout : >>>>>> Well, did u try it? The result is the same, run on the same code >>>>>> example I gave above but replacing it with you method. >>>>>> >>>>>> >>>>>> >>>>>> 2010/3/20, Peter Ondru=C5=A1ka : >>>>>>> IMHO your deleteDir method is not deleting anything. See >>>>>>> http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#delete() >>>>>>> >>>>>>> It should be something like: >>>>>>> >>>>>>> void delete(File f){ >>>>>>> if (f.isDirectory()) >>>>>>> for (File sf: f.listFiles()) delete(sf); >>>>>>> f.delete(); >>>>>>> } >>>>>>> >>>>>>> On Sat, Mar 20, 2010 at 1:05 PM, Gabriele Kahlout >>>>>>> wrote: >>>>>>>> any updates? This is bogging me down. >>>>>>>> >>>>>>>> 2010/3/19, Gabriele Kahlout : >>>>>>>>> Here is the code for wrapper methods that might be incorrect: >>>>>>>>> >>>>>>>>> public final static Connection connectToDerby(final File >>>>>>>>> parentPath, >>>>>>>>> final boolean create) throws InstantiationException, >>>>>>>>> IllegalAccessException, ClassNotFoundException, SQLException { >>>>>>>>> // Class.forName("org.apache.derby.jdbc.EmbeddedDriver")= ; >>>>>>>>> final Connection con =3D >>>>>>>>> DriverManager.getConnection("jdbc:derby:" + parentPath.getPath() = + >>>>>>>>> File.separator + "db.sqlwrapper;create=3D" + create); >>>>>>>>> return con; >>>>>>>>> } >>>>>>>>> >>>>>>>>> public static boolean shutDownDerby() { >>>>>>>>> try { >>>>>>>>> Connection con =3D connectToDerby(); >>>>>>>>> con.close(); >>>>>>>>> con =3D >>>>>>>>> DriverManager.getConnection("jdbc:derby:db.sqlwrapper;shutdown=3D= true"); >>>>>>>>> >>>>>>>>> } catch (SQLException e) { // with throw exception on >>>>>>>>> successful deletion. >>>>>>>>> return true; >>>>>>>>> } >>>>>>>>> return false; >>>>>>>>> } >>>>>>>>> >>>>>>>>> 2010/3/19, Gabriele Kahlout : >>>>>>>>>> Here is the shortest test that shows the problem: >>>>>>>>>> >>>>>>>>>> import com.mysimpatico.sqlwrapper.*; >>>>>>>>>> import java.io.File; >>>>>>>>>> import java.sql.*; >>>>>>>>>> >>>>>>>>>> /* >>>>>>>>>> * To change this template, choose Tools | Templates >>>>>>>>>> * and open the template in the editor. >>>>>>>>>> */ >>>>>>>>>> /** >>>>>>>>>> * >>>>>>>>>> * @author simpatico >>>>>>>>>> */ >>>>>>>>>> public class DbDeletionTest { >>>>>>>>>> >>>>>>>>>> public static boolean deleteDir(File dir) { >>>>>>>>>> if (dir.isDirectory()) { >>>>>>>>>> String[] children =3D dir.list(); >>>>>>>>>> for (int i =3D 0; i < children.length; i++) { >>>>>>>>>> boolean success =3D deleteDir(new File(dir, >>>>>>>>>> children[i])); >>>>>>>>>> if (!success) { >>>>>>>>>> return false; >>>>>>>>>> } >>>>>>>>>> } // The directory is now empty so delete it return >>>>>>>>>> dir.delete(); } >>>>>>>>>> } >>>>>>>>>> return dir.delete(); >>>>>>>>>> } >>>>>>>>>> >>>>>>>>>> public static void test() throws Exception { >>>>>>>>>> final File dir =3D new File("test"); >>>>>>>>>> dir.mkdir(); >>>>>>>>>> final Connection con =3D SqlWrapper.connectToDerby(dir, >>>>>>>>>> true); >>>>>>>>>> final Statement st =3D con.createStatement(); >>>>>>>>>> SqlWrapper.setVendor(SqlWrapper.vendor.JAVADB); >>>>>>>>>> >>>>>>>>>> final String expTableName =3D "Expressions"; >>>>>>>>>> final String exp =3D "expression"; >>>>>>>>>> final ReferencedColumn expColumn =3D new >>>>>>>>>> ReferencedColumn(exp, >>>>>>>>>> SqlWrapper.VARCHAR, 100); >>>>>>>>>> final Table expTable =3D new Table(expTableName, expColu= mn, >>>>>>>>>> expColumn); >>>>>>>>>> st.executeUpdate(SqlWrapper.create(expTable)); >>>>>>>>>> con.close(); >>>>>>>>>> SqlWrapper.shutDownDerby(); >>>>>>>>>> deleteDir(dir); >>>>>>>>>> System.out.println("test executed."); >>>>>>>>>> >>>>>>>>>> } >>>>>>>>>> >>>>>>>>>> public static void main(String[] args) { >>>>>>>>>> try { >>>>>>>>>> test(); >>>>>>>>>> test(); >>>>>>>>>> } >>>>>>>>>> catch (Exception e) { >>>>>>>>>> e.printStackTrace(); >>>>>>>>>> } >>>>>>>>>> } >>>>>>>>>> } >>>>>>>>>> The libraries needed are: derby.jar, SqlWrapper.jar (just wraps >>>>>>>>>> around >>>>>>>>>> sql statements, u can replace it with sql strings). >>>>>>>>>> http://memorizeasy.googlecode.com/svn/tags/live/lib/derby.jar >>>>>>>>>> http://memorizeasy.googlecode.com/svn/tags/live/lib/sqlwrapper.j= ar >>>>>>>>>> >>>>>>>>>> The output is: >>>>>>>>>> test executed. >>>>>>>>>> Shutting down due to severe error. >>>>>>>>>> java.sql.SQLException: Table/View 'EXPRESSIONS' already exists i= n >>>>>>>>>> Schema >>>>>>>>>> 'APP'. >>>>>>>>>> at >>>>>>>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException= (Unknown >>>>>>>>>> Source) >>>>>>>>>> at >>>>>>>>>> org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown >>>>>>>>>> Source) >>>>>>>>>> at >>>>>>>>>> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLExce= ption(Unknown >>>>>>>>>> Source) >>>>>>>>>> at >>>>>>>>>> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleExcepti= on(Unknown >>>>>>>>>> Source) >>>>>>>>>> at >>>>>>>>>> org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unkno= wn >>>>>>>>>> Source) >>>>>>>>>> at >>>>>>>>>> org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unkno= wn >>>>>>>>>> Source) >>>>>>>>>> at >>>>>>>>>> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unkno= wn >>>>>>>>>> Source) >>>>>>>>>> at >>>>>>>>>> org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown >>>>>>>>>> Source) >>>>>>>>>> at >>>>>>>>>> org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown >>>>>>>>>> Source) >>>>>>>>>> at DbDeletionTest.test(DbDeletionTest.java:42) >>>>>>>>>> at DbDeletionTest.main(DbDeletionTest.java:53) >>>>>>>>>> Caused by: java.sql.SQLException: Table/View 'EXPRESSIONS' >>>>>>>>>> already >>>>>>>>>> exists in Schema 'APP'. >>>>>>>>>> at >>>>>>>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(U= nknown >>>>>>>>>> Source) >>>>>>>>>> at >>>>>>>>>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTran= sportAcrossDRDA(Unknown >>>>>>>>>> Source) >>>>>>>>>> >>>>>>>>>> 2010/3/19, Gabriele Kahlout : >>>>>>>>>>> 'rm -R myDbDirectory' in *nix' >>>>>>>>>>> How do you programmatically, from java do that (OS independent)= ? >>>>>>>>>>> What I do is I iterate over the db folder and delete all >>>>>>>>>>> contents, >>>>>>>>>>> as >>>>>>>>>>> returned by the java.io API. >>>>>>>>>>> >>>>>>>>>>> However, even doing that seems not sufficient. >>>>>>>>>>> I see that the test folder (the one that contains db.sqlwrapper= ) >>>>>>>>>>> is >>>>>>>>>>> deleted after the first test, and created in the setup of the >>>>>>>>>>> next. >>>>>>>>>>> However, I get: >>>>>>>>>>> >>>>>>>>>>> Caused by: ERROR X0Y32: Table/View 'EXPRESSIONS' already exists >>>>>>>>>>> in >>>>>>>>>>> Schema >>>>>>>>>>> 'APP'. >>>>>>>>>>> >>>>>>>>>>> I think it has to do with the copy in memory not being updated >>>>>>>>>>> with >>>>>>>>>>> the disk. That is because through the debugger, I've even >>>>>>>>>>> manually >>>>>>>>>>> deleted the db, but to no avail. >>>>>>>>>>> Maybe this is more of a Java question now: >>>>>>>>>>> How do I make sure the memory is flushed/sync with the disk? Or >>>>>>>>>>> that >>>>>>>>>>> derby, when creating a connection is not fooled by the cache in >>>>>>>>>>> memory? >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> 2010/3/19, Kristian Waagan : >>>>>>>>>>>> On 19.03.10 10:11, Gabriele Kahlout wrote: >>>>>>>>>>>>> Also, I've copied from the code what I seem to need, and then >>>>>>>>>>>>> end >>>>>>>>>>>>> up >>>>>>>>>>>>> with when I use the db again in a 2nd method. >>>>>>>>>>>>> >>>>>>>>>>>>> Caused by: java.sql.SQLException: Database '/Volumes/STORE N >>>>>>>>>>>>> GO/ws/MemorizEasy/test/db.sqlwrapper' not found. >>>>>>>>>>>>> >>>>>>>>>>>>> Note that after destroying the schemas, I shut down the db, >>>>>>>>>>>>> and >>>>>>>>>>>>> delete >>>>>>>>>>>>> the test folder of the previous method. >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Hi Gabriele, >>>>>>>>>>>> >>>>>>>>>>>> I don't know the requirements of your application, but note >>>>>>>>>>>> that >>>>>>>>>>>> in >>>>>>>>>>>> general you have three options: >>>>>>>>>>>> >>>>>>>>>>>> - clean the database and reuse it >>>>>>>>>>>> This is what we're doing in the Derby test framework (see >>>>>>>>>>>> the >>>>>>>>>>>> class >>>>>>>>>>>> that Bryan pointed to), because it would take much longer to >>>>>>>>>>>> actually >>>>>>>>>>>> delete and recreate the database files all the time. Here we >>>>>>>>>>>> use >>>>>>>>>>>> meta-data to detect all objects added to the database during >>>>>>>>>>>> the >>>>>>>>>>>> test, >>>>>>>>>>>> and then we drop them. >>>>>>>>>>>> >>>>>>>>>>>> - simply just delete the database on disk (i.e. 'rm -R >>>>>>>>>>>> myDbDirectory' >>>>>>>>>>>> in *nix) and create a new one for the next test (through JDBC, >>>>>>>>>>>> using >>>>>>>>>>>> 'jdbc:derby:...;create=3Dtrue'). >>>>>>>>>>>> You should shut down the database before deleting the file= s >>>>>>>>>>>> on >>>>>>>>>>>> disk. >>>>>>>>>>>> >>>>>>>>>>>> - if you just need a database for a short period of time or >>>>>>>>>>>> similar, >>>>>>>>>>>> use an in-memory db. >>>>>>>>>>>> Remember to drop it [1] to free up the memory. >>>>>>>>>>>> >>>>>>>>>>>> It's hard to tell exactly what went wrong above, but are you >>>>>>>>>>>> sure >>>>>>>>>>>> the >>>>>>>>>>>> database is still on disk? >>>>>>>>>>>> Can you locate the directory? (you should see the directories >>>>>>>>>>>> db.sqlwrapper, db.sqlwrapper/seg0 and db.sqlwrapper/log) >>>>>>>>>>>> If not, why did it get deleted? >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Kristian >>>>>>>>>>>> >>>>>>>>>>>> [1] Note that proper support for this is added in 10.6, by >>>>>>>>>>>> using >>>>>>>>>>>> the >>>>>>>>>>>> "drop=3Dtrue" attribute. In 10.5, the mechanism is different. >>>>>>>>>>>> >>>>>>>>>>>>> 2010/3/18, Gabriele Kahlout: >>>>>>>>>>>>> >>>>>>>>>>>>>> I reached here: >>>>>>>>>>>>>> http://svn.apache.org/viewvc/db/derby/code/trunk/java/testin= g/org/apache/derbyTesting/junit/CleanDatabaseTestSetup.java?view=3Dmarkup >>>>>>>>>>>>>> >>>>>>>>>>>>>> But then what do I do? The code relies on some other class, >>>>>>>>>>>>>> and >>>>>>>>>>>>>> it >>>>>>>>>>>>>> seems like I'd have to import the whole package to use it. I= s >>>>>>>>>>>>>> that >>>>>>>>>>>>>> it? >>>>>>>>>>>>>> Besides that one cannot delete the APP schema (which is the >>>>>>>>>>>>>> one >>>>>>>>>>>>>> i >>>>>>>>>>>>>> use), while the code seems to want to do that. >>>>>>>>>>>>>> If not, is there how I can use this without concerning mysel= f >>>>>>>>>>>>>> with >>>>>>>>>>>>>> the >>>>>>>>>>>>>> impl. details? >>>>>>>>>>>>>> >>>>>>>>>>>>>> 2010/3/18, Gabriele Kahlout: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Can you provide a link to it? Also, is it in some library I >>>>>>>>>>>>>>> could >>>>>>>>>>>>>>> use? >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> 2010/3/18, Bryan Pendleton: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> For testing, how can I make sure the tearDown completely >>>>>>>>>>>>>>>>> deletes >>>>>>>>>>>>>>>>> the >>>>>>>>>>>>>>>>> db, and setUp creates a completely new copy, without usin= g >>>>>>>>>>>>>>>>> in-memory >>>>>>>>>>>>>>>>> db? >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> We do this in the Derby regression test suite. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Have a look at >>>>>>>>>>>>>>>> org.apache.derbyTesting.functionTests.junit.CleanDatabaseT= estSetup.java >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> thanks, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> bryan >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>>> K. Gabriele >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> --- unchanged since 25/1/10 --- >>>>>>>>>>>>>>> P.S. Unless a notification (LON), please reply either with >>>>>>>>>>>>>>> an >>>>>>>>>>>>>>> answer >>>>>>>>>>>>>>> OR with " ACK" appended to this subject within 48 hours. >>>>>>>>>>>>>>> Otherwise, >>>>>>>>>>>>>>> I >>>>>>>>>>>>>>> might resend. >>>>>>>>>>>>>>> In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88= =83x. In(x, MyInbox) =E2=88=A7 >>>>>>>>>>>>>>> IsAnswerTo(x, >>>>>>>>>>>>>>> this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In= (ACK, subject(x)) >>>>>>>>>>>>>>> =E2=88=A7 >>>>>>>>>>>>>>> =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Also note that correspondence may be received only from >>>>>>>>>>>>>>> specified >>>>>>>>>>>>>>> a >>>>>>>>>>>>>>> priori senders, or if the subject of this email ends with a >>>>>>>>>>>>>>> code, >>>>>>>>>>>>>>> eg. >>>>>>>>>>>>>>> -LICHT01X, then also from senders whose reply contains it. >>>>>>>>>>>>>>> =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), M= ySafeSenderList) >>>>>>>>>>>>>>> =E2=88=A8 >>>>>>>>>>>>>>> (=E2=88=83y. >>>>>>>>>>>>>>> In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLik= e(y, -LICHT01X) >>>>>>>>>>>>>>> ). >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>> K. Gabriele >>>>>>>>>>>>>> >>>>>>>>>>>>>> --- unchanged since 25/1/10 --- >>>>>>>>>>>>>> P.S. Unless a notification (LON), please reply either with a= n >>>>>>>>>>>>>> answer >>>>>>>>>>>>>> OR with " ACK" appended to this subject within 48 hours. >>>>>>>>>>>>>> Otherwise, >>>>>>>>>>>>>> I >>>>>>>>>>>>>> might resend. >>>>>>>>>>>>>> In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83= x. In(x, MyInbox) =E2=88=A7 >>>>>>>>>>>>>> IsAnswerTo(x, >>>>>>>>>>>>>> this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(= ACK, subject(x)) >>>>>>>>>>>>>> =E2=88=A7 >>>>>>>>>>>>>> =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). >>>>>>>>>>>>>> >>>>>>>>>>>>>> Also note that correspondence may be received only from >>>>>>>>>>>>>> specified >>>>>>>>>>>>>> a >>>>>>>>>>>>>> priori senders, or if the subject of this email ends with a >>>>>>>>>>>>>> code, >>>>>>>>>>>>>> eg. >>>>>>>>>>>>>> -LICHT01X, then also from senders whose reply contains it. >>>>>>>>>>>>>> =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), My= SafeSenderList) =E2=88=A8 >>>>>>>>>>>>>> (=E2=88=83y. >>>>>>>>>>>>>> In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike= (y, -LICHT01X) ). >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Regards, >>>>>>>>>>> K. Gabriele >>>>>>>>>>> >>>>>>>>>>> --- unchanged since 25/1/10 --- >>>>>>>>>>> P.S. Unless a notification (LON), please reply either with an >>>>>>>>>>> answer >>>>>>>>>>> OR with " ACK" appended to this subject within 48 hours. >>>>>>>>>>> Otherwise, >>>>>>>>>>> I >>>>>>>>>>> might resend. >>>>>>>>>>> In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. = In(x, MyInbox) =E2=88=A7 >>>>>>>>>>> IsAnswerTo(x, >>>>>>>>>>> this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK= , subject(x)) =E2=88=A7 >>>>>>>>>>> =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). >>>>>>>>>>> >>>>>>>>>>> Also note that correspondence may be received only from >>>>>>>>>>> specified >>>>>>>>>>> a >>>>>>>>>>> priori senders, or if the subject of this email ends with a >>>>>>>>>>> code, >>>>>>>>>>> eg. >>>>>>>>>>> -LICHT01X, then also from senders whose reply contains it. >>>>>>>>>>> =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySaf= eSenderList) =E2=88=A8 >>>>>>>>>>> (=E2=88=83y. >>>>>>>>>>> In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y,= -LICHT01X) ). >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Regards, >>>>>>>>>> K. Gabriele >>>>>>>>>> >>>>>>>>>> --- unchanged since 25/1/10 --- >>>>>>>>>> P.S. Unless a notification (LON), please reply either with an >>>>>>>>>> answer >>>>>>>>>> OR with " ACK" appended to this subject within 48 hours. >>>>>>>>>> Otherwise, >>>>>>>>>> I >>>>>>>>>> might resend. >>>>>>>>>> In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. I= n(x, MyInbox) =E2=88=A7 >>>>>>>>>> IsAnswerTo(x, >>>>>>>>>> this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK,= subject(x)) =E2=88=A7 >>>>>>>>>> =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). >>>>>>>>>> >>>>>>>>>> Also note that correspondence may be received only from specifie= d >>>>>>>>>> a >>>>>>>>>> priori senders, or if the subject of this email ends with a code= , >>>>>>>>>> eg. >>>>>>>>>> -LICHT01X, then also from senders whose reply contains it. >>>>>>>>>> =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySafe= SenderList) =E2=88=A8 >>>>>>>>>> (=E2=88=83y. >>>>>>>>>> In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y, = -LICHT01X) ). >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Regards, >>>>>>>>> K. Gabriele >>>>>>>>> >>>>>>>>> --- unchanged since 25/1/10 --- >>>>>>>>> P.S. Unless a notification (LON), please reply either with an >>>>>>>>> answer >>>>>>>>> OR with " ACK" appended to this subject within 48 hours. >>>>>>>>> Otherwise, >>>>>>>>> I >>>>>>>>> might resend. >>>>>>>>> In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. In= (x, MyInbox) =E2=88=A7 >>>>>>>>> IsAnswerTo(x, >>>>>>>>> this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK, = subject(x)) =E2=88=A7 >>>>>>>>> =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). >>>>>>>>> >>>>>>>>> Also note that correspondence may be received only from specified >>>>>>>>> a >>>>>>>>> priori senders, or if the subject of this email ends with a code, >>>>>>>>> eg. >>>>>>>>> -LICHT01X, then also from senders whose reply contains it. >>>>>>>>> =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySafeS= enderList) =E2=88=A8 (=E2=88=83y. >>>>>>>>> In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y, -= LICHT01X) ). >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Regards, >>>>>>>> K. Gabriele >>>>>>>> >>>>>>>> --- unchanged since 25/1/10 --- >>>>>>>> P.S. Unless a notification (LON), please reply either with an >>>>>>>> answer >>>>>>>> OR with " ACK" appended to this subject within 48 hours. Otherwise= , >>>>>>>> I >>>>>>>> might resend. >>>>>>>> In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. In(= x, MyInbox) =E2=88=A7 >>>>>>>> IsAnswerTo(x, >>>>>>>> this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK, s= ubject(x)) =E2=88=A7 >>>>>>>> =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). >>>>>>>> >>>>>>>> Also note that correspondence may be received only from specified = a >>>>>>>> priori senders, or if the subject of this email ends with a code, >>>>>>>> eg. >>>>>>>> -LICHT01X, then also from senders whose reply contains it. >>>>>>>> =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySafeSe= nderList) =E2=88=A8 (=E2=88=83y. >>>>>>>> In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y, -L= ICHT01X) ). >>>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Regards, >>>>>> K. Gabriele >>>>>> >>>>>> --- unchanged since 25/1/10 --- >>>>>> P.S. Unless a notification (LON), please reply either with an answer >>>>>> OR with " ACK" appended to this subject within 48 hours. Otherwise, = I >>>>>> might resend. >>>>>> In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. In(x,= MyInbox) =E2=88=A7 IsAnswerTo(x, >>>>>> this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK, sub= ject(x)) =E2=88=A7 >>>>>> =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). >>>>>> >>>>>> Also note that correspondence may be received only from specified a >>>>>> priori senders, or if the subject of this email ends with a code, eg= . >>>>>> -LICHT01X, then also from senders whose reply contains it. >>>>>> =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySafeSend= erList) =E2=88=A8 (=E2=88=83y. >>>>>> In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y, -LIC= HT01X) ). >>>>>> >>>>> >>>>> >>>>> -- >>>>> Regards, >>>>> K. Gabriele >>>>> >>>>> --- unchanged since 25/1/10 --- >>>>> P.S. Unless a notification (LON), please reply either with an answer >>>>> OR with " ACK" appended to this subject within 48 hours. Otherwise, I >>>>> might resend. >>>>> In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. In(x, = MyInbox) =E2=88=A7 IsAnswerTo(x, >>>>> this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK, subj= ect(x)) =E2=88=A7 >>>>> =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). >>>>> >>>>> Also note that correspondence may be received only from specified a >>>>> priori senders, or if the subject of this email ends with a code, eg. >>>>> -LICHT01X, then also from senders whose reply contains it. >>>>> =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySafeSende= rList) =E2=88=A8 (=E2=88=83y. >>>>> In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y, -LICH= T01X) ). >>>>> >>>> >>>> >>>> -- >>>> Regards, >>>> K. Gabriele >>>> >>>> --- unchanged since 25/1/10 --- >>>> P.S. Unless a notification (LON), please reply either with an answer >>>> OR with " ACK" appended to this subject within 48 hours. Otherwise, I >>>> might resend. >>>> In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. In(x, M= yInbox) =E2=88=A7 IsAnswerTo(x, >>>> this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK, subje= ct(x)) =E2=88=A7 >>>> =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). >>>> >>>> Also note that correspondence may be received only from specified a >>>> priori senders, or if the subject of this email ends with a code, eg. >>>> -LICHT01X, then also from senders whose reply contains it. >>>> =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySafeSender= List) =E2=88=A8 (=E2=88=83y. >>>> In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y, -LICHT= 01X) ). >>>> >>> >>> >>> -- >>> Regards, >>> K. Gabriele >>> >>> --- unchanged since 25/1/10 --- >>> P.S. Unless a notification (LON), please reply either with an answer >>> OR with " ACK" appended to this subject within 48 hours. Otherwise, I >>> might resend. >>> In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. In(x, My= Inbox) =E2=88=A7 IsAnswerTo(x, >>> this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK, subjec= t(x)) =E2=88=A7 >>> =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). >>> >>> Also note that correspondence may be received only from specified a >>> priori senders, or if the subject of this email ends with a code, eg. >>> -LICHT01X, then also from senders whose reply contains it. >>> =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySafeSenderL= ist) =E2=88=A8 (=E2=88=83y. >>> In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y, -LICHT0= 1X) ). >>> >> >> >> -- >> Regards, >> K. Gabriele >> >> --- unchanged since 25/1/10 --- >> P.S. Unless a notification (LON), please reply either with an answer >> OR with " ACK" appended to this subject within 48 hours. Otherwise, I >> might resend. >> In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. In(x, MyI= nbox) =E2=88=A7 IsAnswerTo(x, >> this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK, subject= (x)) =E2=88=A7 >> =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). >> >> Also note that correspondence may be received only from specified a >> priori senders, or if the subject of this email ends with a code, eg. >> -LICHT01X, then also from senders whose reply contains it. >> =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySafeSenderLi= st) =E2=88=A8 (=E2=88=83y. >> In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y, -LICHT01= X) ). >> > > > -- > Regards, > K. Gabriele > > --- unchanged since 25/1/10 --- > P.S. Unless a notification (LON), please reply either with an answer > OR with " ACK" appended to this subject within 48 hours. Otherwise, I > might resend. > In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. In(x, MyIn= box) =E2=88=A7 IsAnswerTo(x, > this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK, subject(= x)) =E2=88=A7 > =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). > > Also note that correspondence may be received only from specified a > priori senders, or if the subject of this email ends with a code, eg. > -LICHT01X, then also from senders whose reply contains it. > =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySafeSenderLis= t) =E2=88=A8 (=E2=88=83y. > In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y, -LICHT01X= ) ). > --=20 Regards, K. Gabriele --- unchanged since 25/1/10 --- P.S. Unless a notification (LON), please reply either with an answer OR with " ACK" appended to this subject within 48 hours. Otherwise, I might resend. In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. In(x, MyInbo= x) =E2=88=A7 IsAnswerTo(x, this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK, subject(x)= ) =E2=88=A7 =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). Also note that correspondence may be received only from specified a priori senders, or if the subject of this email ends with a code, eg. -LICHT01X, then also from senders whose reply contains it. =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySafeSenderList)= =E2=88=A8 (=E2=88=83y. In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y, -LICHT01X) = ).