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

Knut Anders Hatlen commented on DERBY-6511:
-------------------------------------------

I can also reproduce this by chaining a function and a function.

Given this Java method

{code}
    public static int f(Integer x) {
        return x;
    }
{code}

the following SQL code fails

{noformat}
ij> create function f(x int) returns int language java parameter style java no 
sql deterministic external name 'Kladd.f';
0 rows inserted/updated/deleted
ij> values f(f(1));
1          
-----------
ERROR 38000: The exception 'java.lang.NoSuchMethodError: Kladd.f(I)I' was 
thrown while evaluating an expression.
ERROR XJ001: Java exception: 'Kladd.f(I)I: java.lang.NoSuchMethodError'.
{noformat}

If I add "returns null on null input" to the CREATE FUNCTION statement, it 
doesn't fail.

> java.lang.NoSuchMethodError chaining a function and procedure
> -------------------------------------------------------------
>
>                 Key: DERBY-6511
>                 URL: https://issues.apache.org/jira/browse/DERBY-6511
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.11.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: derby-6511.sql, derby-6511.sql
>
>
> java.lang.NoSuchMethodError is raised when calling a procedure which takes an 
> Integer argument and passing it the result of a function which returns an 
> int. The error is raised in generated code.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to