cancel
Showing results for 
Search instead for 
Did you mean: 

Problem upgrading from 3.2r to 3.4a on Windows + Postgresql

cvillemure
Champ in-the-making
Champ in-the-making
Hi,

      I've tried today to upgrade a 3.2r installation to the new 3.4a community edition.

I've followed the upgrade steps described here : http://wiki.alfresco.com/wiki/General_Upgrade_Process

So i've installed the 3.4 with the installer without any problem and everything was working fine.

I've then stopped the service, replaced the database and alf_data with my 3.2r backup and try to restart the service

The first error encountered was the following :


09:03:36,512 INFO  [org.alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]
09:03:36,528 INFO  [org.alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]
09:03:36,528 INFO  [org.alfresco.config.JndiPropertiesFactoryBean] Loading properties file from file [C:\Borealis\nomDuProjet\Alfresco34a\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\module\test\alfresco-global.properties]
09:03:36,528 INFO  [org.alfresco.config.JndiPropertiesFactoryBean] Loading properties file from file [C:\Borealis\nomDuProjet\Alfresco34a\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\module\tests\alfresco-global.properties]
09:03:36,528 INFO  [org.alfresco.config.JndiPropertiesFactoryBean] Loading properties file from URL [file:/C:/Borealis/nomDuProjet/Alfresco34a/tomcat/shared/classes/alfresco-global.properties]
09:03:36,606 INFO  [org.alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
09:03:59,395 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor Repository Template Processor for extension ftl
09:03:59,395 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor Repository Script Processor for extension js
09:04:10,289 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.PostgreSQLDialect.
09:04:15,806 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\WINDOWS\TEMP\Alfresco\AlfrescoSchema-PostgreSQLDialect-Update-4833463500614607074.sql (Copied from classpath:alfresco/dbscripts/upgrade/3.2/org.hibernate.dialect.PostgreSQLDialect/AlfrescoSchemaUpdate-3.2-ContentTables2.sql).
09:04:15,915 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\WINDOWS\TEMP\Alfresco\AlfrescoSchema-PostgreSQLDialect-Update-7837465265002177326.sql (Copied from classpath:alfresco/dbscripts/upgrade/3.3/org.hibernate.dialect.PostgreSQLDialect/modify-index-permission_id.sql).
09:04:15,962 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\WINDOWS\TEMP\Alfresco\AlfrescoSchema-PostgreSQLDialect-Update-7306072689515511718.sql (Copied from classpath:alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.PostgreSQLDialect/AddFKIndexes.sql).
09:04:18,760 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\WINDOWS\TEMP\Alfresco\AlfrescoSchema-PostgreSQLDialect-Update-5380972763397163833.sql (Copied from classpath:alfresco/dbscripts/upgrade/3.3/org.hibernate.dialect.PostgreSQLDialect/remove-VersionCount.sql).
09:04:18,760 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\WINDOWS\TEMP\Alfresco\AlfrescoSchema-PostgreSQLDialect-Update-7104058919245194012.sql (Copied from classpath:alfresco/dbscripts/upgrade/3.3/org.hibernate.dialect.PostgreSQLDialect/fix-Repo-seqs.sql).
09:04:18,807 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script C:\WINDOWS\TEMP\Alfresco\AlfrescoSchema-PostgreSQLDialect-Update-994888723247639757.sql (Copied from classpath:alfresco/dbscripts/upgrade/3.3/org.hibernate.dialect.PostgreSQLDialect/fix-AVM-seqs.sql).
09:04:18,823 ERROR [org.alfresco.repo.domain.schema.SchemaBootstrap] Statement execution failed:
   SQL: CREATE SEQUENCE avm_stores_seq START WITH 1669 INCREMENT BY 1
   Error: ERROR: relation "avm_stores_seq" already exists
   File: C:\WINDOWS\TEMP\Alfresco\AlfrescoSchema-PostgreSQLDialect-Update-994888723247639757.sql
   Line: 16
09:04:18,823 ERROR [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema auto-update failed
org.postgresql.util.PSQLException: ERROR: relation "avm_stores_seq" already exists
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:1215)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:1165)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptUrl(SchemaBootstrap.java:897)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.checkSchemaPatchScripts(SchemaBootstrap.java:868)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:804)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1375)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:78)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
   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:3972)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   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)
09:04:18,838 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 09200000 Schema auto-update failed
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1506)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:78)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
   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:3972)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   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)
Caused by: org.postgresql.util.PSQLException: ERROR: relation "avm_stores_seq" already exists
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:1215)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:1165)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptUrl(SchemaBootstrap.java:897)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.checkSchemaPatchScripts(SchemaBootstrap.java:868)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:804)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1375)
   … 34 more

So I fixed the problematic SQL file : alfresco/dbscripts/upgrade/3.3/org.hibernate.dialect.PostgreSQLDialect/fix-Repo-seqs.sql
by adding "DROP SEQUENCE IF EXISTS …" before each sequence creation.

After that I've restore my 3.2r database backup and tried to upgrade again.

I've encouter many PSQL errors about tenantDomain and then the error log stopped with "context initialization failed nodeRef is a mandatory parameter …"

I've then tried to upgrade Postgresql from 8.2 to 8.4 and start again from step 0 (whitout any modification to the 3.3 sequence creation script).

The avm sequence error popped again, so I've put back my script modification and retry the upgrade process again which then worked.

So if anyone is using Postgresql 8.2, it seems you'll need to upgrade your Postgresql install, in order to upgrade to Alfresco 3.4.  A fresh install is working fine but an upgrade will likely failed.  However, I've been able to do the upgrade process with Postgresql 8.4 then backup the upgraded database with pgAdmin 1.10.5 (version 1.6 had errors in the backup process) and restore it to my 8.2 server then use my Postgresql 8.2 install and Alfresco worked.

I haven't done any exhaustive test yet to check if using Postgresql 8.2 might cause problem.

My questions :

     Does my modification of the SQL script (to add the DROP SEQUENCE directives) is the right thing to do?  Should I've done something else?

      Is there any major issues that i should know if using Postgresql 8.2?

Thanks,

Charles
10 REPLIES 10

jturmelle
Champ in-the-making
Champ in-the-making
I've run into the same problems here, and was about to try changing the script to ALTER SEQUENCE RESTART WITH …
since most likely those sequences are already in use.  Especially avm_nodes_seq.


SELECT NEXTVAL('hibernate_sequence') AS value;

ALTER SEQUENCE avm_stores_seq RESTART WITH ${hibernate_seq_next_value} INCREMENT BY 1;

ALTER SEQUENCE avm_store_properties_seq RESTART WITH ${hibernate_seq_next_value} INCREMENT BY 1;

ALTER SEQUENCE avm_nodes_seq RESTART WITH ${hibernate_seq_next_value} INCREMENT BY 1;

ALTER SEQUENCE avm_version_roots_seq RESTART WITH ${hibernate_seq_next_value} INCREMENT BY 1;


– Record script finish

DELETE FROM alf_applied_patch WHERE id = 'patch.db-V3.3-Fix-AVM-Seqs';
INSERT INTO alf_applied_patch
  (id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
  VALUES
  (
    'patch.db-V3.3-Fix-AVM-Seqs', 'Manually executed script upgrade V3.3 to create AVM sequences',
     0, 4104, -1, 4105, null, 'UNKOWN', ${TRUE}, ${TRUE}, 'Script completed'
   );

cvillemure
Champ in-the-making
Champ in-the-making
I agree that a ALTER SEQUENCE would be more appropriate.

We've also decided to install a parallel PostgreSQL server (8.4.x) to run our Alfresco database, until we are ready to upgrade our other applications databases.  So we're now using the same database with which Alfresco was tested, so I guess this will provide us better stability and performance.

maqsood
Confirmed Champ
Confirmed Champ
i am trying to migrate my existing db and content to a  new alfresco 3.3v instance from same version. First i was getting following error

More than one Alfresco schema was found when querying the database metadata.
which i fixed going thru this https://issues.alfresco.com/jira/browse/ETHREEOH-680, now getting the below error:

Nov 1, 2010 6:49:14 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/java/jdk1.6.0_14/jre/lib/i386/server:/usr/local/java/jdk1.6.0_14/jre/lib/i386:/usr/local/java/jdk1.6.0_14/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Nov 1, 2010 6:49:14 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Nov 1, 2010 6:49:14 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1386 ms
Nov 1, 2010 6:49:14 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 1, 2010 6:49:14 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Nov 1, 2010 6:49:14 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Nov 1, 2010 6:49:15 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Nov 1, 2010 6:49:15 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor alfresco.xml
Nov 1, 2010 6:49:18 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
18:49:25,785  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]
18:49:25,813  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]
18:49:25,818  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from URL [file:/opt/tomcat/shared/classes/alfresco-global.properties]
18:49:25,967  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
18:49:43,148  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor Repository Template Processor for extension ftl
18:49:43,150  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor Repository Script Processor for extension js
18:49:51,214  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.PostgreSQLDialect.
18:49:59,218  INFO  [domain.schema.SchemaBootstrap] Executing database script /opt/tomcat/temp/Alfresco/AlfrescoSchema-PostgreSQLDialect-Update-5340394460132504260.sql (Copied from classpath:alfresco/dbscripts/create/3.3/org.hibernate.dialect.PostgreSQLDialect/AlfrescoCreate-3.3-RepoTables.sql).
18:49:59,229  ERROR [domain.schema.SchemaBootstrap] Statement execution failed:
   SQL: CREATE TABLE alf_applied_patch
(
    id VARCHAR(64) NOT NULL,
    description VARCHAR(1024),
    fixes_from_schema INT4,
    fixes_to_schema INT4,
    applied_to_schema INT4,
    target_schema INT4,
    applied_on_date TIMESTAMP,
    applied_to_server VARCHAR(64),
    was_executed BOOL,
    succeeded BOOL,
    report VARCHAR(1024),
    PRIMARY KEY (id)
)
   Error: ERROR: relation "alf_applied_patch" already exists
   File: /opt/tomcat/temp/Alfresco/AlfrescoSchema-PostgreSQLDialect-Update-5340394460132504260.sql
   Line: 24
18:49:59,230  ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
org.postgresql.util.PSQLException: ERROR: relation "alf_applied_patch" already exists
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:1110)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:1064)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptUrl(SchemaBootstrap.java:859)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:714)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1279)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
   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:4135)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   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)
18:49:59,232  ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 10010000 Schema auto-update failed
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1407)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
   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:4135)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   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)
Caused by: org.postgresql.util.PSQLException: ERROR: relation "alf_applied_patch" already exists
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
   at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:1110)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:1064)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptUrl(SchemaBootstrap.java:859)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:714)
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1279)
   … 33 more
Nov 1, 2010 6:49:59 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Nov 1, 2010 6:49:59 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/alfresco] registered the JBDC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [net.sf.ehcache.CacheManager@9a6bbb] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [DefaultScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [DefaultScheduler_Worker-2] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [DefaultScheduler_Worker-3] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [DefaultScheduler_Worker-4] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [DefaultScheduler_Worker-5] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [DefaultScheduler_Worker-6] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [DefaultScheduler_Worker-7] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [DefaultScheduler_Worker-8] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [DefaultScheduler_Worker-9] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [DefaultScheduler_Worker-10] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [FileStateReaper] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [Thread-13] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [DefaultScheduler_QuartzSchedulerThread] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1edbbb9]) and a value of type [org.alfresco.util.CachingDateFormat] (value [yyyy-MM-dd]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/alfresco] created a ThreadLocal with key of type [null] (value [com.sun.xml.bind.v2.runtime.Coordinator$1@bf811c]) and a value of type [com.sun.xml.bind.v2.runtime.Coordinator[]] (value [[Lcom.sun.xml.bind.v2.runtime.Coordinator;@b57ca1]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1094702]) and a value of type [org.apache.cxf.bus.CXFBusImpl] (value [org.apache.cxf.bus.CXFBusImpl@1502ff]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Nov 1, 2010 6:49:59 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/alfresco] created a ThreadLocal with key of type [null] (value [com.sun.xml.bind.v2.ClassFactory$1@177d330]) and a value of type [java.util.WeakHashMap] (value [{class javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference@1b21521, class org.alfresco.repo.audit.model._3.GenerateValue=java.lang.ref.WeakReference@8968f8, class org.alfresco.repo.audit.model._3.AuditPath=java.lang.ref.WeakReference@14aa766, class java.util.ArrayList=java.lang.ref.WeakReference@342475, class org.alfresco.repo.audit.model._3.DataExtractor=java.lang.ref.WeakReference@145aa90, class org.alfresco.repo.audit.model._3.Application=java.lang.ref.WeakReference@c0f87e, class org.alfresco.repo.audit.model._3.PathMappings=java.lang.ref.WeakReference@fa302c, class org.alfresco.repo.audit.model._3.Audit=java.lang.ref.WeakReference@170d9d4, class org.alfresco.repo.audit.model._3.DataGenerator=java.lang.ref.WeakReference@1ed1c32, class org.alfresco.repo.audit.model._3.RecordValue=java.lang.ref.WeakReference@1d63e96, class org.alfresco.repo.audit.model._3.PathMap=java.lang.ref.WeakReference@a6eee5, class org.alfresco.repo.audit.model._3.DataGenerators=java.lang.ref.WeakReference@18e25c0, class org.alfresco.repo.audit.model._3.DataExtractors=java.lang.ref.WeakReference@150a1ac}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
Nov 1, 2010 6:50:02 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Nov 1, 2010 6:50:02 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Nov 1, 2010 6:50:02 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Nov 1, 2010 6:50:02 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Nov 1, 2010 6:50:02 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 1, 2010 6:50:02 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/42  config=null
Nov 1, 2010 6:50:02 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 48096 ms

How do i fix this error??
Have already gone thru the JIRA site (https://issues.alfresco.com/jira/browse/ALF-5344), but didn't understand what to do to fix this error?
Help me please ..

cvillemure
Champ in-the-making
Champ in-the-making
From my experience upgrading from 3.2 to 3.4, if you're not using Postgresql 8.4, they're a lot of chances your transfer will fail.  It seems the language syntax or triggers are different between the two version.  I was unable to transfer from 8.2 to 8.4 until i upgrade Postgresql to 8.4

If you're already using the correct version of Postgresql or other Alfresco's supported database, you should take a look in the upgrade SQL file to try to understand what it's trying to do.  You will find the file under tomcat/webapps/Alfresco/WEB-INF/classes/alfresco/dbscripts/create/3.3/org.hibernate.dialect.PostgreSQLDialect/AlfrescoCreate-3.3-RepoTables.sql

You can also modify the sql file directly in the war file using a program like 7zip to edit the content of the archive.

Good luck

jturmelle
Champ in-the-making
Champ in-the-making
maqsood wrote:
>> i am trying to migrate my existing db and content to a new alfresco 3.3v instance from same version. First i was getting following error…

This is a different problem than the one posted here.  Even though the troubleshooting may be similar, You'd be better creating a new topic, otherwise no one will find your issue.

My guess is that you failed to re-initialize the database after a previous failure?  Try restoring your database back to the original.  Then run the upgrade process again.  In addition, the database issues you reference are Oracle database problems, not necessarily related to postgresql issues.

maqsood
Confirmed Champ
Confirmed Champ
Alfresco 3.3 CE was working fine with Postgresql 8.2 before migration. And also, i am not upgrading the versions of alfresco or db, just trying to point my new alfresco instance to old db and contents. Trying with
db.schema.update=false
Any other pointer??

cvillemure
Champ in-the-making
Champ in-the-making
As reported by Jeff, your post if off topic of this post since my problem was due to a upgrade.

I gave you the solution I thought should work, but this is as far as my knowledge can help you.

You will have better luck doing a new post with your specific topic to have qualified people to look into your problem.

Sorry I cannot help you more.

Good luck

maqsood
Confirmed Champ
Confirmed Champ
No issues .. Anyway Thanks guys for quick replies.

Will post it in a new topic

Cheers!!

jturmelle
Champ in-the-making
Champ in-the-making
Its a confusing issue because I don't understand what procedures you may have followed regarding the oracle database, which almost definitely would not have helped on the postgresql instance.

I would still start over with a fresh copy of the database.

Perhaps if you can post more information on the original error:
More than one Alfresco schema was found when querying the database metadata.

This is an unusual error message, especially for postgres.  You should also post this to a new topic to get more help.