{"action":"created","issue":{"url":"https://api.github.com/repos/mybatis/mybatis-3/issues/863","repository_url":"https://api.github.com/repos/mybatis/mybatis-3","labels_url":"https://api.github.com/repos/mybatis/mybatis-3/issues/863/labels{/name}","comments_url":"https://api.github.com/repos/mybatis/mybatis-3/issues/863/comments","events_url":"https://api.github.com/repos/mybatis/mybatis-3/issues/863/events","html_url":"https://github.com/mybatis/mybatis-3/issues/863","id":194333489,"number":863,"title":"@Intercepts PROCEDURE: throws ClientAbortException: java.io.IOException: Broken pipe","user":{"login":"zhoufan879","id":6309448,"avatar_url":"https://avatars.githubusercontent.com/u/6309448?v=3","gravatar_id":"","url":"https://api.github.com/users/zhoufan879","html_url":"https://github.com/zhoufan879","followers_url":"https://api.github.com/users/zhoufan879/followers","following_url":"https://api.github.com/users/zhoufan879/following{/other_user}","gists_url":"https://api.github.com/users/zhoufan879/gists{/gist_id}","starred_url":"https://api.github.com/users/zhoufan879/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhoufan879/subscriptions","organizations_url":"https://api.github.com/users/zhoufan879/orgs","repos_url":"https://api.github.com/users/zhoufan879/repos","events_url":"https://api.github.com/users/zhoufan879/events{/privacy}","received_events_url":"https://api.github.com/users/zhoufan879/received_events","type":"User","site_admin":false},"labels":[{"id":486354880,"url":"https://api.github.com/repos/mybatis/mybatis-3/labels/waiting%20for%20feedback","name":"waiting for feedback","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-12-08T13:17:57Z","updated_at":"2016-12-12T02:56:06Z","closed_at":"2016-12-12T02:54:21Z","body":"<!--\r\nThank you for your contribution!\r\n\r\nQuestion?\r\n======================\r\nPlease use the mailing list. http://groups.google.com/group/mybatis-user\r\nQuestions on this tracker will be closed without comment.\r\n\r\nBug report?\r\n======================\r\nPlease fill out the BUG REPORT FORM below.\r\n\r\nTo fix a bug, we need to reproduce it first.\r\nAnd we spend a lot of time just trying to reproduce the reported problem, so please consider creating a failing test case or an example project.\r\n\r\n- How to create a test case : https://github.com/mybatis/mybatis-3/wiki/Unit-Test\r\n- How to create a good example : http://sscce.org\r\n- How to upload your project to GitHub: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/\r\n\r\nFeature request?\r\n=======================\r\n- Please delete the BUG REPORT FORM below and describe the feature.\r\n- It is a good idea to discuss your changes on the mailing list to get feedback from the community. http://groups.google.com/group/mybatis-user\r\n- If you have a patch with unit tests, send a pull request. Please see the wiki page : https://github.com/mybatis/mybatis-3/wiki/Contribute\r\n-->\r\n\r\n<!-- BUG REPORT FORM -->\r\n\r\n*I just want to get the SQL-execute-time*\r\n\r\n## MyBatis version\r\n3.2.8\r\n\r\n## Database vendor and version\r\nOracle 12c\r\n\r\n## Test case or example project\r\n\r\n## Steps to reproduce\r\n```java\r\n@Intercepts({\r\n        @Signature(type = Executor.class, method = \"query\", args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class}),\r\n        @Signature(type = Executor.class, method = \"update\", args = {MappedStatement.class, Object.class})\r\n})\r\npublic class SqlInterceptor implements Interceptor {\r\n\tprotected Logger logger = Logger.getLogger(SqlInterceptor.class);\r\n\r\n    @Override\r\n    public Object intercept(Invocation invocation) throws Throwable {\r\n        long start = System.currentTimeMillis();\r\n        Object result = invocation.proceed();\r\n        long end = System.currentTimeMillis();\r\n        long timing = end - start;\r\n        logger.debug(\"sql-exe-time:[\" + timing + \"]ms\");\r\n        return result;\r\n    }\r\n\r\n    @Override\r\n    public Object plugin(Object target) {\r\n        if (target instanceof Executor) {\r\n            return Plugin.wrap(target, this);\r\n        }\r\n        return target;\r\n    }\r\n\r\n    @Override\r\n    public void setProperties(Properties properties) {\r\n    }\r\n  }\r\n```\r\n\r\nthen call procedure in mybatis\r\n```sql\r\n{call PROCEDURE_NAME(?,?)} \r\n```\r\n\r\n## Expected result\r\nlog> sql-exe-time[xxx]ms\r\n\r\n## Actual result\r\n```java\r\norg.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe\r\n\tat org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)\r\n\tat org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)\r\n\tat org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:342)\r\n\tat org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:317)\r\n\tat org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:110)\r\n\tat com.fasterxml.jackson.core.json.UTF8JsonGenerator.flush(UTF8JsonGenerator.java:1042)\r\n\tat com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:2242)\r\n\tat org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.writeInternal(AbstractJackson2HttpMessageConverter.java:231)\r\n\tat org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:208)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:186)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:125)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:185)\r\n\tat org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:71)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:126)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:775)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)\r\n\tat org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)\r\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)\r\n\tat org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:622)\r\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:729)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\r\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\r\n\tat org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\r\n\tat com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\r\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)\r\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)\r\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)\r\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)\r\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)\r\n\tat org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)\r\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)\r\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)\r\n\tat org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)\r\n\tat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)\r\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1526)\r\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1482)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n\r\nCaused by: java.io.IOException: Broken pipe\r\n\tat sun.nio.ch.FileDispatcherImpl.write0(Native Method)\r\n\tat sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)\r\n\tat sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)\r\n\tat sun.nio.ch.IOUtil.write(IOUtil.java:65)\r\n\tat sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)\r\n\tat org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:127)\r\n\tat org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)\r\n\tat org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)\r\n\tat org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)\r\n\tat org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)\r\n\tat org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)\r\n\tat org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)\r\n\tat org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:93)\r\n\tat org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)\r\n\tat org.apache.coyote.Response.doWrite(Response.java:503)\r\n\tat org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)\r\n\t... 51 more\r\n```\r\n\r\n\r\nthank you :)"},"comment":{"url":"https://api.github.com/repos/mybatis/mybatis-3/issues/comments/266332635","html_url":"https://github.com/mybatis/mybatis-3/issues/863#issuecomment-266332635","issue_url":"https://api.github.com/repos/mybatis/mybatis-3/issues/863","id":266332635,"user":{"login":"zhoufan879","id":6309448,"avatar_url":"https://avatars.githubusercontent.com/u/6309448?v=3","gravatar_id":"","url":"https://api.github.com/users/zhoufan879","html_url":"https://github.com/zhoufan879","followers_url":"https://api.github.com/users/zhoufan879/followers","following_url":"https://api.github.com/users/zhoufan879/following{/other_user}","gists_url":"https://api.github.com/users/zhoufan879/gists{/gist_id}","starred_url":"https://api.github.com/users/zhoufan879/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhoufan879/subscriptions","organizations_url":"https://api.github.com/users/zhoufan879/orgs","repos_url":"https://api.github.com/users/zhoufan879/repos","events_url":"https://api.github.com/users/zhoufan879/events{/privacy}","received_events_url":"https://api.github.com/users/zhoufan879/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T02:56:06Z","updated_at":"2016-12-12T02:56:06Z","body":"i get this question, the error is my env - sentos :)"}}
{"actor":{"display_login":"zhoufan879"}}