8 Replies Latest reply on Oct 5, 2002 1:31 PM by Juha Lindfors

    arrow failed

    peixubin peixubin Newbie

      following code:
      ......
      try{
      Context initial=new InitialContext();
      System.out.println("initial create success");
      Object objref=initial.lookup("ejb/StatelessFundBean");
      StatelessFundManagerHome h=(StatelessFundManagerHome)
      PortableRemoteObject.narrow(objref,
      StatelessFundManagerHome.class);
      System.out.println("home create success");
      }catch(Exception e){
      System.out.println(e.getMessage());
      }
      ....

      run it:
      initial create success
      java.lang.ExceptionInInitializerError
      but:
      ....
      try{
      Context initial=new InitialContext();
      System.out.println("initial create success");
      Object objref=initial.lookup("ejb/StatelessFundBean");
      StatelessFundManagerHome h=(StatelessFundManagerHome)objref;
      System.out.println("home create success");
      }catch(Exception e){
      System.out.println(e.getMessage());
      }
      ....
      run it:
      initial create success
      home create success

      why?