AnsweredAssumed Answered

1.2.1 to 1.3 upgrade yields fatal Patch errors

Question asked by didierm on Aug 14, 2006
Latest reply on Aug 16, 2006 by didierm
Upgrading from 1.21. to 1.3 seems to be a bumpy road. Does anyone have an idea concerning the issue quoted in 3. with the PatchServiceImpl/PatchExecuter  ?



1.
Trying to run the MySQL upgrade script from the alfresco-community-tomcat-1.3.0 distribution (after applying the case changes as indicated in http://wiki.alfresco.com/wiki/Upgrading_to_1.3.0) yields a
    ERROR 1062 (23000) at line 624: Duplicate entry
error.


2.
This is corrected by downloading the latest SVN upgrade scripts :
svn co svn://www.alfresco.org/alfresco/HEAD/root/projects/installer/upgrade/scripts alfresco-upgrade-scripts
, and applying the following new case changes :
132c132
< ALTER TABLE `t_node_properties` ADD INDEX `IDX_REF`(`protocol`, `identifier`, `uuid`);

> ALTER TABLE `T_node_properties` ADD INDEX `IDX_REF`(`protocol`, `identifier`, `uuid`);
142c142
< ALTER TABLE `t_node_status` ADD INDEX `IDX_REF`(`protocol`, `identifier`, `guid`);

> ALTER TABLE `T_node_status` ADD INDEX `IDX_REF`(`protocol`, `identifier`, `guid`);
156c156
< ALTER TABLE `t_store` ADD INDEX `IDX_STORE_REF`(`protocol`, `identifier`);

> ALTER TABLE `T_store` ADD INDEX `IDX_STORE_REF`(`protocol`, `identifier`);
185c185
< insert into t_version_count (protocol, identifier, version_count)

> insert into T_version_count (protocol, identifier, version_count)
188c188
< insert into t_node_status (protocol, identifier, guid, change_txn_id, deleted)

> insert into T_node_status (protocol, identifier, guid, change_txn_id, deleted)
307c307
<     externalkeys;

>     externalKeys;
365c365
< delete from T_access_control_list where id not in (select distinct(acl_id) id from t_access_control_entry where acl_id is not null);

> delete from T_access_control_list where id not in (select distinct(acl_id) id from T_access_control_entry where acl_id is not null);


3.
Unfortunately (and this is the showstopper for me), subsequent launching of the stock alfresco-community-tomcat-1.3.0 yields the following fatal errors :

    17:32:56,833 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: imconvert /opt/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_source_47828.gif  /opt/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_target_47829.png
    17:33:02,509 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
    17:33:02,771 ERROR [org.alfresco.repo.admin.patch.PatchServiceImpl] org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.alfresco.repo.domain.hibernate.DbAccessControlListImpl#2]
       at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
       at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:128)
       at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
       at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
       at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862)
       at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:830)
       at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
       at org.hibernate.type.EntityType.resolve(EntityType.java:303)
       at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116)
       at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
       at org.hibernate.loader.Loader.doQuery(Loader.java:717)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
       at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
       at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:47)
       at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:41)
       at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730)
       at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365)
       at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346)
       at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
       at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:82)
       at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862)
       at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:820)
       at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:62)
       at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:158)
       at org.alfresco.repo.domain.Node$$EnhancerByCGLIB$$c2458312.getNodeRef(<generated>)
       at org.alfresco.repo.domain.hibernate.ChildAssocImpl.getChildAssocRef(ChildAssocImpl.java:109)
       at org.alfresco.repo.node.db.DbNodeServiceImpl.getChildAssocs(DbNodeServiceImpl.java:1008)
       at org.alfresco.repo.node.AbstractNodeServiceImpl.getChildAssocs(AbstractNodeServiceImpl.java:569)
       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.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:213)
       at $Proxy2.getChildAssocs(Unknown Source)
       at org.alfresco.repo.search.DocumentNavigator.getChildAxisIterator(DocumentNavigator.java:359)
       at org.jaxen.expr.iter.IterableChildAxis.iterator(IterableChildAxis.java:82)
       at org.jaxen.expr.DefaultNameStep.evaluate(DefaultNameStep.java:206)
       at org.jaxen.expr.DefaultLocationPath.evaluate(DefaultLocationPath.java:154)
       at org.jaxen.expr.DefaultAbsoluteLocationPath.evaluate(DefaultAbsoluteLocationPath.java:121)
       at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:112)
       at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:688)
       at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:227)
       at org.alfresco.repo.search.NodeServiceXPath.selectNodes(NodeServiceXPath.java:187)
       at org.alfresco.repo.search.impl.NodeSearcher.selectNodes(NodeSearcher.java:130)
       at org.alfresco.repo.search.impl.lucene.LuceneSearcherImpl.selectNodes(LuceneSearcherImpl.java:491)
       at org.alfresco.repo.search.SearcherComponent.selectNodes(SearcherComponent.java:100)
       at org.alfresco.repo.search.AbstractSearcherComponent.selectNodes(AbstractSearcherComponent.java:69)
       at org.alfresco.repo.admin.patch.impl.EmailTemplatesFolderPatch.setUp(EmailTemplatesFolderPatch.java:127)
       at org.alfresco.repo.admin.patch.impl.EmailTemplatesFolderPatch.applyInternal(EmailTemplatesFolderPatch.java:175)
       at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.java:332)
       at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.java:335)
       at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:168)
       at org.alfresco.repo.transaction.TransactionUtil.executeInNonPropagatingUserTransaction(TransactionUtil.java:108)
       at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:337)
       at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatch(PatchServiceImpl.java:185)
       at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatchAndDependencies(PatchServiceImpl.java:140)
       at org.alfresco.repo.admin.patch.PatchServiceImpl.applyOutstandingPatches(PatchServiceImpl.java:96)
       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:335)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
       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 $Proxy23.applyOutstandingPatches(Unknown Source)
       at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(PatchExecuter.java:64)
       at org.alfresco.repo.admin.patch.PatchExecuter.onApplicationEvent(PatchExecuter.java:112)
       at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:45)
       at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:225)
       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:323)
       at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
       at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
       at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
       at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3692)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4127)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
       at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
       at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
       at org.apache.catalina.core.StandardService.start(StandardService.java:450)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
       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:275)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

    17:33:02,808 ERROR [org.alfresco.repo.admin.patch.PatchExecuter]
    === Failed to apply patch         ===
    ID: patch.emailTemplatesFolder
    RESULT:
    org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.alfresco.repo.domain.hibernate.DbAccessControlListImpl#2]
       at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
       at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:128)
       at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
       at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
       at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862)
       at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:830)
       at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
       at org.hibernate.type.EntityType.resolve(EntityType.java:303)
       at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116)
       at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
       at org.hibernate.loader.Loader.doQuery(Loader.java:717)
       at org.hibern…
    =====================================
    17:33:02,810 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
    org.alfresco.error.AlfrescoRuntimeException: Not all patches could be applied
       at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(PatchExecuter.java:99)
       at org.alfresco.repo.admin.patch.PatchExecuter.onApplicationEvent(PatchExecuter.java:112)
       at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:45)


    etc.


Any pointers would be greatly appreciated.

Outcomes