Subject Re: [Firebird-Java] Trying to run XWiki
Author Mark Rotteveel
On 27-6-2012 15:15, the_a_rioch wrote:
> Hibernate cfg:
> <property name="connection.url">jdbc:firebirdsql://localhost:3064/XWiki</property>
> <property name="connection.username">SYSDBA</property>
> <property name="connection.password">masterkey</property>
> <property name="connection.driver_class">org.firebirdsql.jdbc.FBDriver </property>
> <property name="dialect">org.hibernate.dialect.FirebirdDialect</property>
> <property name="connection.provider_class"></property>
> <property name="connection.pool_size">2</property>
> <property name="statement_cache.size">2</property>
> <mapping resource="xwiki.hbm.xml"/>
> <mapping resource="feeds.hbm.xml"/>
> <mapping resource="activitystream.hbm.xml"/>
> Lines below Hibernate Dialect seems to be default ones, ichanged pools to 1/1 with no difference.
> hbm.xml files are customized for some servers, but it seems that no SQL is sent to server at all. I cannot look at it on Jaybird/FB level, but i could see HSQLDB statements after tweaking logback.xml

Jaybird logs statements using Log4J (if it is on the classpath), if you
have configured it to log trace level.

> <!-- Hibernate logging options -->
> <logger name="org.hibernate" level="warn"/>
> <logger name="org.hibernate.type" level="warn"/>
> <logger name="" level="warn"/>
> <logger name="org.hibernate.SQL" level="debug"/>
> <logger name="org.firebirdsql" level="debug" />
> Since i see none, i think that Hibernate just cannot determine type of some column...
> If it at least rendered type name, or object/property or both. But what is "-1" ? whatever.
> Here are persons running applications on Hibernate 3.6 / FB , so i hope there is something really easy, if only you knows where and how to look.

Type -1 is java.sql.Types.LONGVARCHAR, which is the type identification
which Jaybird uses for BLOB SUB_TYPE 1. The FirebirdDialect in Hibernate
does not have that type mapping (instead it maps java.sql.Types.CLOB to

The quickest solution will probably be to extend FirebirdDialect and add
the following to the constructor:

registerColumnType( Types.LONGVARCHAR, "blob sub_type 1" );

I do have plans to write a better dialect for Hibernate, but I currently
simply don't have the time (I do hope to get more time for releasing
Jaybird 2.2 and other things in the coming month).

Mark Rotteveel