Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-9961

DB2: Upgrade from 4.0.2.40 to 4.2.1 fails with NPE during database schema bootstrap

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 4.2
    • Fix Version/s: 4.2.1
    • Labels:
    • Environment:

      Description

      The issue was found during validation of MNT-9834

      Upgrade from 4.0.2.40 to 4.2.1 fails with NPE during database schema bootstrap. Error log:

      catalina.out
       2013-11-12 15:22:42,613  INFO  [domain.schema.SchemaBootstrap] [localhost-startStop-1] Executing database script /data/upgrade/bugfix42-58/tomcat/temp/Alfresco/AlfrescoSchema-DB2Dialect-Update-6035970969837829361.sql (Copied from classpath:alfresco/dbscripts/upgrade/4.1/org.hibernate.dialect.DB2Dialect/createIdxAlfNodeTQN.sql).
       2013-11-12 15:22:42,668  ERROR [domain.schema.SchemaBootstrap] [localhost-startStop-1] Schema auto-update failed
       java.lang.NullPointerException
      	at org.alfresco.repo.domain.schema.SchemaBootstrap.getScriptInputStream(SchemaBootstrap.java:1185)
      	at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptUrl(SchemaBootstrap.java:1099)
      	at org.alfresco.repo.domain.schema.SchemaBootstrap.checkSchemaPatchScripts(SchemaBootstrap.java:1091)
      	at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:957)
      	at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1649)
      	at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
      	at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
      	at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
      	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
      	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
      	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
      	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
      	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:4939)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
      	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
      	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1653)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:724)
      2013-11-12 15:22:42,672  ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
       org.alfresco.error.AlfrescoRuntimeException: 10120000 Schema auto-update failed
      	at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1748)
      	at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
      	at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
      	at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
      	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
      	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
      	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
      	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
      	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:4939)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
      	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
      	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1653)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:724)
      Caused by: java.lang.NullPointerException
      	at org.alfresco.repo.domain.schema.SchemaBootstrap.getScriptInputStream(SchemaBootstrap.java:1185)
      	at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptUrl(SchemaBootstrap.java:1099)
      	at org.alfresco.repo.domain.schema.SchemaBootstrap.checkSchemaPatchScripts(SchemaBootstrap.java:1091)
      	at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:957)
      	at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1649)
      	... 24 more
      

      Notes:

      • Upgrade path: 4.0.2 (.40 187) schema 5,034 --> 4.2.1 (r57815-b58) schema 6,052
      • No data was created on a source version
      • Please, see the logs and schemas in the attachment (402.ZIP and 421.ZIP)
      • Worked on v4.2.0 (r55820-b1513) schema 6,033 (see the issue ALF-20060)

      ChristinaSh

        Attachments

        1. 402.ZIP
          135 kB
        2. 421.ZIP
          30 kB

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs (Inactive)
                  Reporter:
                  alfrescoqa Alfresco QA Team (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 5 hours
                    5h

                      Structure Helper Panel