![]() | ![]() | ![]() | ![]() | ![]() |
When you run SAS® in UNIX environments and attempt to use features that require Java (for example, ODS Graphics, SASIOMIE or INFOMAPS LIBNAME engines), you might encounter errors, such as the following:
To diagnose the problem, you must first ensure that the system environment variables required by SAS to locate and execute Java on the system are defined correctly. Use the SAS code available from the Full Code tab of this SAS Note to display the relevant variables.
The most common problem occurs when modifications are made to the dynamic link path in the sasenv_local file. Frequently, mistakes are made when paths are added to the relational database management system (RDBMS) client libraries, and instead of the RDBMS paths being correctly added to the existing value, the variable is completely (and incorrectly) redefined. For example, under Solaris, a correct value for the LD_LIBRARY_PATH environment variable when viewed from within SAS might appear like this:
/usr/local/SAS/jre1.5.0_12/lib/sparc/server:usr/local/SAS/jre1.5.0_12/lib/sparc:usr/local/SAS/SASFoundation/9.2/sasexe:/usr/sfw/oracle/lib
In the above, the path to the Oracle client library is appended to the paths added for SAS in SASFoundation/9.2/bin/sasenv.
In order to correctly add the Oracle path, the following lines were added to the file SASFoundation/9.2/bin/sasenv_local:
ORACLE_HOME=/usr/sfw/oracle export ORACLE_HOME LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib export LD_LIBRARY_PATH
Notice the inclusion of $LD_LIBRARY_PATH in the definition. An incorrect specification would appear as follows:
Such a specification results in the value of LD_LIBRARY_PATH being completely redefined to contain only the Oracle path, resulting in errors when you attempt to access Java from within SAS.
The above discussion applies to all UNIX environments with respect to their linking paths:
Here are some other common problems:
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | Base SAS | ABI+ for Intel Architecture | ||
Linux on Itanium | ||||
AIX | ||||
HP-UX | ||||
HP-UX IPF | ||||
Linux | ||||
Linux for x64 | ||||
Solaris for x64 | ||||
Solaris | ||||
64-bit Enabled Solaris | ||||
64-bit Enabled HP-UX | ||||
64-bit Enabled AIX | ||||
Tru64 UNIX |
/*** BEGIN ***/
%macro getpaths ;
options set=TKJNI_OPT_TRACE="y" ;
%put TS Site: &SYSSITE ;
%put OS: &SYSSCP &SYSSCPL ;
%put SAS Mode: &SYSPROCESSNAME ;
%put Host: &SYSTCPIPHOSTNAME ;
%put SAS Version: &sysvlong ;
%put User: &SYSUSERID ;
%put SASROOT: %sysget(SASROOT) ;
%put JAVA_HOME is: %sysget(JAVA_HOME) ;
%put CLASSPATH is: %sysget(CLASSPATH) ;
%put PATH is: %sysget(PATH) ;
%put DISPLAY is set as: %sysget(DISPLAY);
%if %index(&sysscp, SUN) or %index(&sysscp,LIN) %then %do ;
%put LD_LIBRARY_PATH is: %sysget(LD_LIBRARY_PATH) ;
%put LD_LIBRARY_PATH_64 is: %sysget(LD_LIBRARY_PATH_64) ;
%end ;
%else %if %index(&sysscp, AIX) %then %do ;
%put LIBPATH is: %sysget(LIBPATH) ;
%put IBM_JAVA_OPTIONS: %sysget(IBM_JAVA_OPTIONS) ;
%end ;
%else %if %index(&sysscp, HP) %then %do ;
%put SHLIB_PATH is: %sysget(SHLIB_PATH) ;
%end ;
%else %do;
%put SAS is not on a recognized Unix platform ;
%end ;
proc javainfo ;
run ;
proc options option=jreoptions ;
run ;
%mend ;
%getpaths ;
/**** END ****/
Type: | Installation Note |
Priority: | medium |
Date Modified: | 2011-03-04 19:38:53 |
Date Created: | 2011-03-02 16:52:39 |