db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5438) Empty MAPS table in toursdb
Date Thu, 29 Sep 2011 14:55:45 GMT

     [ 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.<init>(EmbedConnection.java:414)
>         at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30.java:73)
>         at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(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

        

Mime
View raw message