On Mar 15, 2007, at 12:50 AM, Ronald Borman wrote:

As Oracle is a company standard, I've investigated the use of an Oracle database.

Appearantly, during initialisation of a new XWiki database, one or more XWikiDOC records are created that contain an empty XWD_TITLE field. It seems that Oracle interprets an empty string differently than (for instance) mySQL.When a query contains a string value that is empty (""), Oracle stores this in the database as a NULL value. Because the XWD_TITLE field has a NOT NULL constraint, the exception is raised.

Oracle 10g has some kind of a switch in the form of the statement IGNORE NAV that can be included in the (Oracle specific?) MODEL clause of an SQL query. I have not tried this though, because our installation of XWiki had to be completed and it looks like the MODEL clause is not transparently supported in Hibernate.

One solution could be to modify XWiki storage to use something like http://www.hibernate.org/169.html


Besides, I think there is another problem with the use of Oracle. Large text fields are implemented als a CLOB type. But searching this type of field with LIKE only accesses the first 4K of the field.

Have you tried with latest drivers and latest hibernate versions? On http://www.hibernate.org/56.html it says at the end "if all you want is to load the CLOB contents into a text field then map it with Hibernate type "text" and all CLOB handling will be done transparently for you".

There is a forum thread ( http://mail-archive.objectweb.org/xwiki-users/2006-08/msg00112.html) that mentions this and the possible use of Lucene.

Ludovic/Vincent: are there any (future) plans to support Oracle as mentioned in the forum thread?

Yes we really need to support Oracle. However I don't know anyone working on this right now (although several users have tried in their limited time but I don't recall any success story so far although I believe it's possible to succeed :)) So that's really cool you're looking into it again. What help would you need?

Note that we do have a working Lucene plugin in 1.0 B6 which we'll release on next Monday so it's always possible to use it in place of the current search. It's currently missing some documentation though.

Thanks
-Vincent

2007/3/13, Sergiu Dumitriu <sergiu.dumitriu@gmail.com>:
Hi,

There's a problem with using XWiki on Oracle, which is not solved yet. Other users got stuck on the same problem:
http://mail-archive.objectweb.org/xwiki-dev/2007-01/msg00142.html
http://mail-archive.objectweb.org/xwiki-dev/2007-01/msg00143.html
http://archivesat.com/post4701341.htm

Unfortunately, I don't have Oracle, so I can't debug it to see what's the problem.

Sergiu


On 3/13/07, srinivasarao.nagabhirava1@ge.com <srinivasarao.nagabhirava1@ge.com> wrote:
Hi Ludovic,

First of all thank you for your response. I have tried by removing the Calendar Plugin but still getting the similar error.

10:17:01,204  WARN [ACTIVE] ExecuteThread: '2' for queue: ' weblogic.kernel.Default (self-tuning)' http://3.170.64.77:7001/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 1400, SQLState: 23000
10:17:01,211 ERROR [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' http://3.170.64.77:7001/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - ORA-01400: cannot insert NULL into ("XWIKI"."XWIKIDOC"."XWD_TITLE")

10:17:01,216  WARN [ACTIVE] ExecuteThread: '2' for queue: ' weblogic.kernel.Default (self-tuning)' http://3.170.64.77:7001/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 1400, SQLState: 23000
10:17:01,221 ERROR [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' http://3.170.64.77:7001/xwiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - ORA-01400: cannot insert NULL into ("XWIKI"."XWIKIDOC"."XWD_TITLE")

10:17:01,228 ERROR [ACTIVE] ExecuteThread: '2' for queue: ' weblogic.kernel.Default (self-tuning)' http://3.170.64.77:7001/xwiki/bin/view/Main/WebHome AbstractFlushingEventListener:performExecutions:299 - Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69)
        at org.hibernate.exception.JDBCExceptionHelper.convert (JDBCExceptionHelper.java:43)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
        at org.hibernate.engine.ActionQueue.executeActions (ActionQueue.java:140)
        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush ( DefaultFlushEventListener.java:27)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1009)
        at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:356)
        at org.hibernate.transaction.JDBCTransaction.commit (JDBCTransaction.java:106)
        at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:573)
        at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java :547)
        at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:309)
        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.XWiki.getPrefsClass(XWiki.java:2292)
        at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:674)
        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 :743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet (StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:42)
        at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:121)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3243)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
        at weblogic.servlet.internal.WebAppServletContext.execute (WebAppServletContext.java:1909)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run (ExecuteThread.java:181)
Caused by: java.sql.BatchUpdateException: ORA-01400: cannot insert NULL into ("XWIKI"."XWIKIDOC"."XWD_TITLE")

        at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException (DatabaseError.java:343)
        at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10698)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java :294)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
        at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch (AbstractBatcher.java:195)
        ... 40 more
com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving document XWiki.XWikiPreferences
Wrapped Exception: Could not execute JDBC batch update
        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.XWiki.getPrefsClass(XWiki.java:2292)
        at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:674)
        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 :743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet (StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:42)
        at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:121)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3243)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
        at weblogic.servlet.internal.WebAppServletContext.execute (WebAppServletContext.java:1909)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run (ExecuteThread.java:181)


Wrapped Exception:

java.sql.BatchUpdateException: ORA-01400: cannot insert NULL into ("XWIKI"."XWIKIDOC"."XWD_TITLE")

        at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException (DatabaseError.java:343)
        at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10698)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java :294)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
        at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch (AbstractBatcher.java:195)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions (AbstractFlushingEventListener.java:296)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1009)
        at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:356)
        at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
        at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction (XWikiHibernateBaseStore.java:573)
        at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:547)
        at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java :309)
        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.XWiki.getPrefsClass(XWiki.java:2292)
        at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:674)
        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:743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run (StubSecurityHelper.java:223)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
        at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter (SetCharacterEncodingFilter.java:121)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java :3243)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute (WebAppServletContext.java:2003)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java :1359)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
10:17:01,271  WARN [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'  RequestProcessor:processException:528 - Unhandled Exception thrown: class com.xpn.xwiki.XWikiException
<Mar 13, 2007 10:17:01 AM EDT> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@e5376a - appName: '_appsdir_xwiki_dir', name: 'xwiki', context-path: '/xwiki'] Root cause of ServletException.
com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context
Wrapped Exception: Error number 3201 in 3: Exception while saving document XWiki.XWikiPreferences
Wrapped Exception: Could not execute JDBC batch update
        at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:290)
        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)
        Truncated. see log file for complete stacktrace
>



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


--
You receive this message as a subscriber of the xwiki-users@objectweb.org mailing list.
To unsubscribe: mailto: xwiki-users-unsubscribe@objectweb.org
For general help: mailto: sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the xwiki-users@objectweb.org mailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws