Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-7539

Hibernate versioning broken with non-ascii characters when using a PostgreSQL database

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.0-milestone-2, 3.5.1
    • 3.3
    • Old Core
    • None
    • Unknown

    Description

      After migration to 3.4 I have serious problem with versioning.
      Migration has been done via export-import of xar (with history), but the problem occurs also for newer versions of document (created after importing).
      Whatever version of document I click (https://wiki/xwiki/bin/viewrev/DRiW/testserwer?rev=43.1) I get an exception in catalina.out.

      If I click 'compare two versions' - I see comparation page as if all differences (i.e. the whole document) were created in the last version (no differences between older versions), with exception similar to the first one.

      2012-02-15 14:37:13,871 https://wiki/xwiki/bin/viewrev/DRiW/testserwer?rev=42.1 WARN c.x.x.w.XWikiAction - Uncaught exception: Error number 3103 in 3: Exception while reading version [42.1] for document id [-2 002 094 545]
      Wrapped Exception: Error number 2002 in 2: Error parsing xml
      Wrapped Exception: Error on line 28 of document : An invalid XML character (Unicode: 0x5) was found in the element content of the document. Nested exception: An invalid XML character (Unicode: 0x5) was found in the element content of the document.
      com.xpn.xwiki.XWikiException: Error number 3103 in 3: Exception while reading version [42.1] for document id [-2 002 094 545]
      Wrapped Exception: Error number 2002 in 2: Error parsing xml
      Wrapped Exception: Error on line 28 of document : An invalid XML character (Unicode: 0x5) was found in the element content of the document. Nested exception: An invalid XML character (Unicode: 0x5) was found in the element content of the document.
      at com.xpn.xwiki.doc.XWikiDocumentArchive.loadDocument(XWikiDocumentArchive.java:342) ~[xwiki-platform-legacy-oldcore-3.4.jar:na]
      at com.xpn.xwiki.store.XWikiHibernateVersioningStore.loadXWikiDoc(XWikiHibernateVersioningStore.java:213) ~[xwiki-platform-legacy-oldcore-3.4.jar:na]
      at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1448) ~[xwiki-platform-legacy-oldcore-3.4.jar:na]
      at com.xpn.xwiki.web.XWikiAction.handleRevision(XWikiAction.java:444) [xwiki-platform-legacy-oldcore-3.4.jar:na]
      at com.xpn.xwiki.web.ViewrevAction.render(ViewrevAction.java:28) ~[xwiki-platform-legacy-oldcore-3.4.jar:na]
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:231) [xwiki-platform-legacy-oldcore-3.4.jar:na]
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116) [xwiki-platform-legacy-oldcore-3.4.jar:na]
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) [struts-1.2.9.jar:1.2.9]
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) [struts-1.2.9.jar:1.2.9]
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) [struts-1.2.9.jar:1.2.9]
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) [struts-1.2.9.jar:1.2.9]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) [servlet-api-2.5.jar:na]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [servlet-api-2.5.jar:na]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina-6.0.28.jar:6.0.28]
      at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:128) [xwiki-platform-legacy-oldcore-3.4.jar:na]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina-6.0.28.jar:6.0.28]
      at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) [xwiki-platform-wysiwyg-server-3.4.jar:na]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina-6.0.28.jar:6.0.28]
      at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) [xwiki-platform-webdav-server-3.4.jar:na]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina-6.0.28.jar:6.0.28]
      at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:217) [xwiki-platform-container-servlet-3.4.jar:na]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina-6.0.28.jar:6.0.28]
      at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) [xwiki-platform-container-servlet-3.4.jar:na]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [catalina-6.0.28.jar:6.0.28]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) [catalina-6.0.28.jar:6.0.28]
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) [tomcat-coyote-6.0.28.jar:6.0.28]
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) [tomcat-coyote-6.0.28.jar:6.0.28]
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774) [tomcat-coyote-6.0.28.jar:6.0.28]
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) [tomcat-coyote-6.0.28.jar:6.0.28]
      at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896) [tomcat-coyote-6.0.28.jar:6.0.28]
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) [tomcat-coyote-6.0.28.jar:6.0.28]
      at java.lang.Thread.run(Thread.java:662) [na:1.6.0_26]
      Caused by: com.xpn.xwiki.XWikiException: Error number 2002 in 2: Error parsing xml
      Wrapped Exception: Error on line 28 of document : An invalid XML character (Unicode: 0x5) was found in the element content of the document. Nested exception: An invalid XML character (Unicode: 0x5) was found in the element content of the document.
      at com.xpn.xwiki.doc.XWikiDocument.fromXML(XWikiDocument.java:4104) ~[xwiki-platform-legacy-oldcore-3.4.jar:na]
      at com.xpn.xwiki.doc.XWikiDocument.fromXML(XWikiDocument.java:4087) ~[xwiki-platform-legacy-oldcore-3.4.jar:na]
      at com.xpn.xwiki.doc.XWikiDocumentArchive.loadDocument(XWikiDocumentArchive.java:332) ~[xwiki-platform-legacy-oldcore-3.4.jar:na]
      ... 42 common frames omitted
      Caused by: org.dom4j.DocumentException: Error on line 28 of document : An invalid XML character (Unicode: 0x5) was found in the element content of the document. Nested exception: An invalid XML character (Unicode: 0x5) was found in the element content of the document.
      at org.dom4j.io.SAXReader.read(SAXReader.java:482) ~[dom4j-1.6.1.jar:1.6.1]
      at org.dom4j.io.SAXReader.read(SAXReader.java:365) ~[dom4j-1.6.1.jar:1.6.1]
      at com.xpn.xwiki.doc.XWikiDocument.fromXML(XWikiDocument.java:4102) ~[xwiki-platform-legacy-oldcore-3.4.jar:na]
      ... 44 common frames omitted
      2012-02-15 14:37:13,924 https://wiki/xwiki/bin/viewrev/DRiW/testserwer?rev=42.1 WARN o.x.v.i.DefaultVelocityEngine - Deprecated usage of method [com.xpn.xwiki.api.XWiki.parseMessage] in /templates/exceptioninline.vm@1,24

      Attachments

        Issue Links

          Activity

            People

              sdumitriu Sergiu Dumitriu
              rylach Ryszard Lach
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: