-
November 19th, 2020, 12:24 PM
#1
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?
Last edited by ManKeer; November 19th, 2020 at 01:01 PM.
-
November 19th, 2020, 01:33 PM
#2
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
-
November 19th, 2020, 01:48 PM
#3
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.
-
November 19th, 2020, 02:53 PM
#4
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
-
November 22nd, 2020, 07:22 AM
#5
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.
-
November 22nd, 2020, 07:57 AM
#6
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
-
November 23rd, 2020, 09:23 AM
#7
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
Similar Threads
-
By Nordlicht in forum General
Replies: 3
Last Post: July 25th, 2017, 09:21 PM
-
By rvkvino in forum General
Replies: 3
Last Post: March 28th, 2017, 04:58 PM
-
By Virendra in forum Adapter SDKs
Replies: 1
Last Post: May 20th, 2016, 09:38 AM
-
By Ranag in forum Adapter SDKs
Replies: 1
Last Post: January 19th, 2015, 10:23 AM
-
By sheik in forum Adapter SDKs
Replies: 3
Last Post: May 8th, 2013, 09:35 AM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 10:08 AM.
Bookmarks