You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Demonstration example I can't use
I tried different methods
Prompt the following error
example:ResultSetTest.java
CREATE OR REPLACE FUNCTION test_pljava(query TEXT) RETURNS TEXT AS 'com.kamin.pljava.Cases.executeSelect' LANGUAGE java
> ERROR: java.sql.SQLNonTransientException: resolving static method com.kamin.pljava.Cases.executeSelect with signature (String)String: java.lang.NoSuchMethodException: no such method: com.kamin.pljava.Cases.executeSelect(String)String/invokeStatic
CREATE OR REPLACE FUNCTION test_pljava(query TEXT) RETURNS SETOF mv_case_template AS 'com.kamin.pljava.Cases.executeSelect' LANGUAGE java
> ERROR: java.sql.SQLNonTransientException: resolving static method com.kamin.pljava.Cases.executeSelect with signature (String)ResultSetProvider: java.lang.NoSuchMethodException: no such method: com.kamin.pljava.Cases.executeSelect(String)ResultSetProvider/invokeStatic
SELECT schemaname, jarname
FROMsqlj.classpath_entryNATURAL JOINsqlj.jar_repositoryORDER BY schemaname, ordinal;
SHOW pljava.classpath;
SHOW search_path;
Very often, an issue like what you are reporting will have an explanation among those settings.
SELECT schemaname, jarname
FROMsqlj.classpath_entryNATURAL JOINsqlj.jar_repositoryORDER BY schemaname, ordinal;
SHOW pljava.classpath;
SHOW search_path;
SELECT schemaname, jarname
FROM sqlj.classpath_entry NATURAL JOIN sqlj.jar_repository
ORDER BY schemaname, ordinal;
return:
Oops, sorry, I copied the show pljava.classpath from an older issue, before the variable name changed. It would be show pljava.module_path in recent versions.
Oops, sorry, I copied the show pljava.classpath from an older issue, before the variable name changed. It would be show pljava.module_path in recent versions.
\c
SET client_min_messages TO debug1;
CREATE OR REPLACEFUNCTIONtest_pljava(query TEXT) RETURNS TEXTAS'com.kamin.pljava.Cases.executeSelect' LANGUAGE java;
Sometimes during create-time validation, another exception further down the stacktrace may end up looking like the method wasn't found.
If you don't see more useful output at the client, also take a look in the server log afterward.
Activity
jcflack commentedon Mar 11, 2023
Hi,
Can you include the output of the following?
Very often, an issue like what you are reporting will have an explanation among those settings.
exqmjmz commentedon Mar 11, 2023
SELECT schemaname, jarname
FROM sqlj.classpath_entry NATURAL JOIN sqlj.jar_repository
ORDER BY schemaname, ordinal;
return:
schemaname jarname
public pgjar
SHOW pljava.classpath;
return:
ERROR: unrecognized configuration parameter "pljava.classpath"
SHOW search_path;
return:
search_path
public, "$user", public
jcflack commentedon Mar 11, 2023
Oops, sorry, I copied the
show pljava.classpathfrom an older issue, before the variable name changed. It would beshow pljava.module_pathin recent versions.But even that might be less important here than
exqmjmz commentedon Mar 11, 2023
It's all right, glad you helped!
return:
get_classpath
pgjar
jcflack commentedon Mar 11, 2023
This may show more:
Sometimes during create-time validation, another exception further down the stacktrace may end up looking like the method wasn't found.
If you don't see more useful output at the client, also take a look in the server log afterward.
jcflack commentedon Jun 7, 2023
Was there any resolution?
jcflack commentedon Apr 5, 2024
Closed waiting on reporter