Lucene rises an WARNING message on WildFly 31.

45 views
Skip to first unread message

Masudana Ika

unread,
Jan 27, 2024, 3:36:01 PMJan 27
to WildFly
Hi Team

Lucene rises an WARNING message on WildFly 31.0.0.Final.

`2024-01-27 21:56:43,844 WARNING [org.apache.lucene.store.MappedByteBufferIndexInputProvider] (MSC service thread 1-3) Unmapping is not supported on this platform, because internal Java APIs are not compatible with this Lucene version: java.lang.ClassNotFoundException: sun.misc.Unsafe from [Module "org.apache.lucene" from local module loader @38831718 (finder: local module finder @2c1156a7 (roots: C:\wildfly-31.0.0.Final\modules,C:\wildfly-31.0.0.Final\modules\system\layers\base))]`

It seems that this can be avoided by adding "sun.jdk" to the dependencies in module.xml.

wildfly-31.0.0.Final/modules/system/layers/base/org/apache/lucene/main/module.xml
`<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright The WildFly Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->
<module name="org.apache.lucene" xmlns="urn:jboss:module:1.9">

    <properties>
        <!-- Native Lucene access is allowed in WildFly,
             though it may not be supported by product vendors
             (because its APIs could change without prior notice). -->
        <property name="jboss.api" value="public"/>
    </properties>

    <resources>
        <resource-root path="lucene-analysis-common-9.8.0.jar"/>
        <resource-root path="lucene-core-9.8.0.jar"/>
        <resource-root path="lucene-facet-9.8.0.jar"/>
        <resource-root path="lucene-queries-9.8.0.jar"/>
        <resource-root path="lucene-queryparser-9.8.0.jar"/>
        <resource-root path="lucene-join-9.8.0.jar"/>
    </resources>

    <dependencies>
        <module name="java.logging"/>
        <module name="jdk.management"/> <!-- WFLY-18922: necessary for Lucene's memory usage estimates -->
        <module name="com.carrotsearch.hppc"/>
        <module name="java.xml"/>
        <module name="sun.jdk"/>
    </dependencies>
</module>`

My environment is Windows 11(x64), JDK 17.0.10.

Thank you in advance.

Masudana Ika

rop...@redhat.com

unread,
Jan 27, 2024, 7:53:05 PMJan 27
to WildFly
Thanks for reporting this issue Masudana Ika


Richard
Reply all
Reply to author
Forward
0 new messages