Error while getting user OpenMRS Legecy UI


I am using OpenMRS 2.1.0. I have created a development environment in eclipse and maven server. I have installed UI legacy module. Everything working fine except when I go to admin->Manage Users-> Add users. I get an exception in the log while OpenMRS works fine. The exception occurs because of the required variable userId in NULL (String userId = request.getParameter(“userId”):wink: In addition when I create a person “P” the person is added and I make that person a user. Now then if I check the Person table it’s not there while in Users table the username I create with the person P is there. Also if I search the person I get the person but its not there in Person_Name table.

Note: I have not changed any source code. The OpenMRS core and Legacy-UI both are pulled from OpenMRS GitHub.

Here is exception log

Are you able to reproduce that error here?

Hi Dkayiwa,

The link you sent it do not has that administration panel. What I am referring to Admin -> Manager Users -> Add Users. Here is the screenshot of exception.

What I understood the code is trying to get “userId” get parameter but there is no userid parameter.

You can get there via “System Administration” => “Advanced Administration”

Thanks for information, but exception is not “throw”. It’s in the log so where I can check on the link if the exception didn’t occur ?

Actually, I figured it out, that exception is ignorable as per my knowledge. If we click on add users then User Form controller’s “formBackingObject” function is called. In that function “String userId = request.getParameter(“userId”);” is executed while there is no userId in url since I clicked on add users. Here is screenshot for add users

Afte clicking on Add user, the user form is opened and there is no userId in URL so the exception only in log

Also if we search the user

Then click on the system id then we see a userId in in URL so that line satisfied the condition since the parameter is in the URL.