errors trying to create an alias

38 views
Skip to first unread message

Vito De Tullio

unread,
Sep 18, 2020, 8:53:35 AM9/18/20
to H2 Database

Hi.
I'm trying to "convert" a stored procedure in h2.

For example, if I run

CREATE ALIAS NEXT_PRIME AS $$
String nextPrime(String value) {
    return new BigInteger(value).nextProbablePrime().toString();
}
$$;


in dbeaver (using jdbc:h2:~/test;MODE=Oracle as connection url), I have this error:

SQL Error [50000] [HY000]: General error: "java.lang.NoClassDefFoundError: javax/tools/JavaFileManager"; SQL statement:
CREATE ALIAS NEXT_PRIME AS $$
String nextPrime(String value) {
    return new BigInteger(value).nextProbablePrime().toString();
}
$$

 [50000-200]

Could you help me understanding what is the problem?

Thanks

Evgenij Ryazanov

unread,
Sep 18, 2020, 10:38:29 AM9/18/20
to H2 Database
Hello.

It looks like you run H2 in JRE instead of JDK and you don't have a javac from JDK in the path. JRE doesn't have a Java compiler.
Reply all
Reply to author
Forward
0 new messages