This ticket addresses top class level comment in JpaGroupRoleProvider regarding refactoring out the REST endpoint from the core JpaGroupRoleProvider service to clean the code and attempt to avoid a race-condition load collision.
"Since this is not intended to be production code, the REST concerns have not be factored into a separate class. Feel free to refactor." 
And the module load race condition SCR-vs-JAXRS tug of war exception .
 Load race condition with dependencies triggered by JaxRsServiceTracker.addingService regarding opencast-userdirectory. Consistently about the time the "/groups" endpoint is being registered.