Error when retiring email(person atttribute)

Dear community, I am customizing the registration page, and while I have been able to retire some unnecessary person attributes I was unable to retire the email address attribute. It is throwing this error: HTTP Status 500 - Request processing failed; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value : org.openmrs.PersonAttributeType.sortWeight

Thanks for your help.

Usually if there is some data in the DB already against an attribute, it might not be possible to retire it. Need to check further. Please see if in openmrs log file there is any further exception/error message or trace regarding this field. That can also help debug this.

I checked the DB, no previous entries made. For the log file, its very difficult to read the files from the terminal(Im using vagrant on windows), if I knew how to save it on a local file on windows that would make it easier. Thanks

To connect to your vagrant box, you can download WinSCP

FTP protocol: SFTP
Port number: 22
Host name: 192.168.33.10 (or the one you have set in your vagrant file)
User name: vagrant
Password: vagrant

image

1 Like

Most code editors have an SSH remote mode that allows you to view files in your IDE/Code Editor, while tunneling the file via SSH from a remote machine/VM.

For example with

If you set this up for ssh into vagrant, then you should be able to see logs locally on your windows machine via the editor.

2 Likes

Nothing in the logs… Any idea what this function "sortweight’ is supposed to do?
If it helps, when I untick “searchable” when editing the attribute I also get the same error…