cancel
Showing results for 
Search instead for 
Did you mean: 

Linking java to SIDADM for an upgrade (PREPARE)

Former Member
0 Kudos

hi

i am facing a problem that someone here might assit me with.I have installed java runtime in preparation for a sap upgrade.i can test and confirm java is available as root but not as SIDADM.is there a file i need to specify the path to Java for SIDADM.i edited .bashrc but no joy as yet.

i get this error :mxt1:mxt1adm 51> java -version

Error: could not find libjava.so

Error: could not find Java 2 Runtime Environment.

mxt1:~ # java -version

java version "1.4.2_14"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_14-b05)

Java HotSpot(TM) Client VM (build 1.4.2_14-b05, mixed mode)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

thanks for ur assistance.

i have aedited the .cshrc file and still java cant link to SIDADM.

from the ouput of #which java it showed that the 2 shells (.bashrc and .cshrc)are point to different directory for java.

i have put this path in .cshrc for SIDADM :::

setenv JAVA_HOME /usr/java/2sdk1.4.2_14/bin

but it doesnt want to pick it up.

if i checked my env under SIDADM i get this

JAVA_BINDIR=/usr/lib/java/jre/bin

JAVA_ROOT=/usr/lib/java

JAVA_HOME=/usr/lib/java/jre

JRE_HOME=/usr/lib/java/jre

i need to edit and change where its looking for java then i think that will fix that problem.Where is it finding that path?

markus_doehr2
Active Contributor
0 Kudos

On SuSE the configuration is stored under /etc/java in the file "java2-jre.conf".

I'd suggest renaming that file and modify it to fit your paths - then execute SuSEconfig, logout and re-login, then your path should be correct.

--

Markus

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi all

Thanks for the tips.I manged to solve the problem.If you run the command env as both SIDADM and root ,check the PATH in the env variables and then st the path to the java home directory where you want ur sidadm to point to.

Former Member
0 Kudos

Yes after changing those files

markus_doehr2
Active Contributor
0 Kudos

This is strange...

I have done the following on one of our boxes:

I edited .sapenv_<hostname>.csh and added the following:

[code]setenv DIR_LIBRARY /usr/sap/<SID>/SYS/exe/run

setenv JAVA_HOME /opt/java1.4

foreach d ( $JAVA_HOME/bin /usr/sap/<SID>/SYS/exe/run $HOME . )

[/code]

Then I logged out and logged back in:

[code]$> which java

/opt/java1.4/bin/java

$> java -version

java version "1.4.2"

Java(TM) 2 Runtime Environment, Standard Edition (build 2.2)

IBM J9SE VM (build 2.2, J2RE 1.4.2 IBM J9 2.2 Linux amd64-64 j9xa64142-20061124 (JIT enabled)

J9VM - 20061121_1035_LHdSMr

JIT - r7_level20061020_1803)

[/code]

--

Markus

Former Member
0 Kudos

i have changed that file but still no joy.i even changed the other one java2.conf but still env hasnt changed.still pointing to /usr/lib

markus_doehr2
Active Contributor
0 Kudos

And you executed

SuSEconfig

after you changed that file - and logged out and on again?

--

Markus

Former Member
0 Kudos

mxt1:mx1adm 55> which java

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

mxt1:~ # which java

/usr/java/j2sdk1.4.2_14/bin/java

markus_doehr2
Active Contributor
0 Kudos

So you mtxadm is using the standard Java path (you´re on SuSE, right?)

If you want to start the Upgrade Assistant you can use

mx1> /usr/java/j2sdk1.4.2_14/bin/java -cp /usr/sap/put/ua/ua.jar UaServer

If you want to put the java path into your shell you need to edit

cshrc

or switch your shell to /bin/bash in /etc/passwd and then use .profile.

--

Markus

Message was edited by:

Markus Döhr

Former Member
0 Kudos

Hi,

What's the JRE version you installed? Do you know the path where it's installed?

Regards,

JC Llanes.

Former Member
0 Kudos

sorry iam trying to get you

which command should i type in

#

hannes_kuehnemund
Active Contributor
0 Kudos

The command is called 'which'

Its purpose is, to find the location of the executable that is passed to it as option. This means, executing 'which java' tells you, where the java binary is located. This information is very important, because it looks like, that either the $PATH variable, or $LD_LIBRARY_PATH variable may be broken.

markus_doehr2
Active Contributor
0 Kudos

You are using a csh (C-Shell) - the syntax is different

What do you get as mxtadm and as root when you type

which java

--

Markus

Former Member
0 Kudos

mxt1:mxt1adm 51> java -version

Error: could not find libjava.so

Error: could not find Java 2 Runtime Environment.

mxt1:~ # java -version

java version "1.4.2_14"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_14-b05)

Java HotSpot(TM) Client VM (build 1.4.2_14-b05, mixed mode)

hannes_kuehnemund
Active Contributor
0 Kudos

Dear Mudzingwa,

please post the output of 'which java' and not of 'java -version'.

Thanks