tada / pljava

PL/Java is a free add-on module that brings Java™ Stored Procedures, Triggers, Functions, Aggregates, Operators, Types, etc., to the PostgreSQL™ backend.
http://tada.github.io/pljava/
Other
238 stars 77 forks source link

Always prompts that the language pljava does not exist #470

Closed Houtx closed 8 months ago

Houtx commented 9 months ago

postgresql 15、java 11、pljava1.6.6

image

image

image

image

Always prompts that the language pljava does not exist! image image

jcflack commented 9 months ago

Hello,

I cannot read the localized messages, but from the SQLSTATE 42710 in the last screenshot, I infer it is saying the extension has already been created. Just a few comments:

There is a step-by-step "Hello, world"-style example here:

https://tada.github.io/pljava/use/hello.html

I am sorry that it is only available in English.

Houtx commented 9 months ago

@jcflack I found that the previous installation method was wrong, and I have successfully reinstalled pljava1.6.6 into postgresql15. Then I want to package a jar according to the sample program, but pljava-api cannot be found in maven. What is the reason or from which repository can I download dependency?

image

jcflack commented 9 months ago

Building and uploading the api jar to an online repo has been on the wish list for a long time, but still needs attention. One complication is coordinating the use of the org.postgresql space, which the PL/Java project doesn't control.

But if you have installed PL/Java 1.6.6 on your PostgreSQL server, you already have the pljava-api-1.6.6.jar on your server, in $(pg_config --sharedir)/pljava and you can copy it from there, adding to your local Maven repository if that is what's most convenient.

Or, of course, if you build PL/Java from source using Maven, the API jar ends up in your local repository as a matter of course.

Houtx commented 8 months ago

Building and uploading the api jar to an online repo has been on the wish list for a long time, but still needs attention. One complication is coordinating the use of the org.postgresql space, which the PL/Java project doesn't control.

But if you have installed PL/Java 1.6.6 on your PostgreSQL server, you already have the pljava-api-1.6.6.jar on your server, in $(pg_config --sharedir)/pljava and you can copy it from there, adding to your local Maven repository if that is what's most convenient.

Or, of course, if you build PL/Java from source using Maven, the API jar ends up in your local repository as a matter of course.

Thanks, following this program will solve it!