User Creation failing via Metadata API.

Hello,

We are using metadata api to create user, the post payload looks like this.

    {
"users"        : [
{
"disabled": false            ,
"organisationUnits"                : [
{
"name": "MSF"                    ,
"id": "2cf79e8f137"
                }
],
"dataViewOrganisationUnits"                : [
{
"name": "MSF"                    ,
"id": "2cf79e8f137"
                }
],
"userCredentials"                : {
"username": "foo.bar@dubia.msf.org"                ,
"password": "aab24180611c714b04f572c737a324ae"                ,
"userAuthorityGroups"                    : [
{
"name": "HQ"                        ,
"id": "hq"
                    }
]
},
"surname": "Bar"            ,
"name": "Foo Bar"            ,
"firstName": "Foo"            ,
"selfRegistered": false            ,
"id": 7            ,
"email": "foo.bar@dubia.msf.org"            ,
"strategy": "create_and_update"
        }
]
}

This post is failing with the error :

No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure of UserCredential object which is breaking the API.

Any help on this asap is greatly appreciated.

Thanks

Kiran.

I do not know the details here, but do know that the IDs (i.e. DHIS2 UIDs) cannot begin with a number.

See here for more information

https://www.dhis2.org/doc/snapshot/en/user/html/go01.html

This was discussed just a few days ago on this list.

Regards,

Jason

···

On Tue, Jun 17, 2014 at 11:58 AM, Kiran Prakash kprakash@thoughtworks.com wrote:

Hello,

We are using metadata api to create user, the post payload looks like this.

    { "users"        : [ { "disabled": false            , "organisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "dataViewOrganisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "userCredentials"                : { "username": "foo.bar@dubia.msf.org"                , "password": "aab24180611c714b04f572c737a324ae"                , "userAuthorityGroups"                    : [ { "name": "HQ"                        , "id": "hq"
                    } ] }, "surname": "Bar"            , "name": "Foo Bar"            , "firstName": "Foo"            , "selfRegistered": false            , "id": 7            , "email": "foo.bar@dubia.msf.org"            , "strategy": "create_and_update"
        } ] }

This post is failing with the error :

No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure of UserCredential object which is breaking the API.

Any help on this asap is greatly appreciated.

Thanks

Kiran.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi

We are using metadata api to create user, the post payload looks like this.

{
    "users": [
        {
            "disabled": false,

Why do you have this here? this is part of userCredentials

            "organisationUnits": [

                {
                    "name": "MSF",
                    "id": "2cf79e8f137"
                }
            ],
            "dataViewOrganisationUnits": [
                {
                    "name": "MSF",
                    "id": "2cf79e8f137"
                }
            ],
            "userCredentials": {
                "username": "foo.bar@dubia.msf.org",
                "password": "aab24180611c714b04f572c737a324ae",
                "userAuthorityGroups": [
                    {
                        "name": "HQ",
                        "id": "hq"
                    }
                ]
            },
            "surname": "Bar",
            "name": "Foo Bar",
            "firstName": "Foo",
            "selfRegistered": false,
            "id": 7,

This ID makes no sense, where do you get this from?

            "email": "foo.bar@dubia.msf.org",

            "strategy": "create_and_update"

Strategy is not on the user class..

        }

    ]
}

This post is failing with the error :

No IdentifiableObjectStore found for class: class
org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

You can ignore this

We debugged a little, it looks like the there are some change in structure

of UserCredential object which is breaking the API.

What changes? I don't see any changes to that class

···

--
Morten

Any help on this asap is greatly appreciated.

Thanks

Kiran.

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

Forwarding to the list for everyone’s benefit.

Better if you respond to the list, so that it is more clear to everyone else what the underlying cause might be.

Best regards,

Jason

···

On Tue, Jun 17, 2014 at 3:35 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

I do not know the details here, but do know that the IDs (i.e. DHIS2 UIDs) cannot begin with a number.

See here for more information

https://www.dhis2.org/doc/snapshot/en/user/html/go01.html

This was discussed just a few days ago on this list.

Regards,

Jason

On Tue, Jun 17, 2014 at 11:58 AM, Kiran Prakash kprakash@thoughtworks.com wrote:

Hello,

We are using metadata api to create user, the post payload looks like this.

    { "users"        : [ { "disabled": false            , "organisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "dataViewOrganisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "userCredentials"                : { "username": "foo.bar@dubia.msf.org"                , "password": "aab24180611c714b04f572c737a324ae"                , "userAuthorityGroups"                    : [ { "name": "HQ"                        , "id": "hq"
                    } ] }, "surname": "Bar"            , "name": "Foo Bar"            , "firstName": "Foo"            , "selfRegistered": false            , "id": 7            , "email": "foo.bar@dubia.msf.org"            , "strategy": "create_and_update"
        } ] }

This post is failing with the error :

No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure of UserCredential object which is breaking the API.

Any help on this asap is greatly appreciated.

Thanks

Kiran.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

We think the issue is because UserCredentialsStore is not a type of GenericIdentifiableObjectStore.

Ids are a non issue. We’ve local changes on our branch that allows for this kind of Id.

To be sure, I tested with this payload. Same error.

{
“users”: [
{
“organisationUnits”: [
{
“name”: “Paoua-Hospital”,

                "id": "ae791727683"
            }
        ],
        "dataViewOrganisationUnits": [
            {
                "name": "Paoua-Hospital",

                "id": "ae791727683"
            }
        ],
        "userCredentials": {
            "username": "isabelle.mouniaman@paris.msf.org",

            "password": "c0441bc76d7b5b52cffe7100424676b0",
            "userAuthorityGroups": [
                {
                    "name": "HQ",

                    "id": "hq"
                }
            ]
        },
        "surname": "Foo",
        "name": "Foo Bar",

        "firstName": "Foo",
        "selfRegistered": false,
        "id": 0,
        "email": "foo.bar@paris.msf.org"

    }
]

}

Regards,

Kiran.

···

On Tue, Jun 17, 2014 at 3:50 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Forwarding to the list for everyone’s benefit.

Better if you respond to the list, so that it is more clear to everyone else what the underlying cause might be.

Best regards,

Jason

---------- Forwarded message ----------
From: Kiran Prakash kprakash@thoughtworks.com

Date: Tue, Jun 17, 2014 at 12:07 PM
Subject: Re: [Dhis2-devs] User Creation failing via Metadata API.
To: Jason Pickering jason.p.pickering@gmail.com

Yes. but that is not the cause of the error though.

We have made local changes to allow for alpha numeric ids that could begin with a number.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 17, 2014 at 3:35 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

I do not know the details here, but do know that the IDs (i.e. DHIS2 UIDs) cannot begin with a number.

See here for more information

https://www.dhis2.org/doc/snapshot/en/user/html/go01.html

This was discussed just a few days ago on this list.

Regards,

Jason

On Tue, Jun 17, 2014 at 11:58 AM, Kiran Prakash kprakash@thoughtworks.com wrote:

Hello,

We are using metadata api to create user, the post payload looks like this.

    { "users"        : [ { "disabled": false            , "organisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "dataViewOrganisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "userCredentials"                : { "username": "foo.bar@dubia.msf.org"                , "password": "aab24180611c714b04f572c737a324ae"                , "userAuthorityGroups"                    : [ { "name": "HQ"                        , "id": "hq"
                    } ] }, "surname": "Bar"            , "name": "Foo Bar"            , "firstName": "Foo"            , "selfRegistered": false            , "id": 7            , "email": "foo.bar@dubia.msf.org"            , "strategy": "create_and_update"
        } ] }

This post is failing with the error :

No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure of UserCredential object which is breaking the API.

Any help on this asap is greatly appreciated.

Thanks

Kiran.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

please ignore that “id”: 0 line. I tested it without that.

···

On Tue, Jun 17, 2014 at 4:14 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

We think the issue is because UserCredentialsStore is not a type of GenericIdentifiableObjectStore.

Ids are a non issue. We’ve local changes on our branch that allows for this kind of Id.

To be sure, I tested with this payload. Same error.

{
“users”: [
{
“organisationUnits”: [
{
“name”: “Paoua-Hospital”,

                "id": "ae791727683"
            }
        ],
        "dataViewOrganisationUnits": [
            {
                "name": "Paoua-Hospital",



                "id": "ae791727683"
            }
        ],
        "userCredentials": {
            "username": "isabelle.mouniaman@paris.msf.org",



            "password": "c0441bc76d7b5b52cffe7100424676b0",

            "userAuthorityGroups": [
                {
                    "name": "HQ",



                    "id": "hq"
                }
            ]
        },

“surname”: “Foo”,

        "name": "Foo Bar",



        "firstName": "Foo",
        "selfRegistered": false,

“id”: 0,
“email”: "foo.bar@paris.msf.org"

    }
]

}

Regards,

Kiran.

On Tue, Jun 17, 2014 at 3:50 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Forwarding to the list for everyone’s benefit.

Better if you respond to the list, so that it is more clear to everyone else what the underlying cause might be.

Best regards,

Jason

---------- Forwarded message ----------
From: Kiran Prakash kprakash@thoughtworks.com

Date: Tue, Jun 17, 2014 at 12:07 PM
Subject: Re: [Dhis2-devs] User Creation failing via Metadata API.
To: Jason Pickering jason.p.pickering@gmail.com

Yes. but that is not the cause of the error though.

We have made local changes to allow for alpha numeric ids that could begin with a number.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 17, 2014 at 3:35 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

I do not know the details here, but do know that the IDs (i.e. DHIS2 UIDs) cannot begin with a number.

See here for more information

https://www.dhis2.org/doc/snapshot/en/user/html/go01.html

This was discussed just a few days ago on this list.

Regards,

Jason

On Tue, Jun 17, 2014 at 11:58 AM, Kiran Prakash kprakash@thoughtworks.com wrote:

Hello,

We are using metadata api to create user, the post payload looks like this.

    { "users"        : [ { "disabled": false            , "organisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "dataViewOrganisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "userCredentials"                : { "username": "foo.bar@dubia.msf.org"                , "password": "aab24180611c714b04f572c737a324ae"                , "userAuthorityGroups"                    : [ { "name": "HQ"                        , "id": "hq"
                    } ] }, "surname": "Bar"            , "name": "Foo Bar"            , "firstName": "Foo"            , "selfRegistered": false            , "id": 7            , "email": "foo.bar@dubia.msf.org"            , "strategy": "create_and_update"
        } ] }

This post is failing with the error :

No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure of UserCredential object which is breaking the API.

Any help on this asap is greatly appreciated.

Thanks

Kiran.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

There have been no changes to UserCredentials, and it doesn’t require an idStore since it’s handled differently in the importer.

I will have a look at it

···


Morten

On Tue, Jun 17, 2014 at 12:46 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

please ignore that “id”: 0 line. I tested it without that.

On Tue, Jun 17, 2014 at 4:14 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

We think the issue is because UserCredentialsStore is not a type of GenericIdentifiableObjectStore.

Ids are a non issue. We’ve local changes on our branch that allows for this kind of Id.

To be sure, I tested with this payload. Same error.

{
“users”: [
{
“organisationUnits”: [
{
“name”: “Paoua-Hospital”,

                "id": "ae791727683"
            }
        ],
        "dataViewOrganisationUnits": [
            {
                "name": "Paoua-Hospital",





                "id": "ae791727683"
            }
        ],
        "userCredentials": {
            "username": "isabelle.mouniaman@paris.msf.org",





            "password": "c0441bc76d7b5b52cffe7100424676b0",

            "userAuthorityGroups": [
                {
                    "name": "HQ",





                    "id": "hq"
                }
            ]
        },

“surname”: “Foo”,

        "name": "Foo Bar",





        "firstName": "Foo",
        "selfRegistered": false,

“id”: 0,
“email”: "foo.bar@paris.msf.org"

    }
]

}

Regards,

Kiran.

On Tue, Jun 17, 2014 at 3:50 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Forwarding to the list for everyone’s benefit.

Better if you respond to the list, so that it is more clear to everyone else what the underlying cause might be.

Best regards,

Jason

---------- Forwarded message ----------
From: Kiran Prakash kprakash@thoughtworks.com

Date: Tue, Jun 17, 2014 at 12:07 PM
Subject: Re: [Dhis2-devs] User Creation failing via Metadata API.
To: Jason Pickering jason.p.pickering@gmail.com

Yes. but that is not the cause of the error though.

We have made local changes to allow for alpha numeric ids that could begin with a number.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 17, 2014 at 3:35 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

I do not know the details here, but do know that the IDs (i.e. DHIS2 UIDs) cannot begin with a number.

See here for more information

https://www.dhis2.org/doc/snapshot/en/user/html/go01.html

This was discussed just a few days ago on this list.

Regards,

Jason

On Tue, Jun 17, 2014 at 11:58 AM, Kiran Prakash kprakash@thoughtworks.com wrote:

Hello,

We are using metadata api to create user, the post payload looks like this.

    { "users"        : [ { "disabled": false            , "organisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "dataViewOrganisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "userCredentials"                : { "username": "foo.bar@dubia.msf.org"                , "password": "aab24180611c714b04f572c737a324ae"                , "userAuthorityGroups"                    : [ { "name": "HQ"                        , "id": "hq"
                    } ] }, "surname": "Bar"            , "name": "Foo Bar"            , "firstName": "Foo"            , "selfRegistered": false            , "id": 7            , "email": "foo.bar@dubia.msf.org"            , "strategy": "create_and_update"
        } ] }

This post is failing with the error :

No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure of UserCredential object which is breaking the API.

Any help on this asap is greatly appreciated.

Thanks

Kiran.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Can you give some more details about the error you get? is it just not updating, or is it giving you an exception? some kind of conflict report?

···


Morten

On Tue, Jun 17, 2014 at 12:48 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

There have been no changes to UserCredentials, and it doesn’t require an idStore since it’s handled differently in the importer.

I will have a look at it


Morten

On Tue, Jun 17, 2014 at 12:46 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

please ignore that “id”: 0 line. I tested it without that.

On Tue, Jun 17, 2014 at 4:14 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

We think the issue is because UserCredentialsStore is not a type of GenericIdentifiableObjectStore.

Ids are a non issue. We’ve local changes on our branch that allows for this kind of Id.

To be sure, I tested with this payload. Same error.

{
“users”: [
{
“organisationUnits”: [
{
“name”: “Paoua-Hospital”,

                "id": "ae791727683"
            }
        ],
        "dataViewOrganisationUnits": [
            {
                "name": "Paoua-Hospital",






                "id": "ae791727683"
            }
        ],
        "userCredentials": {
            "username": "isabelle.mouniaman@paris.msf.org",






            "password": "c0441bc76d7b5b52cffe7100424676b0",

            "userAuthorityGroups": [
                {
                    "name": "HQ",






                    "id": "hq"
                }
            ]
        },

“surname”: “Foo”,

        "name": "Foo Bar",






        "firstName": "Foo",
        "selfRegistered": false,

“id”: 0,
“email”: "foo.bar@paris.msf.org"

    }
]

}

Regards,

Kiran.

On Tue, Jun 17, 2014 at 3:50 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Forwarding to the list for everyone’s benefit.

Better if you respond to the list, so that it is more clear to everyone else what the underlying cause might be.

Best regards,

Jason

---------- Forwarded message ----------
From: Kiran Prakash kprakash@thoughtworks.com

Date: Tue, Jun 17, 2014 at 12:07 PM
Subject: Re: [Dhis2-devs] User Creation failing via Metadata API.
To: Jason Pickering jason.p.pickering@gmail.com

Yes. but that is not the cause of the error though.

We have made local changes to allow for alpha numeric ids that could begin with a number.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 17, 2014 at 3:35 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

I do not know the details here, but do know that the IDs (i.e. DHIS2 UIDs) cannot begin with a number.

See here for more information

https://www.dhis2.org/doc/snapshot/en/user/html/go01.html

This was discussed just a few days ago on this list.

Regards,

Jason

On Tue, Jun 17, 2014 at 11:58 AM, Kiran Prakash kprakash@thoughtworks.com wrote:

Hello,

We are using metadata api to create user, the post payload looks like this.

    { "users"        : [ { "disabled": false            , "organisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "dataViewOrganisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "userCredentials"                : { "username": "foo.bar@dubia.msf.org"                , "password": "aab24180611c714b04f572c737a324ae"                , "userAuthorityGroups"                    : [ { "name": "HQ"                        , "id": "hq"
                    } ] }, "surname": "Bar"            , "name": "Foo Bar"            , "firstName": "Foo"            , "selfRegistered": false            , "id": 7            , "email": "foo.bar@dubia.msf.org"            , "strategy": "create_and_update"
        } ] }

This post is failing with the error :

No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure of UserCredential object which is breaking the API.

Any help on this asap is greatly appreciated.

Thanks

Kiran.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

yes. getting the following conflict report.

“importTypeSummaries”: [
{
“status”: “SUCCESS”,
“importCount”: {

            "imported": 0,
            "updated": 1,
            "ignored": 0,
            "deleted": 0
        },
        "type": "User",

        "importConflicts": [
            {
                "object": "Foo Bar",
                "value": "Unknown reference to IdentifiableObject{id=0, uid='cXT4SsLSp7X', code='foo.barman@paris.msf.org', name='foo.bar@paris.msf.org', created=Tue Jun 17 16:16:11 IST 2014, lastUpdated=Tue Jun 17 16:16:11 IST 2014} (UserCredentials) on object IdentifiableObject{id=0, uid='d75c93b498d', code='null', name='Foo Bar', created=null, lastUpdated=null} (User)."

            }
        ]
    }
]

We see followig warning on the server:

WARN 2014-06-17 16:08:26,376 No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java [375879558@qtp-1739190459-0])

···

On Tue, Jun 17, 2014 at 4:23 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

Can you give some more details about the error you get? is it just not updating, or is it giving you an exception? some kind of conflict report?


Morten

On Tue, Jun 17, 2014 at 12:48 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

There have been no changes to UserCredentials, and it doesn’t require an idStore since it’s handled differently in the importer.

I will have a look at it


Morten

On Tue, Jun 17, 2014 at 12:46 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

please ignore that “id”: 0 line. I tested it without that.

On Tue, Jun 17, 2014 at 4:14 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

We think the issue is because UserCredentialsStore is not a type of GenericIdentifiableObjectStore.

Ids are a non issue. We’ve local changes on our branch that allows for this kind of Id.

To be sure, I tested with this payload. Same error.

{
“users”: [
{
“organisationUnits”: [
{
“name”: “Paoua-Hospital”,

                "id": "ae791727683"
            }
        ],
        "dataViewOrganisationUnits": [
            {
                "name": "Paoua-Hospital",








                "id": "ae791727683"
            }
        ],
        "userCredentials": {
            "username": "isabelle.mouniaman@paris.msf.org",








            "password": "c0441bc76d7b5b52cffe7100424676b0",

            "userAuthorityGroups": [
                {
                    "name": "HQ",








                    "id": "hq"
                }
            ]
        },

“surname”: “Foo”,

        "name": "Foo Bar",








        "firstName": "Foo",
        "selfRegistered": false,

“id”: 0,
“email”: "foo.bar@paris.msf.org"

    }
]

}

Regards,

Kiran.

On Tue, Jun 17, 2014 at 3:50 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Forwarding to the list for everyone’s benefit.

Better if you respond to the list, so that it is more clear to everyone else what the underlying cause might be.

Best regards,

Jason

---------- Forwarded message ----------
From: Kiran Prakash kprakash@thoughtworks.com

Date: Tue, Jun 17, 2014 at 12:07 PM
Subject: Re: [Dhis2-devs] User Creation failing via Metadata API.
To: Jason Pickering jason.p.pickering@gmail.com

Yes. but that is not the cause of the error though.

We have made local changes to allow for alpha numeric ids that could begin with a number.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 17, 2014 at 3:35 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

I do not know the details here, but do know that the IDs (i.e. DHIS2 UIDs) cannot begin with a number.

See here for more information

https://www.dhis2.org/doc/snapshot/en/user/html/go01.html

This was discussed just a few days ago on this list.

Regards,

Jason

On Tue, Jun 17, 2014 at 11:58 AM, Kiran Prakash kprakash@thoughtworks.com wrote:

Hello,

We are using metadata api to create user, the post payload looks like this.

    { "users"        : [ { "disabled": false            , "organisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "dataViewOrganisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "userCredentials"                : { "username": "foo.bar@dubia.msf.org"                , "password": "aab24180611c714b04f572c737a324ae"                , "userAuthorityGroups"                    : [ { "name": "HQ"                        , "id": "hq"
                    } ] }, "surname": "Bar"            , "name": "Foo Bar"            , "firstName": "Foo"            , "selfRegistered": false            , "id": 7            , "email": "foo.bar@dubia.msf.org"            , "strategy": "create_and_update"
        } ] }

This post is failing with the error :

No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure of UserCredential object which is breaking the API.

Any help on this asap is greatly appreciated.

Thanks

Kiran.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hm, ok. So you are creating a new user, right? I see it says, updated: 1, which means it selected the wrong strategy.

···


Morten

On Tue, Jun 17, 2014 at 12:56 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

yes. getting the following conflict report.

“importTypeSummaries”: [
{
“status”: “SUCCESS”,
“importCount”: {

            "imported": 0,
            "updated": 1,
            "ignored": 0,
            "deleted": 0
        },
        "type": "User",




        "importConflicts": [
            {
                "object": "Foo Bar",
                "value": "Unknown reference to IdentifiableObject{id=0, uid='cXT4SsLSp7X', code='foo.barman@paris.msf.org', name='foo.bar@paris.msf.org', created=Tue Jun 17 16:16:11 IST 2014, lastUpdated=Tue Jun 17 16:16:11 IST 2014} (UserCredentials) on object IdentifiableObject{id=0, uid='d75c93b498d', code='null', name='Foo Bar', created=null, lastUpdated=null} (User)."




            }
        ]
    }
]

We see followig warning on the server:

WARN 2014-06-17 16:08:26,376 No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java [375879558@qtp-1739190459-0])

On Tue, Jun 17, 2014 at 4:23 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

Can you give some more details about the error you get? is it just not updating, or is it giving you an exception? some kind of conflict report?


Morten

On Tue, Jun 17, 2014 at 12:48 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

There have been no changes to UserCredentials, and it doesn’t require an idStore since it’s handled differently in the importer.

I will have a look at it


Morten

On Tue, Jun 17, 2014 at 12:46 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

please ignore that “id”: 0 line. I tested it without that.

On Tue, Jun 17, 2014 at 4:14 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

We think the issue is because UserCredentialsStore is not a type of GenericIdentifiableObjectStore.

Ids are a non issue. We’ve local changes on our branch that allows for this kind of Id.

To be sure, I tested with this payload. Same error.

{
“users”: [
{
“organisationUnits”: [
{
“name”: “Paoua-Hospital”,

                "id": "ae791727683"
            }
        ],
        "dataViewOrganisationUnits": [
            {
                "name": "Paoua-Hospital",










                "id": "ae791727683"
            }
        ],
        "userCredentials": {
            "username": "isabelle.mouniaman@paris.msf.org",










            "password": "c0441bc76d7b5b52cffe7100424676b0",

            "userAuthorityGroups": [
                {
                    "name": "HQ",










                    "id": "hq"
                }
            ]
        },

“surname”: “Foo”,

        "name": "Foo Bar",










        "firstName": "Foo",
        "selfRegistered": false,

“id”: 0,
“email”: "foo.bar@paris.msf.org"

    }
]

}

Regards,

Kiran.

On Tue, Jun 17, 2014 at 3:50 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Forwarding to the list for everyone’s benefit.

Better if you respond to the list, so that it is more clear to everyone else what the underlying cause might be.

Best regards,

Jason

---------- Forwarded message ----------
From: Kiran Prakash kprakash@thoughtworks.com

Date: Tue, Jun 17, 2014 at 12:07 PM
Subject: Re: [Dhis2-devs] User Creation failing via Metadata API.
To: Jason Pickering jason.p.pickering@gmail.com

Yes. but that is not the cause of the error though.

We have made local changes to allow for alpha numeric ids that could begin with a number.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 17, 2014 at 3:35 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

I do not know the details here, but do know that the IDs (i.e. DHIS2 UIDs) cannot begin with a number.

See here for more information

https://www.dhis2.org/doc/snapshot/en/user/html/go01.html

This was discussed just a few days ago on this list.

Regards,

Jason

On Tue, Jun 17, 2014 at 11:58 AM, Kiran Prakash kprakash@thoughtworks.com wrote:

Hello,

We are using metadata api to create user, the post payload looks like this.

    { "users"        : [ { "disabled": false            , "organisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "dataViewOrganisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "userCredentials"                : { "username": "foo.bar@dubia.msf.org"                , "password": "aab24180611c714b04f572c737a324ae"                , "userAuthorityGroups"                    : [ { "name": "HQ"                        , "id": "hq"
                    } ] }, "surname": "Bar"            , "name": "Foo Bar"            , "firstName": "Foo"            , "selfRegistered": false            , "id": 7            , "email": "foo.bar@dubia.msf.org"            , "strategy": "create_and_update"
        } ] }

This post is failing with the error :

No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure of UserCredential object which is breaking the API.

Any help on this asap is greatly appreciated.

Thanks

Kiran.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

yes, it’s a new user create call.

···

On Tue, Jun 17, 2014 at 4:47 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hm, ok. So you are creating a new user, right? I see it says, updated: 1, which means it selected the wrong strategy.


Morten

On Tue, Jun 17, 2014 at 12:56 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

yes. getting the following conflict report.

“importTypeSummaries”: [
{
“status”: “SUCCESS”,
“importCount”: {

            "imported": 0,
            "updated": 1,
            "ignored": 0,
            "deleted": 0
        },
        "type": "User",






        "importConflicts": [
            {
                "object": "Foo Bar",
                "value": "Unknown reference to IdentifiableObject{id=0, uid='cXT4SsLSp7X', code='foo.barman@paris.msf.org', name='foo.bar@paris.msf.org', created=Tue Jun 17 16:16:11 IST 2014, lastUpdated=Tue Jun 17 16:16:11 IST 2014} (UserCredentials) on object IdentifiableObject{id=0, uid='d75c93b498d', code='null', name='Foo Bar', created=null, lastUpdated=null} (User)."






            }
        ]
    }
]

We see followig warning on the server:

WARN 2014-06-17 16:08:26,376 No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java [375879558@qtp-1739190459-0])

On Tue, Jun 17, 2014 at 4:23 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

Can you give some more details about the error you get? is it just not updating, or is it giving you an exception? some kind of conflict report?


Morten

On Tue, Jun 17, 2014 at 12:48 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

There have been no changes to UserCredentials, and it doesn’t require an idStore since it’s handled differently in the importer.

I will have a look at it


Morten

On Tue, Jun 17, 2014 at 12:46 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

please ignore that “id”: 0 line. I tested it without that.

On Tue, Jun 17, 2014 at 4:14 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

We think the issue is because UserCredentialsStore is not a type of GenericIdentifiableObjectStore.

Ids are a non issue. We’ve local changes on our branch that allows for this kind of Id.

To be sure, I tested with this payload. Same error.

{
“users”: [
{
“organisationUnits”: [
{
“name”: “Paoua-Hospital”,

                "id": "ae791727683"
            }
        ],
        "dataViewOrganisationUnits": [
            {
                "name": "Paoua-Hospital",












                "id": "ae791727683"
            }
        ],
        "userCredentials": {
            "username": "isabelle.mouniaman@paris.msf.org",












            "password": "c0441bc76d7b5b52cffe7100424676b0",

            "userAuthorityGroups": [
                {
                    "name": "HQ",












                    "id": "hq"
                }
            ]
        },

“surname”: “Foo”,

        "name": "Foo Bar",












        "firstName": "Foo",
        "selfRegistered": false,

“id”: 0,
“email”: "foo.bar@paris.msf.org"

    }
]

}

Regards,

Kiran.

On Tue, Jun 17, 2014 at 3:50 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Forwarding to the list for everyone’s benefit.

Better if you respond to the list, so that it is more clear to everyone else what the underlying cause might be.

Best regards,

Jason

---------- Forwarded message ----------
From: Kiran Prakash kprakash@thoughtworks.com

Date: Tue, Jun 17, 2014 at 12:07 PM
Subject: Re: [Dhis2-devs] User Creation failing via Metadata API.
To: Jason Pickering jason.p.pickering@gmail.com

Yes. but that is not the cause of the error though.

We have made local changes to allow for alpha numeric ids that could begin with a number.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 17, 2014 at 3:35 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

I do not know the details here, but do know that the IDs (i.e. DHIS2 UIDs) cannot begin with a number.

See here for more information

https://www.dhis2.org/doc/snapshot/en/user/html/go01.html

This was discussed just a few days ago on this list.

Regards,

Jason

On Tue, Jun 17, 2014 at 11:58 AM, Kiran Prakash kprakash@thoughtworks.com wrote:

Hello,

We are using metadata api to create user, the post payload looks like this.

    { "users"        : [ { "disabled": false            , "organisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "dataViewOrganisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "userCredentials"                : { "username": "foo.bar@dubia.msf.org"                , "password": "aab24180611c714b04f572c737a324ae"                , "userAuthorityGroups"                    : [ { "name": "HQ"                        , "id": "hq"
                    } ] }, "surname": "Bar"            , "name": "Foo Bar"            , "firstName": "Foo"            , "selfRegistered": false            , "id": 7            , "email": "foo.bar@dubia.msf.org"            , "strategy": "create_and_update"
        } ] }

This post is failing with the error :

No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure of UserCredential object which is breaking the API.

Any help on this asap is greatly appreciated.

Thanks

Kiran.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi,

I was able to create a new user, and also update it as usual… the conflict you are seeing means nothing and can be ignored. Are you staying nothing gets saved to the db?

···


Morten

On Tue, Jun 17, 2014 at 1:27 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

yes, it’s a new user create call.

On Tue, Jun 17, 2014 at 4:47 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hm, ok. So you are creating a new user, right? I see it says, updated: 1, which means it selected the wrong strategy.


Morten

On Tue, Jun 17, 2014 at 12:56 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

yes. getting the following conflict report.

“importTypeSummaries”: [
{
“status”: “SUCCESS”,
“importCount”: {

            "imported": 0,
            "updated": 1,
            "ignored": 0,
            "deleted": 0
        },
        "type": "User",








        "importConflicts": [
            {
                "object": "Foo Bar",
                "value": "Unknown reference to IdentifiableObject{id=0, uid='cXT4SsLSp7X', code='foo.barman@paris.msf.org', name='foo.bar@paris.msf.org', created=Tue Jun 17 16:16:11 IST 2014, lastUpdated=Tue Jun 17 16:16:11 IST 2014} (UserCredentials) on object IdentifiableObject{id=0, uid='d75c93b498d', code='null', name='Foo Bar', created=null, lastUpdated=null} (User)."








            }
        ]
    }
]

We see followig warning on the server:

WARN 2014-06-17 16:08:26,376 No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java [375879558@qtp-1739190459-0])

On Tue, Jun 17, 2014 at 4:23 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

Can you give some more details about the error you get? is it just not updating, or is it giving you an exception? some kind of conflict report?


Morten

On Tue, Jun 17, 2014 at 12:48 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

There have been no changes to UserCredentials, and it doesn’t require an idStore since it’s handled differently in the importer.

I will have a look at it


Morten

On Tue, Jun 17, 2014 at 12:46 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

please ignore that “id”: 0 line. I tested it without that.

On Tue, Jun 17, 2014 at 4:14 PM, Kiran Prakash kprakash@thoughtworks.com wrote:

We think the issue is because UserCredentialsStore is not a type of GenericIdentifiableObjectStore.

Ids are a non issue. We’ve local changes on our branch that allows for this kind of Id.

To be sure, I tested with this payload. Same error.

{
“users”: [
{
“organisationUnits”: [
{
“name”: “Paoua-Hospital”,

                "id": "ae791727683"
            }
        ],
        "dataViewOrganisationUnits": [
            {
                "name": "Paoua-Hospital",














                "id": "ae791727683"
            }
        ],
        "userCredentials": {
            "username": "isabelle.mouniaman@paris.msf.org",














            "password": "c0441bc76d7b5b52cffe7100424676b0",

            "userAuthorityGroups": [
                {
                    "name": "HQ",














                    "id": "hq"
                }
            ]
        },

“surname”: “Foo”,

        "name": "Foo Bar",














        "firstName": "Foo",
        "selfRegistered": false,

“id”: 0,
“email”: "foo.bar@paris.msf.org"

    }
]

}

Regards,

Kiran.

On Tue, Jun 17, 2014 at 3:50 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Forwarding to the list for everyone’s benefit.

Better if you respond to the list, so that it is more clear to everyone else what the underlying cause might be.

Best regards,

Jason

---------- Forwarded message ----------
From: Kiran Prakash kprakash@thoughtworks.com

Date: Tue, Jun 17, 2014 at 12:07 PM
Subject: Re: [Dhis2-devs] User Creation failing via Metadata API.
To: Jason Pickering jason.p.pickering@gmail.com

Yes. but that is not the cause of the error though.

We have made local changes to allow for alpha numeric ids that could begin with a number.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 17, 2014 at 3:35 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

I do not know the details here, but do know that the IDs (i.e. DHIS2 UIDs) cannot begin with a number.

See here for more information

https://www.dhis2.org/doc/snapshot/en/user/html/go01.html

This was discussed just a few days ago on this list.

Regards,

Jason

On Tue, Jun 17, 2014 at 11:58 AM, Kiran Prakash kprakash@thoughtworks.com wrote:

Hello,

We are using metadata api to create user, the post payload looks like this.

    { "users"        : [ { "disabled": false            , "organisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "dataViewOrganisationUnits"                : [ { "name": "MSF"                    , "id": "2cf79e8f137"
                } ], "userCredentials"                : { "username": "foo.bar@dubia.msf.org"                , "password": "aab24180611c714b04f572c737a324ae"                , "userAuthorityGroups"                    : [ { "name": "HQ"                        , "id": "hq"
                    } ] }, "surname": "Bar"            , "name": "Foo Bar"            , "firstName": "Foo"            , "selfRegistered": false            , "id": 7            , "email": "foo.bar@dubia.msf.org"            , "strategy": "create_and_update"
        } ] }

This post is failing with the error :

No IdentifiableObjectStore found for class: class org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure of UserCredential object which is breaking the API.

Any help on this asap is greatly appreciated.

Thanks

Kiran.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp