I write a circulation to save thousands of documents into the Repository; But after executing about 500 times,it throws exceptions as below:
\"org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager - failed to write node state: 573c07a7-60c0-4a2d-8dac-621fe0ba0bda
java.lang.OutOfMemoryError: Java heap space
at org.apache.derby.iapi.services.io.DynamicByteArrayOutputStream.<init>(Unknown Source)
at org.apache.derby.impl.store.raw.data.StoredPage.doUpdateAtSlot(Unknown Source)
……………………\"
I guess Session ItemManager Cache and CacheManager Cache would cause the problem. So,is there any method to clear the cache after every save option.
(\'Node.save\' or \'session.save\' can\'t solve de problem)
\"org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager - failed to write node state: 573c07a7-60c0-4a2d-8dac-621fe0ba0bda
java.lang.OutOfMemoryError: Java heap space
at org.apache.derby.iapi.services.io.DynamicByteArrayOutputStream.<init>(Unknown Source)
at org.apache.derby.impl.store.raw.data.StoredPage.doUpdateAtSlot(Unknown Source)
……………………\"
I guess Session ItemManager Cache and CacheManager Cache would cause the problem. So,is there any method to clear the cache after every save option.
(\'Node.save\' or \'session.save\' can\'t solve de problem)