环境:
我可以毫无错误地构建,但是当我尝试运行项目时出现此错误,但我还没有任何持久性配置。
错误日志
11:47:56,871 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
11:47:57,070 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
11:47:57,144 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.2.1.Final "Tweek" starting
11:47:57,534 ERROR [org.jboss.as.server] (Controller Boot Thread) JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:112)
at org.jboss.as.server.ServerService.boot(ServerService.java:331)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:259)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3,1]
Message: Unexpected element '{urn:jboss:domain:3.0}server'
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:108)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:104)
... 3 more
11:47:57,535 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
11:47:57,545 INFO [org.jboss.as] (MSC service thread 1-8) JBAS015950: WildFly 8.2.1.Final "Tweek" stopped in 3ms
我该如何解决这个问题?
答案 0 :(得分:3)
您的服务器无法启动,因为您的服务器配置存在问题。根据您的错误消息,您的配置从以下内容开始:
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:3.0">
...
但我知道wildfly 8.2.1支持服务器配置2.2版,你的配置应如下所示:
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:2.2">
...
怎么会发生这种情况?最有可能的是,您的IDE或环境属性配置错误,因此Wildfly在错误的位置进行配置。检查JBOSS_HOME环境属性,在大多数情况下你不需要它,所以取消设置它。
$ env | grep JBOSS_HOME
否则请仔细检查Netbeans中的服务器配置。