主要是这2个地方的问题:
//测试检查用户的方法
  public void testCheckUser() throws RemoteException {
    //测试正确的用户名
    String userName = "jack";
    String userPassword = "jack";
    //检查用户的方法
    int[] functions = stockManagementData.checkUser(userName, userPassword);
    this.assertEquals("return value", 0, functions[0]);
    //测试错误的用户名
    userName = "jack1";
    userPassword = "jack";
    //检查用户的方法
    functions = stockManagementData.checkUser(userName, userPassword);
    this.assertEquals("return value", -1, functions[0]);
  }//测试根据用户名字取得用户记录的方法
  public void testGetUserByUserName() throws RemoteException {
    String userName = "jack";
    String[][] result = stockManagementData.getUserByUserName(userName);
    this.assertEquals("return value", "jack", result[0][1]);
  }

解决方案 »

  1.   

    lz还是把StockManagementData 这个类的代码贴出来吧
    看你的testcase是找不出什么问题的
      

  2.   

    package stockmanagementpro;import javax.ejb.*;
    import java.util.*;
    import java.rmi.*;
    import user.*;
    import java.sql.*;public interface StockManagementData
        extends javax.ejb.EJBObject {
      public int[] checkUser(String userName, String userPassword) throws RemoteException;
      public int createUser(User user) throws RemoteException;
      public int updateUser(User user) throws RemoteException;
      public int deleteUser(User user) throws RemoteException;
      public String[][] getUserByUserName(String userName) throws RemoteException;
      public int createUserLog(String programName, String operationContent,
                               String userName) throws RemoteException;
      public int deleteUserLog(Integer id) throws RemoteException;
      public String[] getTableNames() throws RemoteException;
      public String[][] getDataByTableName(String tableName) throws RemoteException;
    }上面是StockManagementData类的代码
      

  3.   


    看起来是没办法了
    你把错误堆栈打出来看看吧
    看是你的testcase里边出现的这个异常还是在你的services端的问题