Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Sep 2006
    Location
    London
    Posts
    6

    Question about connecting a java client to the HTTP socket

    All

    We have a ls feed that is pumping data out to a webpage(s) and this works fine.

    What we need to do is create a java client that can listen to the same connection and get the same data out:

    The URL is http://<machine.domain>:8087/OurStuff/ (tomcat is sat on 8085)

    Tweaking the Test example (from sdk_for_j2se-clients\examples\ls_client) to point to the above, I get the following:
    using "<machine.domain>", port "8087" and the adaptor "OurStuff"

    Exception in thread "main" com.lightstreamer.ls_client.PushConnException: java.io.FileNotFoundException: http://<machine.domain>:8087/lightstreamer/create_session.txt
    at com.lightstreamer.ls_client.PushServerProxy.startS ession(PushServerProxy.java:101)
    at com.lightstreamer.ls_client.ServerManager.<init>(S erverManager.java:62)
    etc..

    and nothing appears in the LisghtStreamer window

    if I use port 8085 (Tomcat) i get:
    Exception in thread "main" com.lightstreamer.ls_client.PushConnException: java.io.IOException: Server returned HTTP response code: 500 for URL: http://<machine.domain>:8085/lightstreamer/create_session.txt
    at com.lightstreamer.ls_client.PushServerProxy.startS ession(PushServerProxy.java:101)
    at com.lightstreamer.ls_client.ServerManager.<init>(S erverManager.java:62)

    and the lightstreamer reports:
    com.lightstreamer.i.j: com.lightstreamer.g.a: Requested Adapter, OurStuff, not found
    at com.lightstreamer.i.bb.a(bb.java)
    at com.lightstreamer.f.g.a(g.java)
    at com.lightstreamer.f.g.a(g.java)
    at com.lightstreamer.f.n.b(n.java)
    at com.lightstreamer.f.n.a(n.java)
    at com.lightstreamer.a.g.b(g.java)
    at com.lightstreamer.a.g.a(g.java)
    at com.lightstreamer.a.w.a(w.java)
    at com.lightstreamer.j.wb.run(wb.java)
    at com.lightstreamer.j.qb.a(qb.java)
    at com.lightstreamer.j.rb.run(rb.java)
    (I am about 99% certain the jars are the same).

    Using the StockDemo I get the same type of responces.

    Is there anything obvious I am missing (e.g. "you cannot use that Test to connect") and/or is there a tutorial I can read.

    Thanks

    JoN

  2. #2
    Member
    Join Date
    Sep 2006
    Location
    London
    Posts
    6

    -- an update --

    All

    After a bit of trial and error it looks as if we had a version clash of the jar files.

    A "revert to green field" and start again fixed the issue.

    If possible, it would be nice if there was a better error message.

    Thanks

    JoN

  3. #3
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    Hi JoN,

    some more error messages can be enabled by configuring the logging categories.
    The logging is performed through the "java.util.logging" package supplied by the java API.
    You can find at "DOCS-SDKs\sdk_client_java_se\conf\logCfg.properties" a sample logging configuration file. As far as I know, this file has to be merged with the corresponding "jre/lib/logging.properties" file in your JRE installation.

    Dario

  4. #4
    Member
    Join Date
    Sep 2006
    Location
    London
    Posts
    6
    Dario

    Quote Originally Posted by DarioCrivelli
    Hi JoN,

    some more error messages can be enabled by configuring the logging categories.
    The logging is performed through the "java.util.logging" package supplied by the java API.

    Dario
    That's a fair point - it was/is a bit annoying when I was doing a dev test (not wanting to configure the logging) it appeared to be somewhat unhelpful.

    Thanks for the feedback.

    JoN

  5. #5
    Member
    Join Date
    Feb 2009
    Location
    Pyrmont
    Posts
    25
    Hello,

    Just wondering if you implemented the java solution using an external server (external to the lightstreamer server) - similar to the .NET sockets example described in http://cometdaily.com/2008/04/14/hel...lightstreamer/ ?

    I want to implement something similar and any help would be much appreciated

    Thanks,

    C

 

 

Similar Threads

  1. Newbie Java Remote Adapter question
    By webmons in forum Adapter SDKs
    Replies: 3
    Last Post: March 7th, 2013, 10:30 AM
  2. Replies: 4
    Last Post: January 11th, 2011, 11:21 AM
  3. Replies: 3
    Last Post: September 29th, 2009, 09:54 AM
  4. Replies: 1
    Last Post: May 21st, 2009, 10:41 AM
  5. Replies: 0
    Last Post: January 10th, 2007, 05:03 PM

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 04:48 AM.