EJB design: problem looking up an ejb local interface

  1. problem looking up an ejb local interface (1 messages)


    I am newbie in ejb. I'm calling an ejb local interface and getting an exception (BEA WLS 8.1):
    ** Unable to connect to the server at:
    javax.naming.LinkException: [Root exception is ...

    How can I fix this problem?
    Thanks for the help.

    The client code:
    Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    Context ctx = new InitialContext(p);
    StudentLocalHome localHome = (StudentLocalHome) ctx.lookup("StudentLocalEJB");

    The ejb-jar.xml:

    The weblogic-ejb-jar.xml:
  2. The fact that there is no address for the server after the colon in your exception trace leads me to believe that you need to put in the property value for Context.PROVIDER_URL in your Porperties object to initialize the InitialContext. Try this - it may well solve your problem.