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

XAR Export of a page with a bang (!) in the name fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Duplicate
    • Affects Version/s: 9.11.7, 10.6.1
    • Fix Version/s: None
    • Component/s: Old Core - XAR Export
    • Environment:
      Tested with XWiki from Debian install with mysql DB; zip-package with hsqlDB
    • Difficulty:
      Easy
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Pull Request Status:
      Pull Request accepted
    • Similar issues:

      Description

      ... at least with hsqlDB; mysql instead exports the page, but also all other pages.

      Steps to reproduce:

      • create a new (non terminal) page with an exclamation mark in the name
      • "save + view" the page, and export it as XAR

      Result:

      With a mysql DB this exports the complete wiki

      With a hsqlDB this creates an error message:

         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:90)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:459)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:209)
      	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
      	[...]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: com.xpn.xwiki.XWikiException: Error number 11015 in 11: Failed to resolve pages to export
      	at com.xpn.xwiki.web.ExportAction.resolvePagesToExport(ExportAction.java:207)
      	at com.xpn.xwiki.web.ExportAction.exportXAR(ExportAction.java:303)
      	at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:83)
      	... 52 more
      Caused by: org.xwiki.query.QueryException: Exception while executing query. Query statement = [where doc.fullName like ? or doc.fullName like ?]
      	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:195)
      	at org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)
      	at org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:296)
      	at com.xpn.xwiki.web.ExportAction.resolvePagesToExport(ExportAction.java:195)
      	... 54 more
      Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:927)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:990)
      	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:177)
      	... 57 more
      Caused by: org.hibernate.exception.DataException: could not execute query
      	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102)
      	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      	at org.hibernate.loader.Loader.doList(Loader.java:2545)
      	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
      	at org.hibernate.loader.Loader.list(Loader.java:2271)
      	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
      	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
      	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
      	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
      	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
      	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor$1.doInHibernate(HqlQueryExecutor.java:185)
      	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor$1.doInHibernate(HqlQueryExecutor.java:178)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:921)
      	... 59 more
      Caused by: java.sql.SQLDataException: data exception: invalid escape sequence
      	at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
      	at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
      	at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source)
      	at org.hsqldb.jdbc.JDBCPreparedStatement.executeQuery(Unknown Source)
      	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
      	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
      	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
      	at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
      	at org.hibernate.loader.Loader.doQuery(Loader.java:802)
      	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
      	at org.hibernate.loader.Loader.doList(Loader.java:2542)
      	... 69 more
      Caused by: org.hsqldb.HsqlException: data exception: invalid escape sequence
      	at org.hsqldb.error.Error.error(Unknown Source)
      	at org.hsqldb.error.Error.error(Unknown Source)
      	at org.hsqldb.ExpressionOp.getValue(Unknown Source)
      	at org.hsqldb.RangeVariable$RangeIteratorMain.getFirstRow(Unknown Source)
      	at org.hsqldb.RangeVariable$RangeIteratorMain.initialiseIterator(Unknown Source)
      	at org.hsqldb.RangeVariable$RangeIteratorMain.next(Unknown Source)
      	at org.hsqldb.QuerySpecification.buildResult(Unknown Source)
      	at org.hsqldb.QuerySpecification.getSingleResult(Unknown Source)
      	at org.hsqldb.QuerySpecification.getResult(Unknown Source)
      	at org.hsqldb.StatementQuery.getResult(Unknown Source)
      	at org.hsqldb.StatementDMQL.execute(Unknown Source)
      	at org.hsqldb.Session.executeCompiledStatement(Unknown Source)
      	at org.hsqldb.Session.execute(Unknown Source)
      	... 78 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                surli Simon Urli
                Reporter:
                camil7 Clemens Robbenhaar
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: