0 Replies Latest reply on Jul 29, 2002 1:39 AM by 265044

    How to slove this problem

    265044
      I met a problem:In Jdev9i_rc2 ,I completed the stateless bean example in the Enterprise java bean help except the last two steps.I have started my embeded OC4J (oracle9ias 9.0.2.0) successfully,I use jdev9i to create a sample client as following:

      package samplemypackage1;
      ...

      public class MySessionEJBClient
      {
      public static void main(String[] args)
      {
      MySessionEJBClient mySessionEJB = new MySessionEJBClient();
      try{
      Hashtable env= new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
      env.put(Context.SECURITY_PRINCIPAL,"admin");
      env.put(Context.SECURITY_CREDENTIALS,"welcome");
      env.put(Context.PROVIDER_URL,"ormi://localhost:23892/current-workspace-app");
      Context ctx= new InitialContext(env);
      MySessionEJBHome mySessionEJBHome =(MySessionEJBHome)ctx.lookup("MySessionEJB");

      MySessionEJB mySessionEJB =mySessionEJBHome.create();
      system.out.println(mySessionEJB.calc("a"));
      }
      catch(Throwable ex)
      {
      ex.printstackTrace();
      }
      }
      }

      then the console display:


      javax.naming.NameNotFoundException:MySessionEJB not found.
      java.lang.object com.everming.server.rmi.RMIContext.lookup(java.lang.String)
      java.lang.object javax.naming.InitialContext.lookup(java.lang.String)
      void SamplePackage1.MySessionEJBClient.main(java.lang.String[])
      process exited with exit code 0


      I don't know how to solve this problem? anybody can help me?






      Copyright ) 2002 Oracle Corporation. All Rights Reserved.