Exception with duplicate content in backlinks database table
------------------------------------------------------------

                 Key: XWIKI-2123
                 URL: http://jira.xwiki.org/jira/browse/XWIKI-2123
             Project: XWiki Core
          Issue Type: Bug
          Components: Storage
    Affects Versions: 1.2.2
            Reporter: Ludovic Dubost
            Priority: Critical


On un upgraded XWiki 1.2.2 it is possible to have storage fail because of the 
backlinks feature.
We need to make sure it is impossible to have duplicates in the backlinks IDs 
before calling the storage. Otherwise the page becomes unsavable

Here is an example exception:

Wrapped Exception: Could not execute JDBC batch update
com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving 
document Space_Organisation_Wiki.Gestiondescomptesdetest
Wrapped Exception: Error number 13012 in 3: Exception while saving links
Wrapped Exception: Could not execute JDBC batch update
        at 
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:317)
        at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:97)
        at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:91)
        at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:922)
        at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:113)
        at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:122)
        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:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at 
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:595)


Wrapped Exception:


com.xpn.xwiki.XWikiException: Error number 13012 in 3: Exception while saving 
links
Wrapped Exception: Could not execute JDBC batch update
        at 
com.xpn.xwiki.store.XWikiHibernateStore.saveLinks(XWikiHibernateStore.java:1511)
        at 
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:303)
        at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:97)
        at 
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:91)
        at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:922)
        at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:113)
        at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:122)
        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:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at 
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:595)


Wrapped Exception:


java.sql.BatchUpdateException: Duplicate entry 
'63766763-Space_SecteurPresse_Wiki.contactsactivÃ?' for key 1
        at 
com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1103)
        at 
com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:853)
        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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.xwiki.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
_______________________________________________
notifications mailing list
notifications@xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to