Comments (4)
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 no need for the
pljava.classpath
setting inpostgresql.conf
. PL/Java has not even had a variable by that name since a rather old version, so that line has no effect. - the extension does not create a language named
pljava
. It creates two languages by default, one namedjava
and one namedjavaU
. So try simplyLANGUAGE java
instead ofLANGUAGE pljava
. - it is not possible to simply put Java source, like
return "Hello from Java!";
, into theAS
string. TheAS
string must refer to apublic static
method in a Java class that you have already compiled, and loaded into PostgreSQL in a jar file. - The best way to write the
CREATE FUNCTION
declaration properly is to let the Java compiler do it, using annotations you place on the method in the Java source.
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.
from pljava.
@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?
from pljava.
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.
from pljava.
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!
from pljava.
Related Issues (20)
- Fails on s390x HOT 1
- Class Loading issue HOT 31
- Question: How to install Pl/Java into AWS RDS Postgres HOT 2
- Compilen error occuring while running mvn clean install HOT 2
- dependency not adding..issue in plugin HOT 1
- fatal error: postgres.h: No such file or directory HOT 2
- XML parsing errors reported as `XX000` when DOM API is used HOT 1
- Documentation comments for sandboxed and unsandboxed grants in pljava.policy inverted HOT 6
- Publish PlJava to a public Maven Repository HOT 2
- Unhelpful output when build fails because no platform rules matched HOT 10
- undefined symbol: GetMemoryChunkContext HOT 2
- pljava.ddr This script file related issues HOT 13
- Execute Java Code at PostgreSQL startup to "Get Things Ready" HOT 1
- I meet a compile error while compiling PL/Java using maven HOT 6
- How to implement a special top-N group function? HOT 1
- How to set classpath including multiple jars? HOT 2
- Reminder - there are official-ish releases for Debian + TestContainer notes
- Getting Build Failure issue after 'mvn clean install'. HOT 6
- pljava-so: TypeError: null is not an Object in <eval> HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pljava.