EJB Reference Not In IntitialContext

I have a jsp which accesses a stateless session bean which in turn accesses an entity bean.
The reference to the session bean is in the initial context but the entity bean reference is not (I have printed out the entire initial context to verify this).
When I deploy the application it does say that it is binding both the session bean and the entity bean.
(ie. binding "java:comp/env/ejb/<Name>" for both)
Any ideas as to why the ejb reference doesn't exist in the initial context?
FYI: I am using the J2EE app server and the deploy tool. I have checked the xmls and there is an ejb-ref in it for the entity bean.

You should say wheter the entity bean is referenced by the session bean, that is, in the deploytool:
1) select the session bean.
2) select the EJB Refs tab.
3) enter "ejb/YourEntityBean", "Entity" and the interfaces used. "ejb/YourEntityBean" should be as appears in your session bean code.
4) select the EJB jar. (the beans owner)
5) in the JNDI tab you will see this new entry in "References", here you put the JNDI name of your bean as appears bellow in "EJBs"

Similar Messages

  • EJB reference not bound

    I'm running JBoss 3.0.1 with Tomcat 4.0.4 bundle. I have successfully deployed a EJB to Jboss and created 2 clients (java & JSP client).
    For some reasons, I'm able to run the java client but when I try the JSP client (served by Tomcat) I get this error message
    javax.servlet.ServletException: Name greetings is not bound in this Context
    Below is the code for the 2 clients & web.xml
    <----------- jsp client -------------->
    <%@ page import="javax.naming.*,
    java.util.*,
              java.util.Hashtable,
              javax.rmi.PortableRemoteObject,
    com.stardeveloper.ejb.session.*"%>
    <%
    long t1 = System.currentTimeMillis();
    InitialContext ctx = new InitialContext();
    Object ref = ctx.lookup("ejb/First");
    FirstHome home = (FirstHome) PortableRemoteObject.narrow (ref, FirstHome.class);
    First bean = home.create();
    String time = bean.getTime();
    bean.remove();
    ctx.close();
    long t2 = System.currentTimeMillis();
    %>
    <html>
    <head>
    <style>p { font-family:Verdana;font-size:12px; }</style>
    </head>
    <body>
    <p>Message received from bean = "<%= time %>".<br>Time taken :
    <%= (t2 - t1) %> ms.</p>
    </body>
    </html>
    <----------- java client ------------->
    import javax.naming.*;
    import com.stardeveloper.ejb.session.*;
    import java.util.Hashtable;
    import javax.rmi.PortableRemoteObject;
    import com.stardeveloper.ejb.session.*;
    class firstEJBclient {
         public static void main(String[] args) {
              try {
                   long t1 = System.currentTimeMillis();
                   InitialContext ctx = new InitialContext();
                   System.out.println("Got CONTEXT");
                   Object ref = ctx.lookup("ejb/First");
                   System.out.println("Got REFERENCE");
                   FirstHome home = (FirstHome) PortableRemoteObject.narrow (ref, FirstHome.class);
                   First bean = home.create();
                   String time = bean.getTime();
                   bean.remove();
                   ctx.close();
                   long t2 = System.currentTimeMillis();
                   System.out.println("Message received from bean = "+time+" Time taken : "+(t2 - t1)+" ms.");
              catch (Exception e) {
                   System.out.println(e.toString());
    <----------------- web.xml -------------------->
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <session-config>
    <session-timeout>
              1800
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
              firstEJB2.jsp
    </welcome-file>
    </welcome-file-list>
    <ejb-ref>
         <description>A reference to an entity bean</description>
         <ejb-ref-name>ejb/First</ejb-ref-name>
         <ejb-ref-type>Stateless</ejb-ref-type>
         <home>com.stardeveloper.ejb.session.FirstHome</home>
         <remote>com.stardeveloper.ejb.session.First</remote>
    </ejb-ref>
    </web-app>
    Why is it not bound?

    Please Ignore my other Message(My META-INF was not in Root and now I am able to get my beans bound).
    I am using Jboss 3.0
    I am able to access service of my HelloWorld Session Bean through a jsp.
    But not able to do so using a java client.
    my directory structure is :
    com\ideas\users\<Bean classes(Remote Interface,home interface,Bean)>
    com\ideas\users\<Bean client(a java client)>
    My java client program is :
    import javax.rmi.*;
    import javax.naming.*;
    import java.util.*;
    import com.ideas.users.*;
    public class HelloWorld {
    public static void main( String args[]) {
    try{
    Properties p = new Properties();
              p.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
              p.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
              p.put("java.naming.provider.url","localhost");
              InitialContext ctx = new InitialContext(p);
              //Lookup the bean using it's deployment id
              Object obj = ctx.lookup("users/Hello");
    //Be good and use RMI remote object narrowing
    //as required by the EJB specification.
    HelloHome ejbHome = (HelloHome) PortableRemoteObject.narrow(obj,HelloHome.class);
    //Use the HelloHome to create a HelloObject
    Hello ejbObject = ejbHome.create();
    //The part we've all been wainting for...
    String message = ejbObject.sayHello();
    //A drum roll please.
    System.out.println( " run successfully and message is :" + message);
    } catch (Exception e){
    e.printStackTrace();
    I am able to compile but when i try to Run I get the following error message
    javax.naming.CommunicationException. Root exception is java.lang.ClassNotFoundException: org.jboss.proxy.ClientContainer (no security manager: RMI class loader disabled)
    at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
    at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
    at java.io.ObjectInputStream.inputClassDescriptor(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at java.io.ObjectInputStream.inputObject(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at java.io.ObjectInputStream.inputClassFields(Unknown Source)
    at java.io.ObjectInputStream.defaultReadObject(Unknown Source)
    at java.io.ObjectInputStream.inputObject(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at java.rmi.MarshalledObject.get(Unknown Source)
    at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:30)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:449)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:429)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at HelloWorld.main(HelloWorld.java:25)
    Please help me out .
    Thanks in advance
    Sujith

  • Ejb reference not bound when calling a stateless bean in jboss

    hi there !
    i am trying to deploy a simple stateless session bean in Jboss3.0.4_tomcat-4.1.12
    my bean is successfully deployed but when it is looked up in a jsp i am getting an exception as below :
    javax.naming.NameNotFoundException ejb not bound
    my ejb-jar.xml is as follows :
    <session>
    <display-name>FirstEJB</display-name>
    <ejb-name>First</ejb-name>
    <home>com.ejb.session.FirstHome</home>
    <remote>com.ejb.session.First</remote>
    <ejb-class>com.ejb.session.FirstEJB</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    jboss.xml is as follows:
    <jboss>
    <enterprise-beans>
    <session>
    <ejb-name>First</ejb-name>
    <jndi-name>ejb/First</jndi-name>
    </session>
    </enterprise-beans>
    </jboss>
    my jsp is as follows :
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
    props.put(Context.PROVIDER_URL,"localhost:1099");
    props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces" );
    props.put("java.naming.rmi.security.manager","yes");
    Context ctx = new InitialContext(props);
    System.out.println("Before LookUp");
    FirstHome home = (FirstHome)ctx.lookup("session.First");
    System.out.println("LookUp Successfull");
    First bean = home.create();
    Can anyone fix this ?
    Thanx in Advance

    Hi,
    hi Vicky !
    thanx again for ur response.
    i created a Demo.jar file as u said.
    and now where should i place my JSP ?
    first i will tell u my folder structure
    <jboss-home>/server/default/deploy/index.war
    index.war has the following
    firstEJB.jsp
    Web-inf/web.xml
    Web-inf/jboss-web.xml
    Web-inf/lib/First.jar
    First.jar file has my home , remote , bean classes.
    and ejb-jar.xml and jboss.xml files
    web.xml has the <welcome-file-list>
    jboss-web.xml has the <context-root>/</context-root>
    plz tell me where i have messed up my code.
    i have created the Demo.jar file now as u said.
    so plz tell me where should i place my jsp file.
    thanx
    lakshmi
    Since your application is having the jsp and ejb hence the deployment should be done as per the J2EE specification, where you have
    1)web-module
    2)ejb-module
    3)appliction-client module
    4)JCA(It is included in J2EE1.3+)
    Now follow the following steps:
    1)Demo.ear folder
    2)Create META-INF/application.xml
    3)Put your Demo.war and Demo.jar in Demo.ear
    4)Demo.jar and Demo.war should be as expalined earlier.Also no need to place the ejb related classes in the WEB-INF/lib of Demo.war.
    5)Write the following contents in the applicaiton.xml
    <?xml version="1.0"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
    <application>
         <display-name>Project</display-name>     
         <module>
         <ejb>
         Demo.jar
         </ejb>
         </module>     
         <module>
              <web>
                   <web-uri>Demo.war</web-uri>
                   <context-root>/demo</context-root>
              </web>
         </module>
    </application>
    6)You can create the compressed form of ear or keep it exploded in the Jboss/server/default/Demo.ear
    7)Note the console for the results of deplotment
    8)call http://localhost:8080/demo/yourjsp.jsp
    Hope now I have explained in the detail and it should work now.
    Regards
    Vicky

  • Could not lookup PortalManagerHome in the JNDI tree using EJB reference java:comp/env/ejb/PortalManager

    Hi
    I am just a starter on WLPortal.
    I have created a barebone Application from scratch. I have synchronized it properly
    from EBCC to WLP. But When I am trying to access the home page of my application,
    I am getting from stack trace -
    <Nov 6, 2002 5:37:59 PM IST> <Error> <PortalAppflow> <Could not lookup PortalManagerHome
    in the JNDI tree using EJB reference java:comp/env/ejb/PortalManager.
    javax.naming.NameNotFoundException: Unable to resolve comp/env/ejb/PortalManager
    Resolved: 'comp/env' Unresolved:'ejb' ; remaining name 'PortalManager'
    at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:802)
    at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:209)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:173)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:181)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:181)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:36)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:124)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at com.bea.p13n.util.JndiHelper.lookupNarrow(JndiHelper.java:96)
    at com.bea.portal.appflow.PortalAppflowHelper.<clinit>(PortalAppflowHelper.java:64)
    at com.bea.portal.appflow.servlets.internal.PortalWebflowServlet.init(PortalWebflowServlet.java:78)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:700)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:643)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:588)
    at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:368)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:215)
    at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:112)
    at jsp_servlet.__index._jspService(__index.java:92)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:304)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2459)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    >
    <Nov 6, 2002 5:37:59 PM IST> <Error> <HTTP> <[WebAppServletContext(19695286,FirstWebApp,/FirstWebApp)]
    Servlet failed with Exception
    java.lang.NullPointerException:
    at com.bea.portal.appflow.PortalAppflowHelper.createPortalManager(PortalAppflowHelper.java:82)
    at com.bea.portal.appflow.servlets.internal.PortalWebflowServlet.setupPortalRequest(PortalWebflowServlet.java:187)
    at com.bea.portal.appflow.servlets.internal.PortalWebflowServlet.doGet(PortalWebflowServlet.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:215)
    at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:112)
    at jsp_servlet.__index._jspService(__index.java:92)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:304)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2459)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    When I decompiled the class PortalAppflowHelper, I found a static block in it,
    which was as under-
    static
    debug = Debug.getInstance(com.bea.portal.appflow.PortalAppflowHelper.class);
    try
    if(debug.ON)
    debug.out("Looking up PortalManagerHome using EJB reference java:comp/env/ejb/PortalManager");
    portalManagerHome = (PortalManagerHome)JndiHelper.lookupNarrow("java:comp/env/ejb/PortalManager",
    com.bea.portal.manager.ejb.PortalManagerHome.class);
    if(debug.ON)
    debug.out("Successfully retrieved PortalManagerHome " + portalManagerHome);
    catch(Exception e)
    PortalAppflowLogger.errorFindingPortalManagerHome("java:comp/env/ejb/PortalManager",
    e);
    I have checked the PortalManager's JNDI name on WLConsole. Its ${APPNAME}.BEA_portal.PortalManager.
    Should I change it?
    When I tried to change it, I started getting other weird errors.
    Thanks
    Neeraj Hans

    Neeraj -
    The Portal framework code (including PortalAppflowHelper) uses ejb
    references to find the PortalManager (and other EJBs) from servlets and
    taglibs; that is what is signified by the java:comp/env/... name.
    Since you built your webapp from scratch (instead of using the portal
    wizard), you will need to make sure the you have the appropriate
    <ejb-ref> entries in your web.xml, and the corresponding
    <ejb-reference-description> entries in your weblogic.xml. By default,
    you will need at least mappings for:
    - ejb/PortalManager
    - ejb/UserManager
    - ejb/GroupManager
    - ejb/PipelineExecutor
    - ejb/EventService
    See either the resulting webapp from using the portal wizard or
    BEA_HOME/weblogic700/samples/portal/sampleportalDomain/beaApps/sampleportal/sampleportal/WEB-INF
    for example syntax.
    Greg
    Neeraj Hans wrote:
    Hi
    I am just a starter on WLPortal.
    I have created a barebone Application from scratch. I have
    synchronized it properly
    from EBCC to WLP. But When I am trying to access the home page of my
    application,
    I am getting from stack trace -
    <Nov 6, 2002 5:37:59 PM IST> <Error> <PortalAppflow> <Could not lookup
    PortalManagerHome
    in the JNDI tree using EJB reference java:comp/env/ejb/PortalManager.
    javax.naming.NameNotFoundException: Unable to resolve
    comp/env/ejb/PortalManager
    Resolved: 'comp/env' Unresolved:'ejb' ; remaining name 'PortalManager'
    at <stack trace lines snipped>
    When I decompiled the class PortalAppflowHelper, I found a static
    block in it,
    which was as under-
    static
    debug =
    Debug.getInstance(com.bea.portal.appflow.PortalAppflowHelper.class);
    try
    if(debug.ON)
    debug.out("Looking up PortalManagerHome using EJB
    reference java:comp/env/ejb/PortalManager");
    portalManagerHome =
    (PortalManagerHome)JndiHelper.lookupNarrow("java:comp/env/ejb/PortalManager",
    com.bea.portal.manager.ejb.PortalManagerHome.class);
    if(debug.ON)
    debug.out("Successfully retrieved PortalManagerHome "
    + portalManagerHome);
    catch(Exception e)
    PortalAppflowLogger.errorFindingPortalManagerHome("java:comp/env/ejb/PortalManager",
    e);
    I have checked the PortalManager's JNDI name on WLConsole. Its
    ${APPNAME}.BEA_portal.PortalManager.
    Should I change it?
    When I tried to change it, I started getting other weird errors.
    Thanks
    Neeraj Hans

  • J2EE JNDI-00009 EJB Reference "ejb/SessionEJBCalled" could not be resolved

    When load (run) the following EJB (JDev 10.1.3.1.0 embedded server) loads with no problem:
    package project2;
    import javax.ejb.Stateless;
    @Stateless
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    When load the following, only difference is name attribute for the @Stateless annotation:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalled")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");    }
    Get the following error message - Why?
    2006-08-24 15:48:54.640 WARNING J2EE JNDI-00009 EJB Reference "ejb/SessionEJBCalled" could not be resolved. Allowing J2EEContext creation to continue anyway
    Finally - If I specify the name as per the following all is well:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalledBean")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    Would be appreciated if someone could tell me what is going on?
    Thanks - Ken

    When load (run) the following EJB (JDev 10.1.3.1.0 embedded server) loads with no problem:
    package project2;
    import javax.ejb.Stateless;
    @Stateless
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    When load the following, only difference is name attribute for the @Stateless annotation:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalled")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");    }
    Get the following error message - Why?
    2006-08-24 15:48:54.640 WARNING J2EE JNDI-00009 EJB Reference "ejb/SessionEJBCalled" could not be resolved. Allowing J2EEContext creation to continue anyway
    Finally - If I specify the name as per the following all is well:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalledBean")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    Would be appreciated if someone could tell me what is going on?
    Thanks - Ken

  • EJB Reference could not be resolved (javax.naming.NameNotFoundException)

    I am new to EJBs and am trying to get a simple Java client to run which I've generated from a EJB3.0 session bean.
    The code for the client (LoanAppFacadeClient.java) is
    package buslogic;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public class LoanAppFacadeClient {
    public static void main(String [] args) {
    try {
    final Context context = getInitialContext();
    LoanAppFacade loanAppFacade = (LoanAppFacade)context.lookup("java:comp/env/ejb/LoanAppFacade");
    // Call any of the Remote methods below to access the EJB
    // System.out.println( loanAppFacade.getLoans( ) );
    loanAppFacade.addLoan( "Galactic Loans", 30, "fixed", 6.25 );
    String ssn = "123-12-1234";
    System.out.println(loanAppFacade.getCreditRating( ssn ));
    } catch (Exception ex) {
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException {
    Hashtable env = new Hashtable();
    // Standalone OC4J connection details
    env.put( Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.naming.ApplicationClientInitialContextFactory" );
    env.put( Context.SECURITY_PRINCIPAL, "oc4jadmin" );
    env.put( Context.SECURITY_CREDENTIALS, "welcome1" );
    env.put(Context.PROVIDER_URL, "ormi://localhost:23791/LoanApp");
    return new InitialContext( env );
    When the trying to run the client I get a warning:
    "WARNING: EJB Reference "ejb/LoanAppFacade" could not be resolved."
    followed by the error
    "javax.naming.NameNotFoundException: java:comp/env/ejb/LoanAppFacade not found in Lab1_BusinessServices-app-client"
    When the client was created I right-clicked on the session bean (LoanAppFacadeBean which implements LoanAppFacade) and chose New Sample Java Client.
    This automatically creates the java client and also created the following xml file (application-client.xml)
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <application-client xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <display-name>Lab1_BusinessServices-app-client</display-name>
    <ejb-ref>
    <ejb-ref-name>ejb/LoanAppFacade</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <remote>buslogic.LoanAppFacade</remote>
    <ejb-link>LoanAppFacade</ejb-link>
    </ejb-ref>
    </application-client>
    Could someone please help me to fix these errors?
    Thanks,
    Andrew

    I used windows for years whereby I stored all photos in folders. As macs don't use this concept I am finding it hard to organize my photos.
    You can do this on your Mac too. Just don't use iPhoto. But iPhoto is a lot more flexible.
    For instance:
    I usually sort them by month so when I say move to an album I mean I create an album called for example '2013 March' so I can easily find specific photos/videos.
    Click on the Magnifying Glass lower left to reveal the search box. Then click on the magnifying glass in the search box, and select Date. Now you can instantly find all the photos from a particular month, or day.
    File -> New Smart Album will allow you to create an automatic album for any date or date range you choose.
    Select one of the affected videos in the iPhoto Window and go File -> Reveal in Finder -> Original. A Finder Window should open with the file selected. Does it play?

  • Ejb-link not working when i access ejb in different ear

    Hi All
    I am here trying to access ejb's which is in different ear, I am providing ejb-link inside web.xml of war file deployed inside deffirent ear file.
    I am using wls8.1sp5. I tried different combination with elb-link name , but its not working . <ejb-ref>
    <ejb-ref-name>ejb/AuditService</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.onstar.audit.ejb.AuditServiceHome</home>
    <remote>com.onstar.audit.ejb.AuditService</remote>
    <ejb-link>ccarenewal.jar#AuditService</ejb-link>
    </ejb-ref>
    <ejb-ref>
         <ejb-ref-name>ejb/AccountService</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <home>com.onstar.account.ejb.AccountServiceHome</home>
         <remote>com.onstar.account.ejb.AccountService</remote>
         <ejb-link>ccarenewal.jar#AccountService</ejb-link>
         </ejb-ref>
    Exception:weblogic.management.ApplicationException: activate failed for sbwo Module: sbwo Error: weblogic.management.DeploymentException: Could not setup environment - with nested exception: [weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'ccarenewal.jar#AuditService' declared in the ejb-ref or ejb-local-ref 'ejb/AuditService' in the application module 'accountadj.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.] weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'ccarenewal.jar#AuditService' declared in the ejb-ref or ejb-local-ref 'ejb/AuditService' in the application module 'accountadj.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct. at weblogic.deployment.EnvironmentBuilder.addEJBLinkRef(EnvironmentBuilder.java:658) at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:467) at weblogic.servlet.internal.CompEnv.init(CompEnv.java:123) at weblogic.servlet.internal.WebAppServletContext.activate
    I will appreciate any help.
    Rajiv

    Rob,
    Thanks for your reply.
    Below is all deployment descriptor entries i have(ejb-jar.xml, weblogic-ejb-jar.xml, web.xml, weblogic.xml)
    please correct me if i have wrong entries any where.
    ejb-jar.xml
    ejb-ref>
    <description />
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.onstar.account.ejb.AccountServiceHome</home>
    <remote>com.onstar.account.ejb.AccountService</remote>
    <ejb-link>AccountService</ejb-link>
    </ejb-ref>
    weblogic-ejb-jar.xml
    <ejb-reference-description>
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <jndi-name>cca/AccountService</jndi-name>
    </ejb-reference-description>
    web.xml
    <ejb-ref>
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.onstar.account.ejb.AccountServiceHome</home>
    <remote>com.onstar.account.ejb.AccountService</remote>
    <ejb-link>ccarenewal.jar#AccountService</ejb-link>
    </ejb-ref>
    weblogic.xml
    <ejb-reference-description>
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <jndi-name>cca/AccountService</jndi-name>
    </ejb-reference-description>
    I appreciate your help.
    Thanks
    Rajiv

  • Why to use EJB Reference

    hi all,
    when i have an enterprise application with a session bean and a webapp,
    i can access the session bean either over an ejb-reference in the webapp or directly access the jndi entry. what is the advantage of using ejb references? here an example of what i mean (both from within a webapp):
    ctx.lookup("myBean"); // without ejb ref
    ctx.lookup("java:comp/env/ejb/myRef"); // with ejb ref
    I get back the same, so whats the difference?
    rgds

    With ejb-reference a container optimizes access to collocated beans. For example, say you have a deployment where beans A and B are both replicated in two different containers, for performance and/or availability reasons. For optimal use every instance of A in container would use instances of B also in container one. Likewise for container two. An EJB container can enforce this locality constraint using ejb-links, but not always using direct JNDI names.

  • Passing EJB reference to other Thread

    Hi,
    If I have EJB reference, can I pass it to other thread safely?
    COM had concept of Apartments to handle thread problems and we had to marshal the interfaces if passed to another thread.
    What we do in EJB? Is there any concept like apartments that is hidden?
    Thanks,
    Unmesh

    Within the appserver, EJBs should not be doing anything with threads.
    If we are talking about an external app (ie: a client GUI) holding references, then yes these can be passed around between threads freely.

  • Caching EJB references

    Hi all,
    I was wondering if anyone could give me a conclusive explanation regarding the caching options for EJB objects(SLSB, and Entity Beans), both home/remote and localHome/local.
    I have read a lot of various EJB documentations including a fairly thorough look into the spec, and have about 2 years of practical expirience with EJBs.
    The matter that is still vague to me after all this time is the matter of caching and reusing EJB references. practical expirience and some documentation lead me to believe that caching an EJB reference of any kind is hazardous. From what I saw the spec never adresses this issue in a straightforward conclusive manner. It does discuss some failover scenarios and the use of EJB handles as both optionally a persistent reference and a "long living" refernce, but never in a context that is "spec mandatory" and "encapsulates" the whole picture.
    Now, there is no fundamental difference between caching a reference or using one that is locally scoped in a single method, except the time it is expected to be "alive", which is, by definition, a relative and unmeasurable matter.
    Theoretically, I am sure there is no problem implementing references, which are actually client "proxies", stubs, in a way that will not be dependent of an exact instance, but rather on an abstract EJB ID(which may indeed cause a performance overhead).
    Anyway, I don't want to get into implementation details, I am simply looking for a clear explanation about the matter of "long living" references, and what is mandatory by EJB specification.
    Thanks for any insights....
    I also crossposted to EJB forum -> http://forum.java.sun.com/thread.jsp?forum=13&thread=538526&tstart=0&trange=15

    A locally scoped reference is only on the stack while the cached reference is on the heapOf course, but in the context of what I'm talking about here, that doesn't really matter. The point is that in both cases there is a reference to an EJB object/home, that is used for a longer/shorter time.
    I think the main reason for not caching the references is that is interfere's with the server's ability to manage it's resources. OK, sounds reasonable enough. So why doesn't the specification provide clear rules, even restrective ones that say no caching can be applied? Looks to me as if it would be safe to say that home objects for example are safe to cache working with any EJB server as long as the EJB server isn't restarted. Why isn't it written anywhere?
    It always refers to Handles as "long living" references. How can one measure "long"?
    Now, I may have gotten the wrong picture. Maybe there are some widely agreed issues on this matter, for example that caching SLSB as you've mentioned, and home objects is always safe in the scope of an EJB server life time(from the point in which it starts to the point it goes down).
    The thing is, where ever I looked I saw different strategies, and never it was clear what exactly they came to solve. For instance, an EJBHome service locator that caches the home object as is, vs. a service locator that caches the home handle.

  • External ejb reference error

    Again WLS 8.1 SP1
    i write by hand the weblogic.xml descriptor with the reference information for
    an external ejb and im sure it's correct, but when i try to compile it with appc
    it fails with this exception
    Element "<ejb-jar>" with ejb-ref-name "xyz" must either specify a valid ejb-link
    element or have corresponding ejb-reference-descriptor element in weblogic.xml
    with a valid jndi-name.
    This is my reference in weblogic.xml file
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>CnCargaFacade</ejb-ref-name>
    <jndi-name>ejb.CnCargaFacade</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    of this web.xml
    <ejb-ref>
    <ejb-ref-name>CnCargaFacade</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>load.ejb.CnCargaFacadeHome</home>
    <remote>load.ejb.CnCargaFacade</remote>
    </ejb-ref>
    This is not only if a try to use appc (which is not really necesary) but the error
    is also when i try to deploy the application on my server.
    Is this a Bug?? i thik it is, or where i'm wrong
    Thanks

    I believe it will solve both. In this case, appc and the server are
    sharing some common code with a bug.
    -- Rob
    eric velazquez wrote:
    Thanks for your time
    Just one more question, this patch will solve too the deployment issue? or just
    the appc compiler issue.
    Thanks again
    Rob Woollen <[email protected]> wrote:
    Unfortunately I believe this is an appc bug. You should be able to get
    a temporary patch from [email protected] Reference CR112803.
    -- Rob
    eric velazquez wrote:
    Again WLS 8.1 SP1
    i write by hand the weblogic.xml descriptor with the reference informationfor
    an external ejb and im sure it's correct, but when i try to compileit with appc
    it fails with this exception
    Element "<ejb-jar>" with ejb-ref-name "xyz" must either specify a validejb-link
    element or have corresponding ejb-reference-descriptor element in weblogic.xml
    with a valid jndi-name.
    This is my reference in weblogic.xml file
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>CnCargaFacade</ejb-ref-name>
    <jndi-name>ejb.CnCargaFacade</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    of this web.xml
    <ejb-ref>
    <ejb-ref-name>CnCargaFacade</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>load.ejb.CnCargaFacadeHome</home>
    <remote>load.ejb.CnCargaFacade</remote>
    </ejb-ref>
    This is not only if a try to use appc (which is not really necesary)but the error
    is also when i try to deploy the application on my server.
    Is this a Bug?? i thik it is, or where i'm wrong
    Thanks

  • POJO in the EJB module : To EJB or Not

    Hi All,
    We are preparing the architecture of a new system in J2EE. As usual we have come across the question "To Use EJB or NOT". And we have decided to use EJB when there are transactions involved. ie., If the are multiple updates or inserts involved in a single call. Otherwise - for simple 'selects' just use POJO business service to avoid EJB overhead. These simple classes are placed in same module where EJB is placed. With the module reference delegate will directly create instance of POJO and get the Value Objects.
    Is this approach acceptable? Second question is can I use �Local EJB� invocation when I am sure that I am NOT going to distribute my application components?
    Please help.

    You mention 3 times that you are a "creative person" in a way that seems to indicate you think programming (or perhaps more properly: software engineering) isn't a creative activity.
    Now, I'm sure there are many types of programming that are repetitive, boring and not creative at all, but in my experience, implementing a new concept is a highly creative and intellectually stimulating activity, especially if you have a big influence on the final architecture and design of the system (i.e. it's not "programming to spec").
    As an aside: I'm sure your idea is very innovative and new, but if you haven't been able to get anyone (including yourself) to create even the start of an actual working version in 10 years, it doesn't speak well of your ability to enthuse people and actually get something done. The dot-com fiasco has shown the industry the dangers of "great ideas" without anything to back it up.

  • Sharing EJB references.

    Hi,
    I have two JSP pages which use the same EJB. Both pages are doing their own JNDI lookup for the home interface and do a home.create to obtain the remote interface. The two pages are thus not "sharing" the same reference to the EJB.
    To speed up EJB access, I would have preferred to be able to share the remote reference in session or application scope (=normal stateless EJB behaviour) but unfortunately Oracle does not support the stateless model.
    1) Can I share the same EJB reference between all webserver sessions to avoid the lookup/create penalty? (ie place it in "application" scope)
    2) Failing that, can I share the same EJB reference between all requests in the same session (ie place it in "session" scope)?
    3) In both cases above (or in any other way), can I prevent blocking if an EJB comes across a locked record (see thread "Preventing blocking: EJBs").
    Cheers
    Nic
    null

    I think you might have some fundamental EJB stuff confused. First we would need to know what kind of EJBs you are using. Stateful session, stateless session, entity? With stateless session you need not worry about cleaning up. The client has no control over when the ejbRemove method is called (when the EJB is placed in an inactive state). In fact, it may be called between method calls. In either case, you needn't worry about it. If you are using stateful session beans, I would ask why you are using the HttpSession with them. Stateful session beans provide this functionality for you. If you are using entity beans, there are more things to consider such as CMP/BMP. A short answer without more information is not possible.
    If you have a cluster of machines, or plan on it, putting the remote reference in the session may not actually help performance as binding it to the session will cause the remote reference to be replicated around the cluster.
    If you check the EJB specification, the container is not required to call the ejbRemove method when a client calls the remove method on the remote interface for a session bean. (I assume you are using session since calling remove on an entity will remove the data from the database.) So I would ask what exactly you are trying to accomplish by that call?
    I'll venture a guess that the call, in your case, is unnecessary. If I have assumed something incorrectly, please post more information.
    Hope this helps.

  • "cacheHostInfo is null" and Add-SPDistributedCacheServiceInstance : Object reference not set to an instance of an object.

    I am working on a standalone install Sharepoint 2013 (no Active Directory). I found newsfeed feature is not available and checked Distributed Cache service is stopped. When start it “cacheHostInfo is null” is returned.
    I checked the Windows service “AppFabric caching service” is stopped because the default identity “Network Service” not work. Then I change the AppFabric service identity to use “.\administrator” (which is also the sp farm administrator) and the service can
    be started.
    However the “cacheHostInfo is null” when try to start Distributed Cache service in central admin.
    I searched on web and found this blog: http://rakatechblog.wordpress.com/2013/02/04/sharepoint-2013-spdistributedcacheserviceinstance-cachehostinfo-is-null/
    I tried to run the script but it return error:
    Add-SPDistributedCacheServiceInstance : Object reference not set to an
    instance of an object.
    At C:\root\ps\test.ps1:8 char:13
    + $whatever = Add-SPDistributedCacheServiceInstance
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidData: (Microsoft.Share…ServiceInstance:
    SPCmdletAddDist…ServiceInstance) [Add-SPDistributedCacheServiceInstance]
    , NullReferenceException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddDistr
    ibutedCacheServiceInstance
    I am not sure what went wrong. Please give me some idea? Thank you for any comment!

    Can you deploy Active Directory as installing without is not a supported installation scenario - http://support.microsoft.com/kb/2764086.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Web-UI error message "Access via 'NULL' object reference not possible"

    I need some help, I'm not a Basis person but I need to get this connection problem resolve.
    This problem is in our DEV ICWeb system.  After logging in to Web-UI, I got a error message "Access via 'NULL' object reference not possible".  We have 3 clients (100, 220, & 310) in DEV and all 3 clients are giving me the same error message.
    From the help.sap.com, I found this topic http://help.sap.com/saphelp_nwes70/helpdata/en/84/43f0d786304e19a652a8f80909a8ec/content.htm
    but in the document it asked to go to SM59 to check the ESH_APPL_WS_TEMPLATEENGINE destination.  But we don't have that destination setup in all our systems.
    Here is the complete error message:
    Error when processing your request
    What has happened?
    The URL http://crm-dev.staff.copa:8000/sap/bc/bsp/sap/crm_ui_frame/BSPWDApplication.do was not called due to an error.
    Note
    ■The following error text was processed in the system CD1 : Access via 'NULL' object reference not possible.
    ■The error occurred on the application server CRM-DEV_CD1_00 and in the work process 0 .
    ■The termination type was: RABAX_STATE
    ■The ABAP call stack was:
    Method: GET_DATA_LOSS_HANDLER of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
    Method: GET_DATA_LOSS_HANDLER of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
    Method: EH_TRIGGER_NAVIGATION of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
    Method: SET_WORKAREA_CONTENT of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
    Method: PROCESS_NAV_QUEUE of program CL_BSP_WD_VIEW_MANAGER========CP
    Method: DO_INIT of program CL_CRM_UI_FRAME_APP_CONTROLLERCP
    Method: DO_INIT of program CL_BSP_CTRL_ADAPTER===========CP
    Method: GET_PAGE_CONTEXT_CURRENT of program CL_BSP_CONTEXT================CP
    Method: ON_REQUEST_ENTER of program CL_BSP_RUNTIME================CP
    Method: ON_REQUEST of program CL_BSP_RUNTIME================CP
    What can I do?
    ■If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system CD1 in transaction ST22.
    ■If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server CRM-DEV_CD1_00 in transaction SM21.

    Hi Michael,
    Refer to the link below and check the procedure.
    http://help.sap.com/saphelp_nwes70/helpdata/en/84/43f0d786304e19a652a8f80909a8ec/content.htm
    Regards,
    Arjun

Maybe you are looking for

  • Cannot access local copy of NAS

    I can logon to my NAS, however my MacBook pro keeps prompting me to logon to the local copy of the NAS.  Then rejects my username and password combo.  I no longer know what that combo is.  Is there a way to reset this? 

  • How to avoid swing program exit

    My application, while in a specific condition, need to avoid program exit. In my application program exit can be done: - through a menu bar menu item (exit): no problem to avoid exiting, I manage it with success. - by clicking the standard red button

  • 251 movement type

    Anybodt used 251 movement type? ie GI for sales without sales order? Can any body explain the process and business scenario? Can we do billing against the material doc created through 251 mvt type? Explanatory reply will be awarded full point. Regard

  • Listener for Unique Key in coherence Cache

    Hi Experts, I am using Oracle Coherence in one of my project and I am facing a Performance issue .Here is my scenario, Thie is my Coherence cache structure UniqueKey         <Hive data> D1                     Hive Data1          D2                   

  • GoodsMovement BAPI from VBA

    Hi, I am trying to retrive material document data through the BAPI_GOODSMVT_GETITEMS. In the following code, the connection works fine, but when I get to the line: Set matdocitems = MatDoc.GetItems(mat) I get an error: "Run-time error '8793'. An exce