[ 
https://issues.apache.org/jira/browse/CAMEL-11947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Diesler reassigned CAMEL-11947:
--------------------------------------

    Assignee: Thomas Diesler

> Race condition in iec60870 producer
> -----------------------------------
>
>                 Key: CAMEL-11947
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11947
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-iec60870
>    Affects Versions: 2.20.0
>            Reporter: James Netherton
>            Assignee: Thomas Diesler
>            Priority: Minor
>
> I've been working on integrating the iec60870 component with WIldFly. I have 
> an integration test 
> [here|https://github.com/wildfly-extras/wildfly-camel/blob/master/itests/standalone/basic/src/test/java/org/wildfly/camel/test/iec60870/Iec60870IntegrationTest.java].
>  When it's executed on its own, everything works fine. When it runs with the 
> entire test suite, I encounter a NullPointerException in the Neoscada 
> [Client.writeCommand()|https://github.com/eclipse/neoscada/blob/master/protocols/org.eclipse.neoscada.protocol.iec60870.client/src/org/eclipse/neoscada/protocol/iec60870/client/Client.java#L259]
>  method.
> It seems that the Netty channel that it's trying to write to is null and that 
> initialisation of the channel happens async in 
> [Client.handleOperationComplete()|https://github.com/eclipse/neoscada/blob/master/protocols/org.eclipse.neoscada.protocol.iec60870.client/src/org/eclipse/neoscada/protocol/iec60870/client/Client.java#L138].
>  When I debug, I see the channel gets initialised after the call to 
> writeCommand().
> Not sure if there's any way to detect whether the client connection has been 
> established before trying to use it in the 
> [ClientProducer|https://github.com/apache/camel/blob/master/components/camel-iec60870/src/main/java/org/apache/camel/component/iec60870/client/ClientProducer.java#L49].
>  Or maybe this ticket would be better placed with the neoscada project?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to