-
January 10th, 2007, 04:03 PM
#1
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
-
January 11th, 2007, 11:02 AM
#2
-- 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
-
January 11th, 2007, 02:52 PM
#3
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
-
January 12th, 2007, 10:08 AM
#4
Dario

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
-
February 4th, 2009, 11:45 PM
#5
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
-
By webmons in forum Adapter SDKs
Replies: 3
Last Post: March 7th, 2013, 09:30 AM
-
By msgiribabu in forum General
Replies: 4
Last Post: January 11th, 2011, 10:21 AM
-
By mnenchev in forum General
Replies: 3
Last Post: September 29th, 2009, 08:54 AM
-
By k.mcc2009 in forum Adapter SDKs
Replies: 1
Last Post: May 21st, 2009, 09:41 AM
-
By jsharpe in forum Adapter SDKs
Replies: 0
Last Post: January 10th, 2007, 04:03 PM
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 05:00 AM.
Bookmarks