Can I delete a core role in Standalone edition?

I have a local copy of openmrs standalone app running on my local system. But whenever you delete one of the core roles, say: Organisational: Doctor, an error pops up on page:

An Internal Error has Occurred org.hibernate.ObjectNotFoundException No row with the given identifier exists: [org.openmrs.Role#Organizational: Doctor]

Although, after refresh, everything then shows up correctly. Can we fix this bug?

Another thing I noticed is that when you delete any of those roles, (e…g Organisational: Nurse) and restarts your app, it gets re-populated again, with default privileges. I guess this would be an issue when the app gets deployed.

@osagie.ehigiato, note that the Reference Demo Data module automatically creates these rows at startup, so if by “refresh” you mean that you restart tomcat, then the error stop showing up because the data you deleted was recreated.

So you should remove the Reference Demo Data module before you try deleting those roles.

-Darius

··· On Tue, Mar 15, 2016 at 10:10 AM, osagie ehigiato wrote:

osagie.ehigiato https://talk.openmrs.org/users/osagie.ehigiato osagie ehigiato https://talk.openmrs.org/users/osagie.ehigiato March 15

I have a local copy of openmrs standalone app running on my local system. But whenever you delete one of the core roles, say: Organisational: Doctor, an error pops up on page:

An Internal Error has Occurred org.hibernate.ObjectNotFoundException No row with the given identifier exists: [org.openmrs.Role#Organizational: Doctor]

Although, after refresh, everything then shows up correctly. Can we fix this bug?

Visit Topic https://talk.openmrs.org/t/error-on-row-deletion/5322/1 or reply to this email to respond

To stop receiving notifications for this particular topic, click here https://talk.openmrs.org/t/error-on-row-deletion/5322/unsubscribe. To unsubscribe from these emails, change your user preferences https://talk.openmrs.org/my/preferences

or, click here <reply@talk.openmrs.org?subject=unsubscribe> to unsubscribe via email.

Hi @darius, in my app, I have no reference demo data module. This is why I am actually surprised.

And you can also test the issue of error showing up on row deletion e…g (Organizational: System Administrator).

Ah, my mistake, those roles are defined in the Reference Metadata module (which you cannot remove).

I recommend you leave them there, and just don’t assign them to users…

··· On Tue, Mar 15, 2016 at 10:32 AM, osagie ehigiato wrote:

osagie.ehigiato https://talk.openmrs.org/users/osagie.ehigiato osagie ehigiato https://talk.openmrs.org/users/osagie.ehigiato March 15

darius:

eference Demo Data

Hi @darius https://talk.openmrs.org/users/darius, in my app, I have no reference demo data module. This is why I am actually surprised.

And you can also test the issue of error showing up on row deletion e…g (Organizational: System Administrator).

Visit Topic https://talk.openmrs.org/t/error-on-row-deletion/5322/3 or reply to this email to respond

In Reply To darius https://talk.openmrs.org/users/darius Darius Jazayeri https://talk.openmrs.org/users/darius /dev/5 March 15 @osagie.ehigiato https://talk.openmrs.org/users/osagie.ehigiato, note that the Reference Demo Data module automatically creates these rows at startup, so if by “refresh” you mean that you restart tomcat, then the error stop showing up because the data you deleted was recreated. So you should remove the Reference Demo Data module before you try…

Visit Topic https://talk.openmrs.org/t/error-on-row-deletion/5322/3 or reply to this email to respond

To stop receiving notifications for this particular topic, click here https://talk.openmrs.org/t/error-on-row-deletion/5322/unsubscribe. To unsubscribe from these emails, change your user preferences https://talk.openmrs.org/my/preferences

or, click here <reply@talk.openmrs.org?subject=unsubscribe> to unsubscribe via email.

1 Like