java.lang.StackOverflowError

Product:
Cognos Controller FAP service
Windows 2012 R2
Microsoft SQL database

Symptom:
Start FAP Initial Publish for first time, after a half hour you get a fail message. Also show “java.lang.StackOverflowError” if you hold your mouse over the message in FAP log dialog.
You try by restart and new test but get same result again.

Text in C:\Program Files\ibm\cognos\ccr_64\Server\FAP\error.log file can be:

2015-08-25 17:47:42,429 [schedulerThread] INFO Scheduler – FAP service started on host:SEservername.domainsweden.com
2015-08-25 18:15:30,786 [pool-4-thread-7] ERROR RetryInterceptor – Trial 1 failed for method populateMonthlyPeriod
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.ibm.cognos.fap.common.persistence.retry.RetryInterceptor.intercept(RetryInterceptor.java:45)
at com.ibm.cognos.fap.service.persistence.dao.period.PeriodFAPDaoMSSqlServer$$EnhancerByCGLIB$$519ff1f8.populateMonthlyPeriod()
at com.ibm.cognos.fap.service.dimension.Period.addMonthlyPeriodIfItNotExist(Period.java:182)
at com.ibm.cognos.fap.service.dimension.Period.addMonthlyPeriodIfItNotExist(Period.java:184)
at com.ibm.cognos.fap.service.dimension.Period.addMonthlyPeriodIfItNotExist(Period.java:184)
at com.ibm.cognos.fap.service.dimension.Period.addMonthlyPeriodIfItNotExist(Period.java:184)
at com.ibm.cognos.fap.service.dimension.Period.addMonthlyPeriodIfItNotExist(Period.java:184)

at com.ibm.cognos.fap.service.dimension.Period.addMonthlyPeriodIfItNotExist(Period.java:184)
at com.ibm.cognos.fap.service.dimension.Period.addMonthlyPeriodIfItNotExist(Period.java:184)
at com.ibm.cognos.fap.service.dimension.Period.addMonthlyPeriodIfItNotExist(Period.java:184)
at com.ibm.cognos.fap.service.dimension.facts.BaseFactsHandler.addPeriodsIfTheyNotExist(BaseFactsHandler.java:276)
at com.ibm.cognos.fap.service.dimension.facts.CompositeFactsHandler.addPeriodsIfTheyNotExist(CompositeFactsHandler.java:258)
at com.ibm.cognos.fap.service.dimension.facts.Facts$Transformer.run(Facts.java:128)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:483)
at java.util.concurrent.FutureTask.run(FutureTask.java:274)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
at java.lang.Thread.run(Thread.java:801)
Caused by:
java.lang.StackOverflowError
at java.util.concurrent.CopyOnWriteArrayList.toArray(CopyOnWriteArrayList.java:364)
at java.util.logging.Logger.accessCheckedHandlers(Logger.java:1368)
at java.util.logging.LogManager$RootLogger.accessCheckedHandlers(LogManager.java:1507)
at java.util.logging.Logger.getHandlers(Logger.java:1362)
at java.util.logging.Logger.log(Logger.java:624)
at java.util.logging.Logger.doLog(Logger.java:653)
at java.util.logging.Logger.log(Logger.java:676)
at java.util.logging.Logger.severe(Logger.java:1162)
at com.microsoft.sqlserver.jdbc.TDSParser.throwUnexpectedTokenException(tdsparser.java:97)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:88)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1488)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.processResults(SQLServerStatement.java:1135)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.processBatch(SQLServerStatement.java:1123)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.processExecuteResults(SQLServerStatement.java:1115)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.processResponse(SQLServerPreparedStatement.java:347)
at com.microsoft.sqlserver.jdbc.TDSCommand.close(IOBuffer.java:4660)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.discardLastExecutionResults(SQLServerStatement.java:93)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.closeInternal(SQLServerStatement.java:583)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.closeInternal(SQLServerPreparedStatement.java:172)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.close(SQLServerStatement.java:595)
at org.apache.commons.dbcp.DelegatingStatement.close(DelegatingStatement.java:168)
at com.ibm.cognos.fap.common.persistence.dao.BaseDao.closeJDBCObjects(BaseDao.java:85)
at com.ibm.cognos.fap.service.persistence.dao.period.PeriodFAPDao.populateMonthlyPeriod(PeriodFAPDao.java:135)
… 5294 more

Solution:
Try with a different Cognos Controller database as a source. Try with less period of data, only select 6 months instead of 18 months inside the FAP manager client.