Subject Trying to run XWiki
Author the_a_rioch
Hello all.

Can someone help me to run XWiki/Hibernate-3.6.9/JRE1.7-b5/Win on Firebird.

=== out of line ===

I am tasked to convert old Delphi version to new IDE, and restructure it along the way. There are a lot of ancient libraries to be replaced, lot of duplicating libs and code... over hundred MB of code heap, collected during 15 years. It was to much for my mind to grasp.

So i thought i should start with introducing version control, issue tracking and wiki.

In our department we only have rather overused win2003 server with Firebird 2.1, used in production. I think it is mainly overused by keeping sources snapshots of different years but still...

So after a while i started to look at XWiki, TrackerStudio and later probably some other tools.
I'd better start it on my local box, show it is useful and then move to the server.


I installed TrackStudio 1st, it comes as standalone win exe with Jetty container. Since it did not use root path of server, i unpacked Xwiki WAR into it as well. I have FB 2.5.1 Win64 installed.

It all generally works on HSQLDB, but that is not a way i'd like to use it in production. Also i don't want to get knowledge to yet another DB server, how to back it up, check its state, etc.
So FB support would be very nice to have.

Trackstudio seems to have internal charset problems with JayBird 2.1.6 and absolutely crashes with JB 2.2.0beta1 (not even HSQLDB conenction ;-) ). So preferred provider is 2.1.6

In HSQLDB it run fine, so i started to switch it.
In theory on launch XWiki/Hibernate should create database, but it does not, then tries to read empty database and finally crashes.

=== trace ===
2012-06-27 16:24:34,028 [http://localhost:8888/XWiki/bin/view/Main/%5d ERROR .x.x.s.XWikiHibernateBaseStore - Failed creating schema update script
org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
at org.hibernate.dialect.TypeNames.get( ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at org.hibernate.dialect.TypeNames.get( ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at org.hibernate.dialect.Dialect.getTypeName( ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at org.hibernate.mapping.Column.getSqlType( ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at org.hibernate.mapping.Table.sqlCreateString( ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at org.hibernate.cfg.Configuration.generateSchemaUpdateScript( ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at [xwiki-platform-legacy-oldcore-4.1.1.jar:na]
at [xwiki-platform-legacy-oldcore-4.1.1.jar:na]
at [xwiki-platform-legacy-oldcore-4.1.1.jar:na]
at [xwiki-platform-legacy-oldcore-4.1.1.jar:na]
at [xwiki-platform-legacy-oldcore-4.1.1.jar:na]
at [xwiki-platform-legacy-oldcore-4.1.1.jar:na]
at [xwiki-platform-legacy-oldcore-4.1.1.jar:na]
at [xwiki-platform-legacy-oldcore-4.1.1.jar:na]
at [xwiki-platform-legacy-oldcore-4.1.1.jar:na]
at [xwiki-platform-legacy-oldcore-4.1.1.jar:na]

I have no experience with Java and Hibernate, so i can hardly debug and see what happens there. I don't even know which part of DB it fails at. DB is probably rolled back and remains empty.

There were blog post of 2011 about Jira, that talks about 32+ long names in FB, but it seems XWiki names are rather short.

Some maybe relevant info:

xwiki-enterprise-web-4.1.1 (that is FLOSS software despite a name :-) )
Outdated schema:
I can post HSQLDB file that seems to be executed on launch creation script.

This seems to be code throwing exception:

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
<!-- 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.