Caught exception during boot ConfigurationPersiste

2019-08-11 06:42发布

问题:

Environment:

  • Ubuntu 14.04
  • Netbeans 8.0.2
  • Wildfly 8.2.1
  • JDK 1.8.0_60

I can build without error, but when I try to Run the project I get this error, but I don't have any persistance configuration yet.

Error log

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

How can I fix this?

回答1:

Your server can't start because there is an issue with your server configuration. According to your error message, your configuration starts with something like this:

<?xml version='1.0' encoding='UTF-8'?>

<server xmlns="urn:jboss:domain:3.0">
...

but wildfly 8.2.1 as I know supports server configuration version 2.2 and your config should look like this:

<?xml version='1.0' encoding='UTF-8'?>

<server xmlns="urn:jboss:domain:2.2">
...

How could this happen? Most probably, you have misconfigured your IDE or environment properties, so that Wildfly looks in wrong place for configuration. Check JBOSS_HOME environment property, in most situations you don't need that, so unset it.

$ env | grep JBOSS_HOME

otherwise review carefully your server configuration in Netbeans.