微科社区,轻松开发从此开始! 请登陆 免费注册

微科社区

当前位置:首页 > Java平台 > J2EE >

struts2 java.lang.StackOverflowError org.apache.struts2.jso

时间:2016-06-25 19:12  浏览:努力统计中...
1. 问题描述: 页面通过异步访问action, action的方法通过map封装数据,struts的result的type设置为json,后台报错 六月 25, 2016 6:54:33 下午 org.apache.catalina.core.StandardWrapperValve invokeSEVERE: Servle

1. 问题描述:

   页面通过异步访问action,    action的方法通过map封装数据,struts的result的type设置为json,后台报错

六月 25, 2016 6:54:33 下午 org.apache.catalina.core.StandardWrapperValve invokeSEVERE: Servlet.service() for servlet [default] in context with path [/msf] threw exception [Filter execution threw an exception] with root causejava.lang.StackOverflowError    at sun.reflect.misc.ReflectUtil.checkPackageAccess(ReflectUtil.java:177)    at sun.reflect.misc.ReflectUtil.checkPackageAccess(ReflectUtil.java:164)    at sun.reflect.misc.ReflectUtil.isPackageAccessible(ReflectUtil.java:195)    at java.beans.Introspector.getBeanInfo(Introspector.java:154)    at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:177)    at org.apache.struts2.json.JSONWriter.process(JSONWriter.java:160)    at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:126)    at org.apache.struts2.json.JSONWriter.add(JSONWriter.java:352)    at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:215)    at org.apache.struts2.json.JSONWriter.process(JSONWriter.java:160)

 

2.action的代码

package com.cdv.mediastar.action;import java.util.HashMap;import java.util.List;import java.util.Map;import javax.annotation.Resource;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpSession;import org.apache.struts2.ServletActionContext;import org.springframework.context.annotation.Scope;import org.springframework.stereotype.Controller;import com.cdv.mediastar.model.User;import com.cdv.mediastar.model.UserSessionlog;import com.cdv.mediastar.service.UserService;import com.cdv.mediastar.util.PageParameter;import com.opensymphony.xwork2.ActionSupport;@Scope("request")@Controller("logAction")public class LogAction extends ActionSupport {    /**     *      */    private static final long serialVersionUID = -1455520770797186253L;        Map<String, Object> dataMap = new HashMap<String, Object>();    public Map<String, Object> getDataMap() {        return dataMap;    }    public void setDataMap(Map<String, Object> dataMap) {        this.dataMap = dataMap;    }     @Resource    private UserService userService;        public String index(){        return "index";    }        public
TAG:
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线------
栏目列表
推荐内容