佑瞻 2016-10-20 01:59 采纳率: 60%
浏览 1286

Struts2+hirbernate 结合出错问题

HTTP Status 500 - Method "findAllDept" failed for object com.chinasofti.sh.action.TestAction@64788c73

type Exception report

message Method "findAllDept" failed for object com.chinasofti.sh.action.TestAction@64788c73

description The server encountered an internal error that prevented it from fulfilling this request.

exception

ognl.MethodFailedException: Method "findAllDept" failed for object com.chinasofti.sh.action.TestAction@64788c73 [java.lang.ExceptionInInitializerError]
这个是报的异常

public String findAllDept(){

System.out.println("----------");
DeptBiz deptBiz=new DeptBizImpl();
Listlist=deptBiz.findALLDept();

return SUCCESS;

}这个是Action的方法
public String findAllDept(){

System.out.println("----------");

return SUCCESS;

}
不调Dao可以成功,一像上面一样调方法就报异常

hirbernate 用Junit测试通过了,求大神教!

  • 写回答

1条回答 默认 最新

  • devmiao 2016-10-20 02:01
    关注

    findAllDept
    这个方法不对

    评论

报告相同问题?