BookmarkSubscribeRSS Feed
FriedEgg
SAS Employee
I am receiving a strange module error when attempting to execute a simple PROC HTTP.

I am using RHE Linux 64bit and SAS 9.2

I execute sas using the following system options:

./sas -jreoptions "\(-Djavax.net.ssl.trustStore=full-path-to-the-trust-store -Djavax.net.ssl.trustStorePassword=trustStorePassword -Dsas.app.class.path=/usr/local/SAS/SASVersionedJarRepository/9.2/eclipse/plugins\)" &

Code:

filename in "/tmp/FriedEgg_ProcHTTP_in";
filename out "/tmp/FriedEgg_ProcHTTP_out.png";
data _null_;
file in;
input;
put _infile_;
datalines;
cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World
;

proc http in=in out=out url="https://chart.googleapis.com/chart"
method="post"
ct="application/x-www-form-urlencoded";
run;



LOG:

1 filename in "/home/mkastin/in";
2 filename out "/home/mkastin/out.png";
3 data _null_;
4 file in;
5 input;
6 put _infile_;
7 datalines;

NOTE: The file IN is:
Filename=/home/mkastin/in,
Owner Name=mkastin,Group Name=nyib,
Access Permission=rw-rw-rw-,
Last Modified=Mon Mar 7 17:06:44 2011

NOTE: 1 record was written to the file IN.
The minimum record length was 80.
The maximum record length was 80.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds


9 ;
10
11 proc http in=in out=out url="https://chart.googleapis.com/chart"
12 method="post"
13 ct="application/x-www-form-urlencoded";
14 run;

ERROR: The Java proxy is not responding.
ERROR: JVM failed to start.
NOTE: PROCEDURE HTTP used (Total process time):
real time 1.00 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped processing this step because of errors.
ERROR: Unable to load extension: (tkjava)




I am assuming I am missing some jreoptions but I don't know what. Forget the fact that I am making a Google Charts call that I could just as easily render in sas, it is just an example.
6 REPLIES 6
FriedEgg
SAS Employee

Hi,

I never received any reply's to this posting and so I decided to go about figuring it out myself. 

First, I created a keystore using the 'keytools' application.  This is what I will use later to config Djavax.net.ssl

keytool -genkey -keyalg RSA -alias mycert

Second, I altered my config file to contain the following:

-jreoptions (-Dtkj.app.launch.config=!SASROOT/picklist

             -Dsas.app.class.path=/usr/local/SAS/SASVersionedJarRepository/9.2/eclipse/plugins/tkjava.jar

             -DPFS_TEMPLATE=!SASROOT/misc/base/qrpfstpt.xml

             -Djava.security.policy=!SASROOT/misc/base/sas.policy

             -Djava.security.auth.login.config=!SASROOT/misc/base/sas.login.config

             -Djava.class.path=/usr/local/SAS/SASVersionedJarRepository/9.2/eclipse/plugins/sas.launcher.jar

             -Djava.system.class.loader=com.sas.app.AppClassLoader

             -Dsas.ext.config=!SASROOT/misc/base/sas.java.ext.config

             -Djavax.net.ssl.trustStore=/home/&sysuserid/.keystore

             -Djavax.net.ssl.trustStorePassword=q1w2e3)

This link was helpful but somewhat incomplete in explaining what needed to be done.

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003286920.htm

Thanks,

Matthew Kastin

gkaupas
Calcite | Level 5

I am getting the same three ERROR messages, and I'm not trying an https connection, just a simple HTTP GET within the firewall, just to see if this will work, so I'm thinking the keystore setup is not necessary in my case.

When I look in my SAS 9.2 installation, there is no tkjava.jar whatsoever. Does your installation have one at the path listed in your config file?

Also, my sas.launcher.jar exists in !SASROOT/misc/applets, not in the SASVersionedJarRepository/9.2/eclipse/plugins referenced in my config file (I didn't install SAS so I don't know what's going on with these eclipse-related entries).

FriedEgg
SAS Employee

gkaupas,

It would be for you to consult with SAS tech support on this matter as altering these settings is not usually recommended.

gkaupas
Calcite | Level 5

I wasn't asking for suggestions on changing the configuration settings, even though that's effectively what you were doing, although it clearly looks like our installation is corrupted and possibly needs tech support intervention.

I was just curious, as a preliminary step, whether your installation actually had a tkjava.jar file present anywhere, since the third error "Unable to load extension: (tkjava)" seems to be in reference to this.

FriedEgg
SAS Employee

tkjava.jar part of the SAS Foundation install of JAVA.  If you use linux and install SAS in the default path you will find the file here: /usr/local/SAS/SASVersionedJarRepository/9.2/eclipse/plugins/tkjava.jar

I am not a Windows user so I do not know the relative path for an installation there, but I beleive it is C:\PROGRA~1\SAS\SASVER~1\9.2\eclipse\plugins\TKJAVA~1.000\tkjava.jar.  The reason you are probably experiencing these issues is because you are missing the -Dsas.app.class.path parameter in your SAS system option JREOPTIONS.  This problem and the problem I had are not due to 'corrupt' installations, but rather incorrect configurations in the system enviorment/sas enviornment.  Consider creating a copy of your current config file and using the following JREOPTIONS:

-JREOPTIONS=(

  -Dsas.jre.libjvm=C:\Program Files\Java\jre1.5.0_12\bin\client\jvm.dll

  -Djava.security.policy=!SASROOT\core\sasmisc\sas.policy

  -Dsas.ext.config=!SASROOT\core\sasmisc\sas.java.ext.config

  -Dsas.app.class.path=C:\PROGRA~1\SAS\SASVER~1\9.2\eclipse\plugins\TKJAVA~1.000\tkjava.jar

  -DPFS_TEMPLATE=!SASROOT\core\sasmisc\qrpfstpt.xml

  -Djava.class.path=C:\PROGRA~1\SAS\SASVER~1\9.2\eclipse\plugins\SASLAU~1.000\SASLAU~1.JAR

  -Djava.system.class.loader=com.sas.app.AppClassLoader

  -Djava.security.auth.login.config=!SASROOT\core\sasmisc\sas.login.config

  -Dtkj.app.launch.config=!SASROOT\picklist )


This should be the default JRE configurations for Windows install of SAS Foundation.  This also assumes you are using the default version of JAVA for your SAS Installation: 1.5.0_12.


You may also want to check that your OS environment contains all the appropriate information.

In command prompt check if echo %JDK_HOME% returns anything.

Check the $SAS_CONFIG\Lev1\level_env.bat file and see if maybe this variable is assigned here for by SAS if not.  Or the file C:\Program Files\SAS\sassw.config

Check also for JREHOME and VJRHOME variable.

Consider posting a question in the SAS Deployment section of the forum here for additional responses from people more adept with SAS Installations and Configurations under Windows.

gkaupas
Calcite | Level 5

Thanks ... I'm actually on an antique server running SunOS 5.8, so it's possible something isn't supported or the Java part wasn't all there or didn't install right. I will take it up with my on-site SAS rep and we'll follow up with tech support from there.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 4264 views
  • 0 likes
  • 2 in conversation