Java language procedure error:

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Java language procedure error:

keithaniz
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

Reply | Threaded
Open this post in threaded view
|

Re: Java language procedure error:

Fred Toussi-2
The EXTRNAL NAME string needs to begin with CLASSPATH:

EXTERNAL NAME
'CLASSPATH:com.bloodhound.sequence.embeded.test.StoredProc.mockNextBlock';

Fred

On Thu, Jun 13, 2013, at 17:05, keithaniz wrote:

> 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
> _______________________________________________
> Hsqldb-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|

Re: Java language procedure error:

keithaniz
Hello Fred,
ya i've tried that using 'CLASSPATH:com.bloodhound.sequence.embeded.test.StoredProc.mockNextBlock';but it arises the same error!


On Thu, Jun 13, 2013 at 10:17 PM, Fred Toussi <[hidden email]> wrote:
The EXTRNAL NAME string needs to begin with CLASSPATH:

EXTERNAL NAME
'CLASSPATH:com.bloodhound.sequence.embeded.test.StoredProc.mockNextBlock';

Fred

On Thu, Jun 13, 2013, at 17:05, keithaniz wrote:
> 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
> _______________________________________________
> Hsqldb-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|

Re: Java language procedure error:

Fred Toussi-2
Check your class is on the classpath. If you are running a server, it must be on the classpath of the server.
 
Fred
 
On Thu, Jun 13, 2013, at 17:51, Deep Risal wrote:
Hello Fred,
ya i've tried that using 'CLASSPATH:com.bloodhound.sequence.embeded.test.StoredProc.mockNextBlock';but it arises the same error!


On Thu, Jun 13, 2013 at 10:17 PM, Fred Toussi <[hidden email]> wrote:
The EXTRNAL NAME string needs to begin with CLASSPATH:

EXTERNAL NAME
'CLASSPATH:com.bloodhound.sequence.embeded.test.StoredProc.mockNextBlock';

Fred

On Thu, Jun 13, 2013, at 17:05, keithaniz wrote:
> 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
> _______________________________________________
> Hsqldb-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
 
Build for Windows Store.
 
_______________________________________________
Hsqldb-user mailing list
 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user