db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "V.Narayanan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3552) Handle jar files that are installed when replication is enabled
Date Sun, 23 Mar 2008 14:17:26 GMT

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

V.Narayanan commented on DERBY-3552:

I have been experimenting with running jars with replication and noticed the following

I tried a simple installation of a jar that contained a class with a function that accepts
two numbers and produces their sum (copied the function from here), on the replication master.


I used the following steps to install the jar

CALL SQLJ.install_jar('ReturnOne.jar','APP.ReturnOneJar',0);
CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.classpath', 'APP.ReturnOneJar');
create function myInc(increment_value integer, int_value integer) returns integer language
java parameter style java  no sql external name 'MyMathFuncs.myInc';

and used

values myInc (5,10); to run it on the master

After the above series of steps I did a failover and did 

values myInc(5,10);

on the slave. I got the following output

ij>  values myInc (5,10);
ERROR 42X51: The class 'MyMathFuncs' does not exist or is inaccessible. This can happen if
the class is not public.
ERROR XJ001: Java exception: 'MyMathFuncs: java.lang.ClassNotFoundException'.

To fix this problem I did the following on the slave

ij> CALL sqlj.replace_jar('/home/vn/work/scripts/replication/ReturnOne.jar','APP.ReturnOneJar');
Statement executed.
ij>  values myInc (5,10);

> Handle jar files that are installed when replication is enabled
> ---------------------------------------------------------------
>                 Key: DERBY-3552
>                 URL: https://issues.apache.org/jira/browse/DERBY-3552
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Replication
>    Affects Versions:,
>            Reporter: V.Narayanan

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

View raw message