I am using the following versions of the softwares
JDK : j2sdk1.4.2_04
JBOSS: jboss-4.0.2
Eclipse: 3.0.1
JBossIDE eclipse Plugin: 1.4.1.e30

I've created a EJB project. Created a session bean and deployed the project in 
jboss. When I'm calling the session bean from the servlet it is giving the 
following error:
javax.naming.NameNotFoundException: ejb not bound

The call from the servlet is like this:

Context context = new InitialContext();
object ref = context.lookup("java:comp/env/ejb/Calculator");
home = (CalculatorHome) PortableRemoteObject.narrow(ref,CalculatorHome.class);


following is the ejb-jar.xml

<ejb-jar >

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

   <enterprise-beans>

      <!-- Session Beans -->
      
         <![CDATA[Description for Calculator]]>
         <display-name>Name for Calculator</display-name>

         <ejb-name>Calculator</ejb-name>

         edu.coned.uah.interfaces.CalculatorHome
         edu.coned.uah.interfaces.Calculator
         <ejb-class>edu.coned.uah.ejb.CalculatorSession</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>

      
    </enterprise-beans>
   <assembly-descriptor >
   </assembly-descriptor>
</ejb-jar>



The jboss.xml is :



   <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>Calculator</ejb-name>
         <jndi-name>ejb/Calculator</jndi-name>

      

   </enterprise-beans>

   <resource-managers>
   </resource-managers>





When I'm calling the home of the ejb from a main method of a Java Application 
program, It is working fine.



Can any one please help me out ? it is very important



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885387#3885387

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885387


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to