Error when running .sh file in AIX platform

Hi,

I am trying to open Oracle Warehouse Builder (10g) Design Center in AIX platform using the command ./OWBClient.sh. When I execute, I am getting the below error.

The JVM option is invalid: -XX: MaxPermSize=256M. Could not create the Java Virtual Machine.

Any resolution guidance for the above issue would be much helpful.

Thanks !!!

Can you show the code lines in ./OWBCLient.sh that have the line with -XX: MaxPermSize=256M in it? Use code tags when posting the code, thanks.
I am not sure if removing the blank between -XX: and Max... might make a difference.

According to the documentation Java HotSpot VM Options it should look like this:

-XX:MaxPermSize=....
1 Like

Thanks for your reply. Yes, you are right. There shouldn't be any space between them. Here are the code fragments of owbclient.sh file.

#!/bin/sh
eval `cat setowbenv.sh`
cd ../admin
PLATF=`/bin/uname -s`
if [ "$PLATF" != "OSF1" ] ; then
  MAXPERMSIZE="-XX:MaxPermSize=256M"
fi
$JAVAPATH/bin/java -Xms64M -Xmx768M $MAXPERMSIZE -Dlimit=768M -Dsun.java2d.font.DisableAlgorithmicStyles=true -DORACLE_HOME=$ORACLE_HOME -DOWBCC_HOME=$ORACLE_HOME -DOCM_HOME=$ORACLE_HOME -DOCM_ORACLE_HOME=$ORACLE_HOME -DORCLCWM_META_MODEL_FILE=../../bridges/admin/orcl_cwm.xml -Djava.security.policy=../../bridges/admin/policy -Doracle.cwm.tools.transfer.config=../../bridges/admin/TransferConfigUnix_en_US.properties -DTCLLIBPATH="$TCLLIBPATH" $CLASSPATH_LAUNCHER oracle.wh.ui.framework.StaticLoader $*
cd ../unix

Yikes!

This has perhaps nothing to do with your problem but this part of the script hurt my eyes so much i had to answer.

First: if you are not definitely, absolutely, genuinely 101% sure you need eval - don't use it. In your case this line (i suppose you want to set some environment) can be done this way:

. /path/to/setowbenv.sh

Do yourself a favour and ALWAYS use absolue pathes in scripts! This way you do not depend on the script being called from a certain directory. This:

cd ../admin

will probably work when you call the script your usual way (perhaps like ./script.sh from a certain directory), but will fail when you call it from somewhere else, like this:

$ cd /some/where/else
$ /absolute/path/to/script.sh

And, finally:

PLATF=`/bin/uname -s`

stay away from backticks! They are deprecated and their usage is strongly discouraged. Do it this way:

PLATF=$(/bin/uname -s)

which will do the same in a more reliable, POSIX-compatible, modern and fashionable way. And i guarantee you will be rich, famous and of everlasting health if you can convince 5 others to also stay away from the backticks. :wink:

I hope this helps.

bakunin

2 Likes

Thanks a lot for your detailed notes... Will make sure I follow the hints you shared :slight_smile:

1 Like