Client/Server. Fairly clean (2 weeks old) DB.
Simple query (shown in log below) produced error


2009-04-15 16:01:41.156 GMT Thread[DRDAConnThread_63,5,derby.daemons] (XID = 
10222513), (SESSIONID = 7), (DATABASE = retaindb), (DRDAID = 
NF000001.AB3A-882422812176647029{8}), Cleanup action starting
2009-04-15 16:01:41.156 GMT Thread[DRDAConnThread_63,5,derby.daemons] (XID = 
10222513), (SESSIONID = 7), (DATABASE = retaindb), (DRDAID = 
NF000001.AB3A-882422812176647029{8}), Failed Statement is: SELECT PropertyValue 
FROM t_UserProperties where UserID='admin' and PropertyName='PrimaryUID'
java.lang.NullPointerException
        at java.io.StringReader.<init>(StringReader.java:33)
        at org.apache.derby.impl.services.uuid.BasicUUID.<init>(Unknown Source)
        at 
org.apache.derby.impl.services.uuid.BasicUUIDFactory.recreateUUID(Unknown 
Source)
        at 
org.apache.derby.impl.sql.catalog.SYSSTATISTICSRowFactory.buildDescriptor(Unknown
 Source)
        at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndexMinion(Unknown
 Source)
        at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndex(Unknown
 Source)
        at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getStatisticsDescriptors(Unknown
 Source)
        at 
org.apache.derby.iapi.sql.dictionary.TableDescriptor.getStatistics(Unknown 
Source)
        at 
org.apache.derby.iapi.sql.dictionary.TableDescriptor.statisticsExist(Unknown 
Source)
        at org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(Unknown
 Source)
        at 
org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(Unknown Source)
        at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
        at 
org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
        at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
        at 
org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(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.prepareStatement(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown 
Source)
        at org.apache.derby.impl.drda.DRDAStatement.prepare(Unknown Source)
        at org.apache.derby.impl.drda.DRDAStatement.explicitPrepare(Unknown 
Source)
        at org.apache.derby.impl.drda.DRDAConnThread.parsePRPSQLSTT(Unknown 
Source)
        at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown 
Source)
        at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
Cleanup action completed
WARNING: While deleting a row from a table the index row for base table row 
(2,712) was not found in index with conglomerate id 737.  This problem has 
automatically been corrected as part of the delete operation.
WARNING: While deleting a row from a table the index row for base table row 
(2,713) was not found in index with conglomerate id 737.  This problem has 
automatically been corrected as part of the delete operation.


The WARNINGs are after I successfully fixed it by:

drop index i_userproperties;
create index i_userproperties;

The query then succeeded.

Reply via email to