db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Xue (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-854) DatabaseMetaData methods fail on read-only database
Date Thu, 01 Jun 2006 19:31:34 GMT
    [ http://issues.apache.org/jira/browse/DERBY-854?page=comments#action_12414281 ] 

Gary Xue commented on DERBY-854:
--------------------------------

This isssue is also encounted by the Eclipse BIRT project (http://www.eclipse.org/birt) and
is blocking BIRT's upgrade to Derby 10.1.2.1. This problem does not occur with Derby 10.0.2,
which BIRT currrently packages.

To help with reproduction of this issue, I have attached:
(1) BirtSample.jar, which is the Jar'ed version of the BIRT sample database created with Derby
10.1.2.1.
(2) Test code TestGetDBMetaData. 

To run the test, place the attached db jar file in c:\temp (or update TestGetDBMetaData.main
to set dbFile to the location of this file). Run TestGetDBMetaData class. You will get the
same exception as in Description.

This is a blocker issue for us and we'd appreciate a prompt fix or a workaround suggestion.


> DatabaseMetaData methods fail on read-only database
> ---------------------------------------------------
>
>          Key: DERBY-854
>          URL: http://issues.apache.org/jira/browse/DERBY-854
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.1.2.1
>  Environment: Win XP SP2 / Intel
>     Reporter: Alex Miller

>
> I am using a read-only db in a zip file with Derby in embedded mode.  I ran an importer
against it which basically just harvests info from DatabaseMetaData and got an error on several
methods like this one.  The method in question here is DatabaseMetaData.getTableTypes(). 
The same thing seems to happen on other methods I've tried as well (getCatalogs, getProcedures,
etc).
> Program:
>         Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
>         Connection conn = DriverManager.getConnection("jdbc:derby:jar:(d:\\derby\\bqt\\zipped\\bqt-mini.zip)bqt");
>         DatabaseMetaData dbmd = conn.getMetaData();
>         ResultSet rs = dbmd.getTableTypes();
> ERROR 40XD1: Container was opened in read-only mode.  
>         at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BaseContainer.use(Unknown Source)
>         at org.apache.derby.impl.store.raw.data.BaseContainerHandle.useContainer(Unknown
Source)
>         at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
Source)
>         at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
Source)
>         at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown Source)
>         at org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Unknown
Source)
>         at org.apache.derby.impl.store.access.heap.Heap.open(Unknown Source)
>         at org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown
Source)
>         at org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown
Source)
>         at org.apache.derby.impl.sql.execute.RowChangerImpl.openForUpdate(Unknown Source)
>         at org.apache.derby.impl.sql.execute.RowChangerImpl.open(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.TabInfoImpl.deleteRows(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.TabInfoImpl.deleteRow(Unknown Source)
>         at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.dropDependentsStoredDependencies(Unknown
Source)
>         at org.apache.derby.impl.sql.depend.BasicDependencyManager.clearDependencies(Unknown
Source)
>         at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.compileStatement(Unknown
Source)
>         at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.prepareAndRelease(Unknown
Source)
>         at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.prepareAndRelease(Unknown
Source)
>         at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(Unknown
Source)
>         at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(Unknown
Source)
>         at org.apache.derby.impl.sql.compile.ExecSPSNode.generate(Unknown Source)
>         at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
>         at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
>         at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
>         at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
>         at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedConnection.prepareMetaDataStatement(Unknown
Source)
>         at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.prepareSPS(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(Unknown
Source)
>         at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getSimpleQuery(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getTableTypes(Unknown Source)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message