cancel
Showing results for 
Search instead for 
Did you mean: 

Problem upgrading from 1.2RC2 to 1.2 release

furtado
Champ in-the-making
Champ in-the-making
I just upgraded to the new 1.2 and now the server does not startup and throws the following error
10:08:12,655 INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
10:08:13,060 ERROR [admin.patch.PatchExecuter]
=== Failed to apply patch         ===
ID: patch.spacesRootPermission
RESULT:
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.alfresco.repo.security.permissions.impl.hibernate.PermissionReferenceImpl#org.alfresco.repo.security.permissions.impl.hibernate.PermissionReferenceImpl@3cce94f4]
   at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
   at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:65)
   at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
   at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:158)
   at org.hibernate.proxy.HibernateProxy$$EnhancerByCGLIB$$b78322eb.hashCode(<generated>)
   at org.alfresco.repo.security.permissions.impl.hibernate.PermissionEntryImpl.hashCode(PermissionEntryImpl.java)
   at java.util.HashMap.hash(HashMap.java:261)
   at java.util.HashMap.put(HashMap.java:379)
   at java.util.HashSet.add(HashSet.java:192)
   at java.util.AbstractCollection.addAll(AbstractCollection.java:319)
   at or…
=====================================
10:08:13,077 ERROR [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)
   at org.alfresco.repo.admin.patch.PatchExecuter.onApplicationEvent(PatchExecuter.java)
   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:3831)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4323)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
   at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
   at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:625)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
   at org.apache.catalina.core.StandardService.start(StandardService.java:480)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
   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:324)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
F
5 REPLIES 5

derek
Star Contributor
Star Contributor
Hi,

Are you able to send a dump of your database? (use my personal email address)
Also, what modifications do you have to the standard 1.2RC2 install in terms of configuration?

If we get a look at that data, then we should be able to, quite simply, supply a way to fix the database and put in a fix for the patch as well.

Thanks

furtado
Champ in-the-making
Champ in-the-making
HI,
   I mailed the db dump to your Alfresco email address.

No modifications were done to thee standard settings on 1.2RC2. but as we were having problems managing sceurity with RC2 we setup a parallel 1.1.2 to manage security.

derek
Star Contributor
Star Contributor
Hi,

Did you run a V1.1.2 against the database after running version 1.2RC2 against it?  What do you mean by "parallel"?


If you want to upgrade to 1.2, run the following statement against your DB.

DELETE FROM node_perm_entry where typeName = 'base' and name = 'Consumer'

It is an odd case, but thanks for the dump and I hope you are able to get on better with the 1.2 release.  Oh, and don't run two servers against the same database without first turning off the L2 caches.

Regards

furtado
Champ in-the-making
Champ in-the-making
Thanks Derek!.
   That worked like a charm.  I had two different sites one was a 1.1.2 that was started up only for admin and a 1.2RC2 pointing to the same database. I tried to ensure that only one of them was up at any given time, except for a couple of times when I forgot the bring down the 1.2RC2 before starting the one with 1.1.2. On those two occasions I had to restart the 1.2RC2 site to see te changes made in the 1.1.2 site. But now that I have 1.2 working I will take down the 1.1.2 site to avoid any further complications.

derek
Star Contributor
Star Contributor
No problems.  Let me just clarify, for the benefit of other concerned users, why the issue arose and what could have been done to prevent it.

Hibernate uses an L2 (level 2) cache that provides a cross-transaction, fast reads of objects already loaded from the database.  Data consistency (foreign key relationships) is enforced at this level AND at the database level if your database supports it.

In your case, the foreign key constraint violation was caused by the two servers not seeing the same data in their caches and MySQL not enforcing the constraints at the database level.

If you want to run two servers against shared data, then you need to cluster the servers (Enterprise functionality) or switch off the L2 caches.  The latter will not help you in the long run as the cache provides VERY significant performance improvements.

Regards