xwiki with sql server error
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://[email protected]/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). 14:08:40,440 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 208, SQLState: S0002 14:08:40,455 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Invalid object name 'xwikidoc'. 14:08:40,455 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 8180, SQLState: 01000 14:08:40,455 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Statement(s) could not be prepared. 14:08:40,471 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 208, SQLState: S0002 14:08:40,471 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Invalid object name 'xwikidoc'. 14:08:40,471 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 8180, SQLState: 01000 14:08:40,471 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Statement(s) could not be prepared. 14:08:40,471 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 208, SQLState: S0002 14:08:40,471 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Invalid object name 'xwikidoc'. 14:08:40,471 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 8180, SQLState: 01000 14:08:40,471 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Statement(s) could not be prepared. 14:08:40,487 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 208, SQLState: S0002 14:08:40,487 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Invalid object name 'xwikidoc'. 14:08:40,487 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 8180, SQLState: 01000 14:08:40,487 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Statement(s) could not be prepared. 14:08:40,549 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 208, SQLState: S0002 14:08:40,549 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Invalid object name 'xwikidoc'. 14:08:40,565 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 8180, SQLState: 01000 14:08:40,565 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Statement(s) could not be prepared. 14:08:40,643 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 208, SQLState: S0002 14:08:40,643 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Invalid object name 'xwikidoc'. 14:08:40,643 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 8180, SQLState: 01000 14:08:40,643 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Statement(s) could not be prepared. 14:08:42,424 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). 14:08:42,424 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 208, SQLState: S0002 14:08:42,424 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Invalid object name 'xwikidoc'. 14:08:42,424 WARN http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 8180, SQLState: 01000 14:08:42,424 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - [STGDBSRV]Statement(s) could not be prepared. com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving document XWiki.CalendarEvent Wrapped Exception: Error number 3211 in 3: Exception while updating archive XWiki.CalendarEvent Wrapped Exception: Error number 3212 in 3: Exception while loading archive -237,561,194 Wrapped Exception: could not load an entity: [com.xpn.xwiki.doc.XWikiDocumentArchive#-237561194] at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:314) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:100) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:94) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:891) at com.xpn.xwiki.plugin.calendar.CalendarPlugin.getCalendarEventClass(CalendarPlugin.java:84) at com.xpn.xwiki.plugin.calendar.CalendarPlugin.init(CalendarPlugin.java:293) at com.xpn.xwiki.plugin.XWikiPluginManager.initPlugin(XWikiPluginManager.java:132) at com.xpn.xwiki.plugin.XWikiPluginManager.addPlugin(XWikiPluginManager.java:71) at com.xpn.xwiki.plugin.XWikiPluginManager.addPlugins(XWikiPluginManager.java:97) at com.xpn.xwiki.XWiki.preparePlugins(XWiki.java:709) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:663) at com.xpn.xwiki.XWiki.<init>(XWiki.java:566) at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:281) at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:382) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:96) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:121) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:346) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Unknown Source) Wrapped Exception: com.xpn.xwiki.XWikiException: Error number 3211 in 3: Exception while updating archive XWiki.CalendarEvent Wrapped Exception: Error number 3212 in 3: Exception while loading archive -237,561,194 Wrapped Exception: could not load an entity: [com.xpn.xwiki.doc.XWikiDocumentArchive#-237561194] at com.xpn.xwiki.store.XWikiHibernateVersioningStore.updateXWikiDocArchive(XWikiHibernateVersioningStore.java:249) at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:239) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:100) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:94) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:891)
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.aspxfor 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, [email protected] <[email protected]> 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://[email protected]/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/WebHomeXWikiHibernateBaseStore:upd... - 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/WebHomeXWikiHibernateBaseStore:upd... - Failed updating schema: [STGDBSRV]The size (60000) given to the column 'XWO_CUSTOM_MAPPING' exceeds the maximum allowed for any data type (8000).
Thanks Sergiu. Yes, the only possible reason MS SQL Server can't be used is the character limitation. The Xwiki Objects I will try your suggestions & accordingly & accordingly post them to the mailing list. - Sanjay On 4/30/07, Sergiu Dumitriu <[email protected]> wrote:
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, [email protected] <[email protected] > 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://[email protected]/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/WebHomeXWikiHibernateBaseStore:upd... - 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/WebHomeXWikiHibernateBaseStore:upd... - Failed updating schema: [STGDBSRV]The size (60000) given to the column 'XWO_CUSTOM_MAPPING' exceeds the maximum allowed for any data type (8000).
-- You receive this message as a subscriber of the [email protected] list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
participants (3)
-
sanjavapro@gmail.com -
Sanjay Jaiswar -
Sergiu Dumitriu