从eclipse启动Wildfly 9时出现以下错误。
Declared property enabled wasn't found on class org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
Unable to set property pattern on class org.jboss.logmanager.formatters.PatternFormatter: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.logmanager.PropertyConfigurator.configureProperties(PropertyConfigurator.java:187)
at org.jboss.logmanager.PropertyConfigurator.configureFormatter(PropertyConfigurator.java:360)
at org.jboss.logmanager.PropertyConfigurator.configureHandler(PropertyConfigurator.java:305)
at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:128)
at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:86)
at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:246)
at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:231)
at java.util.logging.LogManager$3.run(Unknown Source)
at java.util.logging.LogManager$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(Unknown Source)
at java.util.logging.LogManager.access$800(Unknown Source)
at java.util.logging.LogManager$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.ensureLogManagerInitialized(Unknown Source)
at java.util.logging.LogManager.getLogManager(Unknown Source)
at org.jboss.modules.Main.main(Main.java:470)
Caused by: java.lang.IllegalArgumentException: Encountered an unknown format character
at org.jboss.logmanager.formatters.FormatStringParser.getSteps(FormatStringParser.java:168)
at org.jboss.logmanager.formatters.PatternFormatter.setPattern(PatternFormatter.java:63)
... 21 more
Declared property enabled wasn't found on class org.jboss.logmanager.handlers.ConsoleHandler
这是standalone.xml中的相同条目
<subsystem xmlns="urn:jboss:domain:logging:3.0">
<console-handler name="CONSOLE">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.apache.tomcat.util.modeler">
<level name="WARN"/>
</logger>
<logger category="org.jboss.as.config">
<level name="DEBUG"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<logger category="jacorb">
<level name="WARN"/>
</logger>
<logger category="jacorb.config">
<level name="ERROR"/>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>
</handlers>
</root-logger>
</subsystem>
配置中是否有问题,或者是否需要添加任何其他内容来解决问题?
jboss-logmanager的版本是旧版本。它与WildFly 9不兼容。一旦我将它改为与WildFly 9兼容的那个。它的工作。谢谢@JamesR.Perkins。