You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Roar Brænden <ro...@gmail.com> on 2025/06/03 07:48:05 UTC

Problem passing args to tomee.maven.plugin

Hi,

I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using Lucene index for some search result. The Lucene jar is version 10.2.1, which is using the new Vector API.
When using this library I notice some warnings in the log:


WARNING: A restricted method in java.lang.foreign.Linker has been called
WARNING: java.lang.foreign.Linker::downcallHandle has been called by the unnamed module
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for this module

03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2] org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java vector incubator module is not readable. For optimal vector performance, pass '--add-modules jdk.incubator.vector' to enable Vector API.

To avoid these messages, I tried to add args to my tomee-maven-plugin configuration:

            <args>enable-native-access=ALL-UNNAMED</args>
            <args>add-modules=jdk.incubator.vector</args>

What I noticed is that only the last one will be taken into consideration. Meaning that with these settings I will get the first WARNING, and a message indicating that the Vector API is found. If I switch the args, I will get the last WARNING.
Is this a know problem with the plugin configuration?

Best regards,
Roar Brænden


Re: Problem passing args to tomee.maven.plugin

Posted by Roar Brænden <ro...@gmail.com>.
Hi Richard,

You're right. It should be only one args within the configuration element.
Which mean that the last one will override all previous.

Thanks,
Roar Brænden

> 4. jun. 2025 kl. 21:06 skrev Richard Zowalla <rz...@apache.org>:
> 
> Hi,
> 
> I think the separator for <args> is a whitespace [1], so you would need to pass it as one argument.
> 
> <tomee.png>
> tomee/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/cli/Args.java at main · apache/tomee
> github.com
>  <https://github.com/apache/tomee/blob/main/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/cli/Args.java#L32>tomee/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/cli/Args.java at main · apache/tomee <https://github.com/apache/tomee/blob/main/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/cli/Args.java#L32>
> github.com <https://github.com/apache/tomee/blob/main/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/cli/Args.java#L32>
> 
> Gruß
> Richard
> 
>> Am 03.06.2025 um 09:48 schrieb Roar Brænden <ro...@gmail.com>:
>> 
>> Hi,
>> 
>> I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using Lucene index for some search result. The Lucene jar is version 10.2.1, which is using the new Vector API.
>> When using this library I notice some warnings in the log:
>> 
>> 
>> WARNING: A restricted method in java.lang.foreign.Linker has been called
>> WARNING: java.lang.foreign.Linker::downcallHandle has been called by the unnamed module
>> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for this module
>> 
>> 03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2] org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java vector incubator module is not readable. For optimal vector performance, pass '--add-modules jdk.incubator.vector' to enable Vector API.
>> 
>> To avoid these messages, I tried to add args to my tomee-maven-plugin configuration:
>> 
>>            <args>enable-native-access=ALL-UNNAMED</args>
>>            <args>add-modules=jdk.incubator.vector</args>
>> 
>> What I noticed is that only the last one will be taken into consideration. Meaning that with these settings I will get the first WARNING, and a message indicating that the Vector API is found. If I switch the args, I will get the last WARNING.
>> Is this a know problem with the plugin configuration?
>> 
>> Best regards,
>> Roar Brænden
>> 
> 


Re: Problem passing args to tomee.maven.plugin

Posted by Richard Zowalla <rz...@apache.org>.
Hi,

I think the separator for <args> is a whitespace [1], so you would need to pass it as one argument.

https://github.com/apache/tomee/blob/main/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/cli/Args.java#L32
tomee/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/cli/Args.java at main · apache/tomee
github.com

Gruß
Richard

> Am 03.06.2025 um 09:48 schrieb Roar Brænden <ro...@gmail.com>:
> 
> Hi,
> 
> I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using Lucene index for some search result. The Lucene jar is version 10.2.1, which is using the new Vector API.
> When using this library I notice some warnings in the log:
> 
> 
> WARNING: A restricted method in java.lang.foreign.Linker has been called
> WARNING: java.lang.foreign.Linker::downcallHandle has been called by the unnamed module
> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for this module
> 
> 03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2] org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java vector incubator module is not readable. For optimal vector performance, pass '--add-modules jdk.incubator.vector' to enable Vector API.
> 
> To avoid these messages, I tried to add args to my tomee-maven-plugin configuration:
> 
>            <args>enable-native-access=ALL-UNNAMED</args>
>            <args>add-modules=jdk.incubator.vector</args>
> 
> What I noticed is that only the last one will be taken into consideration. Meaning that with these settings I will get the first WARNING, and a message indicating that the Vector API is found. If I switch the args, I will get the last WARNING.
> Is this a know problem with the plugin configuration?
> 
> Best regards,
> Roar Brænden
> 


Re: Problem passing args to tomee.maven.plugin

Posted by James Pedersen <ja...@gmail.com>.
This is a hideous abomination of configuration and I would love to try to
fix it myself ........


On Tue, Jun 3, 2025 at 2:07 AM James Pedersen <ja...@gmail.com> wrote:

> Roar, actually, can you send me a direct email please    ????   My email
> address is james00090@gmail.com
>
>
>
> On Tue, Jun 3, 2025 at 2:06 AM James Pedersen <ja...@gmail.com>
> wrote:
>
>> You could also try talking to the swine at Oracle about the warning:
>>
>>
>> "WARNING: A restricted method in java.lang.foreign.Linker has been called
>> "
>>
>> On Tue, Jun 3, 2025 at 2:04 AM James Pedersen <ja...@gmail.com>
>> wrote:
>>
>>> Actually, Roar, I would encourage you to talk to the folks at Apache
>>> Lucene about this ....
>>>
>>>
>>> On Tue, Jun 3, 2025 at 1:58 AM James Pedersen <ja...@gmail.com>
>>> wrote:
>>>
>>>>  It seems like the TomEE configuration subsystem isn't good enough......
>>>>
>>>> On Tue, Jun 3, 2025 at 1:47 AM James Pedersen <ja...@gmail.com>
>>>> wrote:
>>>>
>>>>> Perhaps try to add a name to the module?
>>>>>
>>>>> On Tue, Jun 3, 2025 at 1:46 AM James Pedersen <ja...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Why are these warnings a issue for you?
>>>>>>
>>>>>> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> I'm curious about this.
>>>>>>>
>>>>>>> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Did it make the problem go away, though?
>>>>>>>>
>>>>>>>> On Tue, Jun 3, 2025 at 12:49 AM Roar Brænden <
>>>>>>>> roar.brenden.no@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using
>>>>>>>>> Lucene index for some search result. The Lucene jar is version 10.2.1,
>>>>>>>>> which is using the new Vector API.
>>>>>>>>> When using this library I notice some warnings in the log:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> WARNING: A restricted method in java.lang.foreign.Linker has been
>>>>>>>>> called
>>>>>>>>> WARNING: java.lang.foreign.Linker::downcallHandle has been called
>>>>>>>>> by the unnamed module
>>>>>>>>> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning
>>>>>>>>> for this module
>>>>>>>>>
>>>>>>>>> 03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2]
>>>>>>>>> org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java
>>>>>>>>> vector incubator module is not readable. For optimal vector performance,
>>>>>>>>> pass '--add-modules jdk.incubator.vector' to enable Vector API.
>>>>>>>>>
>>>>>>>>> To avoid these messages, I tried to add args to my
>>>>>>>>> tomee-maven-plugin configuration:
>>>>>>>>>
>>>>>>>>>             <args>enable-native-access=ALL-UNNAMED</args>
>>>>>>>>>             <args>add-modules=jdk.incubator.vector</args>
>>>>>>>>>
>>>>>>>>> What I noticed is that only the last one will be taken into
>>>>>>>>> consideration. Meaning that with these settings I will get the first
>>>>>>>>> WARNING, and a message indicating that the Vector API is found. If I switch
>>>>>>>>> the args, I will get the last WARNING.
>>>>>>>>> Is this a know problem with the plugin configuration?
>>>>>>>>>
>>>>>>>>> Best regards,
>>>>>>>>> Roar Brænden
>>>>>>>>>
>>>>>>>>>

Re: Problem passing args to tomee.maven.plugin

Posted by James Pedersen <ja...@gmail.com>.
Roar, actually, can you send me a direct email please    ????   My email
address is james00090@gmail.com



On Tue, Jun 3, 2025 at 2:06 AM James Pedersen <ja...@gmail.com> wrote:

> You could also try talking to the swine at Oracle about the warning:
>
>
> "WARNING: A restricted method in java.lang.foreign.Linker has been called "
>
> On Tue, Jun 3, 2025 at 2:04 AM James Pedersen <ja...@gmail.com>
> wrote:
>
>> Actually, Roar, I would encourage you to talk to the folks at Apache
>> Lucene about this ....
>>
>>
>> On Tue, Jun 3, 2025 at 1:58 AM James Pedersen <ja...@gmail.com>
>> wrote:
>>
>>>  It seems like the TomEE configuration subsystem isn't good enough......
>>>
>>> On Tue, Jun 3, 2025 at 1:47 AM James Pedersen <ja...@gmail.com>
>>> wrote:
>>>
>>>> Perhaps try to add a name to the module?
>>>>
>>>> On Tue, Jun 3, 2025 at 1:46 AM James Pedersen <ja...@gmail.com>
>>>> wrote:
>>>>
>>>>> Why are these warnings a issue for you?
>>>>>
>>>>> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> I'm curious about this.
>>>>>>
>>>>>> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Did it make the problem go away, though?
>>>>>>>
>>>>>>> On Tue, Jun 3, 2025 at 12:49 AM Roar Brænden <
>>>>>>> roar.brenden.no@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using
>>>>>>>> Lucene index for some search result. The Lucene jar is version 10.2.1,
>>>>>>>> which is using the new Vector API.
>>>>>>>> When using this library I notice some warnings in the log:
>>>>>>>>
>>>>>>>>
>>>>>>>> WARNING: A restricted method in java.lang.foreign.Linker has been
>>>>>>>> called
>>>>>>>> WARNING: java.lang.foreign.Linker::downcallHandle has been called
>>>>>>>> by the unnamed module
>>>>>>>> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning
>>>>>>>> for this module
>>>>>>>>
>>>>>>>> 03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2]
>>>>>>>> org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java
>>>>>>>> vector incubator module is not readable. For optimal vector performance,
>>>>>>>> pass '--add-modules jdk.incubator.vector' to enable Vector API.
>>>>>>>>
>>>>>>>> To avoid these messages, I tried to add args to my
>>>>>>>> tomee-maven-plugin configuration:
>>>>>>>>
>>>>>>>>             <args>enable-native-access=ALL-UNNAMED</args>
>>>>>>>>             <args>add-modules=jdk.incubator.vector</args>
>>>>>>>>
>>>>>>>> What I noticed is that only the last one will be taken into
>>>>>>>> consideration. Meaning that with these settings I will get the first
>>>>>>>> WARNING, and a message indicating that the Vector API is found. If I switch
>>>>>>>> the args, I will get the last WARNING.
>>>>>>>> Is this a know problem with the plugin configuration?
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Roar Brænden
>>>>>>>>
>>>>>>>>

Re: Problem passing args to tomee.maven.plugin

Posted by James Pedersen <ja...@gmail.com>.
You could also try talking to the swine at Oracle about the warning:


"WARNING: A restricted method in java.lang.foreign.Linker has been called "

On Tue, Jun 3, 2025 at 2:04 AM James Pedersen <ja...@gmail.com> wrote:

> Actually, Roar, I would encourage you to talk to the folks at Apache
> Lucene about this ....
>
>
> On Tue, Jun 3, 2025 at 1:58 AM James Pedersen <ja...@gmail.com>
> wrote:
>
>>  It seems like the TomEE configuration subsystem isn't good enough......
>>
>> On Tue, Jun 3, 2025 at 1:47 AM James Pedersen <ja...@gmail.com>
>> wrote:
>>
>>> Perhaps try to add a name to the module?
>>>
>>> On Tue, Jun 3, 2025 at 1:46 AM James Pedersen <ja...@gmail.com>
>>> wrote:
>>>
>>>> Why are these warnings a issue for you?
>>>>
>>>> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
>>>> wrote:
>>>>
>>>>> I'm curious about this.
>>>>>
>>>>> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Did it make the problem go away, though?
>>>>>>
>>>>>> On Tue, Jun 3, 2025 at 12:49 AM Roar Brænden <
>>>>>> roar.brenden.no@gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using
>>>>>>> Lucene index for some search result. The Lucene jar is version 10.2.1,
>>>>>>> which is using the new Vector API.
>>>>>>> When using this library I notice some warnings in the log:
>>>>>>>
>>>>>>>
>>>>>>> WARNING: A restricted method in java.lang.foreign.Linker has been
>>>>>>> called
>>>>>>> WARNING: java.lang.foreign.Linker::downcallHandle has been called by
>>>>>>> the unnamed module
>>>>>>> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning
>>>>>>> for this module
>>>>>>>
>>>>>>> 03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2]
>>>>>>> org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java
>>>>>>> vector incubator module is not readable. For optimal vector performance,
>>>>>>> pass '--add-modules jdk.incubator.vector' to enable Vector API.
>>>>>>>
>>>>>>> To avoid these messages, I tried to add args to my
>>>>>>> tomee-maven-plugin configuration:
>>>>>>>
>>>>>>>             <args>enable-native-access=ALL-UNNAMED</args>
>>>>>>>             <args>add-modules=jdk.incubator.vector</args>
>>>>>>>
>>>>>>> What I noticed is that only the last one will be taken into
>>>>>>> consideration. Meaning that with these settings I will get the first
>>>>>>> WARNING, and a message indicating that the Vector API is found. If I switch
>>>>>>> the args, I will get the last WARNING.
>>>>>>> Is this a know problem with the plugin configuration?
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Roar Brænden
>>>>>>>
>>>>>>>

Re: Problem passing args to tomee.maven.plugin

Posted by James Pedersen <ja...@gmail.com>.
Actually, Roar, I would encourage you to talk to the folks at Apache Lucene
about this ....


On Tue, Jun 3, 2025 at 1:58 AM James Pedersen <ja...@gmail.com> wrote:

>  It seems like the TomEE configuration subsystem isn't good enough......
>
> On Tue, Jun 3, 2025 at 1:47 AM James Pedersen <ja...@gmail.com>
> wrote:
>
>> Perhaps try to add a name to the module?
>>
>> On Tue, Jun 3, 2025 at 1:46 AM James Pedersen <ja...@gmail.com>
>> wrote:
>>
>>> Why are these warnings a issue for you?
>>>
>>> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
>>> wrote:
>>>
>>>> I'm curious about this.
>>>>
>>>> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
>>>> wrote:
>>>>
>>>>> Did it make the problem go away, though?
>>>>>
>>>>> On Tue, Jun 3, 2025 at 12:49 AM Roar Brænden <
>>>>> roar.brenden.no@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using
>>>>>> Lucene index for some search result. The Lucene jar is version 10.2.1,
>>>>>> which is using the new Vector API.
>>>>>> When using this library I notice some warnings in the log:
>>>>>>
>>>>>>
>>>>>> WARNING: A restricted method in java.lang.foreign.Linker has been
>>>>>> called
>>>>>> WARNING: java.lang.foreign.Linker::downcallHandle has been called by
>>>>>> the unnamed module
>>>>>> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning
>>>>>> for this module
>>>>>>
>>>>>> 03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2]
>>>>>> org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java
>>>>>> vector incubator module is not readable. For optimal vector performance,
>>>>>> pass '--add-modules jdk.incubator.vector' to enable Vector API.
>>>>>>
>>>>>> To avoid these messages, I tried to add args to my tomee-maven-plugin
>>>>>> configuration:
>>>>>>
>>>>>>             <args>enable-native-access=ALL-UNNAMED</args>
>>>>>>             <args>add-modules=jdk.incubator.vector</args>
>>>>>>
>>>>>> What I noticed is that only the last one will be taken into
>>>>>> consideration. Meaning that with these settings I will get the first
>>>>>> WARNING, and a message indicating that the Vector API is found. If I switch
>>>>>> the args, I will get the last WARNING.
>>>>>> Is this a know problem with the plugin configuration?
>>>>>>
>>>>>> Best regards,
>>>>>> Roar Brænden
>>>>>>
>>>>>>

Re: Problem passing args to tomee.maven.plugin

Posted by James Pedersen <ja...@gmail.com>.
 It seems like the TomEE configuration subsystem isn't good enough......

On Tue, Jun 3, 2025 at 1:47 AM James Pedersen <ja...@gmail.com> wrote:

> Perhaps try to add a name to the module?
>
> On Tue, Jun 3, 2025 at 1:46 AM James Pedersen <ja...@gmail.com>
> wrote:
>
>> Why are these warnings a issue for you?
>>
>> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
>> wrote:
>>
>>> I'm curious about this.
>>>
>>> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
>>> wrote:
>>>
>>>> Did it make the problem go away, though?
>>>>
>>>> On Tue, Jun 3, 2025 at 12:49 AM Roar Brænden <ro...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using
>>>>> Lucene index for some search result. The Lucene jar is version 10.2.1,
>>>>> which is using the new Vector API.
>>>>> When using this library I notice some warnings in the log:
>>>>>
>>>>>
>>>>> WARNING: A restricted method in java.lang.foreign.Linker has been
>>>>> called
>>>>> WARNING: java.lang.foreign.Linker::downcallHandle has been called by
>>>>> the unnamed module
>>>>> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for
>>>>> this module
>>>>>
>>>>> 03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2]
>>>>> org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java
>>>>> vector incubator module is not readable. For optimal vector performance,
>>>>> pass '--add-modules jdk.incubator.vector' to enable Vector API.
>>>>>
>>>>> To avoid these messages, I tried to add args to my tomee-maven-plugin
>>>>> configuration:
>>>>>
>>>>>             <args>enable-native-access=ALL-UNNAMED</args>
>>>>>             <args>add-modules=jdk.incubator.vector</args>
>>>>>
>>>>> What I noticed is that only the last one will be taken into
>>>>> consideration. Meaning that with these settings I will get the first
>>>>> WARNING, and a message indicating that the Vector API is found. If I switch
>>>>> the args, I will get the last WARNING.
>>>>> Is this a know problem with the plugin configuration?
>>>>>
>>>>> Best regards,
>>>>> Roar Brænden
>>>>>
>>>>>

Re: Problem passing args to tomee.maven.plugin

Posted by James Pedersen <ja...@gmail.com>.
Perhaps try to add a name to the module?

On Tue, Jun 3, 2025 at 1:46 AM James Pedersen <ja...@gmail.com> wrote:

> Why are these warnings a issue for you?
>
> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
> wrote:
>
>> I'm curious about this.
>>
>> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
>> wrote:
>>
>>> Did it make the problem go away, though?
>>>
>>> On Tue, Jun 3, 2025 at 12:49 AM Roar Brænden <ro...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using
>>>> Lucene index for some search result. The Lucene jar is version 10.2.1,
>>>> which is using the new Vector API.
>>>> When using this library I notice some warnings in the log:
>>>>
>>>>
>>>> WARNING: A restricted method in java.lang.foreign.Linker has been called
>>>> WARNING: java.lang.foreign.Linker::downcallHandle has been called by
>>>> the unnamed module
>>>> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for
>>>> this module
>>>>
>>>> 03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2]
>>>> org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java
>>>> vector incubator module is not readable. For optimal vector performance,
>>>> pass '--add-modules jdk.incubator.vector' to enable Vector API.
>>>>
>>>> To avoid these messages, I tried to add args to my tomee-maven-plugin
>>>> configuration:
>>>>
>>>>             <args>enable-native-access=ALL-UNNAMED</args>
>>>>             <args>add-modules=jdk.incubator.vector</args>
>>>>
>>>> What I noticed is that only the last one will be taken into
>>>> consideration. Meaning that with these settings I will get the first
>>>> WARNING, and a message indicating that the Vector API is found. If I switch
>>>> the args, I will get the last WARNING.
>>>> Is this a know problem with the plugin configuration?
>>>>
>>>> Best regards,
>>>> Roar Brænden
>>>>
>>>>

Re: Problem passing args to tomee.maven.plugin

Posted by James Pedersen <ja...@gmail.com>.
Why are these warnings a issue for you?

On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com> wrote:

> I'm curious about this.
>
> On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com>
> wrote:
>
>> Did it make the problem go away, though?
>>
>> On Tue, Jun 3, 2025 at 12:49 AM Roar Brænden <ro...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using Lucene
>>> index for some search result. The Lucene jar is version 10.2.1, which is
>>> using the new Vector API.
>>> When using this library I notice some warnings in the log:
>>>
>>>
>>> WARNING: A restricted method in java.lang.foreign.Linker has been called
>>> WARNING: java.lang.foreign.Linker::downcallHandle has been called by the
>>> unnamed module
>>> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for
>>> this module
>>>
>>> 03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2]
>>> org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java
>>> vector incubator module is not readable. For optimal vector performance,
>>> pass '--add-modules jdk.incubator.vector' to enable Vector API.
>>>
>>> To avoid these messages, I tried to add args to my tomee-maven-plugin
>>> configuration:
>>>
>>>             <args>enable-native-access=ALL-UNNAMED</args>
>>>             <args>add-modules=jdk.incubator.vector</args>
>>>
>>> What I noticed is that only the last one will be taken into
>>> consideration. Meaning that with these settings I will get the first
>>> WARNING, and a message indicating that the Vector API is found. If I switch
>>> the args, I will get the last WARNING.
>>> Is this a know problem with the plugin configuration?
>>>
>>> Best regards,
>>> Roar Brænden
>>>
>>>

Re: Problem passing args to tomee.maven.plugin

Posted by James Pedersen <ja...@gmail.com>.
I'm curious about this.

On Tue, Jun 3, 2025 at 1:45 AM James Pedersen <ja...@gmail.com> wrote:

> Did it make the problem go away, though?
>
> On Tue, Jun 3, 2025 at 12:49 AM Roar Brænden <ro...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using Lucene
>> index for some search result. The Lucene jar is version 10.2.1, which is
>> using the new Vector API.
>> When using this library I notice some warnings in the log:
>>
>>
>> WARNING: A restricted method in java.lang.foreign.Linker has been called
>> WARNING: java.lang.foreign.Linker::downcallHandle has been called by the
>> unnamed module
>> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for
>> this module
>>
>> 03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2]
>> org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java
>> vector incubator module is not readable. For optimal vector performance,
>> pass '--add-modules jdk.incubator.vector' to enable Vector API.
>>
>> To avoid these messages, I tried to add args to my tomee-maven-plugin
>> configuration:
>>
>>             <args>enable-native-access=ALL-UNNAMED</args>
>>             <args>add-modules=jdk.incubator.vector</args>
>>
>> What I noticed is that only the last one will be taken into
>> consideration. Meaning that with these settings I will get the first
>> WARNING, and a message indicating that the Vector API is found. If I switch
>> the args, I will get the last WARNING.
>> Is this a know problem with the plugin configuration?
>>
>> Best regards,
>> Roar Brænden
>>
>>

Re: Problem passing args to tomee.maven.plugin

Posted by James Pedersen <ja...@gmail.com>.
Did it make the problem go away, though?

On Tue, Jun 3, 2025 at 12:49 AM Roar Brænden <ro...@gmail.com>
wrote:

> Hi,
>
> I'm using Tomee 10.0.1 with JDK 21. One of my end-points is using Lucene
> index for some search result. The Lucene jar is version 10.2.1, which is
> using the new Vector API.
> When using this library I notice some warnings in the log:
>
>
> WARNING: A restricted method in java.lang.foreign.Linker has been called
> WARNING: java.lang.foreign.Linker::downcallHandle has been called by the
> unnamed module
> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for
> this module
>
> 03-Jun-2025 09:40:17.597 WARNING [http-nio-8091-exec-2]
> org.apache.lucene.internal.vectorization.VectorizationProvider.lookup Java
> vector incubator module is not readable. For optimal vector performance,
> pass '--add-modules jdk.incubator.vector' to enable Vector API.
>
> To avoid these messages, I tried to add args to my tomee-maven-plugin
> configuration:
>
>             <args>enable-native-access=ALL-UNNAMED</args>
>             <args>add-modules=jdk.incubator.vector</args>
>
> What I noticed is that only the last one will be taken into consideration.
> Meaning that with these settings I will get the first WARNING, and a
> message indicating that the Vector API is found. If I switch the args, I
> will get the last WARNING.
> Is this a know problem with the plugin configuration?
>
> Best regards,
> Roar Brænden
>
>