JBoss AS 5.1.0 CR1 fails to boot from IDE

Version 1

    If you are using an IDE to start/stop JBoss AS 5.1.0 CR1, you might run into this issue related to xmls:

     

    Failed to boot JBoss:
    org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/C:/temp/jboss-5.1.0.CR1/server/
    default/conf/bootstrap/vfs.xml@13,37
         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:177)
         at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:147)
         at org.jboss.bootstrap.microcontainer.TempBasicXMLDeployer.deploy(TempBasicXMLDeployer.java:150)
         at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:138)
         at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:450)
         at org.jboss.Main.boot(Main.java:216)
         at org.jboss.Main$1.run(Main.java:546)
         at java.lang.Thread.run(Unknown Source)
    Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:bean-deployer:2.0}property canno
    t appear in this position. Expected content of {urn:jboss:bean-deployer:2.0}bean is sequence: {urn:j
    boss:bean-deployer:2.0}alias* {urn:jboss:bean-deployer:2.0}related-class* {urn:jboss:bean-deployer:2
    .0}annotation* {urn:jboss:bean-deployer:2.0}classloader? {urn:jboss:bean-deployer:2.0}constructor? {
    urn:jboss:bean-deployer:2.0}property* {urn:jboss:bean-deployer:2.0}create? {urn:jboss:bean-deployer:
    2.0}start? {urn:jboss:bean-deployer:2.0}stop? {urn:jboss:bean-deployer:2.0}destroy? {urn:jboss:bean-
    deployer:2.0}depends* {urn:jboss:bean-deployer:2.0}demand* {urn:jboss:bean-deployer:2.0}supply* {urn
    :jboss:bean-deployer:2.0}install* {urn:jboss:bean-deployer:2.0}uninstall* {urn:jboss:bean-deployer:2
    .0}incallback* {urn:jboss:bean-deployer:2.0}uncallback*
         at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler
    .java:449)
         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossX
    BParser.java:401)
         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
         at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
    
    
    

     

    The error occurs because of some xml files, shipped in the AS, which are not following the xsd element order. The issue is being tracked through https://jira.jboss.org/jira/browse/JBAS-6744

     

    Workaround

    Pass the

    -Dxb.builder.useUnorderedSequence=true     

    Java system property, while starting the server. This already done in the run.sh/run.bat script files shipped in the AS. However, the IDE (and other tools), usually bypass these script files while starting the server. Depending on which IDE you use, you will have to appropriately configure it to pass this parameter.

     

    For Eclipse/WTP users, please follow this forum post http://www.jboss.org/index.html?module=bb&op=viewtopic&t=155252 where Wolfgang Knauf has provided an Eclipse plugin to handle this.