This issue has been created
There are 6 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-0a3604af-b75f-4733-bf9f-27e993cbc9ce XWIKI-23781 Open

No used values suggested for list fields on Oracle

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-e859133d-da00-41c6-b5ef-dc92ebc6824a Michael Hamann created this issue on 02/Dec/25 12:12
 
Summary: No values suggested for DBList field with relational storage on Oracle
Issue Type: cid:jira-generated-image-avatar-0a3604af-b75f-4733-bf9f-27e993cbc9ce Bug
Affects Versions: 16.10.6, 16.4.8, 17.2.0
Assignee: Unassigned
Attachments: image-2025-12-02-12-03-38-550.png
Components: Old Core
Created: 02/Dec/25 12:12
Labels: regression
Priority: cid:jira-generated-image-static-blocker-37e2581a-4d18-4b6e-93b9-d37ded36cb2b Blocker
Reporter: Michael Hamann
Description:

Steps to reproduce:

  1. Create a new XClass by editing any document with the class editor.
  2. Add a property "myList" of type "DBList"
  3. For this property, enable "Multiple Select", "Relational Storage" and set "Display Type" to "input". 44410_image-2025-12-02-12-03-38-550.png
  4. Save the XClass
  5. Add an object of the class to any page using the object editor. Set two values "Option 1", "Option 2" and save the page.
  6. Open the object editor on another page, add an object of the class and type "Option" in the myList input.

Expected result:

The previously set values "Option 1" and "Option 2" are suggested.

Actual result:

No values are suggested. In the network tab of the developer tools, a failed request is displayed with response

org.xwiki.query.QueryException: Exception while executing query. Query statement = [select listItem, str(listItem) as unfilterable1 from BaseObject as obj, DBStringListProperty as prop join prop.list listItem where obj.className = :className and obj.name <> :templateName and prop.id.id = obj.id and prop.id.name = :propertyName order by unfilterable1 desc]
ClassCastException: class java.lang.String cannot be cast to class java.lang.Long (java.lang.String and java.lang.Long are in module java.base of loader 'bootstrap')
 

When adding a Live Data for this class with 

{{liveData
  id="test"
  properties="doc.name,myList"
  limit="5"
  source="liveTable"
  sourceParameters="translationPrefix=&className=NestedLiveDataIT.filterWithRelationalDBList.WebHome"
}}{{/liveData}}

 
the same error can be observed when typing in the filter for "myList" as it triggers the same code.

The cast that is mentioned in the error is from https://github.com/xwiki/xwiki-platform/blob/b320aea672a8daa96226dde94300c973e56f5972/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/objects/classes/UsedValuesListQueryBuilder.java#L83 which is triggered because the second value is no count anymore since XWIKI-23019. I've reverted the change of that issue and then the values were suggested as expected.

For XWIKI-23727 I'm adding an integration test that reproduces the scenario with Live Data.

 
 

6 updates

 
cid:jira-generated-image-avatar-e859133d-da00-41c6-b5ef-dc92ebc6824a Changes by Michael Hamann on 02/Dec/25 12:12
 
Summary: No used values suggested for DBList field with relational storage list fields on Oracle
Fix Version: 17.10.1
Fix Version: 18.0.0-rc-1
Fix Version: 16.10.16
Fix Version: 17.4.8
Description: *Steps to reproduce:*
# Create a new XClass by editing any document with the class editor.
# Add a property "myList" of type "
DBList Static List "
# For this property,
enable "Multiple Select", "Relational Storage" and set "Display Type" to "input".   !image-2025-12-02-12-03-38-550.png|width=164,height=279!
# Save the XClass
# Add an object of the class to any page using the object editor. Set
two values the value to "Option 1" , "Option 2" and save the page.
# Open the object editor on another page, add an object of the class and type "Option" in the myList input.

*Expected result:*

The previously set
values value "Option 1" and "Option 2" are is suggested.

*Actual result:*

No values are suggested. In the network tab of the developer tools, a failed request is displayed with response
{noformat}
org.xwiki.query.QueryException: Exception while executing query. Query statement = [select
listItem prop.value , str( listItem prop.value ) as unfilterable1 from BaseObject as obj, DBStringListProperty StringProperty as prop join prop.list listItem where obj.className = :className and obj.name <> :templateName and prop.id.id = obj.id and prop.id.name = :propertyName order by unfilterable1 desc]
ClassCastException: class java.lang.String cannot be cast to class java.lang.Long (java.lang.String and java.lang.Long are in module java.base of loader 'bootstrap')
  {noformat}
When adding a Live Data for this class with 
{noformat}
{{liveData
  id="test"
  properties="doc.name,myList"
  limit="5"
  source="liveTable"
  sourceParameters="translationPrefix=&className=NestedLiveDataIT.filterWithRelationalDBList.WebHome"
}}{{/liveData}}
{noformat}
 
the same error can be observed when typing in the filter for "myList" as it triggers the same code.

The cast that is mentioned in the error is from [https://github.com/xwiki/xwiki-platform/blob/b320aea672a8daa96226dde94300c973e56f5972/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/objects/classes/UsedValuesListQueryBuilder.java#L83] which is triggered because the second value is no count anymore since XWIKI-23019. I've reverted the change of that issue and then the values were suggested as expected.

For XWIKI-23727 I'm adding an integration test that reproduces the scenario with Live Data
for the special case of (database) list properties with relational storage and multi select .