启动期间捕获异常:org.jboss.as.controller.persistence.ConfigurationPersistenceException:WFLYCTL0085:无法解析配置
Posted
技术标签:
【中文标题】启动期间捕获异常:org.jboss.as.controller.persistence.ConfigurationPersistenceException:WFLYCTL0085:无法解析配置【英文标题】:Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration 【发布时间】:2017-08-04 16:21:45 【问题描述】:我将此配置添加到我的子系统 im JBoss 中,但构建时出现错误。
配置部分:
<subsystem xmlns="urn:jboss:domain:logging:3.0">
<console-handler name="CONSOLE">
<level name="INFO"/>
<formatter>
<named-formatter name="COLOR-PATTERN"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<formatter>
<named-formatter name="PATTERN"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<!-- MY CONFIGURATION PART -->
<file-handler name="ABC-FILE" autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%-5p %d %C (%F:%M:%L) - %m%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="ABC-Activity.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</file-handler>
<logger category="com.my.project.ActivityLogger">
<level name="INFO"/>
<handlers>
<handler name="ABC-FILE"/>
</handlers>
</logger>
这里是构建网络应用程序的错误:
ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
at org.jboss.as.server.ServerService.boot(ServerService.java:357)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[113,17]
Message: WFLYCTL0198: Unexpected element 'urn:jboss:domain:logging:3.0suffix' encountered
at org.jboss.as.controller.parsing.ParseUtils.unexpectedElement(ParseUtils.java:89)
at org.jboss.as.logging.LoggingSubsystemParser_3_0.parseFileHandlerElement(LoggingSubsystemParser_3_0.java:521)
at org.jboss.as.logging.LoggingSubsystemParser_3_0.readElement(LoggingSubsystemParser_3_0.java:152)
at org.jboss.as.logging.LoggingSubsystemParser_3_0.readElement(LoggingSubsystemParser_3_0.java:97)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69)
at org.jboss.as.server.parsing.StandaloneXml_4.parseServerProfile(StandaloneXml_4.java:546)
at org.jboss.as.server.parsing.StandaloneXml_4.readServerElement(StandaloneXml_4.java:242)
at org.jboss.as.server.parsing.StandaloneXml_4.readElement(StandaloneXml_4.java:141)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:103)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:49)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
... 3 more
11:52:57,717 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
我使用了这个文档https://docs.jboss.org/author/display/AS71/Logging+Configuration#LoggingConfiguration-rootlogger
我怎么了???
【问题讨论】:
【参考方案1】:根据我们的经验,这是由错误的standalone.xml
配置引起的。
Jboss 非常复杂。它们为standalone.xml 配置保留特定的历史文件。我不知道原因,这是他们开发人员的问题。
出于某种原因,有时standalone.xml
有 0 个字节。
在中查找文件
JBOSS_AS_HOME/standalone/configuration/
在我们的例子中是这样的
drwxr-xr-x. 11 user user 4096 Mar 14 12:44 standalone_xml_history
-rw-rw-r--. 1 user user 0 Mar 14 12:44 standalone.xml
我们替换为standalone_xml_history
目录中最新的“自动备份/历史记录”;一切恢复正常。
【讨论】:
以上是关于启动期间捕获异常:org.jboss.as.controller.persistence.ConfigurationPersistenceException:WFLYCTL0085:无法解析配置的主要内容,如果未能解决你的问题,请参考以下文章
如何在 Tensorflow 2 中的模型训练期间捕获任何异常