Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-803

Deployment of JavaEE5 application client fails if element "application-client" has attribute "id"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • AS 4.2.0 GA
    • EJB 3.0 RC9 - FD
    • None
    • None

    Description

      I copied the following ear file to the deploy directory of the default configuration and restarted the server: http://www.informatik.fh-wiesbaden.de/~knauf/SWTVertiefung2006/stateless/Stateless.ear
      (Works fine with JBoss 4 + EJB3)

      It did not deploy with this error in server.log:

      2006-11-21 20:26:44,562 DEBUG [org.jboss.ejb3.deployers.AppClientParsingDeployer] Found application-client.xml file: jar:file:/C:/Temp/jboss-5.0.0.Beta1/server/default/deploy/Stateless.ear!/StatelessClient.jar
      2006-11-21 20:26:44,921 ERROR [org.jboss.ejb3.deployers.AppClientParsingDeployer] Error during deployment: jar:file:/C:/Temp/jboss-5.0.0.Beta1/server/default/deploy/Stateless.ear!/StatelessClient.jar
      org.jboss.deployers.spi.DeploymentException: Error parsing meta data Stateless.ear/StatelessClient.jar/META-INF/application-client.xml
      at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
      at org.jboss.deployers.plugins.deployers.helpers.ObjectModelFactoryDeployer.parse(ObjectModelFactoryDeployer.java:87)
      at org.jboss.deployers.plugins.deployers.helpers.AbstractParsingDeployer.parse(AbstractParsingDeployer.java:145)
      at org.jboss.deployers.plugins.deployers.helpers.AbstractParsingDeployer.createMetaData(AbstractParsingDeployer.java:112)
      at org.jboss.deployers.plugins.deployers.helpers.AbstractParsingDeployer.createMetaData(AbstractParsingDeployer.java:88)
      at org.jboss.ejb3.deployers.AppClientParsingDeployer.deploy(AppClientParsingDeployer.java:61)
      at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.java:52)
      at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:145)
      at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:440)
      at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:381)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:366)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.bootstrap(ProfileServiceBootstrap.java:246)
      at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
      at org.jboss.system.server.profileservice.ServerImpl.doStart(ServerImpl.java:401)
      at org.jboss.system.server.profileservice.ServerImpl.start(ServerImpl.java:340)
      at org.jboss.Main.boot(Main.java:210)
      at org.jboss.Main$1.run(Main.java:508)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: jar:file:/C:/DOCUME~1/.../LOCALS~1/Temp/nestedjar62569.tmp!/META-INF/application-client.xml@5,116
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:164)
      at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:180)
      at org.jboss.deployers.plugins.deployers.helpers.ObjectModelFactoryDeployer.parse(ObjectModelFactoryDeployer.java:83)
      ... 16 more
      Caused by: java.lang.IllegalArgumentException: id
      at org.jboss.ejb3.metamodel.ApplicationClientDDObjectFactory.newRoot(ApplicationClientDDObjectFactory.java:137)
      at org.jboss.xb.binding.DelegatingObjectModelFactory.newRoot(DelegatingObjectModelFactory.java:70)
      at org.jboss.xb.binding.ObjectModelBuilder.startElement(ObjectModelBuilder.java:309)
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:323)
      at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
      at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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:160)
      ... 18 more

      application-client.xml looks like this:
      <?xml version="1.0" encoding="UTF-8"?>
      <application-client id="Application-client_ID" version="5"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
      <display-name>StatelessClient</display-name>
      <ejb-ref>
      <ejb-ref-name>ejb/GeometricModel</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <!-- A senseless "home" item is needed, otherwises JBoss would complain...-->
      <home>java.lang.Object</home>
      <remote>de.fhw.swtvertiefung.knauf.stateless.GeometricModel</remote>
      </ejb-ref>
      </application-client>

      The ID attribute is valid, "application-client_5.xsd" defines this:

      <xsd:complexType name="application-clientType">
      <xsd:sequence>
      <xsd:group ref="javaee:descriptionGroup"/>
      ....

      <xsd:attribute name="id" type="xsd:ID"/>
      </xsd:complexType>

      By the way: the ID attribute is autogenerated by Eclipse/WebToolsPlatform (the above project was converted from Java2EE 1.4).

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-cdewolf Carlo de Wolf
              rhn-engineering-cdewolf Carlo de Wolf
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: