I'm not sure this is worth filing on JIRA, since (if I'm right about it) it's really a bug in Derby 10.1.2.1, and the most obvious fix is to note that the combination of Roller 2.3 and Hibernate (from the Roller support project) is incompatible with using Derby /in embedded mode/ (network mode works for me).

The suspected culprit is in the vicinity of DERBY-628:

http://issues.apache.org/jira/browse/DERBY-628?page=all

The bug manifests itself in Roller (produced on two systems with completely clean installs of Tomcat and Roller 2.3) this way: creation of first user after installing all the components succeeds, but creating a new blog results in the following:

WARN 2006-06-15 13:55:09,360 JDBCExceptionReporter:logExceptions - SQL Error: 20000, SQLState: 22005 ERROR 2006-06-15 13:55:09,361 JDBCExceptionReporter:logExceptions - An attempt was made to get a data value of type 'CLOB' from a data value of type 'VARCHAR'. ERROR 2006-06-15 13:55:09,366 AbstractFlushingEventListener:performExecutions -
Could not synchronize database state with session
org.hibernate.exception.DataException: could not insert: [org.apache.roller.pojos.WebsiteData]

.. ( Hibernate classes here ) ...

at org.apache.roller.business.hibernate.HibernateWeblogManagerImpl.getWeblogCategoryAncestorAssocs(HibernateWeblogManagerImpl.java:751)

(the last line is the first part of the trace involving Roller)

The error does NOT occur under the same configuration with the sole change that Derby connects in Network mode. This *could* indicate a problem with Hibernate's Derby dialect, but given the similarity of the symptoms to DERBY-628, I'm inclined to say it's a bug there.

It might be possible to code in a workaround or specify more details in the Hibernate mapping file so Derby doesn't get confused, but my take is that the best option is to note the issue somewhere in documentation or on the wiki.

I don't have the problem isolated well enough to (re)file DERBY-628, but perhaps s/he who contributed the Derby support does.

cheers,

AC

Reply via email to