How to solve the “Class has two properties of the same name” JAXB error (WebSphere Application Server)

Today, when I was creating a RESTful service in JavaEE for a dynamic web application to run in IBM® WebSphere  Application Server (WAS) an error like this was appearing: Class has two properties of the same name “userId” this problem is related to the following location: at public java.lang.String com.rest.model.UserProfile.getUserId() at com.rest.model.UserProfile this problem is…