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

XWiki migration problem to 7.2: ORA-00904: "TRUE": invalid identifier

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 7.2
    • Fix Version/s: 7.3-milestone-1
    • Component/s: Old Core
    • Labels:
      None
    • Environment:
      Oracle DB
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      when migrating XWiki from version 7.1.1 to 7.2, I get the error bellow. My XWiki runs on Oracle DB. It seems that there's error in using TRUE literal in sql statements, which is not supported on Oracle. Could you please fix this. I located the error in the following method in R72001XWIKI12228DataMigration.java

      private String createSpaceQuery(boolean hidden)
      {
      	StringBuilder query = new StringBuilder("select DISTINCT XWD_WEB from xwikidoc where");
      	if (hidden) {
      		query.append(" XWD_WEB not in (" + createSpaceQuery(false) + ")");
      	} else {
      		query.append(" XWD_HIDDEN <> true OR XWD_HIDDEN IS NULL");
      	}
      
      	return query.toString();
      }
      

      The raised error:

      java.sql.SQLSyntaxErrorException: ORA-00904: "TRUE": invalid identifier
      
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
      	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
      	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
      	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
      	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
      	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
      	at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:873)
      	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
      	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
      	at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1491)
      	at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:406)
      	at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:207)
      	at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:207)
      	at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:207)
      	at com.xpn.xwiki.store.migration.hibernate.R72001XWIKI12228DataMigration$R72001Work.getVisibleSpaces(R72001XWIKI12228DataMigration.java:129)
      	at com.xpn.xwiki.store.migration.hibernate.R72001XWIKI12228DataMigration$R72001Work.createVisibleSpaces(R72001XWIKI12228DataMigration.java:182)
      	at com.xpn.xwiki.store.migration.hibernate.R72001XWIKI12228DataMigration$R72001Work.execute(R72001XWIKI12228DataMigration.java:106)
      	at org.hibernate.impl.SessionImpl.doWork(SessionImpl.java:1997)
      	... 28 more
      

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              Mirec Miroslav Galajda
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

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