AnsweredAssumed Answered

Upgrading 1.2.1 to 1.3.0 (Store does not have a root node)

Question asked by rgauss on Jul 31, 2006
Latest reply on Aug 21, 2006 by egabbud
Yes, yet another upgrade problem post, hope I didn't miss an already posted solution to this.

After fixing the case errors in the upgrade script (and adding those notes to the wiki) and successfully completing the MySQL changes, replacing the alfresco.war with the 1.3.0, then starting up Tomcat I get:


INFO: Deploying web application archive alfresco.war
Jul 31, 2006 2:37:24 PM net.sf.joott.uno.UnoConnection connect
INFO: connecting using "socket,host=localhost,port=8100,tcpNoDelay=1"…
Jul 31, 2006 2:37:25 PM net.sf.joott.uno.UnoConnection connect
INFO: connected
Jul 31, 2006 2:37:25 PM net.sf.joott.uno.UnoConnection connect
INFO: connecting using "socket,host=localhost,port=8100,tcpNoDelay=1"…
Jul 31, 2006 2:37:25 PM net.sf.joott.uno.UnoConnection connect
INFO: connected
14:37:25,644 ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.service.cmr.repository.InvalidStoreRefException: Store does not have a root node
        at org.alfresco.repo.node.db.DbNodeServiceImpl.getRootNode(DbNodeServiceImpl.java:206)
        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.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:165)
        at $Proxy2.getRootNode(Unknown Source)
        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:212)
        at $Proxy3.getRootNode(Unknown Source)
        at org.alfresco.repo.descriptor.DescriptorServiceImpl.getDescriptorNodeRef(DescriptorServiceImpl.java:291)
        at org.alfresco.repo.descriptor.DescriptorServiceImpl.updateCurrentRepositoryDescriptor(DescriptorServiceImpl.java:254)
        at org.alfresco.repo.descriptor.DescriptorServiceImpl.access$300(DescriptorServiceImpl.java:61)
        at org.alfresco.repo.descriptor.DescriptorServiceImpl$1.doWork(DescriptorServiceImpl.java:185)
        at org.alfresco.repo.descriptor.DescriptorServiceImpl$1.doWork(DescriptorServiceImpl.java:176)
        at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:168)
        at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:74)
        at org.alfresco.repo.descriptor.DescriptorServiceImpl.onApplicationEvent(DescriptorServiceImpl.java:191)
        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:3729)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
        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:809)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        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:1021)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        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:709)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        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:294)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

I've tried this several times on freshly restored backups of the entire Tomcat directory and a fresh restore then migration of the database with no migration errors.

Another thing I do see the first time I try to startup with the new war is this error:

INFO: Deploying web application archive alfresco.war
14:25:21,103 ERROR [tool.hbm2ddl.SchemaUpdate] Unsuccessful: alter table child_assoc add index FKC6EFFF32A0F28D72 (child_protocol, child_identifier, child_guid), add constraint FKC6EFFF32A0F28D72 foreign key (child_protocol, child_identifier, child_guid) references node (protocol, identifier, guid)
14:25:21,129 ERROR [tool.hbm2ddl.SchemaUpdate] Can't create table './alfresco/#sql-6b7_23b.frm' (errno: 150)
14:25:21,157 ERROR [tool.hbm2ddl.SchemaUpdate] Unsuccessful: alter table child_assoc add index FKC6EFFF3294135688 (parent_protocol, parent_identifier, parent_guid), add constraint FKC6EFFF3294135688 foreign key (parent_protocol, parent_identifier, parent_guid) references node (protocol, identifier, guid)
14:25:21,186 ERROR [tool.hbm2ddl.SchemaUpdate] Can't create table './alfresco/#sql-6b7_23b.frm' (errno: 150)
So I applied those manually in MySQL with no problem, still no help though.

Here's what my store table looks like:

mysql> select * from store;
+———–+————————-+————–+—————+—————–+———–+
| protocol  | identifier              | root_node_id | root_protocol | root_identifier | root_guid |
+———–+————————-+————–+—————+—————–+———–+
| system    | system                  |            7 | NULL          | NULL            | NULL      |
| user      | alfrescoUserStore       |            2 | NULL          | NULL            | NULL      |
| workspace | lightWeightVersionStore |            1 | NULL          | NULL            | NULL      |
| workspace | SpacesStore             |           10 | NULL          | NULL            | NULL      |
+———–+————————-+————–+—————+—————–+———–+
And looking for those nodes:

mysql> select * from node where id=7 or id=2 or id=1 or id=10;
+—-+———–+————————-+————————————–+——————————————————+——–+——+
| id | protocol  | identifier              | uuid                                 | type_qname                                           | acl_id | guid |
+—-+———–+————————-+————————————–+——————————————————+——–+——+
|  1 | workspace | lightWeightVersionStore | 7ca18576-e01b-11da-aa9a-350f095ca7f2 | {http://www.alfresco.org/model/system/1.0}store_root |      1 | NULL |
|  2 | user      | alfrescoUserStore       | 7dc481a9-e01b-11da-aa9a-350f095ca7f2 | {http://www.alfresco.org/model/system/1.0}store_root |   NULL | NULL |
|  7 | system    | system                  | 7e6ca890-e01b-11da-aa9a-350f095ca7f2 | {http://www.alfresco.org/model/system/1.0}store_root |   NULL | NULL |
| 10 | workspace | SpacesStore             | 7e990fc5-e01b-11da-aa9a-350f095ca7f2 | {http://www.alfresco.org/model/system/1.0}store_root |      5 | NULL |
+—-+———–+————————-+————————————–+——————————————————+——–+——+
Very frustrating.  Any thoughts?

Thanks.

Outcomes