Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-5755

NEP in camel git component

XMLWordPrintable

    • % %
    • Hide

      Run route like this two times. In second run you will get the exception.

      <route>
         <from uri="direct:start"/>
         <to uri="git://{$TEST_DIR}?remotePath={$REMOTE_REPO}&amp;username={$USERNAME}&amp;password={$PASSWORD}&amp;operation=clone"/>
      </route>
      
      Show
      Run route like this two times. In second run you will get the exception. <route> <from uri= "direct:start" /> <to uri= "git: //{$TEST_DIR}?remotePath={$REMOTE_REPO}&amp;username={$USERNAME}&amp;password={$PASSWORD}&amp;operation=clone" /> </route>
    • Sprint 5 - towards ER2

      I am using camel-git component. When I use operation clone and the repository is already cloned I get the NPE.

      Caused by: java.lang.NullPointerException
      	at org.apache.camel.component.git.producer.GitProducer.doClone(GitProducer.java:177)
      	at org.apache.camel.component.git.producer.GitProducer.process(GitProducer.java:88)
      	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
      	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
      	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
      	at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
      	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
      	at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:68)
      	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:412)
      	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:380)
      	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:270)
      	at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:380)
      	at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:221)
      	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:124)
      	at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:233)
      	... 158 more
      

      Take a look on https://github.com/jboss-fuse/camel/blob/2.17.0.redhat-6-3-x/components/camel-git/src/main/java/org/apache/camel/component/git/producer/GitProducer.java#L163.
      When localRepo.exists() is only thrown an IllegalArgumentException("The local repository directory already exists"). The variable result stay null.
      On line 177 is in finally block called operation result.close() - in this case the result variable is null -> NPE is thrown.

            acosenti Andrea Cosentino
            jbouska@redhat.com Jan Bouska
            Fernando FR Fernando FR (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: