警告在Windows上启动WildFly

Mar*_*ger 1 wildfly wildfly-8

当我在Windows 8.1上运行wildfly 8.2.0.Final时,我在启动standalone-full配置文件时会在日志中收到以下警告:

WARN  [jacorb.codeset] (MSC service thread 1-8) Warning - unknown codeset (Cp1252) - defaulting to ISO-8859-1
WARN  [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011600: AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
Run Code Online (Sandbox Code Playgroud)

一切似乎工作正常,但我想知道是否有人可以解释这些警告是什么以及如何配置wildfly所以这些警告被清除.

Fed*_*rra 6

对于第一个警告,您可以查看此问题:Windows:未知代码集(Cp1252),默认为ISO-8859-1.

可能的解决方法是增加 JAVA_OPTS

-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8
Run Code Online (Sandbox Code Playgroud)

要么

-Dfile.encoding=ISO-8859-1 -Dsun.jnu.encoding=ISO-8859-1
Run Code Online (Sandbox Code Playgroud)

取决于您的文件编码.

对于第二个,您可以添加消息传递子系统 <journal-type>NIO</journal-type>

<subsystem xmlns="urn:jboss:domain:messaging:2.0">
    <hornetq-server>
        <journal-file-size>102400</journal-file-size>
        <journal-type>NIO</journal-type>

        <!-- ... -->

    </hornetq-server>
</subsystem>
Run Code Online (Sandbox Code Playgroud)

日志型

有效值为NIOASYNCIO.

选择NIO选择Java NIO日记.选择AIO选择Linux异步IO日志.如果您选择AIO但没有运行Linux,或者您没有安装libaio,那么HornetQ将检测到这一点并自动回退使用NIO.

参考:配置消息日志