Subject: [Pljava-dev] RE: PLJava (64-bit) Build Error: JNI_CreateJavaVM‏

From: sotelojavier at hotmail.com (Javier Sotelo)
Date: Mon, 2 Jun 2008 21:07:01 -0700

The LD_LIBRARY_PATH environment setting is being set with the .bashrc 
file which is the start up script that SuSe uses, this should be  the script
 you were referring to. The export snapshot I sent in the DETAILS section 
lists some of  the environmental variables set at start up by default. The 
path to the libjvm.so is correct: 
 
postgres at lb-bft23:/usr/java/jdk1.5.0_15/jre/lib/amd64/server> ls
libjsig.so  libjvm.so  Xusage.txt
 
One thing I did notice was the SuSe used the java binary under 
/usr/java/jdk1.5.0_15/bin so I issued the following command:
 
postgres at lb-bft23:/usr/share/pljava> /usr/java/default/jre/bin/java -server
-cp deploy.jar:postgresql-8.1-412.jdbc3.jar 
org.postgresql.pljava.deploy.Deployer -install -user postgres 
-database pljava
org.postgresql.util.PSQLException: ERROR: could not load library '/usr/sh
are/pljava/pljava.so': /usr/share/pljava/pljava.so: undefined symbol: 
JNI_CreateJavaVM
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse
(QueryExecutorImpl.java:1575)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(Query
ExecutorImpl.java:1324)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecut
orImpl.java:190)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(Abstract
Jdbc2Statement.java:452)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags
(AbstractJdbc2Statement.java:340)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(Abstract
Jdbc2Statement.java:332)
        at org.postgresql.pljava.deploy.Deployer.initJavaHandlers(Deploye
r.java:474)
        at org.postgresql.pljava.deploy.Deployer.main(Deployer.java:269)
 
As you can see it's the same result. Is there any way that the 
environmental variable is not checked? Can it be using a different libjvm.so?
 
Much Appreciated,
Javier Sotelo 
----------------------------------------
> Date: Sat, 31 May 2008 09:27:05 -0400
> From: books at ejurka.com
> To: sotelojavier at hotmail.com
> CC: pljava-dev at pgfoundry.org
> Subject: Re: [Pljava-dev] PLJava (64-bit) Build Error: JNI_CreateJavaVM
> 
> 
> 
> On Tue, 13 May 2008, Javier Sotelo wrote:
> 
>> The current 64-bit pljava binary for Linux depends on assert code that 
>> is not included, therefore it is unusable. After successfully building 
>> pljava with no errors, I tried to install again. This time the library 
>> could not load due to an undefined symbol, JNI_CreateJavaVM (actually 
>> there's more, see details).
> 
> This error suggests that you don't have libjvm.so available to the server 
> process.  You seem to be setting LD_LIBRARY_PATH appropriately, but it's 
> not clear when/where you are settting this.  You need to start your server 
> with this environment, not the deployer.  Note that setting it in your 
> environment and then running an init script is unlikely to work.  I'm not 
> familiar with Suse start scripts, but usually the easiest thing to do is 
> to just modify the start script itself to set this environment variable.
> 
> Kris Jurka
> 
 
_________________________________________________________________
Change the world with e-mail. Join the i?m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ChangeWorld
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20080602/1d1ffea0/attachment.html>

---

From: sotelojavier at hotmail.com (Javier Sotelo)
Date: Tue, 3 Jun 2008 09:57:27 -0700

I forgot to mention that default points to jdk1.5.0_15. The last two question were referring to my PATH variable, does that get checked before the LD_LIBRARY_PATH setting?  Or can anything else cause this setting to be skipped?
From: sotelojavier at hotmail.com
To: pljava-dev at pgfoundry.org
Date: Mon, 2 Jun 2008 21:07:01 -0700
Subject: [Pljava-dev]  RE:  PLJava (64-bit) Build Error: JNI_CreateJavaVM?

 
 
org.postgresql.util.PSQLException: ERROR: could not load library 
 '/usr/sh
 
As you can see it's the same result. Is there any way that the 
environmental vari
 able is not checked? Can it be using a different libjvm.so?
 
Much Appreciated,
Javier Sotelo 

_________________________________________________________________
Enjoy 5 GB of free, password-protected online storage.
http://www.windowslive.com/skydrive/overview.html?ocid=TXT_TAGLM_WL_Refresh_skydrive_062008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20080603/0e455068/attachment.html>

---

From: books at ejurka.com (Kris Jurka)
Date: Wed, 4 Jun 2008 11:20:17 -0400 (EDT)

On Mon, 2 Jun 2008, Javier Sotelo wrote:

> you were referring to.

I was actually referring to something like /etc/init.d/postgresql, but now 
that I see you're installed into /usr/local/pgsql that may not be the 
case.  How are you starting postgres?  an init.d script, pg_ctl, running 
postmaster directly, ...?

Kris Jurka

---

From: sotelojavier at hotmail.com (Javier Sotelo)
Date: Wed, 4 Jun 2008 19:18:04 -0700

postmaster is started in init.d but I've tried running the postmaster directly 
then running the deployer, I've included the output when postmaster
starts and when i try to run the deployer, see output.

Let me know if you need any more info. I would love for this to 
work cause my alternative solution is not as pretty... :(

Again Thanks for the Time,
Javier

************Postmaster Startup Output:****************

postgres at lb-bft23:~> DEBUG:  postmaster: PostmasterMain: initial 
environ dump:
DEBUG:  -----------------------------------------
DEBUG:          LESSKEY=/etc/lesskey.bin
DEBUG:          NNTPSERVER=news
DEBUG:          INFODIR=/usr/local/info:/usr/share/info:/usr/info
DEBUG:          MANPATH=/usr/local/man:/usr/share/man:/usr/X11R6
/man:/opt/gnome/
share/man
DEBUG:          KDE_MULTIHEAD=false
DEBUG:          SSH_AGENT_PID=5328
DEBUG:          HOSTNAME=lb-bft23
DEBUG:          GNOME2_PATH=/usr/local:/opt/gnome:/usr
DEBUG:          XKEYSYMDB=/usr/share/X11/XKeysymDB
DEBUG:          HOST=LB-BFT23
DEBUG:          SHELL=/bin/bash
DEBUG:          TERM=xterm
DEBUG:          PROFILEREAD=true
DEBUG:          HISTSIZE=1000
DEBUG:          GTK2_RC_FILES=/etc/opt/gnome/gtk-2.0/gtkrc:/opt/g
nome/share/them
es//QtCurve/gtk-2.0/gtkrc:/home/arclight/.gtkrc-2.0-qtengine:/home
/arclight/.gtk
rc-2.0:/home/arclight/.kde/share/config/gtkrc-2.0
DEBUG:          GTK_RC_FILES=/etc/opt/gnome/gtk/gtkrc:/home/arc
light/.gtkrc:/hom
e/arclight/.kde/share/config/gtkrc
DEBUG:          GS_LIB=/home/arclight/.fonts
DEBUG:          WINDOWID=106954760
DEBUG:          MORE=-sl
DEBUG:          QTDIR=/usr/lib/qt3
DEBUG:          XSESSION_IS_UP=yes
DEBUG:          KDE_FULL_SESSION=true
DEBUG:          GROFF_NO_SGR=yes
DEBUG:          USER=postgres
DEBUG:          JRE_HOME=/usr/java/jdk1.5.0_15/jre
DEBUG:          LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:
pi=40;33:so=01;35:do=01;
35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;
32:*.exe=01;32:*.com=01
;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;
31:*.tgz=00;31:*.rp
m=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;
31:*.zip=00;31:*.zoo=00;31:
*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;
31:*.tz2=00;31:*.tbz2=00;31:
*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;
35:*.jpeg=01;35:*.mng=0
1;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;
35:*.pgm=01;35:*.png=01;35:*.p
pm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;
35:*.dl=01;35:*.gl=01;35:*
.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;
32:*.ogg=00;32:*.voc=00;
32:*.wav=00;32:
DEBUG:          DESKTOP_LAUNCH=kde-open
DEBUG:          LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/
java/jdk1.5.0_15/jre/l
ib/amd64:/usr/java/jdk1.5.0_15/jre/lib/amd64/server:/usr/jav
a/jdk1.5.0_15/jre/li
b/amd64/native_threads
DEBUG:          XNLSPATH=/usr/share/X11/nls
DEBUG:          ENV=/etc/bash.bashrc
DEBUG:          SSH_AUTH_SOCK=/tmp/ssh-oNvid5282/ag
ent.5282
DEBUG:          HOSTTYPE=x86_64
DEBUG:          SESSION_MANAGER=local/lb-bft23:/tmp/.IC
E-unix/5382
DEBUG:          FROM_HEADER=
DEBUG:          USERNAME=arclight
DEBUG:          PAGER=less
DEBUG:          CSHEDIT=emacs
DEBUG:          PGSQLDIR=/usr/local/pgsql
DEBUG:          XDG_CONFIG_DIRS=/usr/local/etc/xdg/:/etc/
xdg/:/etc/opt/gnome/xdg
/
DEBUG:          KONSOLE_DCOP=DCOPRef(konsole-5457,k
onsole)
DEBUG:          MINICOM=-c on
DEBUG:          MAIL=/var/spool/mail/arclight
DEBUG:          PATH=/opt/kde3/bin:/home/arclight/bin:/usr/lo
cal/bin:/usr/bin:/u
sr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/usr/lib/mit/bin
:/usr/lib/mit/sbin:/
usr/lib/qt3/bin:/usr/local/pgsql/bin:/usr/java/jdk1.5.0_15/bin
DEBUG:          DESKTOP_SESSION=kde
DEBUG:          CPU=x86_64
DEBUG:          _=/usr/local/pgsql/bin/postmaster
DEBUG:          GDM_XSERVER_LOCATION=local
DEBUG:          KONSOLE_DCOP_SESSION=DCOPRef(kons
ole-5457,session-1)
DEBUG:          INPUTRC=/home/arclight/.inputrc
DEBUG:          PWD=/home/postgres
DEBUG:          XMODIFIERS=@im=local
DEBUG:          JAVA_HOME=/usr/java/jdk1.5.0_15
DEBUG:          LANG=en_US.UTF-8
DEBUG:          KDE_SESSION_UID=1000
DEBUG:          PYTHONSTARTUP=/etc/pythonstart
DEBUG:          GDMSESSION=kde
DEBUG:          SSH_ASKPASS=/usr/lib64/ssh/x11-ssh
-askpass
DEBUG:          TEXINPUTS=::/home/arclight/.TeX:/usr/share
/doc/.TeX:/usr/doc/.Te
X:/home/arclight/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX
DEBUG:          QT_SYSTEM_DIR=/usr/share/desktop-data
DEBUG:          SHLVL=4
DEBUG:          HOME=/home/postgres
DEBUG:          LESS_ADVANCED_PREPROCESSOR=no
DEBUG:          OSTYPE=linux
DEBUG:          LS_OPTIONS=-N --color=tty -T 0
DEBUG:          XCURSOR_THEME=crystalwhite
DEBUG:          WINDOWMANAGER=/usr/bin/dbus-launch --
sh-syntax --exit-with-sessi                         on /opt/kde3/bin/
startkde
DEBUG:          GTK_PATH=/usr/local/lib/gtk-2.0:/opt/gnome/li
b/gtk-2.0:/usr/lib/                         gtk-2.0
DEBUG:          G_FILENAME_ENCODING=@locale,UTF-8,ISO
-8859-15,CP1252
DEBUG:          LESS=-M -I
DEBUG:          MACHTYPE=x86_64-suse-linux
DEBUG:          LOGNAME=postgres
DEBUG:          GTK_PATH64=/usr/local/lib64/gtk-2.0:/opt/gn
ome/lib64/gtk-2.0:/us                         r/lib64/gtk-2.0
DEBUG:          CVS_RSH=ssh
DEBUG:          XDG_DATA_DIRS=/usr/local/share/:/usr/share
/:/etc/opt/kde3/share/                         :/opt/kde3/share/:/opt/gn
ome/share/
DEBUG:          ACLOCAL_FLAGS=-I /opt/gnome/share/aclocal
DEBUG:          DBUS_SESSION_BUS_ADDRESS=unix:abstract
=/tmp/dbus-D9rvYZnmNH,guid                         =4546474863cb
0466ebc8580079002800
DEBUG:          PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/us
r/local/share/pkgcon                         fig:/usr/lib64/pkgconfig:/us
r/share/pkgconfig:/opt/kde3/lib64/pkgconfig:/opt/gno                 
        me/lib64/pkgconfig:/opt/gnome/lib64/pkgconfig:/opt/gnome/
share/pkgconfig
DEBUG:          LESSOPEN=lessopen.sh %s
DEBUG:          USE_FAM=
DEBUG:          INFOPATH=/usr/local/info:/usr/share/info:/usr/inf
o:/opt/gnome/sh                         are/info
DEBUG:          DISPLAY=:0
DEBUG:          XAUTHLOCALHOSTNAME=lb-bft23
DEBUG:          LESSCLOSE=lessclose.sh %s %s
DEBUG:          G_BROKEN_FILENAMES=1
DEBUG:          COLORTERM=
DEBUG:          XAUTHORITY=/home/postgres/.xauthBwUkab
DEBUG:          mc=() {  . /usr/share/mc/bin/mc-wrapper.sh
        }
DEBUG:          PGSYSCONFDIR=/usr/local/pgsql/etc
DEBUG:          LC_COLLATE=en_US.UTF-8
DEBUG:          LC_CTYPE=en_US.UTF-8
DEBUG:          LC_MESSAGES=en_US.UTF-8
DEBUG:          LC_MONETARY=C
DEBUG:          LC_NUMERIC=C
DEBUG:          LC_TIME=C
DEBUG:  -----------------------------------------
LOG:  could not create IPv6 socket: Address family not 
supported by protocol
DEBUG:  invoking IpcMemoryCreate(size=11083776)
DEBUG:  max_safe_fds = 985, usable_fds = 1000, alre
ady_open = 5
LOG:  database system was shut down at 2008-06-04 
18:53:18 PDT
LOG:  checkpoint record is at 0/515F68
LOG:  redo record is at 0/515F68; undo record is at 0/0; 
shutdown TRUE
LOG:  next transaction ID: 726; next OID: 16520
LOG:  next MultiXactId: 1; next MultiXactOffset: 0
LOG:  database system is ready
LOG:  transaction ID wrap limit is 2147484146, limited by
 database "postgres"
DEBUG:  proc_exit(0)
DEBUG:  shmem_exit(0)
DEBUG:  exit(0)

*****************Deployer & Postmaster Output:********************
postgres at lb-bft23:/usr/share/pljava> /usr/java/default/jre/bin
/java -server 
-cp deploy.jar:postgresql-8.1-412.jdbc3.jar org.postgresql.plj
ava.deploy
.Deployer -install -user postgres -database pljava
DEBUG:  forked new backend, pid=6111 socket=6
DEBUG:  postmaster child[6111]: starting with (
DEBUG:          postgres
DEBUG:          -v196608
DEBUG:          -p
DEBUG:          pljava
DEBUG:  )
DEBUG:  InitPostgres
DEBUG:  StartTransaction
DEBUG:  name: unnamed; blockState:       
DEFAULT; state: INPROGR, 
xid/subid/cid: 726/1/0, nestlvl: 1, children: <>
DEBUG:  CommitTransaction
DEBUG:  name: unnamed; blockState:       
STARTED; state: INPROGR, 
xid/subid/cid: 726/1/0, nestlvl: 1, children: <>
DEBUG:  StartTransactionCommand
DEBUG:  StartTransaction
DEBUG:  name: unnamed; blockState:       
DEFAULT; state: INPROGR, 
xid/subid/cid: 727/1/0, nestlvl: 1, children: <>
DEBUG:  ProcessUtility
DEBUG:  CommitTransactionCommand
DEBUG:  CommitTransaction
DEBUG:  name: unnamed; blockState:       
STARTED; state: INPROGR, 
xid/subid/cid: 727/1/2, nestlvl: 1, children: <>
DEBUG:  StartTransactionCommand
DEBUG:  StartTransaction
DEBUG:  name: unnamed; blockState:       
DEFAULT; state: INPROGR, 
xid/subid/cid: 728/1/0, nestlvl: 1, children: <>
DEBUG:  ProcessUtility
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  ProcessUtility
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  ProcessUtility
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  ProcessUtility
DEBUG:  find_in_dynamic_libpath: trying "/usr/local/pgsql/lib/pljava"
DEBUG:  find_in_dynamic_libpath: trying "/usr/share/pljava/pljava"
DEBUG:  find_in_dynamic_libpath: trying "/usr/local/pgsql/lib/pljava.so"
DEBUG:  find_in_dynamic_libpath: trying "/usr/share/pljava/pljava.so"
ERROR:  could not load library "/usr/share/pljava/pljava.so": 
/usr/share/pljava/pljava.so: undefined symbol: JNI_CreateJavaVM
org.postgresql.util.PSQLException: ERROR: could not load library 
"/usr/share/pljava/pljava.so": /usr/share/pljava/pljava.so: 
undefined symbol: JNI_CreateJavaVM
        at org.postgresql.core.v3.QueryExecutorImpl.receiveError
Response(QueryExecutorImpl.java:1575)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults
(QueryExecutorImpl.java:1324)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(Query
ExecutorImpl.java:190)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(Ab
stractJdbc2Statement.java:452)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWit
hFlags(AbstractJdbc2Statement.java:340)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(A
bstractJdbc2Statement.java:332)
        at org.postgresql.pljava.deploy.Deployer.initJavaHandlers(D
eployer.java:474)
        at org.postgresql.pljava.deploy.Deployer.main(Deployer.jav
a:269)
LOG:  unexpected EOF on client connection
DEBUG:  proc_exit(0)
DEBUG:  shmem_exit(0)
DEBUG:  exit(0)
DEBUG:  server process (PID 6111) exited with exit code 0
postgres at lb-bft23:/usr/share/pljava>   

> Date: Wed, 4 Jun 2008 11:20:17 -0400
> Subject: Re: [Pljava-dev]  RE:  PLJava (64-bit) Build Error: JNI_CreateJavaVM?
> 
> 
> 

_________________________________________________________________
Now you can invite friends from Facebook and other groups to join you on Windows Live? Messenger. Add now.
https://www.invite2messenger.net/im/?source=TXT_EML_WLH_AddNow_Now