Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

PLJava PostgreSQL could not load library, function not exist

SA-15889

Summary



You cannot install PLJava successfully for the application of UDFs.
Setting up a PostgreSQL database and running the PLJava installation file fails with error messages.


Error Messages



CREATE FUNCTION sqlj.java_call_handler()
RETURNS language_handler AS 'pljava'
LANGUAGE C
ERROR: could not load library "C:/Program Files/PostgreSQL/9.3/lib/pljava.dll": The specified procedure could not be found.
[WARNING ] CREATE TRUSTED LANGUAGE java HANDLER sqlj.java_call_handler
ERROR: function sqlj.java_call_handler() does not exist
[WARNING ] CREATE FUNCTION sqlj.javau_call_handler()
RETURNS language_handler AS 'pljava'
LANGUAGE C
ERROR: could not load library "C:/Program Files/PostgreSQL/9.3/lib/pljava.dll": The specified procedure could not be found.
[WARNING ] CREATE LANGUAGE javaU HANDLER sqlj.javau_call_handler
ERROR: function sqlj.javau_call_handler() does not exist


Steps to Reproduce

  1. Add the pljava.jar and pljava.dll to the postgreSQL\lib.
  2. Change the postgreSQL.conf and pg_hba.conf as described in the deployment guide.
  3. Run the install file from \\PRPCMedia\\ResourceKit\PLJava\9.3\Windows.


Root Cause



A software use or operation error

Resolution



Perform the following steps:

Step 1: Install Postgresql 9.3 'postgresql-9.3.5-1-windows-x64.exe' in a location except in 'C:\Program files'

Step 2: Download Postgresql 9.3 driver .jar file as 'postgresql-9.3-1103.jdbc4' 

Step 3: Deploy pljava as follows

        -Make sure your PATH variable contains a path entry for the jvm.dll file, add  %JAVA_HOME%/bin/Server to your PATH variable
        -Copy the pljava.dll and pljava.jar files from the windows directory in the ResourceKit folder to the <Postgres Home>\lib directory
        -Update the postgres.conf file located in <Postgres Home>\data directory with the settings below where <Postgres Home> 
        is the path to the Postgres lib directory however make sure each directory is marked with a \\ (yes that is the correct format)
        work_mem = 5MB
        pljava.classpath='C:\\PostgreSQL\\9.3\\lib\\pljava.jar'
       
       -Open command prompt and run following command to deploy pljava
       
       java -classpath "<Postgres JDBC.jar path>;<pljava/deploy.jar path>" org.postgresql.pljava.deploy.Deployer -install -database <dbname> -user <user name> -pass <user password>
       
-Stop and restart the Postgres service from the windows services control panel

Step 4: Check for sqlj schema that should be created in your database.

Step 5: Run PRPC_Setup.jar file.

 

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us