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

Cannot XAR-export page with colon ':' in its name

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Steps to reproduce:

      • go to e.g. Sandbox.WebHome
      • add page "page:test' and save page
      • choose "More Actions" > "Export" > "Export as XAR"

      this links to: http://localhost:8080/xwiki/bin/export/Sandbox/page%3Atest?format=xar&name=Sandbox.page%3Atest&pages=Sandbox.page%3Atest which is a 500'er
      Stack trace

      Detailed information:
      
          Error number 11015 in 11: Exception while exporting
      com.xpn.xwiki.XWikiException: Error number 11015 in 11: Exception while exporting
      	at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:83)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:348)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:149)
      	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
      	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
      	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
       [...]
      Caused by: com.xpn.xwiki.XWikiException: Error number 3223 in 3: Exception while searching documents with SQL [select distinct doc.space, doc.name from XWikiDocument as doc where doc.fullName like ?]
      	at com.xpn.xwiki.store.XWikiHibernateStore.searchGenericInternal(XWikiHibernateStore.java:2481)
      	at com.xpn.xwiki.store.XWikiHibernateStore.searchDocumentReferencesInternal(XWikiHibernateStore.java:2437)
      	at com.xpn.xwiki.store.XWikiHibernateStore.searchDocumentsNamesInternal(XWikiHibernateStore.java:2424)
      	at com.xpn.xwiki.store.XWikiHibernateStore.searchDocumentsNames(XWikiHibernateStore.java:2187)
      	at com.xpn.xwiki.store.XWikiHibernateStore.searchDocumentsNames(XWikiHibernateStore.java:2171)
      	at com.xpn.xwiki.store.XWikiCacheStore.searchDocumentsNames(XWikiCacheStore.java:400)
      	at com.xpn.xwiki.web.ExportAction.getPagesToExport(ExportAction.java:183)
      	at com.xpn.xwiki.web.ExportAction.exportXAR(ExportAction.java:283)
      	at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:76)
      	... 41 more
      Caused by: com.xpn.xwiki.XWikiException: Error number 3301 in 3: Exception while switching to database Sandbox.page
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:739)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:911)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:826)
      	at com.xpn.xwiki.store.XWikiHibernateStore.searchGenericInternal(XWikiHibernateStore.java:2462)
      	... 49 more
      Caused by: org.hibernate.exception.GenericJDBCException: error executing work
      	at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
      	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
      	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
      	at org.hibernate.impl.SessionImpl.doWork(SessionImpl.java:2001)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeSQL(XWikiHibernateBaseStore.java:753)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:722)
      	... 52 more
      Caused by: java.sql.SQLException: invalid schema name: SANDBOX.PAGE
      	at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
      	at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
      	at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
      	at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source)
      	at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
      	at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore$1.execute(XWikiHibernateBaseStore.java:760)
      	at org.hibernate.impl.SessionImpl.doWork(SessionImpl.java:1997)
      

      obviously the export confuses the colon as a separator for the wiki name from the space.page.
      Exporting the complete wiki via wiki admin still works, btw.

        Attachments

          Activity

            People

            • Assignee:
              camil7 Clemens Robbenhaar
              Reporter:
              camil7 Clemens Robbenhaar
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: