XML 解析错误:未找到元素位置:moz-nullprincipal:{681ba331-3a54-4685-8675-c3cac36582c6}行 1,列 1:
原因是:sql中的属性和Entity中的不对应。
原因是:sql中的属性和Entity中的不对应。
但是 struts2都不报错误信息的,所以要自己 在action里try catch,
try{
PageResult page=this.dataGridService.getPagedResult(request, QuestionEntity.class, entity, "selectQuestions");
String json=dataGridService.getPagedResultJson(page);
AjaxUtils.writeJsonInfo(json);
}catch(Exception ex){
ex.printStackTrace();
}
才能发现错误信息。
我的错误是:
There is no getter for property named 'answerTimeStart' in 'class com.winflag.dgbagsh.question.QuestionEntity'
原来是Entity里面的anwserTimeStart写错了,应该是answerTimeStart。