1 Reply Latest reply on Nov 20, 2007 8:55 AM by jaikiran

    standardjboss.xml configuration issue

    1javalovers

      Hello all,

      I have an enterprise archive deployed in my JBoss. This "ear" is having two "jar" files inside with individual "ejb-jar.xml" files for each of them. And I have configured an EJB reference in my "standardjboss.xml" to refer one of my EJBs to an enternal EJB running on a different JBoss server, as follows.

      <enterprise-beans>
       <session>
       <ejb-name>MyLocalEJB</ejb-name>
       <ejb-ref>
       <ejb-ref-name>ejb/MyRemoteEJB</ejb-ref-name>
       <jndi-name>jnp://192.118.18.4:1099/ejb/MyRemoteEJB</jndi-name>
       </ejb-ref>
       </session>
      </enterprise-beans>


      But this is showing the following error while starting the Jboss and not deploying my EJB.

      2007-11-11 12:12:21,734 ERROR [org.jboss.metadata.XmlFileLoader] failed to load standardjboss.xml. There could be a syntax error.
      org.jboss.deployment.DeploymentException: Error in jboss.xml for Bean MyLocalEJB: 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:158)
       at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:462)


      I doesn't have any "jboss.xml" file present anywhere in my enterprise archive file at all.

      Is there any requirement for JBoss that an EJB configured in "standardjboss.xml" should have an entry in all "ejb-jar.xml" files of the deploying enterprise archive ?

      My JBoss version is 3.2.7.

      I will be so thankful to you all for any type of help regarding this.

      With regards,
      Manoj.


        • 1. Re: standardjboss.xml configuration issue
          jaikiran

           

          "1javaloverS" wrote:
          And I have configured an EJB reference in my "standardjboss.xml" to refer one of my EJBs to an enternal EJB running on a different JBoss server, as follows.

          <enterprise-beans>
           <session>
           <ejb-name>MyLocalEJB</ejb-name>
           <ejb-ref>
           <ejb-ref-name>ejb/MyRemoteEJB</ejb-ref-name>
           <jndi-name>jnp://192.118.18.4:1099/ejb/MyRemoteEJB</jndi-name>
           </ejb-ref>
           </session>
          </enterprise-beans>



          You will have to add that stuff to a jboss.xml file and package it in your application. The jboss.xml has to be placed at the same place as the ejb-jar.xml file. Undo the changes that you have done to the standardjboss.xml because that file is meant for the entire application server. Your jboss.xml should look like:

          <?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">
          
          <jboss>
          
           <enterprise-beans>
           <session>
           <ejb-name>MyLocalEJB</ejb-name>
           <ejb-ref>
           <ejb-ref-name>ejb/MyRemoteEJB</ejb-ref-name>
           <jndi-name>jnp://192.118.18.4:1099/ejb/MyRemoteEJB</jndi-name>
           </ejb-ref>
           </session>
          </enterprise-beans>
          
          </jboss>