Project: springxd
Issue XD-2685: Module delete command sporadically fails on windows
When a user executes a module delete on a custom module it sporadically fails with the following exception below at the bottom of the description. Deployment: OS: Windows 8 or Windows Server 2012 R2 Java version Java 8 (build 25.31-b07, mixed mode) XD Deployment type. XD-Singlenode (embedded zookeeper) Steps to reproduce: 1) build either the rss-feed-source or the payload-conversion samples from the spring-xd-samples 2) start xd-singlenode 3) start shell 4) from the shell execute module upload for the custom module i.e. module upload --file C:\project\spring-xd-samples\payloadconversion\build\libs\payload-conversion-1.0.0.BUILD-SNAPSHOT.jar --name myTupleProcessor --type processor 5) Verify that the module was uploaded by executing module info processor:myTupleProcessor 6) Execute module delete processor:myTupleProcessor {noformat} 2015-02-18 14:48:43,908 1.1.0.RELEASE ERROR qtp752571350-38 rest.RestControllerA dvice - Caught exception while handling a request org.springframework.xd.dirt.module.DependencyException: Cannot delete module pro cessor:myTupleProcessor because it is used by [stream:test] at org.springframework.xd.dirt.module.ModuleDefinitionService.delete(Mod uleDefinitionService.java:116) at org.springframework.xd.dirt.rest.ModulesController.delete(ModulesCont roller.java:155) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.springframework.web.method.support.InvocableHandlerMethod.doInvok e(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeF orRequest(InvocableHandlerMethod.java:137) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocabl eHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingH andlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:777) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingH andlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:706) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapt er.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatch erServlet.java:943) at org.springframework.web.servlet.DispatcherServlet.doService(Dispatche rServlet.java:877) at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame workServlet.java:966) at org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkSe rvlet.java:890) at javax.servlet.http.HttpServlet.service(HttpServlet.java:761) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkSer vlet.java:842) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684 ) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1496) at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConf iguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConf iguration.java:291) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR equestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1467) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInterna l(HiddenHttpMethodFilter.java:77) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR equestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1467) at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInter nal(HttpPutFormContentFilter.java:87) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR equestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1467) at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilter Internal(WebRequestTraceFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR equestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1467) at org.springframework.security.web.FilterChainProxy.doFilterInternal(Fi lterChainProxy.java:186) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai nProxy.java:160) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1467) at org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfig uration$MetricsFilter.doFilterInternal(MetricFilterAutoConfiguration.java:90) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR equestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1467) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java :499) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j ava:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.jav a:557) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandl er.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandl er.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java: 428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandle r.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandle r.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j ava:135) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper .java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(Abstrac tHttpConnection.java:494) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(Abstra ctHttpConnection.java:971) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.header Complete(AbstractHttpConnection.java:1033) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnecti on.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEn dPoint.java:667) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEnd Point.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo l.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool .java:543) at java.lang.Thread.run(Thread.java:745) 2015-02-18 14:50:38,191 1.1.0.RELEASE INFO main-EventThread server.DeploymentLi stener - Undeploying module [ModuleDescriptor@14b69ddf moduleName = 'http', modu leLabel = 'http', group = 'test', sourceChannelName = [null], sinkChannelName = [null], index = 0, type = source, parameters = map[[empty]], children = list[[em pty]]] 2015-02-18 14:50:38,380 1.1.0.RELEASE INFO main-EventThread server.DeploymentLi stener - Undeploying module [ModuleDescriptor@7c2cd32 moduleName = 'myTupleProce ssor', moduleLabel = 'myTupleProcessor', group = 'test', sourceChannelName = [nu ll], sinkChannelName = [null], index = 1, type = processor, parameters = map['in putType' -> 'application/x-xd-tuple'], children = list[[empty]]] 2015-02-18 14:50:38,470 1.1.0.RELEASE INFO main-EventThread server.DeploymentLi stener - Undeploying module [ModuleDescriptor@30ba1084 moduleName = 'log', modul eLabel = 'log', group = 'test', sourceChannelName = [null], sinkChannelName = [n ull], index = 2, type = sink, parameters = map[[empty]], children = list[[empty] ]] 2015-02-18 14:50:38,527 1.1.0.RELEASE INFO DeploymentSupervisor-0 server.Initia lDeploymentListener - Path cache event: path=/deployments/streams/test, type=CHI LD_REMOVED 2015-02-18 14:50:38,528 1.1.0.RELEASE INFO DeploymentsPathChildrenCache-0 serve r.DeploymentListener - Path cache event: path=/deployments/modules/allocated/f66 35afd-7351-4ac3-baa3-3b98e74a38ca/test.source.http.1, type=CHILD_REMOVED 2015-02-18 14:50:38,530 1.1.0.RELEASE INFO DeploymentsPathChildrenCache-0 serve r.DeploymentListener - Path cache event: path=/deployments/modules/allocated/f66 35afd-7351-4ac3-baa3-3b98e74a38ca/test.processor.myTupleProcessor.1, type=CHILD_ REMOVED 2015-02-18 14:50:38,532 1.1.0.RELEASE INFO DeploymentsPathChildrenCache-0 serve r.DeploymentListener - Path cache event: path=/deployments/modules/allocated/f66 35afd-7351-4ac3-baa3-3b98e74a38ca/test.sink.log.1, type=CHILD_REMOVED 2015-02-18 14:50:41,486 1.1.0.RELEASE INFO LeaderSelector-0 server.DeploymentSu pervisor - Leadership canceled due to thread interrupt 2015-02-18 14:50:41,592 1.1.0.RELEASE WARN NIOServerCxn.Factory:0.0.0.0/0.0.0.0 :5156 server.NIOServerCnxn - caught end of stream exception EndOfStreamException: Unable to read additional data from client sessionid 0x14b 9d2656c30000, likely client has closed socket at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228 ) at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFac tory.java:208) at java.lang.Thread.run(Thread.java:745) {noformat}
Story points: 3