title: Hibernate Error while persisting TEXT datatype
body: <p>Using hibernate and mysql 5.5, I am trying to persist String value in TEXT type column of database table. </p>
  
  <p>Tired to set String value in the mentioned column and tried to persist the data.But i am getting following exception. I have generated Entity class using Netbeans 8.0. 
  <br/><br/><br/><br/>
  <strong>Exception:-</strong> </p>
  
  <pre><code>FATAL:   JSF1073: javax.faces.FacesException caught during processing of INVOKE_APPLICATION 5 : UIComponent-ClientId=, Message=/addNewCategory.xhtml @30,151 actionListener="#{categoryBean.addCategoryAction}": java.lang.AbstractMethodError: com.mysql.jdbc.ServerPreparedStatement.setCharacterStream(ILjava/io/Reader;J)V
  FATAL:   /addNewCategory.xhtml @30,151 actionListener="#{categoryBean.addCategoryAction}": java.lang.AbstractMethodError: com.mysql.jdbc.ServerPreparedStatement.setCharacterStream(ILjava/io/Reader;J)V
  javax.faces.FacesException: /addNewCategory.xhtml @30,151 actionListener="#{categoryBean.addCategoryAction}": java.lang.AbstractMethodError: com.mysql.jdbc.ServerPreparedStatement.setCharacterStream(ILjava/io/Reader;J)V
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:89)
  </code></pre>
  
  <p><strong>CREATE SQL:-</strong> </p>
  
  <pre><code> CREATE TABLE `oc_category_description` (
        `category_id` int(11) NOT NULL,
        `language_id` int(11) NOT NULL,
        `name` varchar(255) NOT NULL,
        `description` text NOT NULL,
        `meta_description` varchar(255) NOT NULL,
        `meta_keyword` varchar(255) NOT NULL,
        PRIMARY KEY (`category_id`,`language_id`),
        KEY `name` (`name`)
      ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  
  /*!40101 SET character_set_client = @saved_cs_client */;
  </code></pre>
  
  <p><strong>EntityClass</strong></p>
  
  <pre><code>@Entity
  @Table(name = "oc_category_description")
  @XmlRootElement
  public class OcCategoryDescription implements Serializable {
      private static final long serialVersionUID = 1L;
  
      @Basic(optional = false)
      @NotNull
      @Lob
      @Size(min = 1, max = 65535)
      @Column(name = "description")
      private String description;
  
       public String getDescription() {
      return description;
  }
  
  public void setDescription(String description) {
      this.description = description;
  }
      //Constructors, setters, getters, equals and hashcode
  }
  </code></pre>
  
  <p>Before raising question I went through following links which were of very little help.</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/3868096/jpa-how-do-i-persist-a-string-into-a-database-field-type-mysql-text">JPA: how do I persist a String into a database field, type MYSQL Text</a></li>
  <li><a href="https://stackoverflow.com/questions/1870927/jpa-and-postqresql-long-string-persistence">JPA and PostqreSQL: long string persistence</a></li>
  <li><a href="https://stackoverflow.com/questions/2112667/issue-persisting-long-strings-with-hibernate">Issue persisting long strings with Hibernate</a></li>
  </ul>
  
  <p><br/><br/></p>
  
  <ul>
  <li>I also tried to persist data by removing <code>@Lob</code>, it saving data as "org.hibernate.engine.jdbc.BlobProxy@11e84b60"</li>
  <li>I tried <code>using @Column(columnDefinition = "TEXT")</code> instead of <code>@Lob</code>, again its giving same result. "org.hibernate.engine.jdbc.BlobProxy@11e84b60"</li>
  <li>I tried <code>@Type(type="text")</code>instead of <code>@Lob</code>, again its giving same result. "org.hibernate.engine.jdbc.BlobProxy@11e84b60"</li>
  </ul>