title: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'aboutMeText' at row 1
body: <p>I am trying to update value of a column using Spring-JPA, values are emoji/smilies.
  but getting error saying java.sql.BatchUpdateException: Incorrect string value: '\xF0\x9F\x98\x84\xF0\x9F...' for column</p>
  
  <p>Here is the connection URL-</p>
  
  <pre><code>jdbc.url=jdbc:mysql:localhost:3306/woo?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;connectionCollation=utf8mb4_unicode_ci&amp;characterSetResults=UTF-8
  </code></pre>
  
  <p>Here is the calling code</p>
  
  <pre><code>userProfile.setAboutMeText("\uD83D\uDE04\uD83D\uDC68\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83D\uDC68\uD83D\uDE02\uD83D\uDE20");
  </code></pre>
  
  <p>Here is the entity </p>
  
  <pre><code> @Entity
  public class UserProfile implements Serializable {
  
      @Column(length = 1000)
  private String aboutMeText;
  @Id
  private Long id;
  public Long getId() {
      return id;
  }
  
  public void seId(Long id) {
      this.id = id;
  }
  
  
  public String getAboutMeText() {
     return JsonEscape.unescapeJson(aboutMeText);
  
  
  }
   public void setAboutMeText(String aboutMeText) {
     this.aboutMeText = JsonEscape.escapeJson(aboutMeText);
  
  
  }
  </code></pre>
  
  <p>and </p>
  
  <p>here is the complete error:</p>
  
  <pre><code>HTTP Status 500 - Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Data truncation: Data too long for column 'aboutMeText' at row 1; SQL [n/a]; nested exception is org.hibernate.exception.DataException: Data truncation: Data too long for column 'aboutMeText' at row 1&lt;/h1&gt;
      &lt;div class="line"&gt;&lt;/div&gt;
      &lt;p&gt;
          &lt;b&gt;type&lt;/b&gt; Exception report
      &lt;/p&gt;
  
  &lt;pre&gt;org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Data truncation: Data too long for column 'aboutMeText' at row 1; SQL [n/a]; nested exception is org.hibernate.exception.DataException: Data truncation: Data too long for column 'aboutMeText' at row 1
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:981)
  org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:871)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
  org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  </code></pre>
  
  <p></p>
  
  <p>I tried and checked various posts on stackoverflow , stackexchange etc.. and performed some changes, but still unable to solve the issue.</p>