cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade to 4.0.a failing using the maven alfresco lifecycle

billerby
Champ on-the-rise
Champ on-the-rise
I'm using the maven alfresco way of building my war (http://wiki.alfresco.com/wiki/Managing_Alfresco_Lifecyle_with_Maven).

I have installed all alfresco 4.0.a artifacts in my local repository. The alfresco war is built without errors but one of the upgrade patches fails when I start the container:

If anyone has a clue what the reason to this failure is, please don't hesitate to share this information with me Smiley Happy

Regards
/Erik


=====================================
10:16:47,964 ERROR [admin.patch.PatchExecuter]
=== Failed to apply patch         ===
ID: patch.siteLoadPatch.swsdp
RESULT:
09130001 java.lang.NullPointerException
   at org.alfresco.repo.security.authentication.AbstractChainingAuthenticationService.getDefaultAdministratorUserNames(AbstractChainingAuthenticationService.java:534)
   at org.alfresco.repo.security.authority.AuthorityServiceImpl.getRoleAuthorities(AuthorityServiceImpl.java:256)
   at org.alfresco.repo.security.authority.AuthorityServiceImpl.access$000(AuthorityServiceImpl.java:52)
   at org.alfresco.repo.security.authority.AuthorityServiceImpl$UserAuthoritySet.<init>(AuthorityServiceImpl.java:717)
   at org.alfresco.repo.security.authority.AuthorityServiceImpl.getAuthoritiesForUser(AuthorityServiceImpl.java:247)
   at org.alfresco.repo.security.permissions.impl.PermissionServiceImpl.getCoreAuthorisations(PermissionServiceImpl.java:769)
   at org.alfresco.repo.security.permissions.impl.PermissionServiceImpl.getAuthorisations(PermissionServiceImpl.java:823)
   at org.alfresco.repo.security.permissions.impl.PermissionServiceImpl.hasPermission(PermissionServiceImpl.java:659)
   at org.alfresco.repo.security.permissions.impl.PermissionServiceImpl.hasPermission(PermissionServiceImpl.java:509)
   at org.alfresco.repo.security.permissions.impl.PermissionServiceImpl.hasPermission(PermissionServiceImpl.java:1006)
   at sun.reflect.GeneratedMethodAccessor366.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   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.invoke(TransactionInterceptor.java:110)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy24.hasPermission(Unknown Source)
   at org.alfresco.repo.security.permissions.impl.acegi.ACLEntryVoter.vote(ACLEntryVoter.java:437)
   at net.sf.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:69)
   at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:394)
   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:146)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy8.hasAspect(Unknown Source)
   at org.alfresco.repo.tagging.TaggingServiceImpl.addTagScope(TaggingServiceImpl.java:783)
   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:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:146)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy83.addTagScope(Unknown Source)
   at org.alfresco.repo.site.SiteServiceImpl.createSite(SiteServiceImpl.java:483)
   at org.alfresco.repo.site.SiteServiceImpl.createSite(SiteServiceImpl.java:426)
   at org.alfresco.repo.admin.patch.impl.SiteLoadPatch.applyInternalImpl(SiteLoadPatch.java:208)
   at org.alfresco.repo.admin.patch.impl.SiteLoadPatch.applyInternal(SiteLoadPatch.java:166)
   at org.alfresco.repo.admin.patch.AbstractPatch.applyImpl(AbstractPatch.java:407)
   at org.alfresco.repo.admin.patch.AbstractPatch.access$000(AbstractPatch.java:52)
   at org.alfresco.repo.admin.patch.AbstractPatch$2$1.execute(AbstractPatch.java:466)
   at org.alfresco.repo.admin.patch.AbstractPatch$2$1.execute(AbstractPatch.java:463)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.admin.patch.AbstractPatch$2.doWork(AbstractPatch.java:469)
   at org.alfresco.repo.admin.patch.AbstractPatch$2.doWork(AbstractPatch.java:456)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:478)
   at org.alfresco.repo.admin.patch.PatchServiceImpl$PatchWork.applyPatch(PatchServiceImpl.java:491)
   at org.alfresco.repo.admin.patch.PatchServiceImpl$PatchWork.execute(PatchServiceImpl.java:403)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatch(PatchServiceImpl.java:258)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatchAndDependencies(PatchServiceImpl.java:235)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.applyOutstandingPatches(PatchServiceImpl.java:171)
   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:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   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.invoke(TransactionInterceptor.java:110)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy92.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:120)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   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:209)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
   at org.apache.catalina.core.StandardService.start(StandardService.java:525)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
   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:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

=====================================
10:16:48,011 ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 09130002 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:120)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   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:209)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
   at org.apache.catalina.core.StandardService.start(StandardService.java:525)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
   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:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2011-okt-13 10:16:48 org.apache.catalina.core.StandardContext listenerStart
ALLVARLIG: Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextLoaderListener
org.alfresco.error.AlfrescoRuntimeException: 09130002 Not all patches could be applied
1 REPLY 1

billerby
Champ on-the-rise
Champ on-the-rise
I think I know what caused this problem now. However since I tried to start with a vanilla war instead (which applied all patches) before reverting to my maven built war I not 100% sure yet.

My guess is however that the reason lies in that i had both alfrescoNtlm and ldap-ad configured in my authentication-chain and the ldap.authentication flag set to false. (since I'm not using this in my development environment). The stacktrace indicates that the authenticationService was not correctly injected by spring and with some debugging I found out that it was the ldap authentication subsystem component that was throwing the error. For some reason Alfresco uses the subsystem in some way although its set to false.

/Erik