AnsweredAssumed Answered

Heap space and composite-action Error

Question asked by srinivasan on Aug 12, 2006
Hi Developers,

I am trying to execute my code, which will upload thousands of folders and files from my system to alfresco. It is a one time process.

When i trying to run my code i am getting the following exeception

19:12:37,718 ERROR [repo.action.ActionServiceImpl] An error was encountered whilst executing the action 'composite-action'.
java.lang.OutOfMemoryError: Java heap space
19:12:40,671 ERROR [util.transaction.SpringAwareUserTransaction] Transaction didn't commit
org.alfresco.service.cmr.action.ActionServiceException: The action failed to execute due to an error.
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:504)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:383)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:371)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:532)
   at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
   at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:32)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:37)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   at $Proxy18.executeAction(Unknown Source)
   at org.alfresco.repo.rule.RuleServiceImpl.executePendingRule(RuleServiceImpl.java:779)
   at org.alfresco.repo.rule.RuleServiceImpl.executePendingRules(RuleServiceImpl.java:715)
   at org.alfresco.repo.rule.RuleTransactionListener.beforeCommit(RuleTransactionListener.java:61)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:586)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:657)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:482)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:469)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:266)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:397)
   at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:178)
   at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:74)
   at com.tpt.ten10.execute.Ten10Executer.main(Ten10Executer.java:69)
Caused by: java.lang.OutOfMemoryError: Java heap space
Exception in thread "main" org.alfresco.error.AlfrescoRuntimeException: Unexpected rollback of exception:
Transaction didn't commit: The action failed to execute due to an error.
   at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:184)
   at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:74)
   at com.tpt.ten10.execute.Ten10Executer.main(Ten10Executer.java:69)
Caused by: javax.transaction.RollbackException: Transaction didn't commit: The action failed to execute due to an error.
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:404)
   at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:178)
   … 2 more


Actually i running this code inside the transaction block. I felt it is safe for me to run the code inside the transaction block. Because when an error is occured, the transaction get rollbacked.

Running the code inside the transaction block is advisable or not?

Possibility of error is because of system memory space?

Why i am getting this error?

please give some solution


Thanks

Outcomes