cancel
Showing results for 
Search instead for 
Did you mean: 

java -version error when trying to do an upgrade

Former Member
0 Kudos

Hi gurus

i am having this problem with my java on SUSE 9.1

  1. java -version

Error occurred during initialization of VM

Unable to load native library: /usr/lib/SunJava2-1.3.1/jre/lib/i386/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

  1. which java

/usr/lib/java/jre/bin/java

my java installation is in /usr/java/j2sdk1.4.2_09 and i have defined this in .bashrc for my sidadm as i need to do an upgrade

JAVA_HOME=/usr/java/j2sdk1.4.2_09/bin/java

export PATH=/usr/java/j2sdk1.4.2_09/bin:$PATH

export CLASSPATH=/usr/java/j2sdk1.4.2_09/lib

Any ideas will be welcome

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you still seem to have at least two JDKs/JREs installed:

- one in /usr/lib/SunJava2-1.3.1 (1.3.1)

- and one in /usr/java/j2sdk1.4.2_09.

Check what is installed:

rpm -qa | grep -i java

rpm -qa | grep -i jdk

rpm -qf /usr/lib/java/jre/bin/java

rpm -qf /usr/lib/SunJava2-1.3.1/jre/lib/i386/libjava.so

and post the results here.

How did you install the new JDK?

Oliver

Former Member
0 Kudos

hi

:~ # rpm -qa |grep i java

grep: java: No such file or directory

~ # rpm -qa | grep i jdk

grep: jdk: No such file or directory

~ # rpm -qa |grep i java

grep: java: No such file or directory

:~ # rpm -qf /usr/lib/java/jre/bin/java

file /usr/lib/java/jre/bin/java is not owned by any package

:~ # rpm -qf /usr/lib/SunJava2-1.3.1/jre/lib/i386/lib/libjava.so

error: file /usr/lib/SunJava2-1.3.1/jre/lib/i386/lib/libjava.so: No such file or directory

i downloaded j2sdk1.4.2_09 and then uzippped it in /usr/java then edited the paths in .bashrc sidadm home directory.

Former Member
0 Kudos

Hi,

you mistyped the commands. Note that you missed the "-" in the command line:

e.g.

rpm -qa |grep i java

should be

rpm -qa |grep <b>-</b>i java

Please to the "rpm -qa ..." again and post the result.

Also, you state that you unziped the files in /usr/java, yet the binary in the path is in /usr/lib/java/jre/bin/java. This file is propably from your old 1.3.1 installation.

Please also provide the following information (as user <sid>adm):

echo $PATH

echo $0

Oliver

markus_doehr2
Active Contributor
0 Kudos

i downloaded j2sdk1.4.2_09 and then uzippped it in

/usr/java then edited the paths in .bashrc sidadm

home directory.

yes - but you´re logged on as root?

I suggest, putting it on a different path instead of the SuSE provided path, you will have trouble upgrading later SuSE packages if you overwrite the installed packages.

I do it the following way:

- cd /opt

- j2sdk....*.sh

- ln -s /opt/j2sdk1.4.2_09 java1.4

- (as root)

export JAVA_HOME=/opt/java1.4

export PATH=$JAVA_HOME/bin:$PATH

Then start installation.

The advantage of using a softlink is the fact, that you don´t need to change anything later if you upgrade your JDK, just re-point the softlink.

--

Markus

Message was edited by:

Markus Döhr

Former Member
0 Kudos

Mark

i have done that but still getting the same error.

markus_doehr2
Active Contributor
0 Kudos

Login as <sid>adm - what's the output of

[code]echo $JAVA_HOME[/code]

Is it pointing to /opt/java1.4?

--

Markus

Former Member
0 Kudos

Hi

:~ # rpm -qa |grep -i java

kdebindings3-javascript-3.2.1-28

java2-jre-1.4.2-129

java2-1.4.2-129

kdebindings3-java-3.2.1-28

:~ # rpm -qa |grep -i jdk

:~ # rpm -qf /usr/lib/java/jre/bin/java

file /usr/lib/java/jre/bin/java is not owned by any package

:~ # rpm -qf /usr/lib/SunJava2-1.3.1/jre/lib/i386/lib/libjava.so

error: file /usr/lib/SunJava2-1.3.1/jre/lib/i386/lib/libjava.so: No such file or directory

:~ # su - sidadm

Have a lot of fun...

Directory: /home/sidadm

sidadm 51> echo$PATH

echo/sapdb/programs/bin:.:/home/mt1adm:/usr/sap/BX1/SYS/exe/run:/opt/kde3/bin:/opt/gnome/bin:/usr/games:/home/sidadm/bin:/usr/bin/X11:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/lib/java/jre/bin: Command not found.

sidadm 52> echo $PATH

/sapdb/programs/bin:.:/home/sidadm:/usr/sap/BX1/SYS/exe/run:/opt/kde3/bin:/opt/gnome/bin:/usr/games:/home/sidadm/bin:/usr/bin/X11:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/lib/java/jre/bin

sidadm 53> echo $0

-csh

markus_doehr2
Active Contributor
0 Kudos

> :~ # rpm -qf /usr/lib/java/jre/bin/java

> file /usr/lib/java/jre/bin/java is not owned by any

> package

That's because you overwrote the original SuSE packages with the SUN ones (what I was saying before).

And how's your JAVA_HOME of <sid>adm set?

--

Markus

Former Member
0 Kudos

hi

sidadm 54> echo $JAVA_HOME

/usr/lib/java/jre

its not pointing to /opt/java

markus_doehr2
Active Contributor
0 Kudos

> sidadm 54> echo $JAVA_HOME

> /usr/lib/java/jre

>

> its not pointing to /opt/java

And this is your problem - the instance uses the wrong JDK...

You need to edit the .j2eeenv.csh of <sid>adm and put the correct path in there. Also check if the correct JAVA_HOME is set in configtool.

--

Markus

Answers (0)