cancel
Showing results for 
Search instead for 
Did you mean: 

error in upgrading from 1.2.1 to 1.3.0dev

cts_sergiu_dunc
Champ in-the-making
Champ in-the-making
Hello,

I've read the upgrade document.

I did the following steps:
- stop alfresco 1.2.1
- unpack alfresco-tomcat-1.3.0dev.tar.gz in a clean /opt/alfresco
- copy ./alf_data from 1.2.1 to the fresh /opt/alfresco
- run the migration schema script

# mysql alfresco < AlfrescoSchemaMigrate-1.3-mysql.sql
ERROR 1146 (42S02) at line 174: Table 'alfresco.t_version_count' doesn't exist

run ./alfresco.sh start
Output from catalina.out:

14:02:22,528 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:214)
        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.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: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)

.. and 2 more exceptions after that. The tail of catalina.out looks like:

INFO: Server startup in 27403 ms
Jun 19, 2006 2:03:21 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already.  Could not load org.quartz.StatefulJob.  The eventual following stack trace is c
aused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
Jun 19, 2006 2:08:13 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Jun 19, 2006 2:08:14 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jun 19, 2006 2:08:14 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Jun 19, 2006 2:08:14 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime

Tomcat is running but the /alfresco context is not accesible.

A fresh installation of 1.3.0dev works fine in the same environment ( fresh db installation, non existing previous alf_data).

Can you tell me please if I did something wrong - and how can I successfully migrate to 1.3.0 ?

Thank you,
Sergiu
16 REPLIES 16

cts_sergiu_dunc
Champ in-the-making
Champ in-the-making
I modified the migration script since MySQL-Max-4.1.18 treats the table names differrent with lower and upper cases. It had another error now:

ERROR 1062 (23000) at line 626: Duplicate entry '0-2-GROUP_EVERYONE' for key 2

After starting the upgraded 1.3.0dev the space permissions are not there.. All previous spaces have empty permissions, none from migrated 1.2.1 is there.

Could you give me some help here please ?

Thank you,
Sergiu

ajshaw
Champ in-the-making
Champ in-the-making
I also get the same error, except mine says  'Duplicate entry '0-1-GROUP_EVERYONE' for key 2'.

I cannot start alfresco however. I also get lots of errors about patches not being installed. I am running 1.2.0 (on windows), how do i upgrade from 1.2.0 to 1.2.1 as recommended in the instructions?.

ero
Champ in-the-making
Champ in-the-making
Hi,

Check if your Mysql has been patched with following:

ALTER TABLE applied_patch MODIFY id varchar(64) not null;

cludt
Champ in-the-making
Champ in-the-making
Why is the temporary table t_applied_patch created? It is never filled with any data.

And why isn't the needed patch
ALTER TABLE applied_patch MODIFY id varchar(64) not null;
included in the mysql update script?

And why are the temporary tables not deleted?

cludt
Champ in-the-making
Champ in-the-making
I still had some problems executing the last insert statement
insert into access_control_entry
  (
    id, acl_id, permission_id, authority_id, allowed
  )
  select
    id, acl_id, permission_id, authority_id, allowed
  from
    T_access_control_entry;
because the index over (acl_id,permission_id,authority_id) would not be unique.

How could this happen? Does this mean, that the former data has already been invalid or should this be possible to happen but has been overlooked by the developers?

Anyway, how can this be solved?

heiko_robert
Star Collaborator
Star Collaborator
I've similar problems. I fixed all upper case and quote issues in the upgrade script and it run without any error. After deploying the new war file and setting the correct hybernate/repository-settings the server fails to startup. The first important error is:

Jul 11, 2006 8:58:52 PM net.sf.joott.uno.UnoConnection connect
INFO: connecting using "socket,host=localhost,port=8100,tcpNoDelay=1"…
Jul 11, 2006 8:58:52 PM net.sf.joott.uno.UnoConnection connect
INFO: connected
20:58:56,320 INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
20:59:01,299 ERROR [admin.patch.PatchServiceImpl] net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:477)
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:355)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:41)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        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 $Proxy16.getProperties(Unknown Source)


seems, that the server is unable to login? missing methods? wrong credentials?
environment: winXP, jdk 1.5.0_07, MySQL 5.0.22, alfresco-enterprise-tomcat-1.3.0

andy
Champ on-the-rise
Champ on-the-rise
Hi

Please post the full output from the patch process.

Regards

Andy

cludt
Champ in-the-making
Champ in-the-making
I still had some problems executing the last insert statement
insert into access_control_entry
  (
    id, acl_id, permission_id, authority_id, allowed
  )
  select
    id, acl_id, permission_id, authority_id, allowed
  from
    T_access_control_entry;
because the index over (acl_id,permission_id,authority_id) would not be unique.

[…]

Sorry, this is not true. The last insert statement is not executed because I have null values for the acl_id column in the t_access_control_entry table. Is this related to invalid former data or are there more reasons why this could happen?

How can I fix this? I guess, replacing the null values by a random acl_id number won't work, as I may violate some other constraints.

cludt
Champ in-the-making
Champ in-the-making
I've similar problems. I fixed all upper case and quote issues in the upgrade script and it run without any error. After deploying the new war file and setting the correct hybernate/repository-settings the server fails to startup. The first important error is:

Jul 11, 2006 8:58:52 PM net.sf.joott.uno.UnoConnection connect
INFO: connecting using "socket,host=localhost,port=8100,tcpNoDelay=1"…
Jul 11, 2006 8:58:52 PM net.sf.joott.uno.UnoConnection connect
INFO: connected
20:58:56,320 INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
20:59:01,299 ERROR [admin.patch.PatchServiceImpl] net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:477)
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:355)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:41)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        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 $Proxy16.getProperties(Unknown Source)


seems, that the server is unable to login? missing methods? wrong credentials?
environment: winXP, jdk 1.5.0_07, MySQL 5.0.22, alfresco-enterprise-tomcat-1.3.0

This error seems to be due to rules firing during patching. Switch off the rules by using the following file (to be placed in extension directory)

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
   <bean id="inbound" class="org.alfresco.repo.rule.RuleTypeImpl" parent="rule-type-base">
      <constructor-arg>
         <list>
         </list>
      </constructor-arg>
   </bean>

   <bean id="update" class="org.alfresco.repo.rule.RuleTypeImpl" parent="rule-type-base">
      <constructor-arg>
         <list>
         </list>
      </constructor-arg>
   </bean>
  
   <bean id="outbound" class="org.alfresco.repo.rule.RuleTypeImpl" parent="rule-type-base">
      <constructor-arg>
         <list>
         </list>
      </constructor-arg>
   </bean>
</beans>