4 Replies Latest reply on Aug 23, 2006 5:20 PM by Duran David

    Syntax Error in jboss.xml???

    hbothmer Newbie

      Hi!

      I am using XDoclet to generate my EJBs. When I deloy the jar I get the message:

      13:29:40,950 ERROR [XmlFileLoader] failed to load jboss.xml. There could be a syntax error.
      org.jboss.deployment.DeploymentException: Error in jboss.xml for Bean AuftragsverwaltungsFassade: resource-env-ref jdbc/CodisDatasource found in jboss.xml but not in ejb-jar.xml
      at org.jboss.metadata.ApplicationMetaData.importJbossXml(ApplicationMetaData.java:764)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:175)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:436)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:778)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:778)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)



      My jboss.xml looks like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">



      <enterprise-beans>

      <!--
      To add beans that you have deployment descriptor info for, add
      a file to your XDoclet merge directory called jboss-beans.xml that contains
      the , and <message-driven></message-driven>
      markup for those beans.
      -->


      <ejb-name>Transporteur</ejb-name>
      <local-jndi-name>Transporteur</local-jndi-name>



      <ejb-name>Frachtbrief</ejb-name>
      <local-jndi-name>Frachtbrief</local-jndi-name>




      <ejb-name>AuftragsverwaltungsFassade</ejb-name>
      <jndi-name>AuftragsverwaltungsFassade</jndi-name>
      <local-jndi-name>AuftragsverwaltungsFassadeLocal</local-jndi-name>
      <resource-env-ref>
      <resource-env-ref-name>jdbc/CodisDatasource</resource-env-ref-name>
      <jndi-name>CodisDatasource</jndi-name>
      </resource-env-ref>


      </enterprise-beans>

      <resource-managers>
      </resource-managers>






      I searched the forum and tried anything that looked even close to my problem but I cannot get it to work.

      Any help is greatly appreciated!!!!!

      Holger
      mailto:holger.bothmer@dbh.de

        • 1. Re: Syntax Error in jboss.xml???
          Adrian Brock Master

          Like it says, you have no resource-env-ref with than name in ejb-jar.xml

          • 2. Re: Syntax Error in jboss.xml???
            hbothmer Newbie

            Adrian,

            thanks for your answer. But it is not that easy. The ejb-jar.xml does have the ressource-env-ref. See first few lines of ejb-jar.xml are:


            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

            <ejb-jar >

            <![CDATA[No Description.]]>
            <display-name>Generated by XDoclet</display-name>

            <enterprise-beans>

            <!-- Session Beans -->

            <![CDATA[----------------------------------------------------------- Dies ist ein XSLT-generierter Sourcecode Verwendete Schablone: XDocFacade.xsl Quelldokument: AuftragsverwaltungsFassade.xml erzeugt von: hbo am: 28.05.2004 14:18 -----------------------------------------------------------]]>
            <display-name>AuftragsverwaltungsFassade</display-name>

            <ejb-name>AuftragsverwaltungsFassade</ejb-name>

            de.dbh.codis.auftrag.ejb.AuftragsverwaltungsFassadeRemoteHome
            de.dbh.codis.auftrag.ejb.AuftragsverwaltungsFassadeRemote
            <local-home>de.dbh.codis.auftrag.ejb.AuftragsverwaltungsFassadeLocalHome</local-home>
            de.dbh.codis.auftrag.ejb.AuftragsverwaltungsFassadeLocal
            <ejb-class>de.dbh.codis.auftrag.ejb.AuftragsverwaltungsFassadeBean</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Container</transaction-type>

            <resource-ref >
            <res-ref-name>jdbc/CodisDatasource</res-ref-name>
            <res-type>javax.sql.Datasource</res-type>
            <res-auth>Container</res-auth>
            </resource-ref>




            And to make things worse: When I delete the ressource-env-ref in jboss.xml I still get the error message (950 ERROR [XmlFileLoader] failed to load jboss.xml. There could be a syntax error. ).

            It must be something else I guess.

            Holger

            • 3. Re: Syntax Error in jboss.xml???
              Kabir Khan Master

              resource-ref and resource-env-ref are different :-)

              • 4. Re: Syntax Error in jboss.xml???
                Duran David Newbie

                Hi every body, while reading the jboss forum, i see that Holger had the same problem as i have now, and i ask you if it's possible to help me to resolve this error for my application :

                21:18:40,525 INFO [EJBDeployer] Deployed: file:/C:/Library/JBoss/jboss-4.0.2/server/default/deploy/MyStore.jar
                21:18:41,386 ERROR [XmlFileLoader] failed to load jboss.xml. There could be a syntax error.
                org.jboss.deployment.DeploymentException: Error in jboss.xml for Bean EixploreAccess: ejb-local-ref ejb/TermSourceLocal found in jboss.xml but not in ejb-jar.xml

                Thanks in advance.
                Abderrahmane,