Struts2注解引发堆栈问题。求高手指教,。。。
java.lang.OutOfMemoryError: Java heap spaceat java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
.....
这个错误怎么解决啊 说是堆栈问题
@ParentPackage("api")
@Result(type="json",name="userinfo")
public class UserinfoAction extends ActionSupport implements ServletContextAware{
@Resource
private UserinfoService userinfoService;
@Resource
private UtypeService utypeService;
@Resource
private CommerceService commerceService;
@Resource
private FriendgroupService friendgroupService;
@Resource
private CommercepositionService commercepositionService;
@Resource
private CommerceuserService commerceuserService;
private Userinfo userinfo;
private File uploadPic;
private String useId;
private File upload;
private String uploadFileName; // 上传文件名
private String uploadContentType; // 文件的内容类型
private ServletContext context;
private String place;
private List<Userinfo> userList;
private String username;
private String industry;
private String district;
private int pageNum;
private int pageSize;
@Action(value="userinfo",results={@Result(type="json",name="aaa")})
public String list(){
userList = userinfoService.getListByPage(username, industry, district, pageNum, pageSize);
System.out.println(userList==null?"null":userList.size());
return "aaa";
}
}
------解决方案--------------------
呃! 你数据量太大了.java虚拟机爆了-_-||| 在tomcat里面修改下虚拟机的内存试下,90%能解决.