History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XWIKI-1702
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vincent Massol
Reporter: Marc Lijour
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XWiki Core

Document "JDBC batch update error" when upgrading from a 0.9 wiki

Created: 04/Sep/07 01:08   Updated: 13/Feb/08 12:52
Component/s: Documentation & xwiki.org
Affects Version/s: 1.1 RC1
Fix Version/s: 1.2 M1

Environment:
Mandriva Linux 2007.1
MySQL-5.0.37-2.1mdv2007.1
mysql-connector-java-5.0.7-bin.jar
jboss 4.0.4
java 6u2

keywords: JDBC
Date of First Response: 06/Sep/07 15:48
Resolution Date: 10/Sep/07 08:44


 Description  « Hide
I installed rc1 yesterday with no problem. By the meantime I updated MySQL to MySQL-5.0.37-2.1mdv2007.1. Apparently it may affect something?

Here is the log error:

Error number 3232 in 3: Exception while saving attachment xwiki-enterprise-wiki-1.1-rc-1.xar of document XWiki.Import
Wrapped Exception: Could not execute JDBC batch update
com.xpn.xwiki.XWikiException: Error number 3232 in 3: Exception while saving attachment xwiki-enterprise-wiki-1.1-rc-1.xar of document XWiki.Import
Wrapped Exception: Could not execute JDBC batch update
at com.xpn.xwiki.store.XWikiHibernateAttachmentStore.saveAttachmentContent(XWikiHibernateAttachmentStore.java:92)
at com.xpn.xwiki.doc.XWikiDocument.saveAttachmentContent(XWikiDocument.java:2451)
at com.xpn.xwiki.doc.XWikiDocument.saveAttachmentContent(XWikiDocument.java:2434)
at com.xpn.xwiki.web.UploadAction.action(UploadAction.java:124)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:147)
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.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
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:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)

Wrapped Exception:

java.sql.BatchUpdateException: Field 'XWD_ARCHIVE' doesn't have a default value
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1257)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:943)
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:611)
at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:585)
at com.xpn.xwiki.store.XWikiHibernateAttachmentStore.saveAttachmentContent(XWikiHibernateAttachmentStore.java:87)
at com.xpn.xwiki.doc.XWikiDocument.saveAttachmentContent(XWikiDocument.java:2451)
at com.xpn.xwiki.doc.XWikiDocument.saveAttachmentContent(XWikiDocument.java:2434)
at com.xpn.xwiki.web.UploadAction.action(UploadAction.java:124)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:147)
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.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
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:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Ludovic Dubost - 06/Sep/07 15:48

It seems at some version of XWiki the hbm file was not correct and the schema has some incorrectness.
You should run this on your DB

alter table xwikidoc modify column XWD_ARCHIVE mediumtext null;


Ludovic Dubost - 06/Sep/07 15:49
BTW do you remember which version of xwiki where run on this database ?


Vincent Massol - 06/Sep/07 16:07
Marc, let us know if it works for you after executing this command. Thanks.

Marc Lijour - 09/Sep/07 21:44
Ok. I did it.

mysql> alter table xwikidoc modify column XWD_ARCHIVE mediumtext null;
Query OK, 598 rows affected (1.39 sec)
Records: 598 Duplicates: 0 Warnings: 0

It worked and XWiki display pages. However, I run into another problem now. I can't login even as superadmin (I can with the old version). Of course, I had enabled superadmin login (I think) in xwiki.cfg by adding:
xwiki.superadminpassword=xyz
xwiki.authentication.superadminpassword=xyz # added this after because z above does not work

Btw I was running a 0.9 version (not sure if 1252 or before, 9xx).

Here is what I see:

15:33:19,527 INFO [STDOUT] 15:33:19,527 WARN [RequestUtils] No FormBeanConfig found under 'view'
15:33:19,530 INFO [STDOUT] Unable to render embedded object: File (remember-me cookie validation hash mismatch) not found.
15:33:19,530 INFO [STDOUT] Unable to render embedded object: File (remember-me cookie has been tampered with) not found.
15:33:19,530 INFO [STDOUT] Unable to render embedded object: File (remember-me cookie is being deleted) not found.
15:33:19,530 INFO [STDOUT] Unable to render embedded object: File (remember-me cookie validation hash mismatch) not found.
15:33:19,530 INFO [STDOUT] Unable to render embedded object: File (remember-me cookie has been tampered with) not found.
15:33:19,531 INFO [STDOUT] Unable to render embedded object: File (remember-me cookie is being deleted) not found.
15:33:19,559 INFO [STDOUT] 15:33:19,559 INFO [SimpleLog4JLogSystem] RHS of #set statement is
null. Context will not be modified. [line 6, column 1]
15:33:19,560 INFO [STDOUT] 15:33:19,559 INFO [SimpleLog4JLogSystem] RHS of #set statement is
null. Context will not be modified. [line 7, column 1]
15:33:19,560 INFO [STDOUT] 15:33:19,560 INFO [SimpleLog4JLogSystem] RHS of #set statement is
null. Context will not be modified. [line 8, column 1]
15:33:19,561 INFO [STDOUT] 15:33:19,561 INFO [SimpleLog4JLogSystem] RHS of #set statement is
null. Context will not be modified. [line 9, column 1]
15:33:19,562 INFO [STDOUT] 15:33:19,562 INFO [SimpleLog4JLogSystem] RHS of #set statement is
null. Context will not be modified. [line 10, column 1]
15:33:19,562 INFO [STDOUT] 15:33:19,562 INFO [SimpleLog4JLogSystem] RHS of #set statement is null. Context will not be modified. [line 11, column 1]
15:33:19,564 INFO [STDOUT] 15:33:19,564 INFO [SimpleLog4JLogSystem] Velocimacro : added #panelheader( title ) : source =
15:33:19,565 INFO [STDOUT] 15:33:19,565 INFO [SimpleLog4JLogSystem] Velocimacro : added #panelhiddenheader( title ) : source =
(...)

15:33:19,581 INFO [STDOUT] 15:33:19,581 INFO [XWikiRightServiceImpl] Access has been denied
for (XWiki.XWikiGuest,Main.WebHome,admin): global level (restricting right was found)
15:33:19,581 INFO [STDOUT] 15:33:19,581 INFO [SimpleLog4JLogSystem] RHS of #set statement is
null. Context will not be modified. [line 7, column 1]
15:33:19,582 INFO [STDOUT] 15:33:19,582 INFO [SimpleLog4JLogSystem] RHS of #set statement is
null. Context will not be modified. [line 9, column 1]
15:33:19,584 INFO [STDOUT] 15:33:19,584 INFO [SimpleLog4JLogSystem] Null reference [template
'', line 1, column 31] : ${xwiki.getDocument($doc.parent).displayTitle} cannot be resolved.
15:33:19,599 INFO [STDOUT] 15:33:19,599 INFO [SimpleLog4JLogSystem] RHS of #set statement is
null. Context will not be modified. [line 1, column 1]
15:33:19,634 INFO [STDOUT] 15:33:19,634 INFO [SimpleLog4JLogSystem] RHS of #set statement is
null. Context will not be modified. [line 18, column 1]
15:33:19,637 INFO [STDOUT] 15:33:19,637 INFO [XWikiRightServiceImpl] Access has been denied
for (XWiki.XWikiGuest,XWiki.XWikiPreferences,register): register level (no right found)
15:33:19,640 INFO [STDOUT] 15:33:19,639 INFO [DBCPConnectionProvider] active: 1 (max: 50)
idle: 0(max: 5)
15:33:19,663 INFO [STDOUT] 15:33:19,663 INFO [DBCPConnectionProvider] active: 0 (max: 50)
idle: 1(max: 5)


Marc Lijour - 09/Sep/07 21:59
My exact version is: 0.9.840

Sergiu Dumitriu - 10/Sep/07 03:15
I think this is because of the cookies. Try removing all the cookies for that domain, and login again.

Marc Lijour - 10/Sep/07 06:05
You were right. Getting rid of the cookies solvethe login problem.

I guess that closes this issue. Thank you!


Marc Lijour - 10/Sep/07 06:09
Somebody could close this bug. Thank you.

Vincent Massol - 10/Sep/07 08:44

Sergiu Dumitriu - 13/Feb/08 12:52
Now automatically fixed by a database migrator.