Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Dec 2019
    Posts
    66

    Angry 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 02:01 PM.

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    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

  3. #3
    Senior Member
    Join Date
    Dec 2019
    Posts
    66
    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.

  4. #4
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    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

  5. #5
    Senior Member
    Join Date
    Dec 2019
    Posts
    66
    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.

  6. #6
    Senior Member
    Join Date
    Dec 2019
    Posts
    66
    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

  7. #7
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    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

  1. Replies: 3
    Last Post: July 25th, 2017, 10:21 PM
  2. Replies: 3
    Last Post: March 28th, 2017, 05:58 PM
  3. Basic Stock Demo in DISTINCT mode
    By Virendra in forum Adapter SDKs
    Replies: 1
    Last Post: May 20th, 2016, 10:38 AM
  4. Question abut the Stock-List demo
    By Ranag in forum Adapter SDKs
    Replies: 1
    Last Post: January 19th, 2015, 11:23 AM
  5. Basic stock-list demo
    By sheik in forum Adapter SDKs
    Replies: 3
    Last Post: May 8th, 2013, 10:35 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 12:39 AM.