Java error "Error fetching patrons" when using the -i flag with a list of patrons for XML Patron Purge
- Product: Voyager
- Product version: 10.1.0
Symptoms
-i flag used with XML patron purge, regardless of the inclusion of the -z flag, does not run and does not create a log file. The audit file contains what looks like the start of the run and the patronPurge.log shows "Error fetching patrons"
Defect Status
VYG-7027 is resolved in Voyager 10.1.0
Replication Steps
- Create a file of patron_ids with expired barcodes in /m1/voyager/xxdb/local
- Run PpatronPrg -i<filename> in sbin
- See /rpt for job files: see that no output file was created, and audit file should show something like this:
PatronPurge start
Database server: localhost
User name: voydb
Audit file: /m1/voyager/voydb/rpt/audit.patpurge.20160622.101810
Output file: /m1/voyager/voydb/rpt/xml.patpurge.20160622.101810
Exception file path: /m1/voyager/voydb/rpt/
Purge date: null
Expire date: null
Patron ID file: /m1/voyager/voydb/local/izzie_barcode
Running in commit mode - records will be updated
- Check in the /log directory for patronPurge.log; find this error:
2016-06-22 10:18:11,945 0 [main] ERROR com.exlibris.voyager.patron.purge.PurgeTask - Error fetching patrons: java.lang.NullPointerException
at com.exlibris.voyager.patron.purge.PurgeTask.run(PurgeTask.java:211)
at com.endinfosys.voyager.util.SimpleClient.doTasks(SimpleClient.java:217)
at com.endinfosys.voyager.util.SimpleClient.execute(SimpleClient.java:264)
at com.exlibris.voyager.patron.purge.PatronPurgeClient.execute(PatronPurgeClient.java:125)
at com.exlibris.voyager.patron.purge.PatronPurgeClient.main(PatronPurgeClient.java:208)
Workaround
Use the other parameters for purge.
Additional Information
Workaround example
- Use same patron ID file to run XML Patron Export by patron_id:
PpatronExpX -f/m1/voyager/patdb/local/delete_patrons.txt
- This will automatically populate the matchID as VoyagerID (patron_id)
- This will automatically populate action with Add (update existing records and add only if no match is found)
- Open XML patron file and update 2 fields:
- purgeDate - replace all values for purge date with a date that precedes all other purge dates for patron records. Example: 1999-12-31
- institutionID if there are duplicate records with same IID - the import will recognize that there is a duplicate record with the same IID when you try to import; remove this parameter it so the import does not error out
- Save changes.
- Run XML import with the file in test mode:
PpatronImpX -p/m1/voyager/xxxdb/local/purge_date_update.xml -t
- Run in production/update database after reviewing audit file of test run and addressing any concerns/issues.
- Review audit & error files, and patron records (spot check in Circulation or query db), to ensure the update was successful.
- Run patron purge in test mode to capture the new purge date in these records & remove them:
PpatronPrg -p2000-01-01
- When ready to run in production, add -z to execute the database update.
- Article last edited: 17-Jan-2019