Error 'java.lang.StackOverflowError' when Job fails while writing to Access DB file

Symptoms

A Job that was running fine started failing with the following stack trace:

 

Exception in component tAccessCommit_1
net.ucanaccess.jdbc.UcanaccessSQLException
	at net.ucanaccess.jdbc.UcanaccessConnection.commit(UcanaccessConnection.java:214)
	at alim_sig.proc_alim_fibre_optique_0_1.PROC_ALIM_FIBRE_OPTIQUE.tAccessCommit_1Process(PROC_ALIM_FIBRE_OPTIQUE.java:4930)
	at alim_sig.proc_alim_fibre_optique_0_1.PROC_ALIM_FIBRE_OPTIQUE.tFileInputExcel_1Process(PROC_ALIM_FIBRE_OPTIQUE.java:4540)
	at alim_sig.proc_alim_fibre_optique_0_1.PROC_ALIM_FIBRE_OPTIQUE.tAccessConnection_1Process(PROC_ALIM_FIBRE_OPTIQUE.java:2166)
	at alim_sig.proc_alim_fibre_optique_0_1.PROC_ALIM_FIBRE_OPTIQUE.tFileList_1Process(PROC_ALIM_FIBRE_OPTIQUE.java:1896)
	at alim_sig.proc_alim_fibre_optique_0_1.PROC_ALIM_FIBRE_OPTIQUE.runJobInTOS(PROC_ALIM_FIBRE_OPTIQUE.java:8030)
	at alim_sig.proc_alim_fibre_optique_0_1.PROC_ALIM_FIBRE_OPTIQUE.main(PROC_ALIM_FIBRE_OPTIQUE.java:7728)
Caused by: net.ucanaccess.jdbc.UcanaccessSQLException
	at net.ucanaccess.jdbc.UcanaccessConnection.flushIO(UcanaccessConnection.java:348)
	at net.ucanaccess.jdbc.UcanaccessConnection.commit(UcanaccessConnection.java:207)
	... 6 more
Caused by: java.lang.StackOverflowError
	at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:342)
	at sun.nio.ch.IOUtil.write(IOUtil.java:60)
	at sun.nio.ch.FileChannelImpl.writeInternal(FileChannelImpl.java:778)
	at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:761)
	at com.healthmarketscience.jackcess.impl.PageChannel.allocateNewPage(PageChannel.java:335)
	at com.healthmarketscience.jackcess.impl.TempPageHolder.setNewPage(TempPageHolder.java:104)
	at com.healthmarketscience.jackcess.impl.UsageMap$ReferenceHandler.createNewUsageMapPage(UsageMap.java:748)
	at com.healthmarketscience.jackcess.impl.UsageMap$ReferenceHandler.addOrRemovePageNumber(UsageMap.java:732)
	at com.healthmarketscience.jackcess.impl.UsageMap.removePageNumber(UsageMap.java:322)
	at com.healthmarketscience.jackcess.impl.PageChannel.allocateNewPage(PageChannel.java:339)
	at com.healthmarketscience.jackcess.impl.TempPageHolder.setNewPage(TempPageHolder.java:104)
	at com.healthmarketscience.jackcess.impl.UsageMap$ReferenceHandler.createNewUsageMapPage(UsageMap.java:748)
	at com.healthmarketscience.jackcess.impl.UsageMap$ReferenceHandler.addOrRemovePageNumber(UsageMap.java:732)
	at com.healthmarketscience.jackcess.impl.UsageMap.removePageNumber(UsageMap.java:322)
	at com.healthmarketscience.jackcess.impl.PageChannel.allocateNewPage(PageChannel.java:339)
	at com.healthmarketscience.jackcess.impl.TempPageHolder.setNewPage(TempPageHolder.java:104)
	at com.healthmarketscience.jackcess.impl.UsageMap$ReferenceHandler.createNewUsageMapPage(UsageMap.java:748)
	at com.healthmarketscience.jackcess.impl.UsageMap$ReferenceHandler.addOrRemovePageNumber(UsageMap.java:732)
	at com.healthmarketscience.jackcess.impl.UsageMap.removePageNumber(UsageMap.java:322)
	at com.healthmarketscience.jackcess.impl.PageChannel.allocateNewPage(PageChannel.java:339)
	at com.healthmarketscience.jackcess.impl.TempPageHolder.setNewPage(TempPageHolder.java:104)
	at com.healthmarketscience.jackcess.impl.UsageMap$ReferenceHandler.createNewUsageMapPage(UsageMap.java:748)
	at com.healthmarketscience.jackcess.impl.UsageMap$ReferenceHandler.addOrRemovePageNumber(UsageMap.java:732)
	at com.healthmarketscience.jackcess.impl.UsageMap.removePageNumber(UsageMap.java:322)
	at com.healthmarketscience.jackcess.impl.PageChannel.allocateNewPage(PageChannel.java:339)
	at com.healthmarketscience.jackcess.impl.TempPageHolder.setNewPage(TempPageHolder.java:104)

 

Diagnosis:

The stack trace keeps growing as the methods are being called recursively, which causes the Java StackOverflowError. You should check what is causing the StackOverflowError instead of trying to fix it by increasing the Java stack size (-Xss), as that doesn't help.

 

This issue could occur because there is a limitation on the Access DB file size, or because the Access DB file is busy or corrupted.

 

Solution:

To resolve the issue:

Version history
Revision #:
5 of 5
Last update:
‎09-28-2018 11:58 PM
Updated by: