[jboss-as7-dev] Something out of sync with StandaloneXml.writeServerProfile

David M. Lloyd david.lloyd at redhat.com
Tue Jun 14 21:46:09 EDT 2011


Should be fixed now.

On 06/14/2011 07:59 PM, Scott Stark wrote:
> If something (such as a hot deployment) modifies the standalone.xml, I'm
> seeing the following error on restart:
>
>
> 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
> at
> org.jboss.as.server.ServerControllerService.start(ServerControllerService.java:154)
> [jboss-as-server-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]
> at
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
> [jboss-msc-1.0.0.Beta8.jar:1.0.0.Beta8]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [:1.6.0_24]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [:1.6.0_24]
> at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
> Caused by:
> org.jboss.as.controller.persistence.ConfigurationPersistenceException:
> Failed to parse configuration
> at
> org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:113)
> at
> org.jboss.as.server.ServerControllerService.start(ServerControllerService.java:152)
> [jboss-as-server-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]
> ... 4 more
> Caused by: javax.xml.stream.XMLStreamException: ParseError at
> [row,col]:[32,5]
> Message: Unexpected attribute 'name' encountered
> at
> org.jboss.as.controller.parsing.ParseUtils.unexpectedAttribute(ParseUtils.java:83)
> at
> org.jboss.as.controller.parsing.ParseUtils.requireNoAttributes(ParseUtils.java:146)
> at
> org.jboss.as.controller.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:293)
> at
> org.jboss.as.controller.parsing.StandaloneXml.readServerElement(StandaloneXml.java:158)
>
>
> This is due to
> org.jboss.as.controller.parsing.StandaloneXml.writeServerProfile
> outputing the name attribute:
>
> private void writeServerProfile(final XMLExtendedStreamWriter writer,
> final ModelMarshallingContext context) throws XMLStreamException {
>
> ModelNode profileNode = context.getModelNode();
>
> writer.writeStartElement(Element.PROFILE.getLocalName());
> writer.writeAttribute(Attribute.NAME.getLocalName(),
> profileNode.get(PROFILE_NAME).asString());
>
> while parseServerProfile disallows attributes:
>
> private void parseServerProfile(final XMLExtendedStreamReader reader,
> final ModelNode address, final List<ModelNode> list) throws
> XMLStreamException {
> // Attributes
> requireNoAttributes(reader);
>
> 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.
>
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


-- 
- DML


More information about the jboss-as7-dev mailing list