0

I have a entity with a com.google.appengine.api.datastore.Text property for storing over 500 chars entries.

The problem is the Jersey REST doesnt like the Text type. So i made the getter return a stringValue to get it to work with rest, like this:

public String getContent() {
  return content.getValue();
 }

 public void setContent(Text content) {
  this.content = content;
 }

The error only comes when deploying to GAE, not when running development mode:

The type of the getter is java.lang.String but that of the setter is com.google.appengine.api.datastore.Text. They have to be the same.

What to do?

1 Answer 1

1

Do this:

public String getContent() {
    return content.getValue();
}

public void setContent(String data) {
    this.content = new Text(data);
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.