-
Basic Stock-List Demo
I'm trying to run the Basic Stock-List Demo but I'm facing some issues.
when I run the Basic Stock-List Demo using the batch file , it's working perfectly.
I have downloaded the code of the Basic Stock-List Demo, but when I'm running the code, code running per fectly but unfortunately with no connection to the lightstreamer server.
No exception, no errors, but lightstreamer client always is disconnected.
I'm using ls-javase-client-4.3.5.jar
What is the issue?
-
Hi ManKeer,
Are you targeting a local server or our public demo server?
Please double check the args[0] argument passed when you launch your code.
Regards,
Giuseppe
-
Definitely, I'm targeting my local server in both cases.
both of them wither the batch file or the java arguments are set to the same local server light streamer.
but unfortunately the batch working, but the code not working at all.
-
Hi ManKeer,
Please add to your project also this dependency:
<dependency>
<groupId>com.lightstreamer</groupId>
<artifactId>java-system-out-log</artifactId>
<version>1.0.2</version>
</dependency>
and this line of code in the StockFeed class, just before the LightstreamerClient initialization:
LightstreamerClient.setLoggerProvider(new SystemOutLogProvider());
That will produce the log of the client library, maybe will help us find some clues about the problem.
Regards,
Giuseppe
-
Hi Giuseppe,
My project is not a maven project, it's just java project, how can I get all dependencies which are needed by my project.
-
Hi Giuseppe,
I want to tell you that finally I have solved the issue.
I have added the following JAR's to my java project build path.
1. netty-common-4.1.19.Final.jar from \Lightstreamer_Home_Dir\lib\mpn\apple
2. The following JAR files list are taken from \Lightstreamer_Home_Dir\lib\mpn:
a. netty-buffer-4.1.19.Final.jar
b. netty-codec-4.1.19.Final.jar
c. netty-codec-http-4.1.19.Final.jar
d. netty-resolver-4.1.19.Final.jar
e. netty-transport-4.1.19.Final.jar
Would you please confirm that all of these libraries are mandatory for my Java client application to run perfectly.
Thank you very much for your help
-
Hi ManKeer,
Yes, if you don't use a build tool such as Maven, Gradle or similar, you need to gather the necessary jars yourself by going up the chain of declared dependencies starting from the Lightstreamer Java Client lib (https://github.com/Lightstreamer/Lig...b/build.gradle).
Anyway I can confirm that the complete list of jars needed by the demo is:
ls-javase-client-4.3.5.jar
json-io-4.10.0.jar
netty-buffer-4.1.46.Final.jar
netty-codec-4.1.46.Final.jar
netty-codec-http-4.1.46.Final.jar
netty-codec-socks-4.1.46.Final.jar
netty-common-4.1.46.Final.jar
netty-handler-4.1.46.Final.jar
netty-handler-proxy-4.1.46.Final.jar
netty-resolver-4.1.46.Final.jar
netty-transport-4.1.46.Final.jar
In addition, if you want log support also these jars are needed:
java-system-out-log-1.0.2.jar
ls-log-adapter-java-1.0.2.jar
Regards,
Giuseppe