bMPBEANHome.ejbInsertAa11(a, b);这个抛出的例外不是java.rmi.RemoteException

解决方案 »

  1.   


    public void insTableAa11(String a,String b) throws CreateException {
        System.out.println("insert() begin");
        try {
          bMPBEANHome.ejbInsertAa11(a, b);//仔细查看一下,这个方法会抛出什么异常
                                          //是不是什么自定义的还是SQL异常等。
        }//然后在这里cath一下,或者,直接抛出。
        catch(java.rmi.RemoteException e) { }  }
      

  2.   

    没自定义的异常啊,sql又可能
      

  3.   

    public void insTableAa11(String a,String b) throws CreateException,javax.naming.NamingException,java.rmi.RemoteException {
        ctx = new InitialContext();
        bMPBEANHome = (BMPBEANHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("BMPBEANRemote"), BMPBEANHome.class);
        System.out.println("insert() begin");
        bMPBEANHome.ejbInsertAa11(a, b);
      }
    现在改成这样,可是错误还是一样的
      

  4.   

    你就throw 一个 Exception 然后把Exception打印出来看看是什么异常