Architecting, installing and maintaining your SAS environment

SAS 9.4 - Proc SGPLOT: Unable to load the Java Virtual Machine

Accepted Solution Solved
Reply
Contributor
Posts: 69
Accepted Solution

SAS 9.4 - Proc SGPLOT: Unable to load the Java Virtual Machine

Hi everyone,

 

I've just finish to install SAS 9.4 on my HP-UX server without any error. When executing the folloing example of SGPLOT on SAS EG 7.1, appears this error: ERROR: Unable to load the Java Virtual Machine.

 

Any idea?

 

Example execute:

proc format;
value agefmt
20-30 = "20 (*ESC*){unicode '2264'x} 30"
31-40 = "31 (*ESC*){unicode '2264'x} 40"
41-50 = "41 (*ESC*){unicode '2264'x} 50"
51-60 = "51 (*ESC*){unicode '2264'x} 60"
61-70 = "61 (*ESC*){unicode '2264'x} 70"
;
run;

proc sgplot data=sashelp.heart noautolegend;
title1 "Cholesterol Level by Age Range";
styleattrs datacolors=(red green purple orange cyan) backcolor=vpav wallcolor=pwh;
vbox cholesterol / category=AgeAtStart group=AgeAtStart;
format AgeAtStart agefmt.;
run;


Accepted Solutions
Solution
‎08-13-2017 10:12 AM
SAS Employee
Posts: 282

Re: SAS 9.4 - Proc SGPLOT: Unable to load the Java Virtual Machine

[ Edited ]

@MariaD,

 

Please change the following line in /sas9/software/SASFoundation/9.4/bin/sasenv_local:

 

SHLIB_PATH=/oracle/app/oracle/product/11.1.0/client_1/lib:/opt/IBM/db2/V9.1/lib64:$ODBCHOME/lib:/sas9/software/SASPrivateJavaRuntimeEnvironment/9.4/jre/bin

 

to:

 

SHLIB_PATH=/oracle/app/oracle/product/11.1.0/client_1/lib:/opt/IBM/db2/V9.1/lib64:$ODBCHOME/lib:$SHLIB_PATH

Save the file and try to run proc javainfo once again.

View solution in original post


All Replies
Community Manager
Posts: 2,953

Re: SAS 9.4 - Proc SGPLOT: Unable to load the Java Virtual Machine

Try running:

 

proc javainfo; run;

Assuming that fails, you might need to configure your JRE options to point to the correct location. That's an install/admin task, so talk to your admin or reach out to SAS tech support.

Contributor
Posts: 69

Re: SAS 9.4 - Proc SGPLOT: Unable to load the Java Virtual Machine

Posted in reply to ChrisHemedinger

Thanks @ChrisHemedinger.

 

I've just run "proc options option=jreoptions; run;" (because javainfo give me the following error: ERROR: Proc javainfo did not run correctly).

 

JREOPTIONS=( -DPFS_TEMPLATE=/sas9/software/SASFoundation/9.4/misc/tkjava/qrpfstpt.xml
-Djava.class.path=/sas9/software/SASVersionedJarRepository/eclipse/plugins/sas.launcher.jar
-Djava.security.auth.login.config=/sas9/software/SASFoundation/9.4/misc/tkjava/sas.login.config
-Djava.security.policy=/sas9/software/SASFoundation/9.4/misc/tkjava/sas.policy
-Djava.system.class.loader=com.sas.app.AppClassLoader
-Dlog4j.configuration=file:/sas9/software/SASFoundation/9.4/misc/tkjava/sas.log4j.properties
-Dsas.app.class.path=/sas9/software/SASVersionedJarRepository/eclipse/plugins/tkjava.jar
-Dsas.ext.config=/sas9/software/SASFoundation/9.4/misc/tkjava/sas.java.ext.config
-Dtkj.app.launch.config=/sas9/software/SASVersionedJarRepository/picklist -Xmx256m -Xms128m )

 

I hd installed SASPrivateJavaRuntimeEnvironment. Where can I define the correct JRE location? On "sasenv_local"? 

 

Regards,

SAS Employee
Posts: 282

Re: SAS 9.4 - Proc SGPLOT: Unable to load the Java Virtual Machine

@MariaD,

 

Please run the following SAS program and show me the log:

 

options set=TKJNI_OPT_TRACE="y";
%put JAVA_HOME is: %sysget(JAVA_HOME);
%put CLASSPATH is: %sysget(CLASSPATH);
%put PATH is: %sysget(PATH);
%put SHLIB_PATH is: %sysget(SHLIB_PATH);
proc javainfo; run;
proc options option=jreoptions; run;
Contributor
Posts: 69

Re: SAS 9.4 - Proc SGPLOT: Unable to load the Java Virtual Machine

Thanks @alexal. Following the results. As mentioned previous, proc javainfo return and error:

 

25 GOPTIONS ACCESSIBLE;
26 options set=TKJNI_OPT_TRACE="y";
27 %put JAVA_HOME is: %sysget(JAVA_HOME);
JAVA_HOME is: /sas9/software/SASPrivateJavaRuntimeEnvironment/9.4/jre
28 %put CLASSPATH is: %sysget(CLASSPATH);
WARNING: The argument to macro function %SYSGET is not defined as a system variable.
CLASSPATH is:
29 %put PATH is: %sysget(PATH);
PATH is:
/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/gvsd/bin:/opt/ipf/bin:/opt/nettladm/bin:/opt/fcms/bin:
/opt/wbem/bin:/opt/wbem/sbin:/opt/sas/bin:/opt/graphics/common/bin:/opt/atok/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/sec_mgmt/bas
tille/bin:/opt/caliper/bin:/opt/drd/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/resmon/bin:/opt/firefox:/opt/gnome/bin:/opt/ignite/bin:/op
t/propplus/bin:/usr/contrib/kwdb/bin:/opt/perl_32/bin:/opt/perl_64/bin:/opt/prm/bin:/opt/sfm/bin:/opt/swm/bin:/opt/sec_mgmt/spc/bin:
/opt/ssh/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/sentinel/bin:/opt/langtools/bin:/opt/gwlm/bin:/oracle/app/oracle/prod
uct/11.1.0/client_1/bin:/opt/networker/bin:.:/home/sas/bin
30 %put SHLIB_PATH is: %sysget(SHLIB_PATH);
SHLIB_PATH is:
/oracle/app/oracle/product/11.1.0/client_1/lib:/opt/IBM/db2/V9.1/lib64:/sas9/software/AccessClients/9.4/SQLServer/lib:/sas9/software
/SASPrivateJavaRuntimeEnvironment/9.4/jre/bin
NOTE: PROCEDURE JAVAINFO used (Total process time):
real time 1.04 seconds
cpu time 0.01 seconds

ERROR: Proc javainfo did not run correctly.
31 proc javainfo; run;


32 proc options option=jreoptions; run;

SAS (r) Proprietary Software Release 9.4 TS1M4

JREOPTIONS=( -DPFS_TEMPLATE=/sas9/software/SASFoundation/9.4/misc/tkjava/qrpfstpt.xml
-Djava.class.path=/sas9/software/SASVersionedJarRepository/eclipse/plugins/sas.launcher.jar
2 The SAS System 18:01 Saturday, August 12, 2017

-Djava.security.auth.login.config=/sas9/software/SASFoundation/9.4/misc/tkjava/sas.login.config
-Djava.security.policy=/sas9/software/SASFoundation/9.4/misc/tkjava/sas.policy
-Djava.system.class.loader=com.sas.app.AppClassLoader
-Dlog4j.configuration=file:/sas9/software/SASFoundation/9.4/misc/tkjava/sas.log4j.properties
-Dsas.app.class.path=/sas9/software/SASVersionedJarRepository/eclipse/plugins/tkjava.jar
-Dsas.ext.config=/sas9/software/SASFoundation/9.4/misc/tkjava/sas.java.ext.config
-Dtkj.app.launch.config=/sas9/software/SASVersionedJarRepository/picklist -Xmx256m -Xms128m )

 

Regards,

SAS Employee
Posts: 282

Re: SAS 9.4 - Proc SGPLOT: Unable to load the Java Virtual Machine

@MariaD,

 

Thanks for your response. Please show me the contents of the following file:

 

/sas9/software/SASFoundation/9.4/bin/sasenv_local

Contributor
Posts: 69

Re: SAS 9.4 - Proc SGPLOT: Unable to load the Java Virtual Machine

Thanks @alexal. Follows the contents requested: 

 

ORACLE_HOME=/oracle/app/oracle/product/11.1.0/client_1
export ORACLE_HOME

 

ODBCHOME=/sas9/software/AccessClients/9.4/SQLServer
export ODBCHOME

 

ODBCINI=$ODBCHOME/odbc.ini
export ODBCINI

 

SHLIB_PATH=/oracle/app/oracle/product/11.1.0/client_1/lib:/opt/IBM/db2/V9.1/lib64:$ODBCHOME/lib:/sas9/software/SASPrivateJavaRuntimeEnvironment/9.4/jre/bin
export SHLIB_PATH

 

NLS_LANG=american_america.WE8ISO8859P1
export NLS_LANG


if [ "$LD_LIBRARY_PATH" != "" ] ; then
LD_LIBRARY_PATH=${SHLIB_PATH}:$LD_LIBRARY_PATH
else
LD_LIBRARY_PATH=$SHLIB_PATH
fi

export LD_LIBRARY_PATH

Solution
‎08-13-2017 10:12 AM
SAS Employee
Posts: 282

Re: SAS 9.4 - Proc SGPLOT: Unable to load the Java Virtual Machine

[ Edited ]

@MariaD,

 

Please change the following line in /sas9/software/SASFoundation/9.4/bin/sasenv_local:

 

SHLIB_PATH=/oracle/app/oracle/product/11.1.0/client_1/lib:/opt/IBM/db2/V9.1/lib64:$ODBCHOME/lib:/sas9/software/SASPrivateJavaRuntimeEnvironment/9.4/jre/bin

 

to:

 

SHLIB_PATH=/oracle/app/oracle/product/11.1.0/client_1/lib:/opt/IBM/db2/V9.1/lib64:$ODBCHOME/lib:$SHLIB_PATH

Save the file and try to run proc javainfo once again.

Contributor
Posts: 69

Re: SAS 9.4 - Proc SGPLOT: Unable to load the Java Virtual Machine

Thanks @alexx. 

 

After applying the change suggested, the proc sgplot run perfectly. Thanks again!

 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 633 views
  • 2 likes
  • 3 in conversation