SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 


#Analytics
#SPSSStatistics
#Analyticstools
 View Only
  • 1.  Production Facility NullPointerException SPSS 28

    Posted 06/06/22 02:12 PM
    Edited by System Admin 01/20/23 04:48 PM
    Hi all,

    I have about 17 syntax files to run against a dataset, each one will run fine by themselves but when I try to use Production Facility I get the following error. 
    I have to admit my syntax files are very basic which creates a series of crosstabs then exports to excel.
    I would like to get it working and ultimately configure it so I can run the series against various datasets 

    Exception in thread "Thread-16" java.lang.NullPointerException
    at com.spss.java_client.core.documents.production.ProductionManager.output(Unknown Source)
    at com.spss.java_client.core.documents.production.ProductionManager.run(Unknown Source)
    Job TestProductionJobStaffSurvey C Jobs Only terminated with exit code 0.

    ------------------------------
    Michael O'Brien
    ------------------------------
    #SPSSStatistics


  • 2.  RE: Production Facility NullPointerException SPSS 28

    Posted 06/06/22 02:47 PM
    I'm sorry to hear this about the Production Facility. We will have to try and replicate and see what's going on.

    In the meantime, if you have installed the Python plugin (which is standard), you could try this. I put it together kind of quickly but it should do the trick.

    ** GET A FILE.
    get file "<insert your file here>".
    
    begin program python3.
    ## Give the directory where your files are.
    SPEC = ['C:/Test']
    ## Filter for select file(s). I'm getting all SPS files in this directory.
    FILTER = ".*.sps"
    import os
    import re
    import spss
    from os.path import isfile, join
    
    selected_files = []
    
    for s in SPEC:
      file_list=[]
      for path, folders, files in os.walk(s):
        for file in files:
          items = re.findall(FILTER,file)
          if len(items) > 0:
            file_list.append(os.path.join(s, file))
    
      selected_files=selected_files+file_list
    
    for f in selected_files:
      print(f)
      spss.Submit("INSERT FILE='" + f + "'.")
    end program.​
    The above will run all the files against the data file you started with.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 3.  RE: Production Facility NullPointerException SPSS 28

    Posted 06/06/22 04:53 PM
    Do I need to send any logs for the null pointer error?

    ------------------------------
    Michael O'Brien
    ------------------------------



  • 4.  RE: Production Facility NullPointerException SPSS 28

    Posted 06/06/22 05:07 PM
    Sure.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 5.  RE: Production Facility NullPointerException SPSS 28

    Posted 06/06/22 05:19 PM
    I forgot to ask: Are you running this production job from within an SPSS session? I did see an exception when I tried that, but the job successfully completed. Did your job complete successfully?

    I also tried running from a command prompt (this was on the Mac; I haven't tried Windows yet). That also worked, and gave no exception(s).

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 6.  RE: Production Facility NullPointerException SPSS 28

    Posted 06/06/22 05:50 PM
    The syntax files was to produce outputs into a folder thats separate from the production folder value and that didn't happen. I was using the Run option on the production dialog screen if thats what you mean

    ------------------------------
    Michael O'Brien
    ------------------------------



  • 7.  RE: Production Facility NullPointerException SPSS 28

    Posted 06/06/22 06:07 PM
    OK, thanks, Michael. What I'm asking is this: When you defined the production job, right under where you listed all the files you wanted run, you had to provide an output location for the SPV file (SPV is the default). I am wondering if that SPV file was created, and if it gives us any clues as to what might be going on while the job runs (to the degree that it does run).

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------