views:

68

answers:

2

I have been struggling with a problem trying to get PLJava to work on PostgreSQL on RHEL.

Here is what I have (based off of this: PL/Java README)

.cshrc

setenv JAVA_HOME /opt/jdk1.6.0_17/
setenv LD_LIBRARY_PATH ${JAVA_HOME}/jre/lib/i386
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${JAVA_HOME}/jre/lib/i386/client
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${JAVA_HOME}/jre/lib/i386/native_threads
setenv PG_DATA /var/lib/pgsql/data

log output

DEBUG:  find_in_dynamic_libpath: trying "/usr/lib/pgsql/pljava"
DEBUG:  find_in_dynamic_libpath: trying "/usr/lib/pgsql/pljava.so"
ERROR:  could not load library "/usr/lib/pgsql/pljava.so": libjvm.so: failed to map segment from shared object: Permission denied

Can anyone tell me what this actually means?

libjvm.so: failed to map segment from shared object: Permission denied

I realize this is a pretty specific question, but I am really struggling with this and any ideas would be welcome.

A: 

You don't have permissions for /usr/lib/pgsql/pljava.so If this is not your production server, do a simple $ chmod 777 /usr/lib/pgsql/pljava.so. Otherwise consult a linux administrator (or google) on the matter of user permissions.

Bozho
Thanks for the help - I verified that, and my pljava.so HAS full permissions (and I did the chmod777 just in case) and I am still getting the same error... I think its more likely a problem with the libjvm.so
Grasper
have in mind that your java (sesrver?) or your postgre can be run from different users, which don't have permissions.
Bozho
A: 

needed to turn off SELinux in RHEL

Grasper