Hi @hardikaj, in the very last lines of it:
org.openmrs.api.APIException:
The user Arun Ajmera (103632344071261943787) already exists, it could therefore not be created.
That should actually not happen because if the user already exists, it should not be null here, and the creation should not be triggered. But perhaps have you encountered a new bug…
So somehow the scheme doesn’t find the user and hence attempts to create it, but then lower down this happens.
And as you can see the latest condition checks a lot of stuff:
user.getId() != null
Context.getUserService().getUser(user.getId()) != null)
Context.getUserService().getUserByUuid(user.getUuid()) != null
Context.getUserService().getUserByUsername(user.getUsername()) != null
(user.getEmail() != null && Context.getUserService().getUserByUsernameOrEmail(user.getEmail()) != null)
Could you check in your OpenMRS database if any of those conditions are true for this user Arun Ajmera (103632344071261943787)
?