起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1377|回复: 5

[结贴] blobImage图片显示

[复制链接]

41

主题

123

帖子

201

积分

中级会员

Rank: 3Rank: 3

积分
201
发表于 2013-6-21 16:23:57 | 显示全部楼层 |阅读模式
        我们现在有个需求是在一个页面上显示许多图片,这个图片是用blobImage存储的。我读取图片代码是这样的:
    。。。。
   var dataModel = "/OA/doc/data";
    var concept = "OA_DC_TemplateInfo";//存储图片的表
    var relation = "fThumbnail";//存储图片的关系
    var action = "blobDownloadAction"; //你们x5使用的显示图片的action
    this.getImage = function(id) {//这个返回图片访问图片地址。参数是数据的主键fid
        var bsessionid = justep.Request.URLParams.bsessionid;
        var process = justep.Context.getCurrentProcess();
        var activiy = justep.Context.getCurrentActivity();
        var img = "<img src='/x5/UI/system/service/common/bizAction.j?bsessionid="+ bsessionid+ "&language=zh_CN&dataModel="+ dataModel+ "&concept="
                + concept+ "&activity="+ activiy+ "&process="+ process+ "&relation="+ relation+ "&action="+ action+ "&id=" + id + "'/>";
        return img;
    }
    。。。。
   但是当图片有10个左右一起显示的时候,报错了,请问怎么解决呢(项目紧急,客户很变态,求解答啊,给跪了啊)?。错误堆栈如下:



41

主题

123

帖子

201

积分

中级会员

Rank: 3Rank: 3

积分
201
 楼主| 发表于 2013-6-21 16:24:44 | 显示全部楼层
2013-06-21 16:05:37 action 执行失败
javax.servlet.ServletException: javax.servlet.ServletException: action 执行失败
        at com.justep.ui.servlet.MainServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.servlet.ServletException: action 执行失败
        at BizAction.doGet(BizAction.java:24)
        at com.justep.ui.impl.JProcessorImpl.execute(Unknown Source)
        at com.justep.ui.JavaServer.runJava(Unknown Source)
        at com.justep.ui.JavaServer.doJ(Unknown Source)
        at com.justep.ui.JavaServer.service(Native Method)
        ... 14 more
Caused by: com.justep.biz.client.ActionException: com.justep.biz.client.ActionException: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
        at com.justep.biz.client.ActionEngine.invokeActions(Unknown Source)
        at com.justep.biz.client.ActionEngine.invokeActions(Unknown Source)
        at com.justep.ui.system.service.commonUtils.getBizAction(Unknown Source)
        at com.justep.ui.system.service.commonUtils.bizAction(Unknown Source)
        at BizAction.doGet(BizAction.java:22)
        ... 18 more
Caused by: com.justep.biz.client.ActionException: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
        at com.justep.biz.client.StreamCallback.execute(Unknown Source)
        ... 23 more
Caused by: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
        at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)
        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
        at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
        ... 24 more
Caused by: java.net.SocketException: Connection reset by peer: socket write error
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:741)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
        at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:765)
        at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)
        at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:574)
        at org.apache.coyote.Response.doWrite(Response.java:560)
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
        ... 29 more
2013-6-21 16:05:37 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet main-servlet threw exception
回复 支持 反对

使用道具 举报

41

主题

123

帖子

201

积分

中级会员

Rank: 3Rank: 3

积分
201
 楼主| 发表于 2013-6-21 16:25:04 | 显示全部楼层
08_luoting 发表于 2013-6-21 16:24
2013-06-21 16:05:37 action 执行失败
javax.servlet.ServletException: javax.servlet.ServletException:  ...

java.net.SocketException: Connection reset by peer: socket write error
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:741)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
        at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:765)
        at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)
        at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:574)
        at org.apache.coyote.Response.doWrite(Response.java:560)
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
        at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)
        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
        at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
        at com.justep.biz.client.StreamCallback.execute(Unknown Source)
        at com.justep.biz.client.ActionEngine.invokeActions(Unknown Source)
        at com.justep.biz.client.ActionEngine.invokeActions(Unknown Source)
        at com.justep.ui.system.service.commonUtils.getBizAction(Unknown Source)
        at com.justep.ui.system.service.commonUtils.bizAction(Unknown Source)
        at BizAction.doGet(BizAction.java:22)
        at com.justep.ui.impl.JProcessorImpl.execute(Unknown Source)
        at com.justep.ui.JavaServer.runJava(Unknown Source)
        at com.justep.ui.JavaServer.doJ(Unknown Source)
        at com.justep.ui.JavaServer.service(Native Method)
        at com.justep.ui.servlet.MainServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:595)
2013-6-21 16:05:37 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
        at org.apache.catalina.connector.Response.getWriter(Response.java:611)
        at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
        at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
        at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
        at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
        at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:180)
        at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
        at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
        at org.apache.jsp.error_jsp._jspService(error_jsp.java:149)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
        at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
        at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:270)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:595)
2013-6-21 16:05:37 org.apache.catalina.core.StandardHostValve custom
严重: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error.jsp]
org.apache.jasper.JasperException: java.lang.IllegalStateException: getOutputStream() has already been called for this response
        at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:413)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
        at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
        at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:270)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
        at org.apache.catalina.connector.Response.getWriter(Response.java:611)
        at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
        at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
        at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
        at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
        at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:180)
        at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
        at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
        at org.apache.jsp.error_jsp._jspService(error_jsp.java:149)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
        ... 18 more
回复 支持 反对

使用道具 举报

109

主题

2907

帖子

1564

积分

金牌会员

Rank: 6Rank: 6

积分
1564
QQ
发表于 2013-6-21 18:02:58 | 显示全部楼层
回复 支持 反对

使用道具 举报

41

主题

123

帖子

201

积分

中级会员

Rank: 3Rank: 3

积分
201
 楼主| 发表于 2013-6-21 18:07:02 | 显示全部楼层
这个就是用那种方法哈。现在的问题是图片多了后,不显示,后台报错。
回复 支持 反对

使用道具 举报

109

主题

2907

帖子

1564

积分

金牌会员

Rank: 6Rank: 6

积分
1564
QQ
发表于 2013-7-2 16:13:29 | 显示全部楼层
解决思路  把所有图偏返回在加载到页面
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-11-23 11:20 , Processed in 0.059906 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表