请求解决50分

杰小 2010-10-15 10:21:10
[Servlet Error]-[/rptProMess.jsp]: java.lang.OutOfMemoryError
at java.lang.StringBuffer.<init>(StringBuffer.java:80)
at java.util.Locale.toString(Locale.java:477)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.addLocaleHeader(SRTServletResponse.java:761)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.commit(SRTServletResponse.java:726)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.alertFirstFlush(SRTServletResponse.java:189)
at com.ibm.wsspi.webcontainer.util.BufferedWriter.flushChars(BufferedWriter.java:363)
at com.ibm.wsspi.webcontainer.util.BufferedWriter.flush(BufferedWriter.java:347)
at java.io.PrintWriter.flush(PrintWriter.java:291)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.flushBuffer(SRTServletResponse.java:515)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:599)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:525)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest

(AbstractJSPExtensionServletWrapper.java:232)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:751)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:126)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:792)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497z)
...全文
89 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
杰小 2010-10-15
  • 打赏
  • 举报
回复
java里做了一个NULL处理
/**
* 不顯示出NULL值
*
* @param str
* 輸入字符串
* @return 輸出字符串
*/
public static String forbidNull(String str) {
if ("null".equals(str))
return "";
return null == str ? "" : str;
}
杰小 2010-10-15
  • 打赏
  • 举报
回复
Jsp页面

<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ page import="com.yitong.commons.util.StringUtil"%>
<%
//String flag=(String)request.getSession().getAttribute("MESSAGE");
String rptId=StringUtil.forbidNull((String)request.getSession().getAttribute("rptId"));
String rptname=StringUtil.forbidNull((String)request.getSession().getAttribute("rptname"));
if(!"".equals(rptId) && !"".equals(rptname)){
out.println(rptId+";"+rptname);
request.getSession().setAttribute("rptId","");
request.getSession().setAttribute("rptname","");
}
%>
无伤 2010-10-15
  • 打赏
  • 举报
回复
内存溢出, 能把代码贴出来吗?
ansensp 2010-10-15
  • 打赏
  • 举报
回复
汗....
下一个那个叫JProfile吧 好像是 可以监测每个对象占用的内存
wo28lf 2010-10-15
  • 打赏
  • 举报
回复
内存溢出……
一路随心 2010-10-15
  • 打赏
  • 举报
回复
是不是有死循环了?
wucjyy 2010-10-15
  • 打赏
  • 举报
回复
内存溢出
zidasine 2010-10-15
  • 打赏
  • 举报
回复
内存溢出 自己去找什么原因引起的

23,404

社区成员

发帖
与我相关
我的任务
社区描述
Java 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧