← Back to team overview

dhis2-devs team mailing list archive

Startup errors in 2.29

 

Hi

After recently upgrading from 2.28 to 2.29, I noted that the PeriodType
"BiWeekly" has been added to the periodtype table, BUT it generates an
error during startup (see tomcat log below). There are also several SEVERE
log items at the end related to listeners failing to start - but i cannot
see how it affect the system running:


* INFO  2018-04-09 11:09:29,180 Executing startup routine [2 of 15,
runlevel 2]: PeriodTypePopulator (DefaultStartupRoutineExecutor.java
[localhost-startStop-1])
* ERROR 2018-04-09 11:09:29,186 org.hibernate.WrongClassException: Object
[id=7119265] was not of the specified subclass
[org.hisp.dhis.period.PeriodType] : Discriminator: BiWeekly
        at org.hibernate.loader.Loader.getInstanceClass(Loader.java:1810)
        at
org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1621)
        at org.hibernate.loader.Loader.getRow(Loader.java:1550)
        at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:733)
        at org.hibernate.loader.Loader.processResultSet(Loader.java:978)
        at org.hibernate.loader.Loader.doQuery(Loader.java:936)
        at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:342)
        at org.hibernate.loader.Loader.doList(Loader.java:2622)
        at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2464)
        at org.hibernate.loader.Loader.list(Loader.java:2426)
        at
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:109)
        at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1787)
        at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:363)
        at
org.hisp.dhis.period.hibernate.HibernatePeriodStore.getAllPeriodTypes(HibernatePeriodStore.java:228)
        at
org.hisp.dhis.period.PeriodTypePopulator.executeInTransaction(PeriodTypePopulator.java:66)
        at
org.hisp.dhis.system.startup.TransactionContextStartupRoutine$1.doInTransaction(TransactionContextStartupRoutine.java:57)
        at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
        at
org.hisp.dhis.system.startup.TransactionContextStartupRoutine.execute(TransactionContextStartupRoutine.java:52)
        at
org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(DefaultStartupRoutineExecutor.java:113)
        at
org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(DefaultStartupRoutineExecutor.java:70)
        at
org.hisp.dhis.system.startup.StartupListener.contextInitialized(StartupListener.java:71)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
        at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
        at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:988)
        at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1860)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Unknown Source)
 (StartupListener.java [localhost-startStop-1])
09-Apr-2018 11:09:29.186 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.startInternal One or more
listeners failed to start. Full details will be found in the appropriate
container log file
09-Apr-2018 11:09:29.194 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.startInternal Context [/dhis]
startup failed due to previous errors
* INFO  2018-04-09 11:09:29,224 De-registering jdbc driver:
org.postgresql.Driver@78fba49a (StartupListener.java
[localhost-startStop-1])
09-Apr-2018 11:09:29.354 WARNING [localhost-startStop-1]
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The
web application [dhis] appears to have started a thread named
[com.google.inject.internal.util.$Finalizer] but has failed to stop it.
This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.ref.ReferenceQueue.remove(Unknown Source)
 java.lang.ref.ReferenceQueue.remove(Unknown Source)
 com.google.inject.internal.util.$Finalizer.run(Finalizer.java:114)
09-Apr-2018 11:09:29.354 SEVERE [localhost-startStop-1]
org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks
The web application [dhis] created a ThreadLocal with key of type
[java.lang.ThreadLocal] (value [java.lang.ThreadLocal@9926dd9]) and a value
of type [org.hibernate.boot.internal.MetadataImpl] (value
[org.hibernate.boot.internal.MetadataImpl@1e8d20a1]) but failed to remove
it when the web application was stopped. Threads are going to be renewed
over time to try and avoid a probable memory leak.
09-Apr-2018 11:09:29.358 SEVERE [localhost-startStop-1]
org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks
The web application [dhis] created a ThreadLocal with key of type
[java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1a61f7c6]) and a
value of type
[org.springframework.security.core.context.SecurityContextImpl] (value
[org.springframework.security.core.context.SecurityContextImpl@ffffffff:
Null authentication]) but failed to remove it when the web application was
stopped. Threads are going to be renewed over time to try and avoid a
probable memory leak.
09-Apr-2018 11:09:29.384 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
application archive [C:\Program Files\Apache Software Foundation\Tomcat
8.5\webapps\dhis.war] has finished in [52,168] ms

Any advice on the reason for this and/or how to fix it?

Regards
Calle

*******************************************

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@xxxxxxxxx

Skype: calle_hedberg

*******************************************

Follow ups