<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
If something (such as a hot deployment) modifies the standalone.xml,
I'm seeing the following error on restart:<br>
<br>
<br>
17:55:07,494 ERROR [org.jboss.msc.service.fail] MSC00001: Failed to
start service jboss.as.server-controller:
org.jboss.msc.service.StartException in service
jboss.as.server-controller:
org.jboss.as.controller.persistence.ConfigurationPersistenceException:
Failed to parse configuration<br>
at
org.jboss.as.server.ServerControllerService.start(ServerControllerService.java:154)
[jboss-as-server-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]<br>
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
[jboss-msc-1.0.0.Beta8.jar:1.0.0.Beta8]<br>
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[:1.6.0_24]<br>
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[:1.6.0_24]<br>
at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]<br>
Caused by:
org.jboss.as.controller.persistence.ConfigurationPersistenceException:
Failed to parse configuration<br>
at
org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:113)<br>
at
org.jboss.as.server.ServerControllerService.start(ServerControllerService.java:152)
[jboss-as-server-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]<br>
... 4 more<br>
Caused by: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[32,5]<br>
Message: Unexpected attribute 'name' encountered<br>
at
org.jboss.as.controller.parsing.ParseUtils.unexpectedAttribute(ParseUtils.java:83)<br>
at
org.jboss.as.controller.parsing.ParseUtils.requireNoAttributes(ParseUtils.java:146)<br>
at
org.jboss.as.controller.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:293)<br>
at
org.jboss.as.controller.parsing.StandaloneXml.readServerElement(StandaloneXml.java:158)<br>
<br>
<br>
This is due to
org.jboss.as.controller.parsing.StandaloneXml.writeServerProfile
outputing the name attribute:<br>
<br>
private void writeServerProfile(final XMLExtendedStreamWriter
writer, final ModelMarshallingContext context) throws
XMLStreamException {<br>
<br>
ModelNode profileNode = context.getModelNode();<br>
<br>
writer.writeStartElement(Element.PROFILE.getLocalName());<br>
<font color="#ff0000">
writer.writeAttribute(Attribute.NAME.getLocalName(),
profileNode.get(PROFILE_NAME).asString());</font><br>
<br>
while parseServerProfile disallows attributes:<br>
<br>
private void parseServerProfile(final XMLExtendedStreamReader
reader, final ModelNode address, final List<ModelNode> list)
throws XMLStreamException {<br>
// Attributes<br>
requireNoAttributes(reader);<br>
<br>
I guess it was decided that there should not be a profile name, but
the write was not updated. This looks like this still is the latest
version, so the fix is a one-liner deletion of the writeAttribute in
red.<br>
<br>
</body>
</html>