cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in migrating old db and content

maqsood
Confirmed Champ
Confirmed Champ
Hi All

I am trying to migrate my old db and content (alf_data) to a new alfresco instance according to wiki http://wiki.alfresco.com/wiki/System_Migration.

First error I encountered was

    Nov 1, 2010 5:22:41 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 5:22:41 PM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Nov 1, 2010 5:22:41 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 518 ms
    Nov 1, 2010 5:22:42 PM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Nov 1, 2010 5:22:42 PM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
    Nov 1, 2010 5:22:42 PM org.apache.catalina.startup.HostConfig deployDescriptor
    INFO: Deploying configuration descriptor manager.xml
    Nov 1, 2010 5:22:42 PM org.apache.catalina.startup.HostConfig deployDescriptor
    INFO: Deploying configuration descriptor host-manager.xml
    Nov 1, 2010 5:22:42 PM org.apache.catalina.startup.HostConfig deployDescriptor
    INFO: Deploying configuration descriptor alfresco.xml
    Nov 1, 2010 5:22:43 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.
    17:22:49,020  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]
    17:22:49,022  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]
    17:22:49,022  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from URL [file:/opt/tomcat/shared/classes/alfresco-global.properties]
    17:22:49,194  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
    17:23:03,624  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor Repository Template Processor for extension ftl
    17:23:03,627  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor Repository Script Processor for extension js
    17:23:10,912  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.PostgreSQLDialect.
    17:23:17,326  ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
    org.alfresco.error.AlfrescoRuntimeException: 10010000
    More than one Alfresco schema was found when querying the database metadata.
       Limit the database user's permissions or set the 'hibernate.default_schema' property in 'custom-hibernate-dialect.properties'.
       at org.alfresco.repo.domain.schema.SchemaBootstrap.countAppliedPatches(SchemaBootstrap.java:510)
       at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:699)
       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)
    17:23:17,328  ERROR [web.context.ContextLoader] Context initialization failed
    org.alfresco.error.AlfrescoRuntimeException: 10010001 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.alfresco.error.AlfrescoRuntimeException: 10010000
    More than one Alfresco schema was found when querying the database metadata.
       Limit the database user's permissions or set the 'hibernate.default_schema' property in 'custom-hibernate-dialect.properties'.
       at org.alfresco.repo.domain.schema.SchemaBootstrap.countAppliedPatches(SchemaBootstrap.java:510)
       at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:699)
       at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1279)
       … 33 more
    Nov 1, 2010 5:23:17 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Nov 1, 2010 5:23:17 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context [/alfresco] startup failed due to previous errors
    Nov 1, 2010 5:23:17 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 5:23:17 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
    SEVERE: The web application [/alfresco] appears to have started a thread named [net.sf.ehcache.CacheManager@ad8bb4] but has failed to stop it. This is very likely to create a memory leak.
    Nov 1, 2010 5:23:17 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 5:23:17 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 5:23:17 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 5:23:17 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 5:23:17 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 5:23:17 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 5:23:17 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 5:23:17 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 5:23:17 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 5:23:17 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 5:23:17 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 5:23:17 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 5:23:17 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 5:23:17 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@1409285]) 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 5:23:17 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@538db1]) and a value of type [com.sun.xml.bind.v2.runtime.Coordinator[]] (value [[Lcom.sun.xml.bind.v2.runtime.Coordinator;@17b9a1a]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
    Nov 1, 2010 5:23:17 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@1c247ad]) and a value of type [org.apache.cxf.bus.CXFBusImpl] (value [org.apache.cxf.bus.CXFBusImpl@1efbf25]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
    Nov 1, 2010 5:23:17 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@ee1c42]) and a value of type [java.util.WeakHashMap] (value [{class java.util.ArrayList=java.lang.ref.WeakReference@1d38439, class org.alfresco.repo.audit.model._3.Audit=java.lang.ref.WeakReference@18dec5c, class org.alfresco.repo.audit.model._3.PathMappings=java.lang.ref.WeakReference@988edd, class org.alfresco.repo.audit.model._3.GenerateValue=java.lang.ref.WeakReference@1cb63fd, class javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference@1193a9, class org.alfresco.repo.audit.model._3.DataGenerator=java.lang.ref.WeakReference@1f54169, class org.alfresco.repo.audit.model._3.DataExtractor=java.lang.ref.WeakReference@995893, class org.alfresco.repo.audit.model._3.RecordValue=java.lang.ref.WeakReference@18657b9, class org.alfresco.repo.audit.model._3.DataGenerators=java.lang.ref.WeakReference@e95a72, class org.alfresco.repo.audit.model._3.AuditPath=java.lang.ref.WeakReference@310a6d, class org.alfresco.repo.audit.model._3.Application=java.lang.ref.WeakReference@1a3a85d, class org.alfresco.repo.audit.model._3.DataExtractors=java.lang.ref.WeakReference@1829770, class org.alfresco.repo.audit.model._3.PathMap=java.lang.ref.WeakReference@a4461e}]) 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 5:23:20 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory docs
    Nov 1, 2010 5:23:20 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory ROOT
    Nov 1, 2010 5:23:20 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory examples
    Nov 1, 2010 5:23:20 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    Nov 1, 2010 5:23:20 PM org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    Nov 1, 2010 5:23:20 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/24  config=null
    Nov 1, 2010 5:23:20 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 38509 ms


I was able to fix this error going thru the JIRA site https://issues.alfresco.com/jira/browse/ETHREEOH-680. To resolve the above error I done the following steps:

1. Included "hibernate.default_schema=dbname" in <classpath>/alfresco/domain/hibernate-cfg.properties
2. Dropped my existing database, recreated fresh db and then imported the old database.
3. Started Tomcat Server

This time the error encountered is:

Nov 1, 2010 8:49:56 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 8:49:56 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Nov 1, 2010 8:49:56 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1260 ms
Nov 1, 2010 8:49:56 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 1, 2010 8:49:56 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Nov 1, 2010 8:49:56 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Nov 1, 2010 8:49:57 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Nov 1, 2010 8:49:57 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor alfresco.xml
Nov 1, 2010 8:50:00 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.
20:50:07,852  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]
20:50:07,874  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]
20:50:07,879  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from URL [file:/opt/tomcat/shared/classes/alfresco-global.properties]
20:50:08,071  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
20:50:25,486  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor Repository Template Processor for extension ftl
20:50:25,488  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor Repository Script Processor for extension js
20:50:33,443  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.PostgreSQLDialect.
20:50:41,098  INFO  [domain.schema.SchemaBootstrap] Executing database script /opt/tomcat/temp/Alfresco/AlfrescoSchema-PostgreSQLDialect-Update-981009637268807983.sql (Copied from classpath:alfresco/dbscripts/create/3.3/org.hibernate.dialect.PostgreSQLDialect/AlfrescoCreate-3.3-RepoTables.sql).
20:50:41,115  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-981009637268807983.sql
   Line: 24
20:50:41,116  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)
20:50:41,118  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 8:50:41 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Nov 1, 2010 8:50:41 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
Nov 1, 2010 8:50:41 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 8:50:41 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/alfresco] appears to have started a thread named [net.sf.ehcache.CacheManager@377e2a] but has failed to stop it. This is very likely to create a memory leak.
Nov 1, 2010 8:50:41 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 8:50:41 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 8:50:41 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 8:50:41 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 8:50:41 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 8:50:41 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 8:50:41 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 8:50:41 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 8:50:41 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 8:50:41 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 8:50:41 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 8:50:41 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 8:50:41 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 8:50:41 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@6e2667]) 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 8:50:41 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@19b3eab]) and a value of type [com.sun.xml.bind.v2.runtime.Coordinator[]] (value [[Lcom.sun.xml.bind.v2.runtime.Coordinator;@12f7354]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Nov 1, 2010 8:50:41 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@3caf2d]) and a value of type [org.apache.cxf.bus.CXFBusImpl] (value [org.apache.cxf.bus.CXFBusImpl@10f000]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Nov 1, 2010 8:50:41 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@1fc9529]) and a value of type [java.util.WeakHashMap] (value [{class javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference@186c86a, class org.alfresco.repo.audit.model._3.PathMappings=java.lang.ref.WeakReference@1cfbe7f, class org.alfresco.repo.audit.model._3.DataGenerator=java.lang.ref.WeakReference@1e3bb25, class org.alfresco.repo.audit.model._3.DataExtractors=java.lang.ref.WeakReference@138456, class org.alfresco.repo.audit.model._3.RecordValue=java.lang.ref.WeakReference@155511f, class org.alfresco.repo.audit.model._3.Application=java.lang.ref.WeakReference@40d52a, class org.alfresco.repo.audit.model._3.GenerateValue=java.lang.ref.WeakReference@6ac2c9, class org.alfresco.repo.audit.model._3.DataGenerators=java.lang.ref.WeakReference@11a30e7, class org.alfresco.repo.audit.model._3.Audit=java.lang.ref.WeakReference@809883, class org.alfresco.repo.audit.model._3.DataExtractor=java.lang.ref.WeakReference@9cf715, class org.alfresco.repo.audit.model._3.AuditPath=java.lang.ref.WeakReference@121946d, class org.alfresco.repo.audit.model._3.PathMap=java.lang.ref.WeakReference@1979119, class java.util.ArrayList=java.lang.ref.WeakReference@1b71290}]) 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 8:50:44 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Nov 1, 2010 8:50:44 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Nov 1, 2010 8:50:44 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Nov 1, 2010 8:50:44 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Nov 1, 2010 8:50:44 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 1, 2010 8:50:44 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/53  config=null
Nov 1, 2010 8:50:44 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 48063 ms

I am using:

1. Alfresco 3.3 CE
2. Tomcat 6.0.29
3. PostgreSQL 8.4.4

Have tried to resolve the above error by disabling db.schema.update=false, it throws other error like:
ERROR [web.context.ContextLoader] Context initialization failed
org.hibernate.exception.GenericJDBCException: could not load an entity: [org.alfresco.repo.attributes.GlobalAttributeEntryImpl#.avm_lock_table]
……………..
Caused by: org.postgresql.util.PSQLException: ERROR: schema "<dbname>" does not exist
  Position: 86
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
……………..

I am stucked here, Did i missed any configuration or step ??

Appreciate any help!!
1 REPLY 1

maqsood
Confirmed Champ
Confirmed Champ
Anybody who can help me out .. ??
Appreciate any help.