[
https://issues.apache.org/jira/browse/DERBY-6496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13922461#comment-13922461
]
Rick Hillegas commented on DERBY-6496:
--------------------------------------
Thanks for taking a look at the first rev of the patch, Knut. I noticed the
goofy naming of the test cases also and renamed them to something bland in the
second rev. To answer your other questions:
1) Yes, I found it was necessary to open the connection as TEST_DBO. The bug
was not popped when I used the default connection.
2) And I found it was also necessary to separate the two tool-loadings into
distinct test-cases. When combined into a single test case, the bug did not pop.
I'll take a look at OptimizerTracer.loadTool(). Thanks for finding that.
> Optional tool registration may fail because the CompilerContext is not always
> available at execution time.
> ----------------------------------------------------------------------------------------------------------
>
> Key: DERBY-6496
> URL: https://issues.apache.org/jira/browse/DERBY-6496
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.11.0.0
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Attachments: derby-6496-01-aa-useClassFactoryContext.diff,
> derby-6496-01-ab-useClassFactoryContext.diff
>
>
> For reasons which elude me, the CompilerContext is sometimes available at
> execution time and sometimes not. When the CompilerContext is not available
> at execution time, optional tool loading fails on an NPE:
> Caused by: java.lang.NullPointerException
> at
> org.apache.derby.catalog.Java5SystemProcedures.SYSCS_REGISTER_TOOL(Java5SystemProcedures.java:104)
> at
> org.apache.derby.exe.ac4d3680a5x0144x93adx0136xffffe1d7aa3e0.g0(Unknown
> Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at
> org.apache.derby.impl.services.reflect.ReflectMethod.invoke(ReflectMethod.java:46)
> at
> org.apache.derby.impl.sql.execute.CallStatementResultSet.open(CallStatementResultSet.java:75)
> at
> org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:470)
> at
> org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:349)
> at
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1338)
--
This message was sent by Atlassian JIRA
(v6.2#6252)