Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-2823 Composite Modules should inherit "xd.*" properties
  3. XD-2820

Composing transformer and gemfire-json-server leads to FileNotFoundException during deployment

    XMLWordPrintable

    Details

    • Type: Technical task
    • Status: Done
    • Priority: Critical
    • Resolution: Complete
    • Affects Version/s: 1.1 GA
    • Fix Version/s: 1.1.1, 1.2 M1
    • Component/s: Runtime
    • Labels:
      None

      Description

      Composing "transform" and "gemfire-json-server" modules leads to FileNotFoundException during stream deployment when:

      • xd-admin and xd-container are started as system services (after installing from RPM).
      • xd-singelonde is started outside of $XD_HOME/bin directory e.g.
        $ cd "$XD_HOME"
        $ bin/xd-singelonde
        

      but it's fully working and exception is not thrown when:

      • xd-singlenode script is started from within "$XD_HOME/bin directory
        $ cd "$XD_HOME/bin"
        $ ./xd-singelonde
        

      Then using the XD Shell:

      $ xd-shell
      > module compose --name "cm-gem-sink" --definition "transform --outputType='application/json' | gemfire-json-server --regionName=timeRegion --keyExpression=payload.getField('location')"
      > stream create --name "cm-test-gem" --definition "tail --name='/tmp/time.json' | cm-gem-sink" 
      > stream deploy --name "cm-test-gem"
      

      Stream deployment will result in following exception

      [2015-03-11 16:38:10.918] boot - 17402  INFO [DeploymentsPathChildrenCache-0] --- DeploymentListener: Deploying module [[email protected] moduleName = 'tail', moduleLabel = 'tail', group = 'cm-test-gem', sourceChannelName = [null], sinkChannelName = [null], index = 0, type = source, parameters = map['name' -> '/tmp/time.json'], children = list[[empty]]]
      2015-03-11 16:38:11,263 1.1.0.RELEASE  INFO DeploymentSupervisor-0 server.StreamDeploymentListener - Deployment status for stream 'cm-test-gem': DeploymentStatus{state=failed,error(s)=org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Error evaluating Groovy script: Configuration problem: Error evaluating Groovy script: ../modules/common/gemfire-sink.groovy (No such file or directory)
      Offending resource: URL [file:../modules/common/gemfire-sink.groovy]; nested exception is java.io.FileNotFoundException: ../modules/common/gemfire-sink.groovy (No such file or directory)
      Offending resource: file [/opt/spring-xd/spring-xd-1.1.0.RELEASE/xd/modules/sink/gemfire-json-server/config/gemfire-json-server.groovy]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Error evaluating Groovy script: ../modules/common/gemfire-sink.groovy (No such file or directory)
      Offending resource: URL [file:../modules/common/gemfire-sink.groovy]; nested exception is java.io.FileNotFoundException: ../modules/common/gemfire-sink.groovy (No such file or directory)
      	at org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader.loadBeanDefinitions(GroovyBeanDefinitionReader.java:247)
      	at org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader.loadBeanDefinitions(GroovyBeanDefinitionReader.java:202)
      	at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:178)
      	at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:138)
      	at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:127)
      	at org.springframework.boot.SpringApplication.load(SpringApplication.java:620)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
      	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139)
      	at org.springframework.xd.module.core.SimpleModule.initialize(SimpleModule.java:214)
      	at org.springframework.xd.module.core.CompositeModule.initialize(CompositeModule.java:105)
      	at org.springframework.xd.dirt.module.ModuleDeployer.doDeploy(ModuleDeployer.java:217)
      	at org.springframework.xd.dirt.module.ModuleDeployer.deploy(ModuleDeployer.java:200)
      	at org.springframework.xd.dirt.server.DeploymentListener.deployModule(DeploymentListener.java:363)
      	at org.springframework.xd.dirt.server.DeploymentListener.deployStreamModule(DeploymentListener.java:332)
      	at org.springframework.xd.dirt.server.DeploymentListener.onChildAdded(DeploymentListener.java:179)
      	at org.springframework.xd.dirt.server.DeploymentListener.childEvent(DeploymentListener.java:147)
      	at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:509)
      	at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:503)
      	at org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:92)
      	at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
      	at org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:83)
      	at org.apache.curator.framework.recipes.cache.PathChildrenCache.callListeners(PathChildrenCache.java:500)
      	at org.apache.curator.framework.recipes.cache.EventOperation.invoke(EventOperation.java:35)
      	at org.apache.curator.framework.recipes.cache.PathChildrenCache$10.run(PathChildrenCache.java:762)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	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:745)
      Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Error evaluating Groovy script: ../modules/common/gemfire-sink.groovy (No such file or directory)
      Offending resource: URL [file:../modules/common/gemfire-sink.groovy]; nested exception is java.io.FileNotFoundException: ../modules/common/gemfire-sink.groovy (No such file or directory)
      	at org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader.loadBeanDefinitions(GroovyBeanDefinitionReader.java:247)
      	at org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader.loadBeanDefinitions(GroovyBeanDefinitionReader.java:202)
      	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
      	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
      	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
      	at org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader.importBeans(GroovyBeanDefinitionReader.java:337)
      	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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
      	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:368)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
      	at beans$_run_closure1.doCall(beans:4)
      	at beans$_run_closure1.doCall(beans)
      	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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
      	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:278)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
      	at groovy.lang.Closure.call(Closure.java:423)
      	at groovy.lang.Closure.call(Closure.java:417)
      	at org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader.invokeBeanDefiningClosure(GroovyBeanDefinitionReader.java:426)
      	at org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader$1.call(GroovyBeanDefinitionReader.java:223)
      	at groovy.lang.Closure.call(Closure.java:439)
      	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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
      	at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1253)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1209)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
      	at beans.run(beans:1)
      	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:649)
      	at org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader.loadBeanDefinitions(GroovyBeanDefinitionReader.java:243)
      	... 30 more
      Caused by: java.io.FileNotFoundException: ../modules/common/gemfire-sink.groovy (No such file or directory)
      	at java.io.FileInputStream.open(Native Method)
      	at java.io.FileInputStream.<init>(FileInputStream.java:146)
      	at java.io.FileInputStream.<init>(FileInputStream.java:101)
      	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
      	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
      	at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:168)
      	at org.springframework.core.io.support.EncodedResource.getReader(EncodedResource.java:132)
      	at org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader.loadBeanDefinitions(GroovyBeanDefinitionReader.java:243)
      	... 80 more
      

      Exporting XD_HOME as a global variable seems to have no effect on this behavior.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dturanski David Turanski
              Reporter:
              kdowbecki Karol Dowbecki
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: