Question

1
Replies
1801
Views
TERIR Member since 2008 11 posts
PEGA
Posted: 3 years ago
Last activity: 3 years 4 months ago
Closed

PostgreSQL 9.5 and PLJAVA configuration issue on Windows

Hi,

I have tried to install PostgreSQL 9.5 / Pega 7.22 / Tomcat 8 on a Windows box. I kept on running into the same error when running PRPC_Setup.jar

java] 2017-06-16 10:16:48,660 ( PostgresUDFJarLoader) INFO - Jar is not already loaded in schema prpc722
[java] 2017-06-16 10:16:48,708 ( PostgresUDFJarLoader) WARNING - Encountered a database problem when attempting to load jar onto PostgreSQL: ERROR: cannot use PL/Java before successfully completing its setup
[java] Hint: Check the log for messages closely preceding this one, detailing what step of setup failed and what will be needed, probably setting one of the "pljava." configuration variables, to complete the setup. If there is not enough help in the log, try again with different settings for "log_min_messages" or "log_error_verbosity".
[java] 2017-06-16 10:16:48,711 ( PostgresUDFJarLoader) WARNING -
[java] *****************************************************************************************************
[java]
[java] Encountered database error attempting to load UDF library onto PostgreSQL, clean schema before running again.
[java]
[java] *****************************************************************************************************
[java] Exception in thread "main" org.postgresql.util.PSQLException: ERROR: cannot use PL/Java before successfully completing its setup
[java] Hint: Check the log for messages closely preceding this one, detailing what step of setup failed and what will be needed, probably setting one of the "pljava." configuration variables, to complete the setup. If there is not enough help in the log, try again with different settings for "log_min_messages" or "log_error_verbosity".

In PostgreSQL the SQLJ schema is present with all the tables and functions created.

I have added the next lines to the start of my PATH system variable:

C:\Program Files\PostgreSQL\9.5\share\pljava;C:\Program Files\Java\jre7\bin;C:\Program Files\Java\jre7\bin\server;

I have added the pljava.dll and pljava.jar to both the .\PostgreSQL\9.5\lib and .\PostgreSQL\9.5\share\pljava directories.

I have made the next changes to postgresql.conf

work_mem = 5MB
pljava.classpath = 'C:\\Program Files\\PostgreSQL\\9.5\\lib\\pljava.jar'
dynamic_library_path = 'C:\\Program Files\\PostgreSQL\\9.5\\lib'
pljava.vmoptions = '-Xms32M -Xmx64M -XX:ParallelGCThreads=2'
pljava.libjvm_location = 'C:\\Program Files\\Java\\jre7\\bin\\server\\jvm.dll'

The devil is in the details as the Installation Guide holds a nasty typo.

Please notice the XX:ParallelGCThreads. It does require the 's' at the end.

Also, this correction in Page 40 of the installation guide:

Java 8
JAVA_OPTS="-Xms4096m –Xmx8192m –XX:MaxMetaSpaceSize=1024m"
Unfortunately MaxMetaSpaceSize is spelled wrong. It should be MaxMetaspaceSize (not the capital S of metaspace should be lower case).

***Updated by moderator: Lochan to mark post as discussion; add FAQ group tag***

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Low-Code App Development Installation and Deployment
Moderation Team has archived post
Share this page LinkedIn