db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3733) CompilerContextImpl.initRequiredPriv causes Null Pointer Exception - 10.3.2.2
Date Fri, 19 Jun 2009 02:09:07 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721617#action_12721617
] 

Kathey Marsden commented on DERBY-3733:
---------------------------------------

I saw this on 10.3 when testing the fixes for DERBY-3926, DERBY-4268 and DERBY-3997, running
jdbcapi/metadata.java against JCC 2.6.  It passed on rerun.

I don't think I'll open a bug or reopen this one unless someone thinks I should.  It does
look like a server side issue but it did happen with JCC.

java.lang.NullPointerException

	at org.apache.derby.impl.sql.compile.CompilerContextImpl.initRequiredPriv(CompilerContextImpl.java:698)

	at org.apache.derby.impl.sql.compile.CompilerContextImpl.resetContext(CompilerContextImpl.java:158)

	at org.apache.derby.impl.sql.compile.CompilerContextImpl.cleanupOnError(CompilerContextImpl.java:107)

	at org.apache.derby.iapi.services.context.ContextManager.cleanupOnError(ContextManager.java:327)

	at org.apache.derby.impl.jdbc.TransactionResourceImpl.cleanupOnError(TransactionResourceImpl.java:419)

	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:337)

	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1593)

	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)

	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1294)

	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1652)

	at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(EmbedCallableStatement.java:116)

	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(EmbedPreparedStatement.java:1304)

	at org.apache.derby.impl.drda.DRDAStatement.execute(DRDAStatement.java:703)

	at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTTobjects(DRDAConnThread.java:4016)

	at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(DRDAConnThread.java:3820)

	at org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:957)

	at org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:277)


There was an earlier NullPointerException too:
2009-06-18 19:53:12.203 GMT Thread[DRDAConnThread_4,5,main] (XID = 397), (SESSIONID = 0),
(DATABASE = wombat), (DRDAID = NF000001.GC59-722545019861466874{2}), Failed Statement is:
EXECUTE STATEMENT SYS."getBestRowIdentifierUniqueConstraint"

java.lang.NullPointerException

	at org.apache.derby.impl.sql.compile.PredicateList.useful(PredicateList.java)

	at org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(OptimizerImpl.java:2222)

	at org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(OptimizerImpl.java:1985)

	at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(FromBaseTable.java:527)

	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(ProjectRestrictNode.java:316)

	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1939)

	at org.apache.derby.impl.sql.compile.SelectNode.optimize(SelectNode.java:1656)

	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(DMLStatementNode.java:305)

	at org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(CursorNode.java:515)

	at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:365)

	at org.apache.derby.impl.sql.GenericStatement.prepareStorable(GenericStatement.java:561)

	at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.compileStatement(SPSDescriptor.java:354)

	at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.prepareAndRelease(SPSDescriptor.java:257)

	at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(SPSDescriptor.java:711)

	at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(SPSDescriptor.java:642)

	at org.apache.derby.impl.sql.compile.ExecSPSNode.generate(ExecSPSNode.java:177)

	at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:447)

	at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88)

	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:746)

	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java:129)

	at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Driver40.java:105)

	at org.apache.derby.impl.jdbc.EmbedConnection.prepareMetaDataStatement(EmbedConnection.java:1945)

	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.prepareSPS(EmbedDatabaseMetaData.java:3666)

	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQueryUsingSystemTables(EmbedDatabaseMetaData.java:3502)

	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(EmbedDatabaseMetaData.java:3551)

	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(EmbedDatabaseMetaData.java:3576)

	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.doGetBestRowId(EmbedDatabaseMetaData.java:2166)

	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getBestRowIdentifier(EmbedDatabaseMetaData.java:2078)

	at org.apache.derby.catalog.SystemProcedures.SQLSPECIALCOLUMNS(SystemProcedures.java:576)

	at org.apache.derby.exe.ac12564092x0121xf4edxfb59x000069c02392f.g0(Unknown Source)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

	at java.lang.reflect.Method.invoke(Method.java:599)

	at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(ReflectMethod.java:46)

	at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(CallStatementResultSet.java:74)

	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)

	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)

	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1652)

	at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(EmbedCallableStatement.java:116)

	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(EmbedPreparedStatement.java:1304)

	at org.apache.derby.impl.drda.DRDAStatement.execute(DRDAStatement.java:703)

	at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTTobjects(DRDAConnThread.java:4016)

	at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(DRDAConnThread.java:3820)

	at org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:957)

	at org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:277


The client side error was:
2,I,4,INTEGER,4,null,10,1
2,VC10,12,VARCHAR,10,null,null,1
getBestRowIdentifier("","SYS","SYSTABLES"):
FAIL -- unexpected exception
SQLSTATE(38000):com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -1, SQLSTATE: 38000,
SQLERRMC: java.sql.SQLException: Java exception: ': java.lang.NullPointerException'.38000XJ001:java.lang.NullPointerExceptionXJ001.U
	at com.ibm.db2.jcc.a.jd.d(jd.java:1397)
	at com.ibm.db2.jcc.b.fb.l(fb.java:366)
	at com.ibm.db2.jcc.b.fb.e(fb.java:102)
	at com.ibm.db2.jcc.b.s.e(s.java:72)
	at com.ibm.db2.jcc.b.wb.i(wb.java:194)
	at com.ibm.db2.jcc.a.jd.q(jd.java:1364)
	at com.ibm.db2.jcc.a.kd.a(kd.java:2358)
	at com.ibm.db2.jcc.a.ld.W(ld.java:188)
	at com.ibm.db2.jcc.a.t.a(t.java:7820)
	at com.ibm.db2.jcc.a.t.a(t.java:6996)
	at com.ibm.db2.jcc.a.t.getBestRowIdentifier(t.java:6908)
	at org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.getMetaDataRS(metadata.java:119)
	at org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata_test.runTest(metadata_test.java:453)
	at org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata.main(metadata.java:85)



> CompilerContextImpl.initRequiredPriv causes Null Pointer Exception - 10.3.2.2
> -----------------------------------------------------------------------------
>
>                 Key: DERBY-3733
>                 URL: https://issues.apache.org/jira/browse/DERBY-3733
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>         Environment: Windows 2003 Server
>            Reporter: Di Qiu
>            Priority: Minor
>
> We randomly hit into this NullPointerException. Any suggestions would be appreciated.

> java.lang.NullPointerException
> 	at org.apache.derby.impl.sql.compile.CompilerContextImpl.initRequiredPriv(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CompilerContextImpl.resetContext(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CompilerContextImpl.cleanupOnError(Unknown Source)
> 	at org.apache.derby.iapi.services.context.ContextManager.cleanupOnError(Unknown Source)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> 	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
> 	at com.ibm.sysmgmt.resource.caching.db.PreparedStatementUtil.executeQuery(PreparedStatementUtil.java:321)
> 	at com.ibm.sysmgmt.resource.caching.db.DBResourceCachingService.getResourcesByType(DBResourceCachingService.java:3117)
> 	at com.ibm.sysmgmt.resource.caching.db.DBResourceCachingService.getResources(DBResourceCachingService.java:3037)
> 	at com.ibm.sysmgmt.resource.caching.BaseResourceCachingService._getResources(BaseResourceCachingService.java:285)
> 	at com.ibm.sysmgmt.resource.caching.BaseResourceCachingService._getResources(BaseResourceCachingService.java:306)
> 	at com.ibm.sysmgmt.resource.caching.BaseResourceCachingService.getResources(BaseResourceCachingService.java:3552)
> 	

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message