← Back to team overview

dhis2-devs team mailing list archive

[Bug 678427] [NEW] Unsupported periodtypes causes startup failure

 

Public bug reported:

Financial period causes startup failure on 2.0.6->2.0.5 downgrade.

Upon downgrading from trunk to 2.0.5, the following start-up error
occurred.

Removing the offending periodtype FinancialApril allowed the start-up to
proceed. Might need some better error handling for unsupported
periodtypes.

* INFO  09:30:54,165 Initialising DHIS 2 Live... (TrayApp.java [main])
* INFO  09:30:54,248 Loading DHIS 2 on port: 8888 (WebAppServer.java [main])
2010-11-22 09:30:54.255::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
* INFO  09:30:54,287 Setting DHIS 2 web app context to: /C:/Program Files/DHIS2-
2.0.5/webapps/dhis (WebAppServer.java [main])
* INFO  09:30:54,288 Lifecycle: server starting (TrayApp.java [main])
2010-11-22 09:30:54.310::INFO:  jetty-6.1.x
2010-11-22 09:30:54.756:/:INFO:  Initializing Spring root WebApplicationContext
* INFO  09:30:56,808 System property dhis2.home points to /C:/Program Files/DHIS
2-2.0.5/conf (DefaultLocationManager.java [main])
 > orderByFragment(order-by)
  > sortSpecification({sort specification})
   > sortKeySpecification(sort key)
    > sortKey($PlaceHolder$.stageinprogram)
    < sortKey(null)
   < sortKeySpecification(null)
  < sortSpecification(null)
 < orderByFragment(null)
 > orderByFragment(order-by)
  > sortSpecification({sort specification})
   > sortKeySpecification(sort key)
    > sortKey($PlaceHolder$.stageinprogram)
    < sortKey(null)
   < sortKeySpecification(null)
  < sortSpecification(null)
 < orderByFragment(null)
 > orderByFragment(order-by)
  > sortSpecification({sort specification})
   > sortKeySpecification(sort key)
    > sortKey($PlaceHolder$.sortorder)
    < sortKey(null)
   < sortKeySpecification(null)
  < sortSpecification(null)
 < orderByFragment(null)
* INFO  09:31:16,195 Executing startup routine [1 of 11, runlevel 1]: TableAlter
or (DefaultStartupRoutineExecutor.java [main])
* INFO  09:31:19,085 Tables updated (TableAlteror.java [main])
* INFO  09:31:19,096 Executing startup routine [2 of 11, runlevel 2]: PeriodType
Populator (DefaultStartupRoutineExecutor.java [main])
2010-11-22 09:31:19.125::WARN:  Failed startup of context org.mortbay.jetty.weba
pp.WebAppContext@1c63791{/,/C:/Program Files/DHIS2-2.0.5/webapps/dhis}
java.lang.RuntimeException: Failed to run startup routines
        at org.hisp.dhis.system.startup.StartupListener.contextInitialized(Start
upListener.java:61)
        at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.
java:548)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.jav
a:1239)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466
)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
        at org.mortbay.jetty.Server.doStart(Server.java:222)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
        at org.hisp.dhis.WebAppServer.start(WebAppServer.java:103)
        at org.hisp.dhis.TrayApp.<init>(TrayApp.java:157)
        at org.hisp.dhis.TrayApp.main(TrayApp.java:87)
Caused by: org.hibernate.WrongClassException: Object with id: 12798 was not of t
he specified subclass: org.hisp.dhis.period.PeriodType (Discriminator: Financial
April)
        at org.hibernate.loader.Loader.getInstanceClass(Loader.java:1496)
        at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1327)
        at org.hibernate.loader.Loader.getRow(Loader.java:1251)
        at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:619)
        at org.hibernate.loader.Loader.doQuery(Loader.java:745)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
ader.java:270)
        at org.hibernate.loader.Loader.doList(Loader.java:2294)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
        at org.hibernate.loader.Loader.list(Loader.java:2167)
        at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java
:119)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1706)
        at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
        at org.hisp.dhis.period.hibernate.HibernatePeriodStore.getAllPeriodTypes
(HibernatePeriodStore.java:277)
        at org.hisp.dhis.period.PeriodTypePopulator.execute(PeriodTypePopulator.
java:68)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
on(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
inpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:150)
        at org.springframework.transaction.interceptor.TransactionInterceptor.in
voke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy36.execute(Unknown Source)
        at org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(De
faultStartupRoutineExecutor.java:101)
        at org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(De
faultStartupRoutineExecutor.java:77)
        at org.hisp.dhis.system.startup.StartupListener.contextInitialized(Start
upListener.java:57)
        ... 12 more
2010-11-22 09:31:19.180::INFO:  Started SelectChannelConnector@0.0.0.0:8888
* INFO  09:31:19,180 Lifecycle: server started (TrayApp.java [main])
* INFO  10:00:45,345 Graceful shutdown... (TrayApp.java [AWT-EventQueue-0])
* INFO  10:00:45,348 Lifecycle: server stopping (TrayApp.java [AWT-EventQueue-0]
)
2010-11-22 10:00:45.376:/:INFO:  Closing Spring root WebApplicationContext
* INFO  10:00:45,548 Lifecycle: server stopped (TrayApp.java [AWT-EventQueue-0])

* INFO  10:00:45,587 Exiting... (TrayApp.java [AWT-EventQueue-0])

C:\Program Files\DHIS2-2.0.5>

** Affects: dhis2
     Importance: Undecided
         Status: New

-- 
Unsupported periodtypes causes startup failure
https://bugs.launchpad.net/bugs/678427
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.

Status in DHIS 2 - District Health Information Software: New

Bug description:
Financial period causes startup failure on 2.0.6->2.0.5 downgrade. 

Upon downgrading from trunk to 2.0.5, the following start-up error occurred. 

Removing the offending periodtype FinancialApril allowed the start-up to proceed. Might need some better error handling for unsupported periodtypes. 

* INFO  09:30:54,165 Initialising DHIS 2 Live... (TrayApp.java [main])
* INFO  09:30:54,248 Loading DHIS 2 on port: 8888 (WebAppServer.java [main])
2010-11-22 09:30:54.255::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
* INFO  09:30:54,287 Setting DHIS 2 web app context to: /C:/Program Files/DHIS2-
2.0.5/webapps/dhis (WebAppServer.java [main])
* INFO  09:30:54,288 Lifecycle: server starting (TrayApp.java [main])
2010-11-22 09:30:54.310::INFO:  jetty-6.1.x
2010-11-22 09:30:54.756:/:INFO:  Initializing Spring root WebApplicationContext
* INFO  09:30:56,808 System property dhis2.home points to /C:/Program Files/DHIS
2-2.0.5/conf (DefaultLocationManager.java [main])
 > orderByFragment(order-by)
  > sortSpecification({sort specification})
   > sortKeySpecification(sort key)
    > sortKey($PlaceHolder$.stageinprogram)
    < sortKey(null)
   < sortKeySpecification(null)
  < sortSpecification(null)
 < orderByFragment(null)
 > orderByFragment(order-by)
  > sortSpecification({sort specification})
   > sortKeySpecification(sort key)
    > sortKey($PlaceHolder$.stageinprogram)
    < sortKey(null)
   < sortKeySpecification(null)
  < sortSpecification(null)
 < orderByFragment(null)
 > orderByFragment(order-by)
  > sortSpecification({sort specification})
   > sortKeySpecification(sort key)
    > sortKey($PlaceHolder$.sortorder)
    < sortKey(null)
   < sortKeySpecification(null)
  < sortSpecification(null)
 < orderByFragment(null)
* INFO  09:31:16,195 Executing startup routine [1 of 11, runlevel 1]: TableAlter
or (DefaultStartupRoutineExecutor.java [main])
* INFO  09:31:19,085 Tables updated (TableAlteror.java [main])
* INFO  09:31:19,096 Executing startup routine [2 of 11, runlevel 2]: PeriodType
Populator (DefaultStartupRoutineExecutor.java [main])
2010-11-22 09:31:19.125::WARN:  Failed startup of context org.mortbay.jetty.weba
pp.WebAppContext@1c63791{/,/C:/Program Files/DHIS2-2.0.5/webapps/dhis}
java.lang.RuntimeException: Failed to run startup routines
        at org.hisp.dhis.system.startup.StartupListener.contextInitialized(Start
upListener.java:61)
        at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.
java:548)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.jav
a:1239)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466
)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
        at org.mortbay.jetty.Server.doStart(Server.java:222)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
        at org.hisp.dhis.WebAppServer.start(WebAppServer.java:103)
        at org.hisp.dhis.TrayApp.<init>(TrayApp.java:157)
        at org.hisp.dhis.TrayApp.main(TrayApp.java:87)
Caused by: org.hibernate.WrongClassException: Object with id: 12798 was not of t
he specified subclass: org.hisp.dhis.period.PeriodType (Discriminator: Financial
April)
        at org.hibernate.loader.Loader.getInstanceClass(Loader.java:1496)
        at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1327)
        at org.hibernate.loader.Loader.getRow(Loader.java:1251)
        at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:619)
        at org.hibernate.loader.Loader.doQuery(Loader.java:745)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
ader.java:270)
        at org.hibernate.loader.Loader.doList(Loader.java:2294)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
        at org.hibernate.loader.Loader.list(Loader.java:2167)
        at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java
:119)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1706)
        at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
        at org.hisp.dhis.period.hibernate.HibernatePeriodStore.getAllPeriodTypes
(HibernatePeriodStore.java:277)
        at org.hisp.dhis.period.PeriodTypePopulator.execute(PeriodTypePopulator.
java:68)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
on(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
inpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:150)
        at org.springframework.transaction.interceptor.TransactionInterceptor.in
voke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy36.execute(Unknown Source)
        at org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(De
faultStartupRoutineExecutor.java:101)
        at org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(De
faultStartupRoutineExecutor.java:77)
        at org.hisp.dhis.system.startup.StartupListener.contextInitialized(Start
upListener.java:57)
        ... 12 more
2010-11-22 09:31:19.180::INFO:  Started SelectChannelConnector@0.0.0.0:8888
* INFO  09:31:19,180 Lifecycle: server started (TrayApp.java [main])
* INFO  10:00:45,345 Graceful shutdown... (TrayApp.java [AWT-EventQueue-0])
* INFO  10:00:45,348 Lifecycle: server stopping (TrayApp.java [AWT-EventQueue-0]
)
2010-11-22 10:00:45.376:/:INFO:  Closing Spring root WebApplicationContext
* INFO  10:00:45,548 Lifecycle: server stopped (TrayApp.java [AWT-EventQueue-0])

* INFO  10:00:45,587 Exiting... (TrayApp.java [AWT-EventQueue-0])

C:\Program Files\DHIS2-2.0.5>





Follow ups

References