<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SasPy - Java error in Developers</title>
    <link>https://communities.sas.com/t5/Developers/SasPy-Java-error/m-p/485665#M243</link>
    <description>&lt;P&gt;I think sascfg.py is configured correctly, this is then entire contents of the file:&lt;/P&gt;&lt;PRE&gt;SAS_config_names=['winlocal']&lt;BR /&gt;&lt;BR /&gt;SAS_config_options = {'lock_down': False,&lt;BR /&gt; 'verbose' : True&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;SAS_output_options = {'output' : 'html5'}&lt;BR /&gt;&lt;BR /&gt;cpW = "D:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.svc.connection.jar"&lt;BR /&gt;cpW += ";D:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\log4j.jar"&lt;BR /&gt;cpW += ";D:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.security.sspi.jar"&lt;BR /&gt;cpW += ";D:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.core.jar"&lt;BR /&gt;cpW += ";D:\\Anaconda3\\envs\\prod1\\Lib\\site-packages\\saspy\\java\\saspyiom.jar"&lt;BR /&gt;&lt;BR /&gt;winlocal = {'java' : 'D:\\Program Files\\SASHOME\\SASPrivateJavaRuntimeEnvironment\\9.4\\jre\\bin\\java',&lt;BR /&gt; 'encoding' : 'windows-1252',&lt;BR /&gt; 'classpath' : cpW&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All files in the cpW dictionary exist at that path. The path in winlocal points to the folder where java.exe and java.dll are located (they are actually in the "bin" folder, but it seems adding "java" at the end is necessary). I tried adding ".exe." and I received the same error.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Aug 2018 06:20:50 GMT</pubDate>
    <dc:creator>MDaniel</dc:creator>
    <dc:date>2018-08-10T06:20:50Z</dc:date>
    <item>
      <title>SasPy - Java error</title>
      <link>https://communities.sas.com/t5/Developers/SasPy-Java-error/m-p/485506#M241</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use SasPy, I have configured it correctly (as far as i can tell) by modifying sascfg.py, but when I run the following code I get a Java error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the machine specs:&lt;/P&gt;&lt;P&gt;- OS: Windows Server 2012R2&lt;/P&gt;&lt;P&gt;- Java version :&amp;nbsp;"1.6.0_45"&lt;/P&gt;&lt;P&gt;- SAS: 9.4_M2&lt;/P&gt;&lt;P&gt;- Python 3.6, Anaconda distribution&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this java related - i.e. does SasPy have some minimum Java requirements ? Or is there some other issue that I'm missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import saspy&lt;BR /&gt;sas = saspy.SASsession(cfgname='winlocal')&lt;BR /&gt;&lt;BR /&gt;Java Error:&lt;BR /&gt;java.lang.NoClassDefFoundError: com/sas/services/connection/ConnectionFactoryException&lt;BR /&gt; at java.lang.Class.getDeclaredMethods0(Native Method)&lt;BR /&gt; at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)&lt;BR /&gt; at java.lang.Class.getMethod0(Class.java:2774)&lt;BR /&gt; at java.lang.Class.getMethod(Class.java:1663)&lt;BR /&gt; at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)&lt;BR /&gt; at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)&lt;BR /&gt;Caused by: java.lang.ClassNotFoundException: com.sas.services.connection.ConnectionFactoryException&lt;BR /&gt; at java.net.URLClassLoader$1.run(URLClassLoader.java:366)&lt;BR /&gt; at java.net.URLClassLoader$1.run(URLClassLoader.java:355)&lt;BR /&gt; at java.security.AccessController.doPrivileged(Native Method)&lt;BR /&gt; at java.net.URLClassLoader.findClass(URLClassLoader.java:354)&lt;BR /&gt; at java.lang.ClassLoader.loadClass(ClassLoader.java:425)&lt;BR /&gt; at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)&lt;BR /&gt; at java.lang.ClassLoader.loadClass(ClassLoader.java:358)&lt;BR /&gt;6 more&lt;BR /&gt;Exception in thread "main" &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 15:04:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SasPy-Java-error/m-p/485506#M241</guid>
      <dc:creator>MDaniel</dc:creator>
      <dc:date>2018-08-09T15:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: SasPy - Java error</title>
      <link>https://communities.sas.com/t5/Developers/SasPy-Java-error/m-p/485602#M242</link>
      <description>&lt;P&gt;The type of error returned for an unsupported Java version would be something like this:&lt;/P&gt;
&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; sas = saspy.SASsession(cfg='winlocal')
Using SAS Config named: winlocal
Java Error:
java.lang.&lt;STRONG&gt;UnsupportedClassVersionError&lt;/STRONG&gt;: pyiom/saspy2j : Unsupported major.minor version 51.0&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The type of error you're getting:&lt;/P&gt;
&lt;PRE&gt;Java Error:
java.lang.&lt;STRONG&gt;NoClassDefFoundError&lt;/STRONG&gt;: com/sas/services/connection/ConnectionFactoryException&lt;/PRE&gt;
&lt;P&gt;indicates an issue with the class paths to the jars rather than the version of Java.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Verify that the class paths in the sascfg.py file are correct. The default paths to the jars under the SASDeploymentManager install directory included in the file almost certainly need to be updated for the maintenance release of SAS running at your site. For example, I had to update mine to reference the correct deploywiz__&amp;lt;version&amp;gt;__ for my SAS release as follows:&lt;/P&gt;
&lt;PRE&gt;# build out a local classpath variable to use below for Windows clients
cpW  =  "C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\&lt;STRONG&gt;deploywiz__94502&lt;/STRONG&gt;__prt__xx__sp0__1\\deploywiz\\sas.svc.connection.jar"
cpW += ";C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\&lt;STRONG&gt;deploywiz__94502&lt;/STRONG&gt;__prt__xx__sp0__1\\deploywiz\\log4j.jar"
cpW += ";C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\&lt;STRONG&gt;deploywiz__94502&lt;/STRONG&gt;__prt__xx__sp0__1\\deploywiz\\sas.security.sspi.jar"
cpW += ";C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\&lt;STRONG&gt;deploywiz__94502&lt;/STRONG&gt;__prt__xx__sp0__1\\deploywiz\\sas.core.jar"&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 21:26:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SasPy-Java-error/m-p/485602#M242</guid>
      <dc:creator>shayne</dc:creator>
      <dc:date>2018-08-09T21:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: SasPy - Java error</title>
      <link>https://communities.sas.com/t5/Developers/SasPy-Java-error/m-p/485665#M243</link>
      <description>&lt;P&gt;I think sascfg.py is configured correctly, this is then entire contents of the file:&lt;/P&gt;&lt;PRE&gt;SAS_config_names=['winlocal']&lt;BR /&gt;&lt;BR /&gt;SAS_config_options = {'lock_down': False,&lt;BR /&gt; 'verbose' : True&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;SAS_output_options = {'output' : 'html5'}&lt;BR /&gt;&lt;BR /&gt;cpW = "D:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.svc.connection.jar"&lt;BR /&gt;cpW += ";D:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\log4j.jar"&lt;BR /&gt;cpW += ";D:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.security.sspi.jar"&lt;BR /&gt;cpW += ";D:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.core.jar"&lt;BR /&gt;cpW += ";D:\\Anaconda3\\envs\\prod1\\Lib\\site-packages\\saspy\\java\\saspyiom.jar"&lt;BR /&gt;&lt;BR /&gt;winlocal = {'java' : 'D:\\Program Files\\SASHOME\\SASPrivateJavaRuntimeEnvironment\\9.4\\jre\\bin\\java',&lt;BR /&gt; 'encoding' : 'windows-1252',&lt;BR /&gt; 'classpath' : cpW&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All files in the cpW dictionary exist at that path. The path in winlocal points to the folder where java.exe and java.dll are located (they are actually in the "bin" folder, but it seems adding "java" at the end is necessary). I tried adding ".exe." and I received the same error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 06:20:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SasPy-Java-error/m-p/485665#M243</guid>
      <dc:creator>MDaniel</dc:creator>
      <dc:date>2018-08-10T06:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: SasPy - Java error</title>
      <link>https://communities.sas.com/t5/Developers/SasPy-Java-error/m-p/503225#M244</link>
      <description>&lt;P&gt;Hi there. I have only just started looking at these posts on Communities. I've only gotten Issues through my saspy Github site till now.&lt;/P&gt;
&lt;P&gt;As it turns out, Java 6 (1.6) is too old to work with saspy. I've hit this issue a few times with other customers and getting a more current version of Java (Java 8&amp;nbsp; is the 'Current' one if you go to java.com to download) has resolved the problem each time.&lt;/P&gt;
&lt;P&gt;And, yes, your config appears perfectly reasonable. I think it is just the old Java.&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 20:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SasPy-Java-error/m-p/503225#M244</guid>
      <dc:creator>sastpw</dc:creator>
      <dc:date>2018-10-10T20:08:48Z</dc:date>
    </item>
  </channel>
</rss>

