Caused by: org.apache.struts2.json.JSONException: java.lang.IllegalAccessExcepti
on: Class org.apache.struts2.json.JSONWriter can not access a member of class or
g.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with modifier
s "public"
?
? ? ? ? at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:243)
? ? ? ? at org.apache.struts2.json.JSONWriter.process(JSONWriter.java:165)
? ? ? ? at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:131)
? ? ? ? at org.apache.struts2.json.JSONWriter.add(JSONWriter.java:329)
? ? ? ? at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:228)
? ? ? ? ... 241 more
?
?
?
<script type="text/javascript">
function isGroupsFull(){
$.getJSON("${ctx}/groups/groups-admin!isGroupsFull.action?nowtime="+new Date(),
function(json){
var isJoin = json.isgroufull;
if (isJoin) {
alert("未满");
<%-- $("#groupFormUp").submit();--%>
} else {
alert("已满");
}
}
);
}
</script>
?
@ParentPackage("json-default")
@Results( {
@Result(name = BaseAction.RELOAD, location = "/groups_admin.htm", type = "redirect"),
@Result(type="json",name="isgroufull")
})
?
?
private User user;
?
public String isGroupsFull() throws Exception {
System.out.println("********");
user=accountService.findUserByLoginName(SpringSecurityUtils.getCurrentUserName());
// if (groupsService.isGroupsFullByUser(user)) {
isgroufull = true;
// }
return "isgroufull";
}
?
public User getUser() {
return user;
}
?
public void setUser(User user) {
this.user = user;
}
?
?
getUser()方法注释掉就可以了,如果这个user有用到,可以重新定义一个;
?