title: error: Entities and Pojos must have a usable public constructor - Java
body: <p>Whenever I try to compile the app I get this error</p>
  <pre><code>error: Entities and Pojos must have a usable public constructor. You can have an empty constructor or a constructor whose parameters match the fields (by name and type). - java.util.List
  </code></pre>
  <p>SystemMessagesEntity.java :</p>
  <pre><code>    @Entity(tableName = &quot;system_messages&quot;)
      @TypeConverters(ReplyMessages.class)
      public class SystemMessageEntity {
          @PrimaryKey
          @NonNull
          public String messageId;
          public String title;
          public String body;
          public String color;
          public Integer date;
          public String icon;
          public String ad;
          public Integer isRead;
          public String ip;
          String id; //user_id
          @Embedded(prefix = &quot;reply_&quot;)
          private List&lt;ReplyMessage&gt; reply_message;
      
          @Ignore
          public SystemMessageEntity() {
          }
      
          public SystemMessageEntity(String id, @NonNull String messageId, String title, String body, String color, Integer date, String icon, String ad, Integer isRead, String ip, List&lt;ReplyMessage&gt; reply_message) {
              this.id = id;
              this.messageId = messageId;
              this.title = title;
              this.body = body;
              this.color = color;
              this.date = date;
              this.icon = icon;
              this.ad = ad;
              this.isRead = isRead;
              this.ip = ip;
              this.reply_message = reply_message;
          }
      //getters and setters
  }
  </code></pre>
  <p>ReplyMessages.java :</p>
  <pre><code>@TypeConverters(ReplyMessages.class)
  </code></pre>
  <p>public class ReplyMessage {</p>
  <pre><code>private String body = &quot;&quot;;
  private String userId = &quot;&quot;;
  private Integer date = 0;
  private String id = &quot;&quot;;
  private String messageId = &quot;&quot;;
  
  
  @Ignore
  public ReplyMessage() {
  }
  
  public ReplyMessage(String body, String userId, Integer date, String id, String messageId) {
      this.body = body;
      this.date = date;
      this.id = id;
      this.messageId = messageId;
      this.userId = userId;
  }
  </code></pre>
  <p>And this is the TypeConverter :</p>
  <pre><code>public class ReplyMessages {
  
      @TypeConverter
      public static String ListToJson(List&lt;ReplyMessage&gt; replyMessages) {
          if(replyMessages == null) return null;
          Type type = new TypeToken&lt;List&lt;ReplyMessage&gt;&gt;() {}.getType();
          String json = new Gson().toJson(replyMessages, type);
          Log.i(&quot;JSON&quot;, &quot;toJson: &quot; + json);
          return replyMessages.isEmpty() ? null : json;
      }
  
      @TypeConverter
      public static List&lt;ReplyMessage&gt; JsonToList(String json) {
          Gson gson = new Gson();
          Type type = new TypeToken&lt;List&lt;ReplyMessage&gt;&gt;() {}.getType();
          List&lt;ReplyMessage&gt; replyMessages = gson.fromJson(json, type);
          return replyMessages;
      }
  }
  </code></pre>
  <p>I want to get a JSON data from API using Retrofit and store it in a database, The JSON data have an array of objects (<code>MessageReply</code>) inside the parent array of objects (<code>SystemMessagesEntity</code>).</p>
  <p>I have tried everything and searched in almost every question in StackOverflow, but I haven't found anything.</p>
  <p><strong>Edit</strong>: When I used the <code>SystemMessageEntity</code> Entity alone, The database worked fine. But when I added the <code>ReplyMessage</code> Entity, The problem appeared.</p>
  <p>Edit 2: The problem has been solved by removing the <code>List&lt;&gt;</code> of the ReplyMessage. I don't know why the list is not working although I'm using a converter.</p>