Metadata Import - ERROR - java.lang.NullPointerException

Hello,

I’m trying to import the new hypertension package (just after rebooting the server) and the dry mode runs perfectlly but when I try to import the real data I get “something went wrong”, with the contents:

TypeError: e is undefined
ht@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/app.19cbdf07.chunk.js:1:506358
Gi@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:626080
_s@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:672310
vl@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:665039
ml@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:664962
sl@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:661971
Ka/<@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:613342
t.unstable_runWithPriority@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:688741
Va@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:613051
Ka@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:613289
Ja@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:613222
nl@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:658753
bo@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/138.b36ddf2e.chunk.js:2:630455
Ht/n</<@https://test.testdomain.com/tomcat1/dhis-web-import-export/static/js/app.19cbdf07.chunk.js:1:516252

in ht
in div
in St
in div
in Dt
in div
in Gn
in div
in Gt
in wi
in n
in n
in zl
in Gl
in main
in div
in n
in n
in Unknown
in Suspense
in be
in div
in div
in _e
in qe
in C
in de
in je
in le
in DHIS2RuntimeProvider
in Ne
in be
in Le
in i

The dhis.log shows the following:

  • INFO 2022-10-07T06:59:09,794 (admin) Import:Start (DefaultMetadataImportService.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:09,859 (admin) Import:Start (NotificationLoggerUtil.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:20,599 (admin) Import:Preheat[REFERENCE] took 10.583835 sec. (DefaultPreheatService.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:23,430 (admin) Import:Validation took 1.223907 sec. (DefaultObjectBundleValidationService.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:23,464 (admin) Creating 1 object(s) of type UserRole (DefaultObjectBundleService.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:23,467 (admin) Creating 1 object(s) of type UserRole (NotificationLoggerUtil.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:23,732 (admin) Creating 4 object(s) of type Attribute (DefaultObjectBundleService.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:23,734 (admin) Creating 4 object(s) of type Attribute (NotificationLoggerUtil.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:23,868 (admin) Updating 1 object(s) of type User (DefaultObjectBundleService.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:23,869 (admin) Updating 1 object(s) of type User (NotificationLoggerUtil.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:24,067 (admin) Creating 3 object(s) of type UserGroup (DefaultObjectBundleService.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:24,069 (admin) Creating 3 object(s) of type UserGroup (NotificationLoggerUtil.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:24,146 (admin) Creating 26 object(s) of type Option (DefaultObjectBundleService.java [taskScheduler-1])
  • INFO 2022-10-07T06:59:24,147 (admin) Creating 26 object(s) of type Option (NotificationLoggerUtil.java [taskScheduler-1])
  • ERROR 2022-10-07T06:59:24,255 java.lang.NullPointerException
    at org.hisp.dhis.option.OptionSet.addOption(OptionSet.java:104)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor.intercept(ByteBuddyInterceptor.java:56)
    at org.hibernate.proxy.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:95)
    at org.hisp.dhis.option.OptionSet$HibernateProxy$5Dgk80P1.addOption(Unknown Source)
    at org.hisp.dhis.dxf2.metadata.objectbundle.hooks.OptionObjectBundleHook.preCreate(OptionObjectBundleHook.java:75)
    at org.hisp.dhis.dxf2.metadata.objectbundle.hooks.OptionObjectBundleHook.preCreate(OptionObjectBundleHook.java:43)
    at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.lambda$handleCreates$4(DefaultObjectBundleService.java:216)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
    at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1085)
    at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.lambda$handleCreates$5(DefaultObjectBundleService.java:216)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
    at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.handleCreates(DefaultObjectBundleService.java:215)
    at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commitObjectType(DefaultObjectBundleService.java:163)
    at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:135)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
    at com.sun.proxy.$Proxy291.commit(Unknown Source)
    at org.hisp.dhis.dxf2.metadata.DefaultMetadataImportService.importMetadata(DefaultMetadataImportService.java:134)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
    at com.sun.proxy.$Proxy293.importMetadata(Unknown Source)
    at org.hisp.dhis.webapi.controller.metadata.MetadataAsyncImporter.call(MetadataAsyncImporter.java:82)
    at org.hisp.dhis.security.SecurityContextRunnable.run(SecurityContextRunnable.java:56)
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
    (MetadataAsyncImporter.java [taskScheduler-1])
  • ERROR 2022-10-07T06:59:24,281 Process failed: null (NotificationLoggerUtil.java [taskScheduler-1])

Do you have any idea how to solve it? Should I create a Jira issue?

Thanks a lot.

Hi @kfeina

Could you also share the Catalina.out log (without the sensitive info)? Thank you!


It might also help if you try this suggestion by @diallotafsir52:

Hello,

Clearing the aplication cache in the maintenance didn’t help.

I attach the Catalina.out output:

07-Oct-2022 06:44:31.312 INFO [Thread-21] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler [“http-nio-8080”]
07-Oct-2022 06:44:31.418 INFO [Thread-21] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
07-Oct-2022 06:44:31.679 WARNING [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [host-manager]
java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader ‘bootstrap’)
at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2269)
at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches(WebappClassLoaderBase.java:2256)
at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1627)
at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1555)
at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:443)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5432)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:473)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:992)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:706)
at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:803)
07-Oct-2022 06:44:36.409 WARNING [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [tomcat1] appears to have started a thread named [Log4j2-TF-7-Scheduled-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.16/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
07-Oct-2022 06:44:36.415 WARNING [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [tomcat1] appears to have started a thread named [cache2k-scheduler] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.16/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
07-Oct-2022 06:44:36.421 WARNING [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [tomcat1] appears to have started a thread named [cache2k-scheduler] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.16/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1177)
java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
07-Oct-2022 06:44:36.430 WARNING [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [tomcat1] appears to have started a thread named [Thread-117 (ActiveMQ-client-global-threads)] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.16/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
java.base@11.0.16/java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:458)
org.apache.activemq.artemis.utils.ActiveMQThreadPoolExecutor$ThreadPoolQueue.poll(ActiveMQThreadPoolExecutor.java:112)
org.apache.activemq.artemis.utils.ActiveMQThreadPoolExecutor$ThreadPoolQueue.poll(ActiveMQThreadPoolExecutor.java:45)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1053)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
07-Oct-2022 06:44:36.431 WARNING [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [tomcat1]
java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader ‘bootstrap’)
at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2269)
at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches(WebappClassLoaderBase.java:2256)
at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1627)
at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1555)
at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:443)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5432)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:473)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:992)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:706)
at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:803)
07-Oct-2022 06:44:36.441 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@4b2daf4a]) and a value of type [org.hibernate.boot.internal.MetadataImpl] (value [org.hibernate.boot.internal.MetadataImpl@24832161]) 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.
07-Oct-2022 06:44:36.458 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@336406be]) 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.
07-Oct-2022 06:44:36.466 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@31f9972b]) and a value of type [org.springframework.security.core.context.SecurityContextImpl] (value [SecurityContextImpl [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.
07-Oct-2022 06:44:36.467 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@2165085b]) 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.
07-Oct-2022 06:44:36.468 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@6a0f802c]) 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.
07-Oct-2022 06:44:36.470 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@79cd3a25]) 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.
07-Oct-2022 06:44:36.471 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@470baf8]) 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.
07-Oct-2022 06:44:36.473 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@dde5dfd]) 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.
07-Oct-2022 06:44:36.474 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@1b46b28a]) 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.
07-Oct-2022 06:44:36.474 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@b4aafd5]) 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.
07-Oct-2022 06:44:36.475 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@aec633e]) 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.
07-Oct-2022 06:44:36.476 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@7522f62b]) 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.
07-Oct-2022 06:44:36.478 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@5b5ec8e7]) 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.
07-Oct-2022 06:44:36.479 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@5b4e05e]) 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.
07-Oct-2022 06:44:36.481 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@6ca88645]) 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.
07-Oct-2022 06:44:36.482 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@e59a655]) 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.
07-Oct-2022 06:44:36.484 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@236d5e89]) 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.
07-Oct-2022 06:44:36.486 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@179ecaa]) 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.
07-Oct-2022 06:44:36.488 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@294bd86e]) 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.
07-Oct-2022 06:44:36.490 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@6a63a81c]) 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.
07-Oct-2022 06:44:36.491 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@23333acf]) 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.
07-Oct-2022 06:44:36.493 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@6de19ebf]) 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.
07-Oct-2022 06:44:36.495 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@1a9ea3c5]) 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.
07-Oct-2022 06:44:36.496 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@6d4acbc2]) 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.
07-Oct-2022 06:44:36.498 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@571571e6]) 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.
07-Oct-2022 06:44:36.500 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@36e009dd]) 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.
07-Oct-2022 06:44:36.502 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@598f144f]) 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.
07-Oct-2022 06:44:36.504 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@6220d067]) 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.
07-Oct-2022 06:44:36.505 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@1e461784]) 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.
07-Oct-2022 06:44:36.507 SEVERE [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [tomcat1] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3f4e8de6]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@285e5b70]) 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.
07-Oct-2022 06:44:36.951 WARNING [Thread-21] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [manager]
java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader ‘bootstrap’)
at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2269)
at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches(WebappClassLoaderBase.java:2256)
at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1627)
at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1555)
at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:443)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5432)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:473)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:992)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:706)
at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:803)

07-Oct-2022 06:49:49.788 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“http-nio-8080”]
07-Oct-2022 06:49:49.858 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [128,686] milliseconds

Thanks for your time!

1 Like

Hi @kfeina , thanks for sharing the logs and glad to hear of your interest in the hypertension control package.

You may want to try restarting the DHIS2 instance itself, not just clearing the application cache, and then trying again.

It seems the error arises with options and option sets. See this section of logs:

* INFO 2022-10-07T06:59:24,147 (admin) Creating 26 object(s) of type Option (NotificationLoggerUtil.java [taskScheduler-1])
* ERROR 2022-10-07T06:59:24,255 java.lang.NullPointerException
at org.hisp.dhis.option.OptionSet.addOption(OptionSet.java:104)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

To help identify the problem further could you please share:

  • Is this a blank DHIS2 instance you are importing into, or an instance with existing data and metadata?
  • Which version of DHIS2 are you using, and can you confirm the package metadata file is the same version?

If this is not a blank instance then the import may be attempting to change an existing option set.
Please see this section of the installation guide for tips on how to deal with metadata conflicts.

Tagging @YuryR and @stratosilva if they have additional thoughts, or if this could be an import bug.

1 Like

Hello,

I use DHIS2 version 2.38.1 and my database already contains some data, like the option_sets GEN - Sex
GEN - Yes/No/Unknown. Restarting the server doesn’t help.

I tried some of the strategies found in the documentation Installation - DHIS2 Documentation without result.

In my opinion, a java.lang.NullPointerException is a real Bug. but I would like someone confirm it and how can I help to find it out or how to solve this import problem.

Thanks a lot for your time.

@kfeina ,

This issue is because of sort order issue in the optionsets/options that is being imported. Did you make any changes to the hypertension package before importing? Please make sure that all the option sets have options with sortOrder starting from 1 and are in sequence.

Thanks,
Rithvik

1 Like

@kfeina when I saw this I immediately wondered if it was option related. Because it is, I’ll add my experience if its useful.

We’ve had tons and tons of issues with options in the past, particularly when importing them in with metadata dependency pulls of programs. What we seem to have found is that there is a correlation with options which have been manually reordered in the optionSets and this inability to re-import them. I have note concreted this solution, but one way we’ve gotten around this is by editing/removing the sortOrder aspect of the options. If you’re able to identify which options are problematic, we’ve also gotten around this by allowing the system to re-order/sort the options by code/name value.

I recognize these are more “front end” solutions, but perhaps this information is helpful towards your investigation.

1 Like

Hi!
I agree this is an issue related to options and sort order of them. I suggest running the following script and trying importing again. It might help at least :slight_smile:

2 Likes

Nice!

1 Like

Hello, sorry for the delay.

I executed the sql script without success importing.

I will try it in a new database instance, at least to see the package.

Thanks a lot for your time!

Regards.

1 Like