Skip to content

Commit

Permalink
OLE-8888 -Batch export terminates when there is an error with a sing…
Browse files Browse the repository at this point in the history
…le record
  • Loading branch information
jayared committed Jun 16, 2016
1 parent a7b8cbc commit 83c842f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.kuali.ole.batch.marc.OLEMarcReader;
import org.kuali.ole.batch.marc.OLEMarcXmlReader;
import org.kuali.ole.batch.service.ExportDataService;
import org.kuali.ole.constants.OleNGConstants;
import org.kuali.ole.docstore.common.client.DocstoreClientLocator;
import org.kuali.ole.docstore.common.document.*;
import org.kuali.ole.docstore.common.document.content.enums.DocFormat;
Expand All @@ -24,6 +25,7 @@
import org.kuali.ole.sys.context.SpringContext;
import org.kuali.rice.core.api.config.property.ConfigContext;
import org.kuali.rice.krad.service.KRADServiceLocator;
import org.marc4j.MarcSplitStreamWriter;
import org.marc4j.MarcStreamWriter;
import org.marc4j.MarcWriter;
import org.marc4j.marc.ControlField;
Expand Down Expand Up @@ -514,7 +516,7 @@ public int generateMarcFromXml() throws Exception {
throw new RuntimeException("Cannot create mrc file in the given file path :: " + fileToWrite.getPath());
}
}
MarcWriter writer = new MarcStreamWriter(fileOutputStream, "UTF-8");
MarcSplitStreamWriter writer = new MarcSplitStreamWriter(fileOutputStream, OleNGConstants.UTF_8,70000,"880");
int errorCount = 0;
for (String bibContent : bibDocList) {
InputStream input = new ByteArrayInputStream(bibContent.getBytes());
Expand Down

0 comments on commit 83c842f

Please sign in to comment.