Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-1738

Stream destroy fails to remove if the underlying modules have been removed.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: To Do
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: M7
    • Fix Version/s: 1.x
    • Component/s: None
    • Labels:
      None
    • Story Points:
      5
    • Rank (Obsolete):
      44397
    • Sprint:
      Sprint 27

      Description

      In short if you attempt to destroy a stream that has had its modules removed, the destroy will fail.
      1) So if I create my own processor:x and use the processor in a stream.
      2) I then shutdown the admin and container.
      3) Delete the processor:x from the $XD_HOME/modules directory
      4) Restart the admin and container.
      5) if you do a stream list the stream that used the processor.x is still present.
      6) but you can not delete the stream because of the exception below.

      [To Reproduce using Payload Conversion example]
      1) Follow the instructions to install and use the myTupleProcessor module in a stream.
      2) Now shutdown the admin and container
      3) rm -rf $XD_HOME/modules/processor/myTupleProcessor.xml
      4) rm -rf $XD_HOME/lib/payload-conversion.jar
      5) Startup your admin and container
      6) stream all destroy. Then type 'y'<return>
      6a) The shell will report ommand failed org.springframework.xd.rest.client.impl.SpringXDException: No content to map due to end-of-input at [Source: [email protected]; line: 1, column: 1]
      6b) The Admin Server will report
      11:59:43,543 ERROR http-nio-9393-exec-1 rest.RestControllerAdvice:199 - Caught exception while handling a request
      org.springframework.xd.dirt.zookeeper.ZooKeeperAccessException: No content to map due to end-of-input
      at [Source: [email protected]; line: 1, column: 1]
      at org.springframework.xd.dirt.zookeeper.ZooKeeperUtils.wrapThrowable(ZooKeeperUtils.java:47)
      at org.springframework.xd.dirt.zookeeper.ZooKeeperUtils.wrapThrowable(ZooKeeperUtils.java:31)
      at org.springframework.xd.dirt.zookeeper.ZooKeeperUtils.wrapAndThrowIgnoring(ZooKeeperUtils.java:65)
      at org.springframework.xd.dirt.module.store.ZooKeeperModuleDefinitionRepository.findByNameAndType(ZooKeeperModuleDefinitionRepository.java:95)
      at org.springframework.xd.dirt.stream.XDStreamParser.resolveModuleType(XDStreamParser.java:300)
      at org.springframework.xd.dirt.stream.XDStreamParser.determineType(XDStreamParser.java:196)
      at org.springframework.xd.dirt.stream.XDStreamParser.parse(XDStreamParser.java:152)
      at org.springframework.xd.dirt.stream.StreamDeployer.beforeDelete(StreamDeployer.java:116)
      at org.springframework.xd.dirt.stream.StreamDeployer.beforeDelete(StreamDeployer.java:43)
      at org.springframework.xd.dirt.stream.AbstractDeployer.delete(AbstractDeployer.java:246)
      at org.springframework.xd.dirt.stream.AbstractDeployer.deleteAll(AbstractDeployer.java:169)
      at org.springframework.xd.dirt.stream.AbstractInstancePersistingDeployer.deleteAll(AbstractInstancePersistingDeployer.java:100)
      at org.springframework.xd.dirt.rest.XDController.deleteAll(XDController.java:110)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
      at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
      at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
      at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
      at org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:885)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:653)
      at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilter(WebRequestTraceFilter.java:115)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextFilterConfiguration$1.doFilterInternal(EndpointWebMvcAutoConfiguration.java:137)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:88)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfiguration$MetricsFilter.doFilterInternal(MetricFilterAutoConfiguration.java:85)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1680)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
      at [Source: [email protected]; line: 1, column: 1]
      at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
      at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3036)
      at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2978)
      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2098)
      at org.springframework.xd.dirt.module.store.ZooKeeperModuleDefinitionRepository.findByNameAndType(ZooKeeperModuleDefinitionRepository.java:82)
      ... 61 more

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            grenfro Glenn Renfro
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: