@RequestBody抛出java.io.IOException:Stream closed的异常

配置了SpringAOP切面 ,访问action前走这个方法:
public Object validate(ProceedingJoinPoint jp){
HttpServletRequest request=jp.getArgs[1];//取出了request
request.getInputStream();//这里得到的ServletInputStream是已关闭的流
//reset方法也不能用,怎么能获取request里的数据
//由于项目要求,请求contentType是application/json,
//不加@RequestBody可以得到数据,但action参数又没有数据了,需要加@RequestBody注解,哪位大神帮忙解决下,万分感谢!
}

0

3个回答

0

问题解决了,写了一个过滤器,覆盖HttpServletRequestWrapper类的getInputStream()和getReader()方法,再走AOP切面配置,能得到数据,但感觉不太靠谱,不知道哪位大神有更好的解决方案没

0

走了弯路,ProceedingJoinPoint jp 对象中已经对请求参数做了处理,直接取出即可

0
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
使用poi重复读取excel时报错:stream closed
1.问题场景public ExcelUtil(InputStream is) { super(); try { if (!is.markSupported()) { is = new PushbackInputStream(is, 8); } if(POIFSFi
解决阿里云SDK出现的Stream closed
为了上传文件到阿里云,使用了阿里云的SDK,参照 文档 写了代码: public static void uploadFile(Context context, String tenantCode, String userToken, String objectName, String filePath) { File file = new F...
hessian协议从rpc服务获取inputStream流下载文件的方式,出现异常 java.io.IOException: stream is closed
在写文件服务的时候,用hessian协议从rpc服务获取inputStream流下载文件的方式,出现异常 java.io.IOException: stream is closed   at sun.net.www.http.ChunkedInputStream.ensureOpen(ChunkedInputStream.java:151)   at sun.net.www.http.Chu
关于JarFile读取jar包文件时,报stream closed异常
最近有个需求需要读取jar里的.csv文件,写了一个utils工具类去将.csv文件读成IO流形式,编写完代码后却报了stream closed。 工具类:ReadJarUtils import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.Enumeration;...
使用@Valid @RequestBody 的用意在于抛出notvalid的异常
Different ways of validating @RequestBody in Spring MVC 3.2 with @Valid annotation 原文  http://blog.codeleak.pl/2013/09/request-body-validation-in-spring-mvc-3.2.html In Spring MVC th
java.io.IOException: Stream closed
HTTP Status 500 - Stream closedrnrnrntype Exception reportrnrnmessage Stream closedrnrndescription The server encountered an internal error that prevented it from fulfilling this request.rnrnexception rnjava.io.IOException: Stream closedrn org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:210)rn org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:115)rn org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:177)rn org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:942)rn org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:656)rn org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:123)rn org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)rn com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)rn cn.labsoft.labos.framework.common.interceptor.IsLoginInterceptorNew.intercept(Unknown Source)rn cn.labsoft.labos.framework.common.interceptor.IsLoginInterceptorNew$$FastClassByCGLIB$$d5f81fd5.invoke()rn net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)rn org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)rn org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)rn org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)rn org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:126)rn org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)rn org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)rn cn.labsoft.labos.framework.common.interceptor.IsLoginInterceptorNew$$EnhancerByCGLIB$$bb81b672.intercept()rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)rn org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rn cn.labsoft.labos.framework.common.filter.HttpSessionContextDataFilter.doFilter(Unknown Source)rn org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rnrnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/7.0.59 logs.rn
java.io.IOException: Stream closed 报错
请问下这是什么错误啊。 这提示完全摸不着头脑啊。。没有一个类是我写的。。。rn我在网上找的资料都说是流未关闭的原因,可是这个原因很不可靠。rnrn[img=https://img-bbs.csdn.net/upload/201407/10/1404987841_657879.jpg][/img]rnrn
针对套接字关闭异常:Socket closed解决方案
本文告诉大家,菜鸟在编程中如何解决Socket closed问题
idea 闪退,项目重启时stream closed问题的解决方案
曾多次遇到这个问题,自己摸索出两个比较快捷的方法,记录一下,分享给大家。 方案一: 很简单,重启电脑就是了。 方案二: 打开【任务管理器】==》【详细信息】,找到java.exe进程,关闭此进程,重启idea即可。 想了想:接着把闪退的原因及解决方案一起记录下来吧 认真思索后,发现是IDEA的运行内存大小的问题,就做了如下修改: Intellij IDEA 2017目...
并发条件下springmvc的@RequestBody获取数据异常问题处理
问题描述:系统的框架使用的是ssm框架,在模拟压力测试的时候,使用APCHE的压力测试,100个并发循环向系统的controller层发送请求,结果发现有如下异常情况: Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: '20172-11-02 08:02:57' f
RequestBody只能用一次,angularjs用post提交json请求
public JsonModel register(@RequestBody User user, @RequestBody String code, HttpSession session) { //验证码校验 if(session.getAttribute(CodeController.codeSessionKey)==null){ return null; } Stri...
java.io.IOException: Stream closed(在线等)
TOMCAT日志报以上错误。rn代码如下rn[code=HTML]rnrn<%@ page language="java" contentType="text/html; charset=GBK" import="">rnrnrn rn rn rnrn<%rn String id = request.getParameter("id")==null?"":request.getParameter("id").trim();rn for(int i=0;i");rn out.print("alert('您要的网页不存在,请与网站管理员联系!');");rn out.print("history.go(-1);");rn out.print("");rn out.close();//是不是我在这里用了关闭才导致那个错误的。rn rn rn CompanyManagerImpl manager = new CompanyManagerImpl();rn CompanyModel model = manager.getCompanyInfoListById(id);rn if(model==null)rn out.print(" ");rn out.close();rn rn ShengManagerImpl shengManager = new ShengManagerImpl();rn ShiManagerImpl shiManager = new ShiManagerImpl();rn String shengId=model.getShengId()+"";rn String shiId = model.getShiId()+"";rn String shengName = shengManager.getShengNameById(shengId);rn String shiName = shiManager.getShiNameById(shiId);rn%>rnrn rn rn rn rn rn[/code]
【exceptions】简单异常汇总
今天在接口的开发中遇到一个问题,把对方表中的数据导入到本地数据库的时候mybatis抛出这个错误 原因对方的数据中一个时间的字段中存在错误的数据0000-00-00 00:00:00mybatis插入数据库的时候发现解析后的时间年份小于公元后1年,抛出了这个异常PS异常中的AD意思就是公元后的意思,所以异常的完整意思是:只能接受公元后范围的日期
一种解决Android进行蓝牙连接时发生socket已关闭或超时错误的方法
在进行树莓派与android蓝牙通信时遇到一个难以解决的错误: java.io.IOException: read failed, socket might closed or timeout, read ret: -1 这个错误是出现在: try { mmSocket.connect();// This is a blocking ...
错误:未报告的异常 java.io.IOException;必须对其进行捕捉或声明以便抛出
原因:1某些方法有IO操作,但此方法后没有添加throws   IOException ,只需在此方法声明后加上即可。         2在可能出错的地方加一段try{}catch{}就好了,因为JAVA程序必须对可能发生的异常进行处理
Stream 中异常处理的4种方式
逅弈 转载请注明原创出处,谢谢! Stream API 和 lambda 是 Java 版本8以来对Java的重大改进。从那时起,我们可以使用更具有功能性的语法风格。但是有个问题就是,我们很爽的使用了这lambda 表达式,那我们怎么处理 lambda 中的异常呢。 大家都知道,不能直接在 lambda 中调用那些会抛出异常的方法,因为这样从编译上都通...
c++标准库笔记:13.4.4 Stream的状态和异常
设置触发异常Stream缺省的情况下不抛出异常,但可由成员函数exceptions来设置这种行为。exceptions有两种形式: 获取引发异常的标志(不带参数) 设置引发异常的标志(带参数) // This method is not used in msvcm80.dll, so we do not need to compile it. // Also, if we never change
groovy的IO操作--真是丧心病狂
//groovy用it表InputStream def targetFile=new File("build.gradle") def buffer=new byte[1024] def hasRead targetFile.withInputStream{ while((hasRead=it.read(buffer))!=-1) println(new String(buffer
Jmeter CSVDataSet配置器修改(可自定义用例开始行号)
1.修改CSVDataSetBeanInfo类,新增linenumber行号变量: 2.CSVDataSetResources.properties配置文件新增行号linenumber项: 3.重载FileServer类中的readline方法(建议重载,保留之前的readline方法,以备后面会用到): 另外,我这里写的有点坑,因为没有大动作的改源码,只是单纯的用当前行和用
(已解决)关于菜鸟使用Vert.x的一次异常记录,寻找解决方法!(这是记录寻找解决办法的文章)
    最近接手一个项目使用了Vert.x,但在上传到服务器后突然发现服务器后台有异常出现。异常如下:Jun 28, 2018 9:46:19 AM io.vertx.core.net.impl.ConnectionBaseSEVERE: Unhandled exceptionjava.io.IOException: Connection reset by peer        at sun.n...
线程安全spring mvc controller java.io.IOException: Stream closed异常
程序的流程是客户端发送一个Http post请求请求的内容是一个xml文件,服务器通过spring mvc 的controller接收rn然后response 返回xmlrn@Controllerrnpublic class QueryController rn public ModelAndView handleRequest(HttpServletRequest request,rn HttpServletResponse response) throws Exception rnrn //业务处理.....rn rnrnrn类似上面的调用,间隔时间比较短的情况下会出现下面的异常,分析原因是Spring MVC的controller不是线程安全的,每次请求都是同一个servlet,当第一次请求的reponse或request关闭后,接下来的请求就会出现stream closed的情况。rnrn尝试了几种方式:rn1.用ThreadLocal管理request response 问题依然存在rn2.尝试把处理写成无状态,线程安全的视乎很难rn3.SingleThreadModel ,synchronized 管理好像也不行,感觉无法控制response和request对象。rnrn现在的想法是把这个servlet变成线程安全,尝试了下视乎配置的不对,希望大家指点。rnrn还有就是像这样的业务比较好的解决方法是什么,也请大家分享一下。rnrnrnrnrnjava.io.IOException: Stream closedrn at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:406)rn at org.apache.catalina.connector.CoyoteReader.read(CoyoteReader.java:105)rn at org.apache.xmlbeans.impl.piccolo.xml.XMLReaderReader.fillCharBuffer(XMLReaderReader.java:247)rn at org.apache.xmlbeans.impl.piccolo.xml.XMLReaderReader.reset(XMLReaderReader.java:84)rn at org.apache.xmlbeans.impl.piccolo.xml.DocumentEntity.open(DocumentEntity.java:74)rn at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.reset(PiccoloLexer.java:982)rn at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:709)rn at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)rn at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1329)rn at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1316)rn at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:360)rn at org.poc.pos.obervationQuery.QueryObservationRequestDocument$Factory.parse(Unknown Source)rn at com.yuxin.referral.services.ObservationQueryServiceImpl.ObservationQueryRequest(ObservationQueryServiceImpl.java:79)rn at com.yuxin.referral.services.ObservationQueryServiceImpl$$FastClassByCGLIB$$27758ac0.invoke()rn at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)rn at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625)rn at com.yuxin.referral.services.ObservationQueryServiceImpl$$EnhancerByCGLIB$$e00082b7.ObservationQueryRequest()rn at com.yuxin.referral.web.ObservationQueryController.handleRequest(ObservationQueryController.java:31)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710)rn at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167)rn at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414)rn at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at com.springsource.metrics.collection.web.HttpRequestMetricCollectionValve.invoke(HttpRequestMetricCollectionValve.java:44)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:379)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)rn at java.lang.Thread.run(Thread.java:619)rn
java多线程报错 java.io.IOException: Stream closed
虽然程序可以正确的讲读取到的信息输出到文本文件 但是报错:java.io.IOException: Stream closed n不知道是什么原因 菜鸟请各位帮忙看一下n代码如下:npackage test;nnimport java.io.FileReader;nimport java.io.FileWriter;nimport java.io.IOException;nimport java.util.Scanner;nimport java.util.concurrent.ExecutorService;nimport java.util.concurrent.Executors;nnnpublic class Test implements Runnablen String lineString;n public Test(String line)n this.lineString = line;n n static FileWriter writer;n static FileReader reader;n public static void main(String[] args) throws IOException n try n reader = new FileReader("/Users/tcredit-0002/Desktop/car.txt");n Scanner scanner = new Scanner(reader);n String lineString;n writer = new FileWriter("/Users/tcredit-0002/Desktop/hebei.txt");n // TODO Auto-generated method stubn ExecutorService pool = Executors.newFixedThreadPool(3);n while(scanner.hasNext())n lineString = scanner.nextLine();n pool.execute(new Test(lineString));n n scanner.close();n writer.close();n catch (Exception e) n // TODO Auto-generated catch blockn e.printStackTrace();n n n n nn @Overriden public void run() n try n writeResult(lineString);n catch (InterruptedException e) n // TODO Auto-generated catch blockn e.printStackTrace();n n n n public static synchronized void writeResult(String lineString) throws InterruptedExceptionn try n writer.write(lineString+"\r\n");n writer.flush();n System.out.println(lineString);n catch (IOException e) n // TODO Auto-generated catch blockn e.printStackTrace();n n n n nnn
Socket常见异常整理
java.net.SocketTimeoutException java.net.SocketTimeoutException 02-25 20:18:03.856 13374-13390/com.example.studylog W/System.err: at java.net.PlainSocketImpl.read(PlainSocketImpl.java:491) 02-2...
axis客户端出现.ConfigurationException: java.io.IOException: Stream closed
使用axis客户端发送xml消息,出现org.apache.axis.ConfigurationException: java.io.IOException: Stream closed.rn代码如下:rnrnHttpUrlWebClient.sendMobilMessage方法rn[code=java]rnpublic String sendMobilMessage(List flagList)rn rn if(!isSendMessage(flagList))rn return null;rn rn String sentSOAPMsg = null;rn try rn String xmlInfo = messageServiceInfo.getXmlInfo();rn xmlInfo = xmlInfo.replace("#1", "one");rn String flag = System.currentTimeMillis()+"";rn flag = flag.substring(flag.length()-8);rn xmlInfo = xmlInfo.replace("#2", flag);rn xmlInfo = xmlInfo.replace("#3", "调用:["+httpUrlStatusInfo.getUrl()+"]异常!");rn logger.warn("服务调用异常信息:"+xmlInfo);rn logger.warn("开始调用短信服务进行通知.... ");rn InnerAdapterImpl innerAdapterImpl = SmsService.getInnerAdapterImpl(messageServiceInfo);rn sentSOAPMsg = innerAdapterImpl.process("SMS_SEND_MESSAGE_REMEDY", "POMS", xmlInfo);rn logger.warn("短信服务调用结束:"+sentSOAPMsg);rn return sentSOAPMsg;rn catch (Exception e) rn logger.error("短信服务发送异常:"+e.getMessage());rn e.printStackTrace();rn rn return null;rn rn rn[/code]rnrn此处为axis生成的代码rn[code=java]rn/**rn * InnerAdapterImpl.javarn *rn * This file was auto-generated from WSDLrn * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.rn */rnrnrnrnpublic interface InnerAdapterImpl extends java.rmi.Remote rn public java.lang.String process(java.lang.String operation, java.lang.String systemName, java.lang.String xmlData) throws java.rmi.RemoteException;rnrn[/code]rnrnrnSoapUtil类的相关代码rn[code=java]rnpublic class SoapUtil rn rn public static Call addSoapHandle(Call call)rn String sid = UUID.randomUUID().toString();rn SoapRepHandle rep = new SoapRepHandle(sid);rn SoapReqHandle req = new SoapReqHandle(sid , call.getTargetEndpointAddress());rn call.setClientHandlers(req, rep);rn //System.out.println("已添加handle");rn return call;rn rn[/code]rnrnrn报错信息如下:rn[code=text]rn2018-03-03 18:00:47 WARN HttpUrlWebClient:188 [pool-6-thread-6] - 服务调用异常信息:1371902928171247544调用:[http://192.168.4.25:8063/addrServer]异常!rn2018-03-03 18:00:47 WARN HttpUrlWebClient:189 [pool-6-thread-6] - 开始调用短信服务进行通知.... rn2018-03-03 18:00:47 FATAL InternalException:88 [pool-6-thread-6] - Exception:rnorg.apache.axis.ConfigurationException: java.io.IOException: Stream closedrnjava.io.IOException: Stream closedrn at java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:67)rn at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:121)rn at java.io.FilterInputStream.read(FilterInputStream.java:83)rn at com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read(XMLEntityManager.java:2889)rn at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:670)rn at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)rn at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)rn at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)rn at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)rn at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)rn at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:388)rn at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)rn at org.apache.axis.AxisEngine.init(AxisEngine.java:172)rn at org.apache.axis.AxisEngine.(AxisEngine.java:156)rn at org.apache.axis.client.AxisClient.(AxisClient.java:52)rn at org.apache.axis.client.Service.getAxisClient(Service.java:104)rn at org.apache.axis.client.Call.setSOAPService(Call.java:2910)rn at org.apache.axis.client.Call.setClientHandlers(Call.java:2924)rn at com.gpdi.common.util.SoapUtil.addSoapHandle(SoapUtil.java:34)rn at com.gpdi.gx.adapter.InnerAdapterSoapBindingStub.createCall(InnerAdapterSoapBindingStub.java:113)rn at com.gpdi.gx.adapter.InnerAdapterSoapBindingStub.process(InnerAdapterSoapBindingStub.java:127)rn at com.gpdi.gx.HttpUrlWebClient.sendMobilMessage(HttpUrlWebClient.java:191)rn at com.gpdi.gx.HttpUrlWebClient.check(HttpUrlWebClient.java:48)rn at com.gpdi.gx.HttpUrlStatusMonitor$1.run(HttpUrlStatusMonitor.java:83)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnrnorg.apache.axis.ConfigurationException: java.io.IOException: Stream closedrnjava.io.IOException: Stream closedrn at java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:67)rn at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:121)rn at java.io.FilterInputStream.read(FilterInputStream.java:83)rn at com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read(XMLEntityManager.java:2889)rn at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:670)rn at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)rn at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)rn at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)rn at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)rn at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)rn at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:388)rn at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)rn at org.apache.axis.AxisEngine.init(AxisEngine.java:172)rn at org.apache.axis.AxisEngine.(AxisEngine.java:156)rn at org.apache.axis.client.AxisClient.(AxisClient.java:52)rn at org.apache.axis.client.Service.getAxisClient(Service.java:104)rn at org.apache.axis.client.Call.setSOAPService(Call.java:2910)rn at org.apache.axis.client.Call.setClientHandlers(Call.java:2924)rn at com.gpdi.common.util.SoapUtil.addSoapHandle(SoapUtil.java:34)rn at com.gpdi.gx.adapter.InnerAdapterSoapBindingStub.createCall(InnerAdapterSoapBindingStub.java:113)rn at com.gpdi.gx.adapter.InnerAdapterSoapBindingStub.process(InnerAdapterSoapBindingStub.java:127)rn at com.gpdi.gx.HttpUrlWebClient.sendMobilMessage(HttpUrlWebClient.java:191)rn at com.gpdi.gx.HttpUrlWebClient.check(HttpUrlWebClient.java:48)rn at com.gpdi.gx.HttpUrlStatusMonitor$1.run(HttpUrlStatusMonitor.java:83)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnrn at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:188)rn at org.apache.axis.AxisEngine.init(AxisEngine.java:172)rn at org.apache.axis.AxisEngine.(AxisEngine.java:156)rn at org.apache.axis.client.AxisClient.(AxisClient.java:52)rn at org.apache.axis.client.Service.getAxisClient(Service.java:104)rn at org.apache.axis.client.Call.setSOAPService(Call.java:2910)rn at org.apache.axis.client.Call.setClientHandlers(Call.java:2924)rn at com.gpdi.common.util.SoapUtil.addSoapHandle(SoapUtil.java:34)rn at com.gpdi.gx.adapter.InnerAdapterSoapBindingStub.createCall(InnerAdapterSoapBindingStub.java:113)rn at com.gpdi.gx.adapter.InnerAdapterSoapBindingStub.process(InnerAdapterSoapBindingStub.java:127)rn at com.gpdi.gx.HttpUrlWebClient.sendMobilMessage(HttpUrlWebClient.java:191)rn at com.gpdi.gx.HttpUrlWebClient.check(HttpUrlWebClient.java:48)rn at com.gpdi.gx.HttpUrlStatusMonitor$1.run(HttpUrlStatusMonitor.java:83)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnrn at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:188)rn at org.apache.axis.AxisEngine.init(AxisEngine.java:172)rn at org.apache.axis.AxisEngine.(AxisEngine.java:156)rn at org.apache.axis.client.AxisClient.(AxisClient.java:52)rn at org.apache.axis.client.Service.getAxisClient(Service.java:104)rn at org.apache.axis.client.Call.setSOAPService(Call.java:2910)rn at org.apache.axis.client.Call.setClientHandlers(Call.java:2924)rn at com.gpdi.common.util.SoapUtil.addSoapHandle(SoapUtil.java:34)rn at com.gpdi.gx.adapter.InnerAdapterSoapBindingStub.createCall(InnerAdapterSoapBindingStub.java:113)rn at com.gpdi.gx.adapter.InnerAdapterSoapBindingStub.process(InnerAdapterSoapBindingStub.java:127)rn at com.gpdi.gx.HttpUrlWebClient.sendMobilMessage(HttpUrlWebClient.java:191)rn at com.gpdi.gx.HttpUrlWebClient.check(HttpUrlWebClient.java:48)rn at com.gpdi.gx.HttpUrlStatusMonitor$1.run(HttpUrlStatusMonitor.java:83)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rn2018-03-03 18:00:47 ERROR HttpUrlWebClient:195 [pool-6-thread-6] - 短信服务发送异常:Failure trying to get the Call object; nested exception is: rn org.apache.axis.InternalException: org.apache.axis.ConfigurationException: java.io.IOException: Stream closedrnjava.io.IOException: Stream closedrn[/code]rnrn貌似并不是自己编写的代码方面的问题,google百度过,相关的问答不多,有说多线程运行导致的,最接近的就是有个问答用cxf客户端也出现了类似我这个问题,链接如下:http://bbs.csdn.net/topics/390750221 但我用的不是cxf。请问各位大神有否遇上过类似的问题,解决方法是怎样的?在此先行感谢。
Java中异常的抛出问题
Java中异常的抛出问题 问题:父类中某个方法抛出了某种类型的异常,那么子类在重写(@Override) 该方法时,这个被重写的方法应当抛出哪种类型的异常? 先看例子 下面两段代码是JavaWeb的基础代码,其中HttpServlet是TestServlet的父类。 public abstract class HttpServlet { //...... protecte...
[奇技淫巧]Android Studio免DDMS免configure快速调试Smali项目
起因 AndroidStudio是开发Android应用的一大利器,极大的提高了生产力(虽然比较臃肿),debug功能也非常好用,而且不止能debug Java代码,smali代码也能调试,配合apktool使用真的是爽的很(除了indexing花了老半天这个问题以外)。 但是!这个利器在调试smali工程的时候,就表现得十分不友好啦,以前有DDMS的时候还好一些,能看到调试端口号,但是经常遇...
Android 蓝牙对等通信初探
本文阐述蓝牙信开发的基础知识,总结了开发过程中产生的各种问题与解决方法。
解决Retrofit和RxJava 抛出异常报错问题
 解决Retrofit和RxJava 抛出异常报错问题 package com.dingtao.rrmmp.core.exception; public class ApiException extends Exception { private int code; private String displayMessage; public ApiException...
记一次混淆后引起的异常,被覆盖的方法未抛出Exception
gradle不同版本打出的jar对比,未将throw Exception打进jar中,1.5.0版本泛型也没打到jar中
wcf 异常 抛出json格式的异常消息
[code=&quot;java&quot;] // 自定义错误处理: 屏蔽发送给客户端错误信息,自己处理错误信息 public class ErrorHandler : IErrorHandler { string time = &quot;&quot;; //记录错误发生的时间,以便到日志文件中查询错误信息 //由于调用 ProvideFault 时,客户端处于阻塞状态,...
使用RandomAccessFile类时出现了“java.io.EOFException”错误。
下面这段代码: package test; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; public class TestRandomAccessFile { String pathOfFile=
工欲善其事,必先利其器之—命令行下使用jdb调试android应用(MAC环境)
前提说明 先关闭Eclipse,Android Studio这类的IDE,否则jdb attach到应用时出现如下异常,jdb连接中断 java.io.IOException: handshake failed - connection prematurally closed at com.sun.tools.jdi.SocketTransportService.handsha...
@Valid不使用bind改为抛出异常
默认没bind返回400不想返回400可以实现ConreollerAdvicer并且不继承spring自带的
java Servlet(五) 异常处理(配置异常处理页)
一、Servlet 异常处理当一个 Servlet 抛出一个异常时,Web 容器在使用了 exception-type 元素的 web.xml 中搜索与抛出异常类型相匹配的配置。 您必须在 web.xml 中使用 error-page 元素来指定对特定异常 或 HTTP 状态码 作出相应的 Servlet 调用。二、web.xml 配置假设,有一个 ErrorHandler 的 Servelt 在
怎么解决java.io.IOException: 拒绝访问/客户端没有所需的特权(亲测有效)
目录 问题:用Java代码在c盘创建文件对象,运行显示java.io.IOException:拒绝访问 踩得坑:更改磁盘权限,结果运行报错:java.io.IOException: 客户端没有所需的特权 解决方法:换个磁盘创建文件:将c盘改成f盘,运行成功并在f盘创建文件 问题:用Java代码在c盘创建文件对象,运行显示java.io.IOException:拒绝访问 packa...
java管道流的使用疑问Write end dead?
在做一个web日志浏览小工具时候 使用到了java的管道流. 但是使用过程中却一直报了 Write end dead 的异常. 我的需求是这样的: 创建好的管道流, 输出流放入 日志的appender 里面,这样log4j 记录日志时候会自动写入, 然后我再人为跑一个线程不断去读取管道的输入流, 每当有websocket连接进来时候就将其session放入一个集合, 自定义的线程遍历s...
android用okhttp和retrofit访问网络的时候有时候出现EOFException异常
android用okhttp和retrofit访问网络的时候有时候出现EOFException异常  java.io.IOException: unexpected end of stream on Connection{10.144.59.130:8291, proxy=DIRECT@ hostAddress=10.144.59.130 cipherSuite=none protoco
Jsoup导致的一次线上服务中断
一、起因 昨天在线上服务器部署了一个的爬虫程序,部署时一段时间服务都是正常的,第二天早上到公司发现服务中断了,报的错误如下: Handler dispatch failed; nested exception is org.jsoup.UncheckedIOException: java.net.SocketTimeoutException: Read timeout] with root c...
Junit下读取HDFS文件内容时异常The client is stopped
在使用junit的test功能时,对要运行的方法加上@Test,方法中调用另外一个线程类来读取分布式系统HDFS上的文件,由于在线程里调用 FSDataInputStream类的open方法来读取分布式系统上文件的内容,但是在调用的时候抛出The client is stopped的异常,一开始以为是包的问题,导入很多相关包,但还是这个问题。有文档说是因为FileSystem被关闭了
socket is closed异常的原因及其解决方法
close() 放末尾