Metadata export with dependencies - not working with sharing

Hello,

I’m trying to use the import/export app in 2.33 to export data set and program metadata with dependencies. When I have sharing turned on, I’m getting the following error:

{
  "httpStatus": "Internal Server Error",
  "httpStatusCode": 500,
  "status": "ERROR",
  "message": "failed to lazily initialize a collection of role: org.hisp.dhis.attribute.Attribute.userGroupAccesses, could not initialize proxy - no Session"
}

The error is happening with any format or compression selection.

As per the error, I’ve reviewed my attribute user group sharing settings thinking that this may help. However, none of my attributes are shared to any user group.

Any idea what might be going on here? Thanks in advance for any help :slight_smile:

Hi @Kris_Reinhardt,
Are you sure you have all the required authorities for the user performing the export?

May I ask you if you are considering upgrading your DHIS2 instance?

Hi @Gassim - thanks for looking at this :slight_smile:

The user is a superuser and has all the authorities so this shouldn’t be the issue.

Also, we are planning on upgrading versions in a few months. Is this an issue that has been fixed in more recent versions?

Great! Hopefully that there won’t be an issue once you upgrade; however, if you’d like to make sure, would you try to reproduce the issue in any of the instances in play.dhis2.org.

If you find an error then it will be great to create a Jira issue and please let me know so I can support you further! :+1:

1 Like

This is a mysterious issue I think, it’s tracked in [DHIS2-8868] - Jira and possibly also in [DHIS2-10331] - Jira .

A workaround has been so far to a) either reboot the server to clear caches, if that is not possible, b) check your custom attributes, remove the object types, and assign it again - props to @JIMENEZ_POMARETA_Ram / @Ramon_Jose_Pomareta

3 Likes

Thanks @dhuser - we’ll give the workarounds a go to see if they’ll work for us. Thanks