Hi,

Thanks for showing your interest in contributing to XWiki. MS SQL server currently isn't on our list of supported server, and it would be great if you helped us determine what is the proper configuration for it. I haven't used MS SQL, but googling the error shows that, indeed, MSSQL does not allow creating table fields of type VARCHAR with more than 8000 characters by default, but that there are some solutions.

One is to declare those fields as BLOB.

The other one is to declare them as VARCHAR(MAX) (see http://www.sql-server-helper.com/faq/sql-server-2005-varchar-max-p01.aspx for more details).

In order to do this, you must create a new xwiki.hbm.xml file (let's say xwiki.hbm.mssql.xml), change it so that all the fields with more than 8000 characters are fixed according to one of the above solutions, and tell hibernate to use this hbm file (in WEB-INF/hibernate.cfg.xml, there's an element named mapping).

Good luck,
Sergiu

On 5/1/07, sanjavapro@gmail.com <sanjavapro@gmail.com > wrote:
I wish to contribute to xwiki. To begin with, I started configuring my development environment for xwiki. I have checkout out the xwiki project through svn ( svn://sanjayjaiswar@svn.forge.objectweb.org/svnroot/xwiki/xwiki/branches/XWIKI_WYSIWYG_NEWARCHI).

I am using is MS Sql Server with Tomcat. I modified the hibernate.cfg.xml
<!-- SQL Server configuration -->
    <property name="connection.url">jdbc:inetpool:inetdae7:stgdbsrv:1433?database=sjaiswar_xwiki_inf</property>
    <property name="connection.username">sa</property>
    <property name="connection.password">sjaiswar</property>
    <property name="connection.driver_class ">com.inet.pool.PoolDriver</property>
    <property name="dialect">org.hibernate.dialect.SQLServerDialect</property>

The appropriate jdbc driver is also there in xwiki's lib directory.
I am getting the following database error.
14:08:40,409 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome XWikiHibernateBaseStore:updateSchema:340 - Failed updating schema: [STGDBSRV]The size (60000) given to the column 'XWO_CUSTOM_MAPPING' exceeds the maximum allowed for any data type (8000).

It seems as the seed data are not inserted, because of which there are other invoked errors.

The database driver is registered but there are datatype size limitation errors.
I hope the database schema file is xwiki_db.log. I am not even able to manually execute the queries in SQL Analyzer as the queries are not getting to the Query Analyzer due to oversize.

I am referring the Community resources & documentation. But then too can anybody help me how to begin with.

----------------------------------------------------------------------
LOG MESSAGES
14:08:40,409 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome XWikiHibernateBaseStore:updateSchema:340 - Failed updating schema: [STGDBSRV]The size (60000) given to the column 'XWO_CUSTOM_MAPPING' exceeds the maximum allowed for any data type (8000).



--
http://purl.org/net/sergiu