Hi Ronald,
Srinivasa and I are trying to get some help with the NULL value when
starting up xwiki in Oracle 9i as well as dealing with CLob datatypes in
Oracle. Do you have any suggestions on how to get this working? I read
in the thread below last years there were suggestion to add more logic
to the getters in some beans. Did anyone ever got that to work? We
really like xWiki and are trying hard to make work with Oracle but we
also have some deadlines and I hate to have to look for a replacement to
xWiki. Any help will be greatly appreciate it.
John G.
________________________________
From: Ronald Borman [mailto:ronald.borman@gmail.com]
Sent: Wednesday, March 14, 2007 7:50 PM
To:
Subject: Re: [xwiki-users] cannot insert NULL into
("XWIKI"."XWIKIDOC"."XWD_TITLE")
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.
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. 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?
Regards,
Ronald.
2007/3/13, Sergiu Dumitriu <sergiu.dumitriu(a)gmail.com>om>:
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(a)ge.com
<srinivasarao.nagabhirava1(a)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(XWikiHibernat
eBaseStore.java:573)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernat
eBaseStore.java :547)
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore
.java:309)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:10
0)
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(RequestPr
ocessor.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(St
ubSecurityHelper.java:223)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet
(StubSecurityHelper.java:125)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:2
83)
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(SetCharacterEncodi
ngFilter.java:121)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:
42)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(WebAppServletContext.java:3243)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121
)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServ
letContext.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(OraclePreparedSt
atement.java:10698)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingState
ment.java :294)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingState
ment.java:294)
at
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:5
8)
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:10
0)
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(RequestPr
ocessor.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(St
ubSecurityHelper.java:223)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet
(StubSecurityHelper.java:125)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:2
83)
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(SetCharacterEncodi
ngFilter.java:121)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:
42)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(WebAppServletContext.java:3243)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121
)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServ
letContext.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(OraclePreparedSt
atement.java:10698)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingState
ment.java :294)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingState
ment.java:294)
at
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:5
8)
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(DefaultFlushEv
entListener.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:10
6)
at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction
(XWikiHibernateBaseStore.java:573)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernat
eBaseStore.java:547)
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore
.java :309)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:10
0)
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(StubSecurityH
elper.java:125)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:2
83)
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.r
un(WebAppServletContext.java :3243)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.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(WebAppServletCont
ext.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(RequestPr
ocessor.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(a)objectweb.org mailing list.
To unsubscribe: mailto: xwiki-users-unsubscribe(a)objectweb.org
For general help: mailto: sympa(a)objectweb.org
<mailto:sympa@objectweb.org> ?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws