facebook

"No object bound to name" Problem – Sun Applicatio

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #242103 Reply

    lrstreets
    Member

    I’m having problems using a Local Session EJB deployed to the Sun Application Server. Specifically, when I attempt to do a JNDI lookup of the bean, I get the error:

    No object bound to name java:comp/env/ejb/admin/quicktravelsystem/Login

    The relevent entries in my sun-ejb-jar.xml file are:
    <ejb>
    <ejb-name>Login</ejb-name>
    <jndi-name>ejb/admin/quicktravelsystem/Login</jndi-name>
    </ejb>

    The relevant entries in my ejb-jar.xml are:
    <session >
    <description><![CDATA[Description for Login]]></description>
    <display-name>Name for Login</display-name>

    <ejb-name>Login</ejb-name>

    <local-home>quicktravelsystem.admin.interfaces.LoginLocalHome</local-home>
    <local>quicktravelsystem.admin.interfaces.LoginLocal</local>
    <ejb-class>quicktravelsystem.admin.ejb.LoginSession</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>

    </session>

    I have tried the following call ways of looking up the bean, all without luck (each prefaced with Context ctx = new InitialContext();):

    LoginLocalHome loginLocalHome = (LoginLocalHome) ctx.lookup(“java:comp/ejb/admin/quicktravelsystem/Login”);
    LoginLocalHome loginLocalHome = (LoginLocalHome) ctx.lookup(“java:comp/env/ejb/admin/quicktravelsystem/Login”);
    LoginLocalHome loginLocalHome = (LoginLocalHome) ctx.lookup(“java:comp/env/ejb/Login”);
    LoginLocalHome loginLocalHome = (LoginLocalHome) ctx.lookup(“Login”);

    I suspect that the poblem is context related (I have also tried obtaining the context from the System.getContext() call, but that resulted in security problems). Is the problem a lack of definition of some property in the sunone ejbdoclet for the EJB project (EJB project | Properties | MyEclipse-XDoclet)? The tutorial was clear about the necessary inclusions for jboss, but not for other app servers (such as Sun’s).

    Thanks in advance!

    #242114

    lrstreets
    Member

    the problem seems to resolve itself if you modify the instructions found at:

    http://jakarta.apache.org/cactus/writing/howto_ejb_j2eeri.html

    (use xdoclet markup in xxxEJB.java to create
    <ejb-ref>
    <ejb-ref-name>ejb/Converter</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>org.apache.cactus.sample.ejb.ConverterHome</home>
    <remote>org.apache.cactus.sample.ejb.Converter</remote>
    </ejb-ref> for insertion into the web.xml)
    Now….why does that work…..

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: "No object bound to name" Problem – Sun Applicatio

You must be logged in to post in the forum log in