Error Importing CSV File

  • 7022495
  • 20-Dec-2017
  • 09-Jan-2018

Environment

Retain 4+
O365 / Exchange

Situation

Trying to start archiving jobs and it does not start.  Worker shows no errors and it takes less than 1 second for the job to start and stop.  When you look at the Worker log, the errors look something like this:

21:00:00,388 EWSUserSelection - Error importing CSV File
com.thoughtworks.xstream.io.StreamException:
    at com.thoughtworks.xstream.io.xml.JDomDriver.createReader(JDomDriver.java:64)
    at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1085)
    at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1076)
    at com.gwava.ews.jobs.selection.StaticEWSUserSelection.initializeUsers(StaticEWSUserSelection.java:195)
    at com.gwava.ews.jobs.selection.StaticEWSUserSelection.initializeMasters(StaticEWSUserSelection.java:179)
    at com.gwava.ews.jobs.selection.StaticEWSUserSelection.<init>(StaticEWSUserSelection.java:43)
    at com.gwava.ews.jobs.ExchangeDredger.getEWSUserSelection(ExchangeDredger.java:169)
    at com.gwava.ews.jobs.ExchangeDredger.getListOfUsers(ExchangeDredger.java:144)
    at com.gwava.ews.jobs.ExchangeDredger.getListOfUsers(ExchangeDredger.java:56)
    at com.gwava.caapi.process.RetainDredger.processNormalJob(RetainDredger.java:268)
    at com.gwava.ews.jobs.ExchangeDredger.executeWork(ExchangeDredger.java:593)
    at com.gwava.jobs.RetainArchiveJob.performDredge(RetainArchiveJob.java:561)
    at com.gwava.jobs.RetainArchiveJob.execute(RetainArchiveJob.java:229)
    at com.gwava.jobs.RetainArchiveJob.execute(RetainArchiveJob.java:442)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: org.jdom.input.JDOMParseException: Error on line 29: Premature end of file.
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:533)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:946)
    at com.thoughtworks.xstream.io.xml.JDomDriver.createReader(JDomDriver.java:59)
Caused by: org.xml.sax.SAXParseException; lineNumber: 29; columnNumber: 1; Premature end of file.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1014)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)
    ... 17 more


Resolution

The Windows machine that is running the Task Scheduler script and creating the CSV files have incorrect permissions for Retain to access.  This usually happens if Retain is on Linux and the server is trying to access the CSV files through a NFS Share.  Since Windows doesn't have the same permission structure, it may be that Retain can not import the settings.

Resolution is to set the folder and all files in the folder where the CSV files are stored with proper read/write permissions for the Linux server to access.

A workaround solution would be to browse to the folder with the CSV files on the Linux server and run a chmod 744 command on the CSV files.  This will give the files the permissions needed.  By default, those CSV files will probably only have 700 access