Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
18.1.0
-
Windows 11 Pro, Firefox 151, using an instance of XWiki 18.4.0 on Oracle 19c, Tomcat 11.0.22
-
Unknown
-
N/A
-
N/A
-
Description
Steps to reproduce
- Create an older instance of XWiki pre 13.10.x (e.g. 13.9 or older) on Oracle 19c (tested with a local (non-docker) Tomcat 9.0.118, Java 17, using the XWiki Oracle Docker image and JDBC 11 connector)
- Close the instance
- Prepare a Tomcat 11 instance, copy the [...]webapps\xwiki folder of the new XWiki version (e.g. 18.4.0) and configure it with Oracle (insert the JDBC 11 connector as well in the WEB-INF\lib folder), and switch to Java 25
- Copy the permanent folder (e.g. Catalina) from the Tomcat 9 instance into Tomcat 11 instance
- Start XWiki
- Access the instance in the browser and observe the migration
Expected results
The upgrade process is completed successfully without errors. The Distribution Wizard is displayed and can be completed in order to upgrade XWiki.
Actual results
After the instance is initialized, the upgrade fails and there are many errors in the logs, such as:
2026-06-15 16:24:13,028 [XWiki initialization] ERROR nDocumentCustomizationDetector - Failed to get document [xwiki:XWiki.DocumentTreeMacros()] from database. com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [xwiki:XWiki.DocumentTreeMacros()] at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1233) at com.xpn.xwiki.store.XWikiCacheStore.lambda$loadXWikiDoc$2(XWikiCacheStore.java:436) [...] at org.xwiki.job.AbstractJob.run(AbstractJob.java:223) at java.base/java.lang.Thread.run(Thread.java:1474) Caused by: com.xpn.xwiki.XWikiException: Error number 3301 in 3: Exception while initializing the database at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:772) at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:601) at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1082) ... 39 common frames omitted Caused by: com.xpn.xwiki.store.migration.DataMigrationException: Migration of database [xwiki] has failed, it could not be safely used! Database is currently in version [140401000] while the required version is [180100000]. at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.preventAccessToOutdatedDb(AbstractDataMigrationManager.java:636) at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:587) at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:770) ... 41 common frames omitted Caused by: com.xpn.xwiki.store.migration.DataMigrationException: Data migration 140600000XWIKI19869 failed at com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:119) [...] at com.xpn.xwiki.XWiki.<init>(XWiki.java:1251) at com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:103) ... 3 common frames omitted Caused by: com.xpn.xwiki.store.migration.DataMigrationException: Error while querying the list of users at com.xpn.xwiki.store.migration.hibernate.R140600000XWIKI19869DataMigration.getUsers(R140600000XWIKI19869DataMigration.java:213) at com.xpn.xwiki.store.migration.hibernate.R140600000XWIKI19869DataMigration.hibernateMigrate(R140600000XWIKI19869DataMigration.java:165) at com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:117) ... 27 common frames omitted Caused by: org.xwiki.query.QueryException: Exception while executing query. Query statement = [ select distinct doc.fullName from XWikiDocument as doc , BaseObject as objUser , com.xpn.xwiki.objects.PasswordProperty as objUser_password1 where ( objUser_password1.value not like 'hash:%' and objUser_password1.value <> '' ) and doc.fullName=objUser.name and objUser.className='XWiki.XWikiUsers' and objUser_password1.id.id=objUser.id and objUser_password1.id.name='password' order by doc.fullName ] at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:219) at org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72) at org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:306) at org.xwiki.query.xwql.internal.XWQLQueryExecutor.execute(XWQLQueryExecutor.java:117) at org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72) at org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:306) at com.xpn.xwiki.store.migration.hibernate.R140600000XWIKI19869DataMigration.getUsers(R140600000XWIKI19869DataMigration.java:209) ... 29 common frames omitted Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:860) at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:927) at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:208) ... 35 common frames omitted Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154) at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1626) at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.lambda$execute$0(HqlQueryExecutor.java:211) at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:851) ... 37 common frames omitted Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:37) [...] at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1617) ... 39 common frames omitted Caused by: java.sql.SQLSyntaxErrorException: ORA-00932: tipuri de date inconsistente: se aştepta -, s-a primit CLOB at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:630) at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:564) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1231) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:772) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:299) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:512) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:163) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:1010) at oracle.jdbc.driver.OracleStatement.prepareDefineBufferAndExecute(OracleStatement.java:1271) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1149) at oracle.jdbc.driver.OracleStatement.executeSQLSelect(OracleStatement.java:1661) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1470) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3761) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3936) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1102) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:123) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:123) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:123) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57) ... 54 common frames omitted Caused by: Error : 932, Position : 210, Sql = select distinct xwikidocum0_.XWD_FULLNAME as col_0_0_ from xwikidoc xwikidocum0_ cross join xwikiobjects baseobject1_ cross join xwikipasswords passwordpr2_ where (passwordpr2_.XWP_VALUE not like 'hash:%') and passwordpr2_.XWP_VALUE<>'' and xwikidocum0_.XWD_FULLNAME=baseobject1_.XWO_NAME and baseobject1_.XWO_CLASSNAME='XWiki.XWikiUsers' and passwordpr2_.XWP_ID=baseobject1_.XWO_ID and passwordpr2_.XWP_NAME='password' orderby xwikidocum0_.XWD_FULLNAME fetch first :1 rows only, OriginalSql = select distinct xwikidocum0_.XWD_FULLNAME as col_0_0_ from xwikidoc xwikidocum0_ cross join xwikiobjects baseobject1_ cross join xwikipasswords passwordpr2_ where (passwordpr2_.XWP_VALUE not like 'hash:%') and passwordpr2_.XWP_VALUE<>'' and xwikidocum0_.XWD_FULLNAME=baseobject1_.XWO_NAME and baseobject1_.XWO_CLASSNAME='XWiki.XWikiUsers' and passwordpr2_.XWP_ID=baseobject1_.XWO_ID and passwordpr2_.XWP_NAME='password' order by xwikidocum0_.XWD_FULLNAME fetch first ? rows only, Error Msg = ORA-00932: tipuri de date inconsistente: se aştepta -, s-a primit CLOB at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:637) ... 72 common frames omitted 2026-06-15 16:24:13,029 [XWiki initialization] ERROR PreferencesConfigurationSource - Failed to access configuration value for property [core.defaultDocumentSyntax]. Ignoring by returning null com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [xwiki:XWiki.XWikiPreferences()] at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1233) at com.xpn.xwiki.store.XWikiCacheStore.lambda$loadXWikiDoc$2(XWikiCacheStore.java:436) at org.xwiki.cache.internal.CacheLoader$LoaderEntry.lambda$new$0(CacheLoader.java:71) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328) [...] at org.xwiki.job.AbstractJob.run(AbstractJob.java:223) at java.base/java.lang.Thread.run(Thread.java:1474)
The error is:
ORA-00932: inconsistent datatypes: expected - got CLOB
The issue could be reproduced when upgrading starting with XWiki pre 13.10.x (worked when upgrading 13.10.11 to 18.4.0, but 13.9 to 18.4.0 failed) to XWiki post 18.0.0 (e.g. upgrading from 13.9 to 18.0.0 works, but 13.9 to 18.1.0 up to 18.4.0 and 18.5.0-SNAPSHOT included, failed).
The issue could not be reproduced when upgrading to XWiki 17.10.9.
I also tested by upgrading to XWiki 18.4.0 on MySQL 9.7, MariaDB 12.3 and PostgreSQL 17, but the issue didn't reproduce.
Please find the attached logs.
Attachments
Issue Links
- is caused by
-
XWIKI-23827 Store password properties in dedicated table
-
- Closed
-