Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 897929306 for ; Thu, 29 Sep 2011 14:56:07 +0000 (UTC) Received: (qmail 44131 invoked by uid 500); 29 Sep 2011 14:56:07 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 44110 invoked by uid 500); 29 Sep 2011 14:56:07 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 44103 invoked by uid 99); 29 Sep 2011 14:56:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 14:56:07 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 14:56:05 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 63D352A0839 for ; Thu, 29 Sep 2011 14:55:45 +0000 (UTC) Date: Thu, 29 Sep 2011 14:55:45 +0000 (UTC) From: "Knut Anders Hatlen (Updated) (JIRA)" To: derby-dev@db.apache.org Message-ID: <982714070.7704.1317308145410.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <50366243.7290.1317298125476.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (DERBY-5438) Empty MAPS table in toursdb MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-5438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-5438: -------------------------------------- Attachment: d5438.diff Attaching a patch that makes the following changes: 1) Stop catching and printing exceptions in insertMaps.main(). Instead let the method throw the exception so that the exit status of the Java process reflects that it failed, and the build stops. With this change only, "ant all" fails with this message: BUILD FAILED /code/derby/trunk/build.xml:625: The following error occurred while executing this line: /code/derby/trunk/java/demo/build.xml:125: The following error occurred while executing this line: /code/derby/trunk/java/demo/toursdb/build.xml:92: Java returned: 1 Then we'll notice if similar problems are introduced later. 2) Change the URL used by insertMaps to match the one used in build.xml (toursDB -> toursdb) to fix the database not found error. 3) Change the directory for the Java process that runs insertMaps to java/demo/toursdb, to avoid the FileNotFoundExceptions, and instead set derby.system.home to make derby.log and the database end up in generated/toursdb. With these changes, the MAPS table gets populated when I run "ant all" in my environment. > Empty MAPS table in toursdb > --------------------------- > > Key: DERBY-5438 > URL: https://issues.apache.org/jira/browse/DERBY-5438 > Project: Derby > Issue Type: Bug > Components: Demos/Scripts > Affects Versions: 10.7.1.1, 10.8.1.2, 10.8.2.1 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Attachments: d5438.diff > > > The toursdb that's bundled with 10.7.1.1 and 10.8.1.2 (and the 10.8.2.1 release candidate) has no rows in the MAPS table. Version 10.6.2.1 had three rows in that table: > ij> select * from maps; > MAP_ID |MAP_NAME |REGION |AREA |PHOTO_FORMAT |PICTURE > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 1 |North Ocean |Cup Island |1776.1100 |gif |4749463839613601fe00f70000000000800000008000808000000080800080008080808080c0c0c0ff000000ff00ffff000000ffff00ff00ffffffffff00000& > 2 |Middle Ocean |Small Island |1166.7700 |gif |47494638396192008e00f70000000000800000008000808000000080800080008080808080c0c0c0ff000000ff00ffff000000ffff00ff00ffffffffff00000& > 3 |South Ocean |Witch Island |9117.9000 |gif |474946383961f602f301f70000000000800000008000808000000080800080008080808080c0c0c0ff000000ff00ffff000000ffff00ff00ffffffffff00000& > 3 rows selected > Building it on a clean trunk and looking at generated/toursdb/toursdb.out gives the following hint: > FAIL -- unexpected exception: java.sql.SQLException: Database 'toursDB' not found. > java.sql.SQLException: Database 'toursDB' not found. > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:98) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:148) > at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:227) > at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnection.java:3085) > at org.apache.derby.impl.jdbc.EmbedConnection.handleDBNotFound(EmbedConnection.java:735) > at org.apache.derby.impl.jdbc.EmbedConnection.(EmbedConnection.java:414) > at org.apache.derby.impl.jdbc.EmbedConnection30.(EmbedConnection30.java:73) > at org.apache.derby.impl.jdbc.EmbedConnection40.(EmbedConnection40.java:51) > at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Driver40.java:70) > at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:248) > at org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:146) > at java.sql.DriverManager.getConnection(DriverManager.java:582) > at java.sql.DriverManager.getConnection(DriverManager.java:207) > at toursdb.insertMaps.main(insertMaps.java:51) > Caused by: java.sql.SQLException: Database 'toursDB' not found. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:122) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71) > ... 14 more > I suspect this was introduced by the changes in DERBY-3986 when the destination directory for toursdb was changed. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira