org.hibernate.HibernateException: Failed to commit or rollback transaction. Root cause [ SQL next exception = [org.postgresql.util.PSQLException: ERROR: column "xwa_content" is of type bytea but expression is of type bigint Rada: You will need to rewrite or cast the expression. Pozice: 67]]

XWiki.org JIRA | Martin Vanek | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    I'm getting same exception when upgrading from 3.1.1 as described in http://jira.xwiki.org/browse/XWIKI-7388 Adding <property name="jdbc.use_streams_for_binary">false</property> into hibernate.cfg.xml does not have any effect Adding <typedef name="materialized_clob" class="org.hibernate.type.StringClobType" /> into xwiki.hbm.xml helps to display and edit, but xar importing and file attaching dies {noformat}org.hibernate.HibernateException: Failed to commit or rollback transaction. Root cause [ SQL next exception = [org.postgresql.util.PSQLException: ERROR: column "xwa_content" is of type bytea but expression is of type bigint Rada: You will need to rewrite or cast the expression. Pozice: 67]] at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:876) ~[xwiki-platform-legacy-oldcore-3.4.jar:na] at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:840) ~[xwiki-platform-legacy-oldcore-3.4.jar:na] at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:683) ~[xwiki-platform-legacy-oldcore-3.4.jar:na] ... 49 common frames omitted Caused by: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92) ~[hibernate-core-3.6.9.Final.jar :3.6.9.Final] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] {noformat}

    XWiki.org JIRA | 5 years ago | Martin Vanek
    org.hibernate.HibernateException: Failed to commit or rollback transaction. Root cause [ SQL next exception = [org.postgresql.util.PSQLException: ERROR: column "xwa_content" is of type bytea but expression is of type bigint Rada: You will need to rewrite or cast the expression. Pozice: 67]]

    Root Cause Analysis

    1. org.hibernate.exception.SQLGrammarException

      Could not execute JDBC batch update

      at org.hibernate.exception.SQLStateConverter.convert()
    2. Hibernate
      AbstractBatcher.executeBatch
      1. org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
      2. org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
      3. org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
      3 frames