You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2009/03/27 16:20:50 UTC
[jira] Updated: (DERBY-4126) You can't invoke a table function
which is stored in a jar file inside the database
[ https://issues.apache.org/jira/browse/DERBY-4126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-4126:
---------------------------------
Attachment: derby-4126-01-aa-useSessionClassloader.diff
Attaching derby-4126-01-aa-useSessionClassloader.diff. This patch causes Derby to lookup VTI optimizer overrides using the session's classloader. This fixes the bug. I will run regression tests now.
Touches the following files:
M java/engine/org/apache/derby/impl/sql/compile/FromVTI.java
Use the session class loader when looking for optimizer overrides.
A java/testing/org/apache/derbyTesting/functionTests/tests/lang/dummy_vti.jar
M java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java
New test to verify that this fixes the problem.
> You can't invoke a table function which is stored in a jar file inside the database
> -----------------------------------------------------------------------------------
>
> Key: DERBY-4126
> URL: https://issues.apache.org/jira/browse/DERBY-4126
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.6.0.0
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Attachments: derby-4126-01-aa-useSessionClassloader.diff
>
>
> You get a ClassNotFoundException when you try to invoke a table function which lives in a jar file stored inside the database. This is because FromVTI.implementsDerbyStyleVTICosting() looks up the class using Class.forName() rather than using the session classloader. A similar bug is in FromVTI.getVTICosting(). This bug was reported by Krzysztof N in the following user list thread: http://www.nabble.com/Uinable-to-use-Table-function-due-to-java.lang.ClassNotFoundException--while-class-is-clearly-reachable..-td22478383.html#a22699492
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.