Java language procedure error:
keithaniz <[email protected]>
| Newsgroups | gmane.comp.java.hsqldb.user |
|---|---|
| Message-ID | <[email protected]> |
Hello Fred,
i've Java language procedure and i think there is everything correct but
why it is giving such error:
Failed to execute goal org.codehaus.mojo:sql-maven-plugin:1.5:execute
(create-db) on project embedded-nexxus-seq-procedure: user lacks privilege
or object not found java.lang.ClassNotFoundException:
com.bloodhound.sequence.embeded.test.StoredProc
com.bloodhound.sequence.embeded.test.StoredProc in statement [
[ERROR] CREATE PROCEDURE NEXXUS_GENERATOR_API_GETNEXTBLOCK (IN realmIn
VARCHAR(20),
[ERROR] IN nameIn VARCHAR(20),
[ERROR] IN deltaIn BIGINT ,
[ERROR] OUT startIdOut BIGINT ,
[ERROR] OUT endIdOut BIGINT)
[ERROR] LANGUAGE JAVA PARAMETER STYLE JAVA READS SQL DATA
[ERROR] EXTERNAL NAME
'com.bloodhound.sequence.embeded.test.StoredProc.mockNextBlock']
create table "DUAL"(ID varchar(1));
insert into DUAL values('1');
Procedure :
CREATE PROCEDURE NEXXUS_GENERATOR_API_GETNEXTBLOCK (IN realmIn VARCHAR(20),
IN nameIn VARCHAR(20),
IN deltaIn BIGINT ,
OUT startIdOut BIGINT ,
OUT endIdOut BIGINT)
LANGUAGE JAVA PARAMETER STYLE JAVA READS SQL DATA
EXTERNAL NAME
'com.bloodhound.sequence.embeded.test.StoredProc.mockNextBlock';
Class:
package com.bloodhound.sequence.embeded.test;
public class StoredProc {
private static int seed = 0;
static Object lock = new Object();
@SuppressWarnings("unchecked")
public static void mockNextBlock(String obj1, String obj2, long obj3,
Long[] obj4, Long[] obj5) throws java.sql.SQLException {
synchronized (lock) {
obj4[0] = new Long(++seed);
while (obj3-- > 0) {
seed++;
}
obj5[0] = new Long(seed);
}
}
}
Please any suggestion!!!
Thank you
--
View this message in context: http://hsqldb.10974.n7.nabble.com/Java-language-procedure-error-tp3915.html
Sent from the HSQLDB - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev