SPSS Integration tool for java version 22 error

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SPSS Integration tool for java version 22 error

Luckyluke
This post was updated on .
Dear SPSS Users,

I have a licneced version of SPSS 22. I just tried to use Java integration tool in Eclispe using JRE version 7 and Windows 7.

I just added the C:\Program Files\IBM\SPSS\Statistics\22\spssjavaplugin.jar to the CLASSPATH and I dont change the JAR location but I recive the backbone exception error at the line of the commnd execution.

import com.ibm.statistics.plugin.*;
public class test {

        public static void main(String[] args) throws StatsException  {
                // TODO Auto-generated method stub
               
                System.out.println(StatsUtil.getStatisticsPath());
                String[] command={"GET FILE='patientanalysis10.sav'.",
                  "OMS SELECT TABLES ",
                  "/IF COMMANDS=['Descriptives'] SUBTYPES=['Descriptive Statistics'] ",
                  "/DESTINATION FORMAT=OXML XMLWORKSPACE='desc_table' ",
                  "/TAG='desc_out'.",
                  "DESCRIPTIVES VARIABLES=age ",
                  "/STATISTICS=MEAN.",
                  "OMSEND TAG='desc_out'."};
                StatsUtil.submit(command);
               
                String handle = "desc_table";
                String context = "/outputTree";
                String xpath = "//pivotTable[@subType='Descriptive Statistics']" +
                        "/dimension[@axis='row']" +
                        "/category[@varName='age']" +
                        "/dimension[@axis='column']" +
                        "/category[@text='Mean']" +
                        "/cell/@text";
                String result = StatsUtil.evaluateXPath(handle, context, xpath)[0];
                StatsUtil.deleteXPathHandle(handle);
               
                System.out.println(result);
               
       

        }

}



I get below exception:

Exception in thread "main" com.ibm.statistics.plugin.StatsException: IBM SPSS Statistics backend is not ready.
        at com.ibm.statistics.plugin.StatsUtil.submit(Unknown Source)
        at test.main(test.java:16)

I don't know where is the problem.

Thanks for any help