Failed patch.fixWebscriptTemplate due to violation of idx_alf_conturl_cr

cancel
Showing results for 
Search instead for 
Did you mean: 
jan_vanoverveld
Member II

Failed patch.fixWebscriptTemplate due to violation of idx_alf_conturl_cr

An Alfresco community upgrade from 4.2 to 5.1 fails over patch.fixWebscriptTemplate.

2019-03-26 14:44:01,217 ERROR [org.alfresco.repo.admin.patch.PatchExecuter] [localhost-startStop-1]
=== Failed to apply patch ===
ID: patch.fixWebscriptTemplate

update 5 april 2019,

This patch failure seems to be the result of the violation of a unique key constraint, namely: idx_alf_conturl_cr

Does anybody know how to work around this issue?

4 Replies
afaust
Master

Re: patch.fixWebscriptTemplate

I don't know why it fails in your case, but I know that you will find the answer to that question in your Alfresco log files / console output if you take a look (or share those logs here so people can point you to the cause).

jan_vanoverveld
Member II

Re: patch.fixWebscriptTemplate

Hello Axel, thank you for your reaction, I just tried an upgrade again. It still complains about the. (patch.fixWebscriptTemplate)

See the attached log file, hop you see something.

2019-04-01 07:10:14,346 INFO [org.alfresco.repo.admin] [localhost-startStop-1] Using database URL 'jdbc:mysql://dc-testdms-db-01.dummy.local/migratie?useUnicode=yes&characterEncoding=UTF-8' with user 'alfmigratie'.
2019-04-01 07:10:14,350 INFO [org.alfresco.repo.admin] [localhost-startStop-1] Connected to database MySQL version 5.5.57-0ubuntu0.14.04.1-log
2019-04-01 07:10:17,766 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Ignoring script patch (post-Hibernate): patch.db-V4.2-metadata-query-indexes
2019-04-01 07:10:17,767 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Ignoring script patch (post-Hibernate): patch.db-V5.1-metadata-query-indexes
2019-04-01 07:10:23,475 INFO [krinkels.alfresco.ocr.consumer.OcrDoneConsumer] [localhost-startStop-1] OcrDoneConsumer is being started. (QUEUE listener)
2019-04-01 07:10:23,476 INFO [krinkels.alfresco.ocr.consumer.OcrDoneConsumer] [localhost-startStop-1] Setting up JMS connection to %s
2019-04-01 07:10:23,681 INFO [krinkels.alfresco.ocr.consumer.OcrDoneConsumer] [localhost-startStop-1] Listening to queue %s
2019-04-01 07:10:23,706 INFO [krinkels.alfresco.ocr.consumer.OcrDoneConsumer] [localhost-startStop-1] OcrDoneConsumer is started and listens to the queue.
2019-04-01 07:10:23,924 INFO [org.springframework.extensions.webscripts.TemplateProcessorRegistry] [localhost-startStop-1] Registered template processor Repository Template Processor for extension ftl
2019-04-01 07:10:23,926 INFO [org.springframework.extensions.webscripts.ScriptProcessorRegistry] [localhost-startStop-1] Registered script processor Repository Script Processor for extension js
2019-04-01 07:10:25,445 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'ContentStore' subsystem, ID: [ContentStore, managed, unencrypted]
2019-04-01 07:10:25,480 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'ContentStore' subsystem, ID: [ContentStore, managed, unencrypted] complete
2019-04-01 07:10:25,554 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Connecting to database: jdbc:mysql://dc-testdms-db-01.dummy.local/migratie?useUnicode=yes&characterEncoding=UTF-8, UserName=alfmigratie@10.0.40.73, MySQL Connector Java
2019-04-01 07:10:25,555 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
2019-04-01 07:10:27,318 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [localhost-startStop-1] No changes were made to the schema.
2019-04-01 07:10:28,526 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Authentication' subsystem, ID: [Authentication, managed, passthru1]
2019-04-01 07:10:28,651 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'Authentication' subsystem, ID: [Authentication, managed, passthru1] complete
2019-04-01 07:10:28,651 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Authentication' subsystem, ID: [Authentication, managed, ldap-ad1]
2019-04-01 07:10:28,739 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'Authentication' subsystem, ID: [Authentication, managed, ldap-ad1] complete
2019-04-01 07:10:28,739 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
2019-04-01 07:10:28,784 DEBUG [org.alfresco.web.app.servlet.NTLMAuthenticationFilter] [localhost-startStop-1] NTLM filter guest access allowed
2019-04-01 07:10:28,785 DEBUG [org.alfresco.repo.webdav.auth.NTLMAuthenticationFilter] [localhost-startStop-1] NTLM filter guest access allowed
2019-04-01 07:10:28,798 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
2019-04-01 07:10:33,455 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'thirdparty' subsystem, ID: [thirdparty, default]
2019-04-01 07:10:33,568 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'thirdparty' subsystem, ID: [thirdparty, default] complete
2019-04-01 07:10:33,569 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'OOoDirect' subsystem, ID: [OOoDirect, default]
2019-04-01 07:10:33,820 WARN [org.alfresco.util.OpenOfficeConnectionTester] [localhost-startStop-1] An initial OpenOffice connection could not be established.
2019-04-01 07:10:33,823 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'OOoDirect' subsystem, ID: [OOoDirect, default] complete
2019-04-01 07:10:33,827 INFO [org.alfresco.repo.admin.ConfigurationChecker] [localhost-startStop-1] The Alfresco root data directory ('dir.root') is: /opt/alf51/alf_data
2019-04-01 07:10:33,827 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Search' subsystem, ID: [Search, managed, solr4]
2019-04-01 07:10:34,046 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'Search' subsystem, ID: [Search, managed, solr4] complete
2019-04-01 07:10:34,076 INFO [org.alfresco.repo.admin.patch.PatchExecuter] [localhost-startStop-1] Checking for patches to apply ...
2019-04-01 07:10:35,360 INFO [org.alfresco.repo.admin.patch.PatchExecuter] [localhost-startStop-1]     Applying patch 'patch.fixWebscriptTemplate' (Reimport fixed sample template.).
2019-04-01 07:10:37,135 ERROR [org.alfresco.repo.admin.patch.PatchExecuter] [localhost-startStop-1] 03010000 java.lang.IllegalStateException: Already value [org.mybatis.spring.SqlSessionHolder@1ecdaa9c] for key [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory@862b025] bound to thread [localhost-startStop-1]
    at org.springframework.transaction.support.TransactionSynchronizationManager.bindResource(TransactionSynchronizationManager.java:189)
    at org.mybatis.spring.SqlSessionUtils$SqlSessionSynchronization.resume(SqlSessionUtils.java:268)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.doResumeSynchronization(AbstractPlatformTransactionManager.java:681)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.resume(AbstractPlatformTransactionManager.java:633)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:1015)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:805)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
    at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:482)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:479)
    at org.alfresco.repo.admin.patch.AbstractPatch.applyWithTxns(AbstractPatch.java:455)
    at org.alfresco.repo.admin.patch.AbstractPatch.access$0(AbstractPatch.java:435)
    at org.alfresco.repo.admin.patch.AbstractPatch$4.doWork(AbstractPatch.java:613)
    at org.alfresco.repo.admin.patch.AbstractPatch$4.doWork(AbstractPatch.java:1)
    at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
    at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:617)
    at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:579)
    at org.alfresco.repo.admin.patch.PatchServiceImpl$PatchWork.applyPatch(PatchServiceImpl.java:557)
    at org.alfresco.repo.admin.patch.PatchServiceImpl$PatchWork.execute(PatchServiceImpl.java:470)
    at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatch(PatchServiceImpl.java:325)
    at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatchAndDependencies(PatchServiceImpl.java:302)
    at org.alfresco.repo.admin.patch.PatchServiceImpl.applyOutstandingPatches(PatchServiceImpl.java:191)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at com.sun.proxy.$Proxy121.applyOutstandingPatches(Unknown Source)
    at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(PatchExecuter.java:76)
    at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:124)
    at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:1)
    at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
    at org.alfresco.repo.admin.patch.PatchExecuter.onBootstrap(PatchExecuter.java:128)
    at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
    at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:207)
    at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:178)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:950)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

2019-04-01 07:10:37,213 ERROR [org.alfresco.repo.admin.patch.PatchExecuter] [localhost-startStop-1]
=== Failed to apply patch ===
ID: patch.fixWebscriptTemplate
RESULT:
03010000 java.lang.IllegalStateException: Already value [org.mybatis.spring.SqlSessionHolder@1ecdaa9c] for key [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory@862b025] bound to thread [localhost-startStop-1]
    at org.springframework.transaction.support.TransactionSynchronizationManager.bindResource(TransactionSynchronizationManager.java:189)
    at org.mybatis.spring.SqlSessionUtils$SqlSessionSynchronization.resume(SqlSessionUtils.java:268)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.doResumeSynchronization(AbstractPlatformTransactionManager.java:681)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.resume(AbstractPlatformTransactionManager.java:633)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:1015)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:805)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
    at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:482)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:479)
    at org.alfresco.repo.admin.patch.AbstractPatch.applyWithTxns(AbstractPatch.java:455)
    at org.alfresco.repo.admin.patch.AbstractPatch.access$0(AbstractPatch.java:435)
    at org.alfresco.repo.admin.patch.AbstractPatch$4.doWork(AbstractPatch.java:613)
    at org.alfresco.repo.admin.patch.AbstractPatch$4.doWork(AbstractPatch.java:1)
    at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
    at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:617)
    at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:579)
    at org.alfresco.repo.admin.patch.PatchServiceImpl$PatchWork.applyPatch(PatchServiceImpl.java:557)
    at org.alfresco.repo.admin.patch.PatchServiceImpl$PatchWork.execute(PatchServiceImpl.java:470)
    at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatch(PatchServiceImpl.java:325)
    at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatchAndDependencies(PatchServiceImpl.java:302)
    at org.alfresco.repo.admin.patch.PatchServiceImpl.applyOutstandingPatches(PatchServiceImpl.java:191)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at com.sun.proxy.$Proxy121.applyOutstandingPatches(Unknown Source)
    at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(PatchExecuter.java:76)
    at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:124)
    at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:1)
    at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
    at org.alfresco.repo.admin.patch.PatchExecuter.onBootstrap(PatchExecuter.java:128)
    at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
    at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:207)
    at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:178)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:950)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

=====================================
2019-04-01 07:10:37,214 ERROR [org.springframework.web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 03010001 Not all patches could be applied
    at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(PatchExecuter.java:111)
    at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:124)
    at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:1)
    at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
    at org.alfresco.repo.admin.patch.PatchExecuter.onBootstrap(PatchExecuter.java:128)
    at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
    at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:207)
    at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:178)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:950)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2019-04-01 07:10:40,591 WARN [org.springframework.web.context.support.XmlWebApplicationContext] [localhost-startStop-1] Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.NullPointerException
    at org.alfresco.repo.workflow.activiti.ActivitiEngineInitializer.onShutdown(ActivitiEngineInitializer.java:58)
    at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:67)
    at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:207)
    at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:183)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1051)
    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1012)
    at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586)
    at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5063)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5719)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2019-04-01 07:10:40,700 INFO [krinkels.alfresco.ocr.consumer.OcrDoneConsumer] [localhost-startStop-1] QUEUE listener is being stopped.
2019-04-01 07:10:40,700 DEBUG [krinkels.alfresco.ocr.consumer.OcrDoneConsumer] [localhost-startStop-1] closing consumer
2019-04-01 07:10:40,702 DEBUG [krinkels.alfresco.ocr.consumer.OcrDoneConsumer] [localhost-startStop-1] closing session
2019-04-01 07:10:40,702 DEBUG [krinkels.alfresco.ocr.consumer.OcrDoneConsumer] [localhost-startStop-1] closing connection
2019-04-01 07:10:40,708 INFO [krinkels.alfresco.ocr.consumer.OcrDoneConsumer] [localhost-startStop-1] Stopped QUEUE listening process.
2019-04-01 07:10:40,883 WARN [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'solrSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
2019-04-01 07:10:40,884 WARN [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'activitiesSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
2019-04-01 07:10:40,885 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'OOoDirect' subsystem, ID: [OOoDirect, default]
2019-04-01 07:10:40,886 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'OOoDirect' subsystem, ID: [OOoDirect, default]
2019-04-01 07:10:40,886 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'ContentStore' subsystem, ID: [ContentStore, managed, unencrypted]
2019-04-01 07:10:40,886 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'ContentStore' subsystem, ID: [ContentStore, managed, unencrypted]
2019-04-01 07:10:41,249 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'Search' subsystem, ID: [Search, managed, solr4]
2019-04-01 07:10:41,394 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'Search' subsystem, ID: [Search, managed, solr4]
2019-04-01 07:10:41,422 WARN [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'locksSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
2019-04-01 07:10:41,424 WARN [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'propertyValueSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
2019-04-01 07:10:41,424 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'thirdparty' subsystem, ID: [thirdparty, default]
2019-04-01 07:10:41,424 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'thirdparty' subsystem, ID: [thirdparty, default]
2019-04-01 07:10:41,425 WARN [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'auditSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
2019-04-01 07:10:41,425 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'Authentication' subsystem, ID: [Authentication, managed, passthru1]
2019-04-01 07:10:41,425 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'Authentication' subsystem, ID: [Authentication, managed, passthru1]
2019-04-01 07:10:41,426 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'Authentication' subsystem, ID: [Authentication, managed, ldap-ad1]
2019-04-01 07:10:41,426 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'Authentication' subsystem, ID: [Authentication, managed, ldap-ad1]
2019-04-01 07:10:41,426 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
2019-04-01 07:10:41,426 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
2019-04-01 07:10:41,426 WARN [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'contentSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
2019-04-01 07:10:41,428 WARN [org.springframework.beans.factory.support.DisposableBeanAdapter] [localhost-startStop-1] Invocation of destroy method 'close' failed on bean with name 'repoSqlSessionTemplate': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
jan_vanoverveld
Member II

Re: patch.fixWebscriptTemplate

It looks like the migration from 4.2 CE to 5.1 CE fails on a duplicate key. 

In the Alfresco repository the violation of unique constraint idx_alf_content_cr seems to trigger the failure of patch.fixWebscriptTemplate.

=== Failed to apply patch ===
ID: patch.fixWebscriptTemplate

Does anybody have an idea how to work around this issue?

sincerely,

Jan

DETAIL:  parameters: $1 = '6321702', $2 = '1', $3 = '6430931', $4 = '6430939', $5 = '161', $6 = '-3410033690', $7 = 'ef971266-cfa8-496b-93f2-14eb4e55d675', $8 = '5', $9 = 'version-0', $10 = '3486964613', $11 = 't', $12 = '-1'

LOG:  execute <unnamed>: RELEASE SAVEPOINT "DuplicateChildNodeNameException"

LOG:  execute <unnamed>: SAVEPOINT "EntityLookupCache.createOrGetByValue"

LOG:  execute <unnamed>: select nextVal('alf_content_url_seq')

LOG:  execute <unnamed>: insert into alf_content_url (id, content_url, content_url_short, content_url_crc, content_size, orphan_time)

            values ($1, $2, $3, $4, $5, $6)

DETAIL:  parameters: $1 = '3714817', $2 = 'store://2019/4/2/16/4/94f84ea5-776d-48d4-a37f-f8d354c15685.bin', $3 = '54c15685.bin', $4 = '2486328869', $5 = '469', $6 = NULL

ERROR:  duplicate key value violates unique constraint "idx_alf_conturl_cr"

DETAIL:  Key (content_url_short, content_url_crc)=(54c15685.bin, 2486328869) already exists.

STATEMENT:  insert into alf_content_url (id, content_url, content_url_short, content_url_crc, content_size, orphan_time)

            values ($1, $2, $3, $4, $5, $6)

LOG:  execute <unnamed>: ROLLBACK TO SAVEPOINT "EntityLookupCache.createOrGetByValue"

jan_vanoverveld
Member II

Re: Failed patch.fixWebscriptTemplate due to violation of idx_alf_conturl_cr

After deleting the samle webscript in 

dictionary/webscripts/org/alfresco

the migration of the repository got futher

a few other adjustments, and the 4.2f CE repository now runs as 5.1 CE for the first time