错误集:常见错误

案例一:

    从jsp提交数据到action报此错;

    java.lang.IllegalArgumentException: id to load is required for loading

    原因:name='shop.account.accountId'这各方式提交,映射关系的id值不能为空;

          然后就是你写成name='account.accountId'同样会错;主键id不能为空!!  


案例二:

    找不到你在action中写的新方法;

java.lang.NoSuchMethodException: cn.zan.action.memberCenter.member.MemberRegisterAction.easemobRegister()

    错误原因:直接copy的action中不需要外部访问的方法修改的,所以方法还是私有的,改成public就好了;

    private void easemobRegister(){

        .......

        PrintWriter out = null;

        try {

        out = response.getWriter();

        } catch (IOException e) {

        e.printStackTrace();

        }

        out.print(statusCode);

      }

你可能感兴趣的:(TO,id,for,load,loading,required,is)