Skip to Content
0
Former Member
Dec 15, 2015 at 12:58 AM

Export Cronjob abruptly stops with nullpointerexception

214 Views

Hi All, The custom export cronjob suddenly fails with the nullpointerexception. The same jobs runs fine if its triggered again, Kindly help on this issue and let me know for any more details on the job. java.lang.NullPointerException at au.com.woolworths.pim.bigw.exportdata.PimBigWAdhocExportJob.perform(PimBigWAdhocExportJob.java:147) at de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob.performCronJob(ServicelayerJob.java:40) at de.hybris.platform.cronjob.jalo.Job.execute(Job.java:1297) at de.hybris.platform.cronjob.jalo.Job.performImpl(Job.java:815) at de.hybris.platform.cronjob.jalo.Job.access$1(Job.java:772) at de.hybris.platform.cronjob.jalo.Job$JobRunable.run(Job.java:677) at de.hybris.platform.util.threadpool.PoolableThread.run(PoolableThread.java:198)

code snippet:

final InputStream inCSV = new FileInputStream(exportHeaderFile); final ImpExMedia impexscript = ImpExManager.getInstance().createImpExMedia("myExportScript", "UTF-8"); impexscript.setFieldSeparator(';');

impexscript.setDataFromStream(new DataInputStream(inCSV)); final ExportConfiguration config = new ExportConfiguration(impexscript, ImpExManager.getExportOnlyMode());

/the export object is returned as null/ final Export export = ImpExManager.getInstance().exportData(config, true);

/error occurs in the below line 147/ final ImpExExportMedia expMedia = export.getExportedData();