MIME media type application/xml was not found Occurs only in production and not in local

30 Views Asked by At

I use Spring Boot Java.

Below exception occurs:

Caused by: com.sun.jersey.api.MessageException: A message body writer for Java class com.linkscreens.commons.exception.entity.MessageEntity, and Java type class com.linkscreens.commons.exception.entity.MessageEntity, and MIME media type application/xml was not found.

Below is the Java class

public class MessageEntity {

    private String code;
    private String description;

    public MessageEntity(String code, String description) {
        super();
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }


}

The above issue only occurs in production and in local the code gets executed successfully without any exception.

0

There are 0 best solutions below