Hi I'm much happier now.
The java application which runs the search runs in two modes, one creates a socket and services requests, the other executes a standalone search. The database application uses the socket server and if that fails for any reason it calls the java method directly. That's where the repeated messages were coming from because the socket was closing instead of persisting. Now fixed. And you are correct, the socket handler generates the message once, which is quite reasonable. cheers -----Original Message----- From: Uwe Schindler via java-user <[email protected]> Sent: Friday, 16 January 2026 03:53 To: [email protected] Cc: Uwe Schindler <[email protected]> Subject: Re: Lucene 10, Incubator Vector: warnings I'd like to suppress, and a question Hi, I think there are a few problems in your setup which you did not explain. The suppression of the message seems to be an XY-problem. There is no need to suppress the message if everything is setup correctly - as it is displayed only once! First of all: If you don't enable the vector incubator module on command line, a WARNING is logged on startup of Java VM. It is not logged on every request. If this is the case, you have far bigger problems! (see below). If you don't enable the vector incubator, some requests may be slower. The reason why it is logged is because on initialization of Lucene some requests are done to the VecorUtils class which triggers the one-time warning message. You can suppress it by adding a config file for java.util.logging (see https://docs.oracle.com/en/java/javase/21/core/java-logging-overview.html on how to configure it). If you enable the Java Incubator module, there are 2 messages logged - also only ONCE on startup of application: * A warning message by The JVM itsself ("WARNING: Using incubator modules: jdk.incubator.vector"). This can't be suppressed and is outside of Lucene's responsibility. If you don't want to see it, complain at the JDK developers (see Dawid's message). * A info message is logged that Lucene detected the Incubator module. This is also logged once on startup. As before, you can suppress it by adding a config file for java.util.logging (see https://docs.oracle.com/en/java/javase/21/core/java-logging-overview.html on how to configure it). If you see a message on every search request then theres something fundamentally broken: * Do you spin up a Java VM on every search request - maybe doue to a python or shell request on every query? If yes, then it will all be slow and thats not a supported setup of Lucene. Every search request will compile the whole Lucene application's bytecode by the Hotspot VM on every request. This will be insanely slow. In that case you will see the both messages every time! * If you don't spin a VM on every search request, but still see the INFO message (not the "WARNING: Using incubator modules: jdk.incubator.vector"), then you have something that re-inits the class loader every time. Is it a web application that gets restarted on every request? Maybe something crashes the webapp every time and Jetty or Tomcat resatarts it while reloading the web application? Please look into this. Uwe Am 09.12.2025 um 15:47 schrieb Trevor Nicholls: > I recently upgraded our application from v8.6.3 to v10, and advanced > to Java 21, and I immediately got both build and runtime errors and > warnings about vector incubators etc. > > > > The warnings when I built the Lucene index suggested that I add > "--add-modules jdk.incubator.vector" to the java commandline. > > > > Our application doesn't use any vector data types and so far as I know > it doesn't do any vector type comparisons either. Nevertheless I added > this to the commandline and I got a different message on execution: > > > > [date & time] > org.apache.lucene.internal.vectorization.PanamaVectorizationProvider > <init> > > INFO: Java vector incubator API enabled: uses preferredBitSize=512; > FMA enabled > > > > This goes to stderr, and I'd prefer to suppress it somehow. > > > > The Lucene doco suggested that I could disable the FMA vector > extension by using the commandline option > "-Dlucene.useVectorFMA=false" but this just generated a different series of > messages to the error log. > > > > So far this is a trivial complaint that I wouldn't raise because the > indexes are not built at a high frequency and these unnecessary > message lines don't do any damage. > > > > However the application which performs the searches is also generating > error output. If I include the --add-modules jdk.incubator.vector > parameters, every search request adds the lines > > > > WARNING: Using incubator modules: jdk.incubator.vector > > [date & time] > org.apache.lucene.internal.vectorization.PanamaVectorizationProvider > <init> > > INFO: Java vector incubator API enabled; uses preferredBitSize=256; > FMA enabled > > > > to the error channel. Now this is a problem because the error file > grows like Topsy and any real errors in it are apt to get missed. > > > > I don't really need to be told every time that I'm using vectorization > (although I'm not!) because I explicitly put it on the commandline. I > only expect to see a warning if something is wrong. > > > > So that's the first question; is there some magical incantation that > will allow Lucene to think it's using vectorization and still keep the > error log clean? > > > > The second question is one that probably reveals profound ignorance. > The option I was prompted to add to the application commandline refers > to a jdk module. > > I'm building and testing this on a machine with the full JDK but it > will be deployed to machines that currently only have the JRE. Do I > need the JDK installed everywhere? > > > > cheers > > T > > > > > > > > > > -- Uwe Schindler Achterdiek 19, D-28357 Bremen https://www.thetaphi.de eMail:[email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
