This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-9b760885-3653-4a04-843d-577f42cb3c76 XWIKI-25453 Open

Lucene vectorization warning when starting XWiki on Java 21 or later

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-d9c13854-ef8f-470f-8048-77893ca36f33 Thomas Mortagne created this issue on 22/Oct/26 10:42
 
Summary: Lucene vectorization warning when starting XWiki on Java 21 or later
Issue Type: cid:jira-generated-image-avatar-9b760885-3653-4a04-843d-577f42cb3c76 Bug
Affects Versions: 18.10.0-rc-1
Assignee: Unassigned
Components: Search - Solr
Created: 22/Oct/26 10:42
Priority: cid:jira-generated-image-static-minor-41e5dee5-7c50-4d6b-a2b4-dc538bd370ca Minor
Reporter: Thomas Mortagne
Description:

Steps to reproduce

  1. Start XWiki with the embedded Solr (the default) on Java 21 or later
  2. Observe the XWiki console

Expected results

No (other) warning is displayed.

Actual results

On Java 21 or 22:

org.apache.lucene.internal.vectorization.VectorizationProvider lookup
WARNING: Java vector incubator module is not readable. For optimal vector performance, pass '--add-modules jdk.incubator.vector' to enable Vector API.

On Java 23 or later:

org.apache.lucene.internal.vectorization.VectorizationProvider lookup
WARNING: You are running with Java 23 or later. To make full use of the Vector API, please update Apache Lucene.

Details

Since Lucene 9.12 (upgraded in XWIKI-21954), the default postings format decodes the postings through Lucene's vectorization support, so this warning is displayed at every startup. With Lucene 9.8, only dense vector fields (not used by XWiki) were using it.

There is no functional impact: without the jdk.incubator.vector module, Lucene uses its scalar implementation and the search results are the same, only an optimization of the postings decoding is missed.

Possible solutions:

  • Lower the level of the org.apache.lucene.internal.vectorization logger. Lucene uses java.util.logging, which is not redirected to SLF4J/logback in XWiki, so this requires either bridging it or setting the level programmatically.
  • Pass --add-modules jdk.incubator.vector to the JVM. It enables the optimization on Java 21 and 22, but the JVM then displays its own warning about using an incubator module.

On Java 23 or later, only Lucene 10 (i.e. Solr 10) will be able to use the Vector API.