Hi
I am trying to connect to SAS enterprise guide using SASPy in Python. I am getting below error:
Cannot use STDIO I/O module on Windows. Try the following: IOM
I have set the sascfg_personal.py iomcom parameter with below details:
iomcom = {
'iomhost': 'Server Machine Name'
'iomport': 8561,
'class_id': class identifier of SAS Workspace Server ,
'provider': 'sas.iomprovider',
'encoding': 'windows-1252'
}
Did you install SAS Enterprise Guide or SAS Integration Technologies Client on that machine?
Yes I have enterprise guide and integration technology, both of them installed on the machine.
attaching sascfg.py
I am now trying to connect as below:
sas = saspy.SASsession(cfgname='winiomwin')
and am getting below error:
Java Error:
java.lang.NoClassDefFoundError: com/sas/services/connection/ConnectionFactoryException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.sas.services.connection.ConnectionFactoryException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main"
Subprocess failed to start. Double check your settings in sascfg_personal.py file.
Attempted to run program java with the following parameters:
['java', '-classpath', E:\\SAS\\SAShome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.svc.connection.jar;E:\\SAS\\SAShome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\log4j.jar;E:\\SAS\\SAShome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.security.sspi.jar;E:\\SAS\\SAShome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.core.jar;C:\\Users\\XXXX\\AppData\\Local\\Programs\\Python\\Python37-32\\Lib\\site-packages\\saspy\\java\\saspyiom.jar', 'pyiom.saspy2j', '-host', 'localhost', '-stdinport', '58234', '-stdoutport', '58235', '-stderrport', '58236', '-iomhost', 'XXXX', '-iomport', '8561', '-user', 'XXXX', '-lrecl', '1048576', ''] If no Java Error above, try running the following command (where saspy is running) manually to see if it's a problem starting Java: java -classpath "E:\SAS\SAShome\SASDeploymentManager\9.4\products\deploywiz__94472__prt__xx__sp0__1\deploywiz\sas.svc.connection.jar;E:\SAS\SAShome\SASDeploymentManager\9.4\products\deploywiz__94472__prt__xx__sp0__1\deploywiz\log4j.jar;E:\SAS\SAShome\SASDeploymentManager\9.4\products\deploywiz__94472__prt__xx__sp0__1\deploywiz\sas.security.sspi.jar;E:\SAS\SAShome\SASDeploymentManager\9.4\products\deploywiz__94472__prt__xx__sp0__1\deploywiz\sas.core.jar;C:\Users\XXXX\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\saspy\java\saspyiom.jar" pyiom.saspy2j -host localhost -stdinport 58234 -stdoutport 58235 -stderrport 58236 -iomhost XXXXX-iomport 8561 -user XXXX -lrecl 1048576
I seriously doubt you could connect to Enterprise Guide. You should be able to connect to the same SAS server that EG is using.
Which looks like what you are actually trying to do.
Thanks for replying, I have now manged to log in, the problem was in the path of the jar files, I didn't change the path completely. Also the port required was of SAS workspace server, i was providing that of meta data erver as visible in EG login details.
Yes the log in is to the SAS server.
Thanks
Sourav
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.