Hello All,
I just downloaded a trial version of spss version 21. In this version, spss offers java plugin.
I tried to followed instruction from the spss plug in document, and I tried to run a simple spss jave plugin program but it did not work.
It gave me the error message : "
com.ibm.statistics.plugin.StatsException: IBM SPSS Statistics backend is not ready.
at com.ibm.statistics.plugin.XDAPI.start(Unknown Source)
at com.ibm.statistics.plugin.StatsUtil.start(Unknown Source)"
I don't know why it gave me this error because I followed the spss plugin manual and I had spssjavaplugin.jar in my class path.
My simple program that I copied from the spss plugin document as
importcom.ibm.statistics.plugin.*;
public class test {public static voidmain(String[] args) {
try{
StatsUtil.start();
String[] command={"OMS",
"/DESTINATION FORMAT=HTML OUTFILE='/output/demo.html'.",
"DATA LIST FREE /salary (F).",
"BEGIN DATA",
"21450",
"30000",
"57000",
"END DATA.",
"DESCRIPTIVES salary.",
"OMSEND."};
StatsUtil.submit(command);
StatsUtil.stop();
} catch (StatsException e) {
e.printStackTrace();
}
}
}
Please advice me on what I did wrong or point me to someone who could help me
Thanks so much in advance.
Bob
Answer by JonPeck (4671) | Jul 03, 2013 at 03:23 PM
Do not put the html file in the Statistics installation directory. In many cases users will not have write permission to that area. You could create your own folder or use the SPSS temporary directory or, on Windows, the APPDATA area. The latter two locations will always be writeable.
As for Hadoop, Statistics does not currently have support for Hadoop, but the IBM Analytic Server and IBM SPSS Modeler 15.0.2 releases bring Hadoop support to Modeler. These were released just last month.
Answer by RichCohen (26) | Jul 02, 2013 at 06:52 PM
Is that the full error message? If not, then please provide the full message.
Also, the Java Plug-in assumes that spssjavaplugin.jar is located in the SPSS Statistics installation directory. The Plug-in will not work if you move the jar file.
Answer by Tommy_suzuki (1) | Jul 03, 2013 at 02:25 PM
Thanks so much Rick !! Your help made a big difference.
It works perfectly where it's supposed to be in the installation directory.
Since it is running well , i would like to ask a question if you don't mind suggesting me where i suppose to put the output/demo.html file refering to this
"/DESTINATION FORMAT=HTML OUTFILE='/output/demo.html'." ?
Would you think if it works best if i put it in the SPSS installation directory and I need to refer to it as an absolute path from the code;
or would you recommend if i put it in a folder i create from the Java project file ?
Also , Since i am learning Hadoop, do you know if there is a SPSS plugin for Hadoop or any thing similar in that nature?
Thanks again for all of your helps,
Bob
Answer by MihaiSchoen (0) | Jul 08, 2013 at 01:02 PM
Hello
I have discovered this post from last week and I try to write to you as I have the problem in the oppostite way and I am blocked since a few weeks concerning this issue.
Trying to call the JAVA class from within SPSS doesn't give me any answer, it blocks showing that the request is beeing executed, but no answer comes.
I followed the tutorial from
but unfortunately I don't get it run. Have you already got to work SPSS with Java this way?
Many thanks in advance
Mihai Schoen
Answer by JonPeck (4671) | Jun 30, 2014 at 03:25 PM
I am not aware of any training available on this. If you already know Java, you are most of the way there. If you know Python, you can see from the Programming and Data Management book that the apis and usage for Python programmability are very similar, although the Python apis are broader.
Suppress console output when using Java API's 0 Answers
When starting from right after split change, DataUtil fetches empty 0 Answers
SPSS Statistics Java and JRE 7 3 Answers
Update Java 3 Answers
How to do alignment for label text 0 Answers