Class: MediaType not found in namespace

Then it seems to be conflicting with another class with same name for example “javax.ws.rs.core.MediaType;”. You can try to call your class using the full package name so that it does not confuse it with another class.