3 Replies Latest reply on Mar 17, 2008 12:16 PM by Andrew Rubinger

    [JBoss 5.0.0.Beta4] JBossXBException: Failed to parse source

    Mathias Arens Newbie

      I am trying to deploy an ejb3 application to JBoss 5.0.0.Beta4.

      One of my ejb3 jars has a META-INF/jboss.xml with the following root tag:

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.jboss.org/j2ee/schema
       http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
       version="5.0">
      


      If I deploy the ear I get the following error:


      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Element {http://java.sun.com/xml/ns/javaee}jboss is not bound as a global element.
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:193)
      at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:153)
      at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:120)
      at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:86)

      Trying to remove the xml namespace attributes from the jboss tag didn't help. Then I get a similar resource-ref exception.

      I tried to modify the conf/jax-ws-catalog.xml but it didn't find a solution so far. Or is there a way to disable xml validation?

        • 1. Re: [JBoss 5.0.0.Beta4] JBossXBException: Failed to parse so
          Andrew Rubinger Master

          From our testsuite:

          <jboss
           xmlns="http://www.jboss.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
           http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
           version="3.0">


          Try this one?

          S,
          ALR

          • 2. Re: [JBoss 5.0.0.Beta4] JBossXBException: Failed to parse so
            Mathias Arens Newbie

            I am sorry but it doesn't seem to help. Now I get the following error:


            16:42:51,243 WARN [CollectionPropertyHandler] ClassInfo.getDeclaredConstructor(null) didn't work for org.jboss.metadata.ejb.spec.InterceptorClassesMetaData, found the default ctor in ClassInfo.getDeclaredConstructors()
            16:42:52,664 ERROR [AbstractKernelController] Error installing to Parse: name=vfsfile:/C:/applications/jboss-5.0.0.Beta4/server/default/deploy/core-ear-0.3-SNAPSHOT.ear state=Not Installed mode=Manual requiredState=Parse
            org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfsfile:/C:/applications/jboss-5.0.0.Beta4/server/default/deploy/core-ear-0.3-SNAPSHOT.ear/core-riskengine-0.3-SNAPSHOT.jar
            at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
            at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:232)
            at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:199)
            at org.jboss.deployment.JBossEjbParsingDeployer.createMetaData(JBossEjbParsingDeployer.java:105)
            at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:162)
            at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
            at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
            at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:906)
            at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
            at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
            at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
            at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
            at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
            at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
            at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
            at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
            at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:246)
            at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:131)
            at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:408)
            at org.jboss.Main.boot(Main.java:208)
            at org.jboss.Main$1.run(Main.java:534)
            at java.lang.Thread.run(Thread.java:595)
            Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: QName {http://www.jboss.com/xml/ns/javaee}resource-ref error adding org.jboss.metadata.javaee.spec.ResourceReferenceMetaData@15b5219 to collection org.jboss.metadata.javaee.spec.ResourceReferencesMetaData@6b258d
            at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:193)
            at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:153)
            at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:120)
            at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:86)
            at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:223)
            ... 22 more
            Caused by: java.lang.RuntimeException: QName {http://www.jboss.com/xml/ns/javaee}resource-ref error adding org.jboss.metadata.javaee.spec.ResourceReferenceMetaData@15b5219 to collection org.jboss.metadata.javaee.spec.ResourceReferencesMetaData@6b258d
            at org.jboss.xb.builder.runtime.CollectionPropertyHandler.handle(CollectionPropertyHandler.java:154)
            at org.jboss.xb.builder.runtime.AbstractPropertyHandler.doHandle(AbstractPropertyHandler.java:98)
            at org.jboss.xb.builder.runtime.BeanHandler.setParent(BeanHandler.java:197)
            at org.jboss.xb.binding.group.ValueListHandler$FACTORY$1.newInstance(ValueListHandler.java:401)
            at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endRepeatableParticle(SundayContentHandler.java:853)
            at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:221)
            at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.endElement(SaxJBossXBParser.java:379)
            at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
            at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
            at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
            at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:189)
            ... 26 more
            Caused by: java.lang.IllegalArgumentException: No resource ref name
            at org.jboss.metadata.javaee.support.AbstractMappedMetaData.add(AbstractMappedMetaData.java:119)
            at org.jboss.metadata.javaee.support.AbstractMappedMetaData.add(AbstractMappedMetaData.java:37)
            at org.jboss.xb.builder.runtime.CollectionPropertyHandler.handle(CollectionPropertyHandler.java:150)
            ... 43 more

            I reinstalled JBoss-5.0.0.Beta4 again to make sure that I have a clean installation. I also ran JBoss with different JDKs (5u13 and 6u5). But I get always the same error. I also tried JBoss 5.0.0.Beta3 but I got the same error with JDK5u13.

            Is there a way to disable xml validation?



            • 3. Re: [JBoss 5.0.0.Beta4] JBossXBException: Failed to parse so
              Andrew Rubinger Master

              Looks like that *did* help, but you're a couple errors deep. :)

              Caused by: java.lang.IllegalArgumentException: No resource ref name


              Please check your XML against the expected schema. Turning off XML validation isn't the answer; your jboss.xml must be in expected form.

              S,
              ALR