1 Reply Latest reply: Aug 10, 2012 3:10 AM by gimbal2 RSS

    Why aren't my EJBs getting created?

    649509
      Hi,

      I'm using JBoss 4.2.3.GA (can't change that at the moment). I have a WAR file and within its WEB-INF/lib directory, I have a bunch of JARs. One JAR contains a META-INF/ejb-jar.xml file with this snippet ...
      <?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 id="ejb-jar_1">
      
         <description><![CDATA[No Description.]]></description>
         <display-name>Generated by XDoclet</display-name>
      
         <enterprise-beans>
      
            <!-- Session Beans -->
            <session id="Session_myprojectStandardManager">
               <description><![CDATA[Session EJB wrapper for myprojectStandardManager <p> This is the implementation class for the myproject Standard Manager.]]></description>
      
               <ejb-name>myprojectStandardManager</ejb-name>
      
               <home>myprojectx.skills.myprojectStandardManagerHome</home>
               <remote>myprojectx.skills.myprojectStandardManager</remote>
               <local-home>myprojectx.skills.myprojectStandardManagerLocalHome</local-home>
               <local>myprojectx.skills.myprojectStandardManagerLocal</local>
               <ejb-class>myprojectx.skills.myprojectStandardManagerEJB</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Container</transaction-type>
      
            </session>
            ...
      Sadly, when in my controller, looking up this EJB fails with the exception "javax.naming.NameNotFoundException: myprojectStandardManager not bound". What other configurations do I need to do to make my EJBs valid? Thanks, -
        • 1. Re: Why aren't my EJBs getting created?
          gimbal2
          You use the proper JNDI name, which is either 'EjbModuleName/EjbHomeName' or 'EarModuleName/EjbModuleName/EjbHomeName'. Or the remote variant of course. All standard and documented in hundreds of places, including the JBoss documentation.

          The declaration is a bit of a mess by the way, I'm not too familiar with the ejb-jar descriptor but I get the idea that there is EJB 2 and EJB 3 stuff mixed in there.


          And by the way: you do know that JBoss has wonderful forums where people using this technology visit, right?

          https://community.jboss.org/en/jbossas?view=discussions

          I'm silly like that, but I find it useful to ask questions about a specific product where other users are likely to go.