AnsweredAssumed Answered

Updating Alfresco's DB (permission) scheme fails

Question asked by hbf on Sep 14, 2008
Latest reply on Sep 15, 2008 by hbf
Hi,

I try to update our Alfresco installation to the latest SVN revision (r3009) and get the following error:

6:52:50,157  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
16:53:01,786  INFO  [domain.schema.SchemaBootstrap] Executing database script /Users/hbf/icar/checkout/knowledge-center-icar/trunk/repository-server/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-24393.sql (Generated).
16:53:02,030  INFO  [domain.schema.SchemaBootstrap] Executing database script /Users/hbf/icar/checkout/knowledge-center-icar/trunk/repository-server/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-24394.sql (Copied from classpath:alfresco/dbscripts/create/3.0/org.hibernate.dialect.MySQLInnoDBDialect/create-activities-extras.sql).
16:53:02,380  INFO  [domain.schema.SchemaBootstrap] All executed statements written to file /Users/hbf/icar/checkout/knowledge-center-icar/trunk/repository-server/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-All_Statements-24395.sql.
16:53:09,776 User:System WARN  [node.index.FullIndexRecoveryComponent] The indexes are not synchronized with the database.
16:53:10,335 User:System INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /Users/hbf/icar/checkout/knowledge-center-icar/trunk/repository-server/alf_data
16:53:10,778 User:System INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
16:53:10,922 User:System INFO  [admin.patch.PatchExecuter]    Applying patch 'patch.updateDmPermissions' (Update ACLs on all DM node objects to the new 3.0 permission model).
16:59:13,921  INFO  [admin.patch.PatchExecuter]       Patch 10% complete, estimated complete at 9/14/08 5:53 PM.
17:10:23,169  INFO  [admin.patch.PatchExecuter]       Patch 20% complete, estimated complete at 9/14/08 6:19 PM.
17:18:38,154  INFO  [admin.patch.PatchExecuter]       Patch 25% complete, estimated complete at 9/14/08 6:34 PM.
17:27:56,572  INFO  [admin.patch.PatchExecuter]       Patch 30% complete, estimated complete at 9/14/08 6:49 PM.
18:04:41,844  INFO  [admin.patch.PatchExecuter]       Patch 35% complete, estimated complete at 9/14/08 8:17 PM.
18:18:15,863  INFO  [admin.patch.PatchExecuter]       Patch 40% complete, estimated complete at 9/14/08 8:25 PM.
18:34:36,536  INFO  [admin.patch.PatchExecuter]       Patch 45% complete, estimated complete at 9/14/08 8:38 PM.
Exception in thread "TraceableThread-2-thread-9" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Timer-1" Exception in thread "PageSavingThread-wicket.website" Exception in thread "TraceableThread-2-thread-7"    at java.util.concurrent.locks.AbstractQueuedSynchronizer.addWaiter(AbstractQueuedSynchronizer.java:546)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireInterruptibly(AbstractQueuedSynchronizer.java:762)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1099)
   at java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:307)
   at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:355)
   at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:470)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
   at java.lang.Thread.run(Thread.java:613)
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
   at java.util.concurrent.ConcurrentHashMap.isEmpty(ConcurrentHashMap.java:654)
   at org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:943)
   at java.lang.Thread.run(Thread.java:613)
java.lang.OutOfMemoryError: Java heap space
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1657)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1837)
   at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:359)
   at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:470)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
   at java.lang.Thread.run(Thread.java:613)
18:40:56,365 User:System ERROR [admin.patch.PatchExecuter] java.lang.NullPointerException
   at org.alfresco.repo.domain.hibernate.NodeImpl.hashCode(NodeImpl.java:153)
   at java.util.HashMap.put(HashMap.java:418)
   at java.util.HashSet.add(HashSet.java:194)
   at org.alfresco.repo.domain.hibernate.HibernateSessionHelperResource.doResetAndRemove(HibernateSessionHelperResource.java:221)
   at org.alfresco.repo.domain.hibernate.HibernateSessionHelperResource.resetAndRemoveMark(HibernateSessionHelperResource.java:170)
   at org.alfresco.repo.domain.hibernate.HibernateSessionHelper.resetAndRemoveMark(HibernateSessionHelper.java:85)
   at org.alfresco.repo.domain.hibernate.DMAccessControlListDAO.fixOldDmAcls(DMAccessControlListDAO.java:199)
   at org.alfresco.repo.domain.hibernate.DMAccessControlListDAO.patchAcls(DMAccessControlListDAO.java:175)
   at org.alfresco.repo.admin.patch.impl.DmPermissionsPatch.applyInternal(DmPermissionsPatch.java:62)
   at org.alfresco.repo.admin.patch.AbstractPatch$1$1.execute(AbstractPatch.java:386)
   at org.alfresco.repo.admin.patch.AbstractPatch$1$1.execute(AbstractPatch.java:380)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:294)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:209)
   at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.java:412)
   at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.java:376)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:585)
   at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:416)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatch(PatchServiceImpl.java:265)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.access$200(PatchServiceImpl.java:56)
   at org.alfresco.repo.admin.patch.PatchServiceImpl$2.execute(PatchServiceImpl.java:208)
   at org.alfresco.repo.admin.patch.PatchServiceImpl$2.execute(PatchServiceImpl.java:206)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:294)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatchAndDependencies(PatchServiceImpl.java:211)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.applyOutstandingPatches(PatchServiceImpl.java:145)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   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:296)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
   at $Proxy50.applyOutstandingPatches(Unknown Source)
   at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(PatchExecuter.java:89)
   at org.alfresco.repo.admin.patch.PatchExecuter.onBootstrap(PatchExecuter.java:132)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

My JVM has 2.5GB and the update consumes it all (allocated memory keeps growing during the update). Any idea what I could do in order to resolve this?

Thanks in advance,
Kaspar

Outcomes