Error while Syncing Metadata

Hi,

While doing the Metadata sync. We encountered the following error. Can you please help us?

nested exception is org.hibernate.HibernateException: Unable to perform afterTransactionCompletion callback: could not initialize proxy [org.hisp.dhis.category.CategoryCombo#2300] - no Session (MetadataSyncPostProcessor.java [taskScheduler-23])

Hi @Padmaja

Thank you for the post. I understand that you are performing a sync between two DHIS2 instances, so may I ask the versions of the DHIS2 are these two instances?

Additionally, it seems that the issue is related to Category Combinations metadata so it’s important to make sure that both instances have the same metadata. Is there a chance you export the category combinations using the Import/Export app from both instances and see if there are any differences?

If there’s a difference then the instance that is syncing from the other instance needs to have the same metadata which means you might need to do some deletions. Additionally, you might want to run Maintenance (Update category option combinations, Clear application cache, and Reload apps) in both instances then restart the instances and resume the sync again.

I hope to receive your insight about the remarks above, and would you kindly share the complete Catalina.out log (without the sensitive/authentication info)?

I hope this helps and hope you’ll find a solution soon. Thanks!

1 Like

Hi Gassim,

These two DHIS instances are in different versions. We are syncing metadata from 2.37.9.1 version to 2.37.8.1 version.

We checked metadata of CategoryCombos in both the instances by downloading it from Import/Export app. Only lastUpdatedBy values are there in one instance, except that everything is same in both instances.

It is giving the same sync error after Clearing application cache, Reload apps and restarting both instances.

We are using docker container for DHIS.
These are the logs of Catalina.out

05-Oct-2023 13:13:23.169 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to start component [Connector[AJP/1.3-8009]]
        org.apache.catalina.LifecycleException: Protocol handler start failed
                at org.apache.catalina.connector.Connector.startInternal(Connector.java:1075)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:449)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:927)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
                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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
        Caused by: java.lang.IllegalArgumentException: The AJP Connector is configured with secretRequired="true" but the secret attribute is either null or "". This combination is not valid.

Thanks,
Padmaja

Hi @Gassim ,

  1. Why the “default” category is getting updated automatically ? How frequently it will be updated?

  2. How to change the last-updated value of it?

  3. Can we stop this automatic updation process?

Thanks,
Padmaja

Hi

Please check the configurations in your server.xml file for the <connector secret=?

The error from the Catalina.out log doesn’t seem to be relevant to the category combinations. Maybe if the above is fixed, there won’t be an issue with the syncing.

Hi @Gassim,

Yes, The issue is not related to Catalina.out logs

The above error is because there are few visualisations with data elements in which disaggregation is selected as “details only” instead of “totals only”. Due to this the sync is failing with the above error. May I Know why is this behaving like this? Is it an expected behaviour?