1 Reply Latest reply on Sep 27, 2005 7:06 AM by sleepycrom

    Clob and transaction commitments

    sleepycrom

      Problem, unable to commit a clob update transaction

      Insert(persist) of entity with clob work fine


      JBoss version: 4.0.3RC2
      mySQL version 4.1.12a

      Database table description:
      ...
      cDescription longtext
      ...
      


      Entity code:
      @Entity
      @Table(name = "COMPETENCE")
      public class Competence implements java.io.Serializable {
       ...
       private String description;
       ...
      
       @Column(name="cDescription", nullable=false)
       @Lob(type=LobType.CLOB,fetch=FetchType.LAZY)
       public String getDescription() {
       return this.description;
       }
      
       public void setDescription(String description) {
       this.description = description;
       }
      }
      


      When I try to update(merge) entity with clob, I got "Unable to Commit" exception...
      2005-09-21 15:50:03,125 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/internal].[action]] Servlet.service() for servlet action threw exception
      java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=audun/10, BranchQual=, localId=10] status=STATUS_NO_TRANSACTION; - nested throwable: (org.hibernate.PropertyValueException: not-null property references a null or transient value: no.antares.domain.Competence.description)
       at org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:185)
      


      Is it a bug since it work with persist but not with merge, or ?