[
https://issues.apache.org/jira/browse/DERBY-5615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207917#comment-13207917
]
Mike Matrigali commented on DERBY-5615:
---------------------------------------
can you post the full derby.log that has the error. Sometimes there is more
info there, especially if some of the background threads are getting
errors and then affecting the client thread.
That line in my client is:
at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(BaseDataFileFactory.java:661)
FileContainer container = (FileContainer) containerCache.find(identity);
So it looks like containerCache went null. A quick search leads to one way
this can happen is if some corrupt level error is encountered, then
we mark everything null as we don't know what state the db is in and need to
insure all clients exit.
> NPE in Store when running SELECT in a read-only database accessed via the
> classpath subprotocol when authentication, authorization, and Java security
> are turned on
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-5615
> URL: https://issues.apache.org/jira/browse/DERBY-5615
> Project: Derby
> Issue Type: Bug
> Components: SQL, Store
> Affects Versions: 10.9.0.0
> Reporter: Rick Hillegas
> Attachments: 5615.policy, 5615_bug.sql, 5615_init.sql, 5615_script
>
>
> I get an NPE trying to select from a table on which I don't have select
> privilege. The database is stored in a jar file accessed via the classpath
> protocol. BUILTIN authentication and sql authorization are turned on in the
> database. Running under a Java security manager. I will attach a repro. Here
> is the NPE:
> Failed Statement is: select * from KIWI.t
> java.lang.NullPointerException
> at
> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(BaseDataFileFactory.java:661)
> at
> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(BaseDataFileFactory.java:591)
> at
> org.apache.derby.impl.store.raw.xact.Xact.openContainer(Xact.java:1316)
> at
> org.apache.derby.impl.store.access.btree.OpenBTree.init(OpenBTree.java:380)
> at
> org.apache.derby.impl.store.access.btree.BTreeController.init(BTreeController.java:1250)
> at
> org.apache.derby.impl.store.access.btree.index.B2IController.init(B2IController.java:140)
> at org.apache.derby.impl.store.access.btree.index.B2I.open(B2I.java:821)
> at
> org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(RAMTransaction.java:476)
> at
> org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(RAMTransaction.java:1308)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.debugGenerateInfo(DataDictionaryImpl.java:9584)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndexMinion(DataDictionaryImpl.java:9492)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndex(DataDictionaryImpl.java:9303)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getColumnDescriptorsScan(DataDictionaryImpl.java:2887)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getColumnDescriptorsScan(DataDictionaryImpl.java:2851)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.finishTableDescriptor(DataDictionaryImpl.java:2408)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getTableDescriptorIndex1Scan(DataDictionaryImpl.java:2277)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getUncachedTableDescriptor(DataDictionaryImpl.java:2293)
> at
> org.apache.derby.impl.sql.catalog.NameTDCacheable.setIdentity(NameTDCacheable.java:110)
> at
> org.apache.derby.impl.services.cache.ConcurrentCache.find(ConcurrentCache.java:295)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getTableDescriptor(DataDictionaryImpl.java:2224)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.faultInTabInfo(DataDictionaryImpl.java:9905)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getNonCoreTI(DataDictionaryImpl.java:9702)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getUncachedPermissionsDescriptor(DataDictionaryImpl.java:13712)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getUncachedTablePermsDescriptor(DataDictionaryImpl.java:13660)
> at
> org.apache.derby.impl.sql.catalog.PermissionsCacheable.setIdentity(PermissionsCacheable.java:71)
> at
> org.apache.derby.impl.services.cache.ConcurrentCache.find(ConcurrentCache.java:295)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getPermissions(DataDictionaryImpl.java:13364)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getTablePermissions(DataDictionaryImpl.java:13350)
> at
> org.apache.derby.iapi.sql.dictionary.StatementTablePermission.oneAuthHasPermissionOnTable(StatementTablePermission.java:239)
> at
> org.apache.derby.iapi.sql.dictionary.StatementTablePermission.hasPermissionOnTable(StatementTablePermission.java:160)
> at
> org.apache.derby.iapi.sql.dictionary.StatementColumnPermission.check(StatementColumnPermission.java:99)
> at
> org.apache.derby.impl.sql.conn.GenericAuthorizer.authorize(GenericAuthorizer.java:183)
> at
> org.apache.derby.exe.ac40348015x0135x7cc7x4621x0000040700000.fillResultSet(Unknown
> Source)
> at
> org.apache.derby.exe.ac40348015x0135x7cc7x4621x0000040700000.execute(Unknown
> Source)
> at
> org.apache.derby.impl.sql.GenericActivationHolder.execute(GenericActivationHolder.java:353)
> at
> org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:441)
> at
> org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:324)
> at
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1242)
> at
> org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:630)
> at
> org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:559)
> at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:367)
> at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:527)
> at
> org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:372)
> at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245)
> at org.apache.derby.impl.tools.ij.Main.go(Main.java:229)
> at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184)
> at org.apache.derby.impl.tools.ij.Main.main(Main.java:75)
> at org.apache.derby.tools.ij.main(ij.java:59)
> Cleanup action completed
--
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