Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

neverending netty errors
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=85&t=57613
Page 1 of 1

Author:  SFXbernhard [ Tue 02 Mar, 2021, 14:33 ]
Post subject:  neverending netty errors

When I start JForex in Eclipse, I am getting these error messages constantly.
com.dukascopy.api.version = 2.13.96

[[DDS2 Standalone Transport Client] NettyUdpTransportThread - 0] ERROR com.dukascopy.dds4.transport.client.netty.udp.UdpClientProtocolHandler - 'com.google.common.util.concurrent.ListenableFuture com.google.common.util.concurrent.Futures.dereference(com.google.common.util.concurrent.ListenableFuture)'
java.lang.NoSuchMethodError: 'com.google.common.util.concurrent.ListenableFuture com.google.common.util.concurrent.Futures.dereference(com.google.common.util.concurrent.ListenableFuture)'
   at com.dukascopy.dds4.transport.netty.AsyncSettableFuture.<init>(AsyncSettableFuture.java:47)
   at com.dukascopy.dds4.transport.netty.AsyncSettableFuture.create(AsyncSettableFuture.java:43)
   at com.dukascopy.dds4.transport.client.netty.task.AbstractEventExecutorChannelTask.executeInExecutor(AbstractEventExecutorChannelTask.java:184)
   at com.dukascopy.dds4.transport.client.netty.task.AbstractEventExecutorChannelTask.executeInExecutor(AbstractEventExecutorChannelTask.java:85)
   at com.dukascopy.dds4.transport.client.netty.udp.UdpClientProtocolHandler.fireFeedbackMessageReceived(UdpClientProtocolHandler.java:276)
   at com.dukascopy.dds4.transport.client.netty.udp.UdpClientProtocolHandler.messageReceived(UdpClientProtocolHandler.java:227)
   at com.dukascopy.dds4.transport.client.netty.udp.UdpClientProtocolHandler.channelRead(UdpClientProtocolHandler.java:192)
   at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
   at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
   at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:93)
   at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
   at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
   at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
   at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
   at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
   at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   at java.base/java.lang.Thread.run(Thread.java:832)


Please help

Author:  Platform Support [ Wed 17 Mar, 2021, 08:22 ]
Post subject:  Re: neverending netty errors

You are using an old version of the transport. The latest version is 2.0.0

Can you list the .jar's in the classpath?

Author:  SFXbernhard [ Wed 17 Mar, 2021, 16:00 ]
Post subject:  Re: neverending netty errors

this is my pom.xml
Should be all on the latest version from your side. But I am still getting these errors.

<?xml version="1.0" encoding="UTF-8"?>
<!--
   The following is an example Maven pom file which allows the user to
   to build JForex-SDK by using the latest version of dependencies
   from dukascopy public repository with command: mvn clean install
-->
<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.dukascopy.dds2</groupId>
   <artifactId>JForex-3-SDK</artifactId>
        <version>3.6.32</version>
   <organization>
      <name>Dukascopy Bank SA</name>
      <url>https://www.dukascopy.com</url>
   </organization>
   <repositories>
      <repository>
         <id>dc_public</id>
         <name>Dukascopy public repository</name>
         <url>https://www.dukascopy.com/client/jforexlib/publicrepo/</url>
      </repository>
   </repositories>

    <properties>
        <com.dukascopy.api.version>2.13.97</com.dukascopy.api.version>
        <com.dukascopy.jclient.version>3.6.32</com.dukascopy.jclient.version>
    </properties>

   <dependencies>
      <dependency>
         <groupId>com.dukascopy.dds2</groupId>
         <artifactId>DDS2-jClient-JForex</artifactId>
         <!-- find the latest available version here:
            https://www.dukascopy.com/client/jforexlib/publicrepo/com/dukascopy/dds2/DDS2-jClient-JForex/
         -->
                      <version>${com.dukascopy.jclient.version}</version>
      </dependency>
      <dependency>
         <groupId>com.dukascopy.api</groupId>
         <artifactId>JForex-API</artifactId>
         <!-- find the latest available version here:
                https://www.dukascopy.com/client/jforexlib/publicrepo/com/dukascopy/api/JForex-API/
            -->
            <version>${com.dukascopy.api.version}</version>
         <classifier>sources</classifier>
      </dependency>
   </dependencies>
   <build>
      <sourceDirectory>src</sourceDirectory>
      <resources>
         <resource>
            <directory>rc</directory>
         </resource>
      </resources>
      <plugins>
         <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.0</version>
            <inherited>true</inherited>
            <configuration>
               <source>1.8</source>
               <target>1.8</target>
               <fork>true</fork>
               <encoding>UTF-8</encoding>
            </configuration>
         </plugin>
      </plugins>
   </build>
</project>

Image
Image

Attachments:
dependencies1.png [16.47 KiB]
Downloaded 8471 times
dependencies0.png [94.08 KiB]
Downloaded 8477 times

Author:  Platform Support [ Fri 19 Mar, 2021, 15:02 ]
Post subject:  Re: neverending netty errors

This excetion can be thrown only if the guava version is not 19.0 in the runtime. Are you sure you have this version?

Author:  SFXbernhard [ Fri 19 Mar, 2021, 15:39 ]
Post subject:  Re: neverending netty errors

guava version 19.0 is in the list as you can see.
This problem should be replicable, just open a new project and import my pom.xml. I attached it below.

Attachments:
pom.xml [2.25 KiB]
Downloaded 864 times

Author:  Platform Support [ Fri 19 Mar, 2021, 17:26 ]
Post subject:  Re: neverending netty errors

Do you have some additional custom dependancies, where guava can be of different version?

Author:  SFXbernhard [ Fri 19 Mar, 2021, 17:46 ]
Post subject:  Re: neverending netty errors

Yes, there is a connected project that uses guava 30.0-jre
I just created a new project without this connected project and no netty errors appear.
Once I add the other project in the build path, these errors are back.

Solution:
I went to the connected project and checked the "Resolved Dependencies", then I right clicked on guava 30.0-jre and selected "Remove Maven Artifact...".
This removed the errors.

Thanks to you, your hint helped a lot!

Author:  SFXbernhard [ Thu 25 Mar, 2021, 23:05 ]
Post subject:  Re: neverending netty errors

Could you upgrade your guava 19 to a more current one?
Version 19 is a bit outdated since it is from 2016.
Latest version is 30.1.1
https://mvnrepository.com/artifact/com. ... uava/guava

Author:  Platform Support [ Mon 29 Mar, 2021, 16:06 ]
Post subject:  Re: neverending netty errors

No, we cannot. We've got rid of Guava at all in the current transport-client version. We are using CompletableFuture now.
Please, switch to the latest version of our code. You will be able to use Guava whatever version you want then.

  Page 1 of 1