camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Angela Wickert (JIRA)" <>
Subject [jira] [Commented] (CAMEL-8241) Exec command failures using Java 8 on Unix
Date Wed, 18 Feb 2015 11:12:11 GMT


Angela Wickert commented on CAMEL-8241:

I've got the same problem as described.I've reduced my program on a simple route. 

I am using CentOS 6.4, jdk1.8.0_25 and the camel version 2.14.1.

this is the route:
 <route id="test_exec" autoStartup="true">
      <from uri="file://target/test" />
      <to uri="exec:pwd" />

and this is the stracktrace:
org.apache.camel.component.exec.ExecException: Unable to execute command ExecCommand [args=[],
executable=pwd, timeout=9223372036854775807, outFile=null, workingDir=null, useStderrOnEmptyStdout=false]
        at org.apache.camel.component.exec.impl.DefaultExecCommandExecutor.execute(
        at org.apache.camel.component.exec.ExecProducer.process(
        at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(
        at org.apache.camel.processor.SendProcessor.process(
        at org.apache.camel.processor.interceptor.TraceInterceptor.process(
        at org.apache.camel.processor.RedeliveryErrorHandler.process(
        at org.apache.camel.processor.CamelInternalProcessor.process(
        at org.apache.camel.processor.CamelInternalProcessor.process(
        at org.apache.camel.component.file.GenericFileConsumer.processExchange(
        at org.apache.camel.component.file.GenericFileConsumer.processBatch(
        at org.apache.camel.component.file.GenericFileConsumer.poll(
        at org.apache.camel.impl.ScheduledPollConsumer.doRun(
        at java.util.concurrent.Executors$
        at java.util.concurrent.FutureTask.runAndReset(
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(
        at java.util.concurrent.ScheduledThreadPoolExecutor$
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$
Caused by: Stream closed
        at java.lang.ProcessBuilder$NullOutputStream.write(
        at org.apache.commons.exec.DefaultExecutor.closeStreams(
        at org.apache.commons.exec.DefaultExecutor.executeInternal(
        at org.apache.commons.exec.DefaultExecutor.execute(
        at org.apache.commons.exec.DefaultExecutor.execute(
        at org.apache.camel.component.exec.impl.DefaultExecCommandExecutor.execute(
        ... 20 more

> Exec command failures using Java 8 on Unix
> ------------------------------------------
>                 Key: CAMEL-8241
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.14.0
>         Environment: JDK 1.8 on Unix systems
>            Reporter: Dave Heath
>             Fix For: 2.14.2, 2.15.0
>         Attachments:
> I'm attaching a test case that shows an issue I've been running into with the exec command
since updating my environment to Java 8. It appears that I'm running into a race condition
where a stream is sometimes closed prematurely before DefaultExecutor has a chance to close
it, causing DefaultExecCommandExecutor to throw and exit (even though the command did execute
properly). I've tested this against the updated version of commons-exec as well just to make
sure this hasn't somehow been fixed in that library.
> Please note that the attached test doesn't always fail; you may need to run it a few
times before the error will show up.

This message was sent by Atlassian JIRA

View raw message