db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Miller" <amil...@metamatrix.com>
Subject Question on DatabaseMetaData with read-only Derby db
Date Thu, 19 Jan 2006 20:12:07 GMT
I am using a read-only db in a zip file.  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().  I think the same thing happened on
other methods too, such as DBMD.getProcedures().  I'm using 10.1.2.1.  

Is this a bug?  If not, can someone explain why I can't get metadata
from a read-only db?  

Thanks,
Alex


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(Un
known Source)
	at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(U
nknown Source)
	at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(U
nknown Source)
	at
org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown Source)
	at
org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Un
known Source)
	at org.apache.derby.impl.store.access.heap.Heap.open(Unknown
Source)
	at
org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unkno
wn Source)
	at
org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unkno
wn 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.dropDependentsStore
dDependencies(Unknown Source)
	at
org.apache.derby.impl.sql.depend.BasicDependencyManager.clearDependencie
s(Unknown Source)
	at
org.apache.derby.iapi.sql.dictionary.SPSDescriptor.compileStatement(Unkn
own Source)
	at
org.apache.derby.iapi.sql.dictionary.SPSDescriptor.prepareAndRelease(Unk
nown Source)
	at
org.apache.derby.iapi.sql.dictionary.SPSDescriptor.prepareAndRelease(Unk
nown 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.prepareI
nternalStatement(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(Unkn
own Source)
	at
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.prepareSPS(Unknown
Source)
	at
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(Unknow
n Source)
	at
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getSimpleQuery(Unknown
Source)
	at
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getTableTypes(Unknown
Source)


Mime
View raw message