Gianluca Finocchiaro
Sorry, we encountered an error while displaying this content. If you're a user, please try again later. If you're an administrator, take a look in your Flarum log files for more information.
nttam
Hi Mr Gianluca.finocchiaro ,
I have a java project with some adapters and a common class that share info between these adapters, could you show me how to export (as jar file) then upload to adapter folder in lightstreamer server for running as well as a project, not independently adapters.
p/s this project can running oke by source (run configuration as your guild above).
Gianluca Finocchiaro
Hi nttam,
I'm sorry but it is not clear to me what you mean by "not independently adapters". If you have already prepared the adapter folder (where also the appropriate adapters.xml is expected to be there), you have to export the eclipse project as jar file (right click and then "Export..."->"JAR file) and put it into the "lib" subfolder.
Please let me know if you are already aware of that information, or you are asking for something different.
Thanks and Regards,
Gianluca
nttam
Hi Mr Gianluca.finocchiaro,
Thanks very much for your quickly reply. I've already exported project as jar file and put it into "lib" subfolder of each adapter folder, note that I have some adapter in adapters folder parent. The lightstreamer server start ok, but these adapter run separated. How make it run as an application which these adapter can use and share some common class or global variable also?
Gianluca Finocchiaro
Hi nttam,
provided that you left the <classloader> value to its default value ("common") in the adapters.xml files relative to the involved Adapter Sets, you have to put common classes and libraries into the "shared/lib" and/or "shared/lib" folders of your Lightstreamer installation: please have a look at all README.txt files you can find
here (even inside "classed" and "lib" subfolders").
Please also look at inline documentation of the <classloader> tag you can find
here.
Hope this helps.
Thanks and Regards,
Gianluca
nttam
Hi Mr Gianluca.finocchiaro,
Thank you so much for your help, I did, it's running well now. Thanks again!
nttam
Hi Mr Gianluca.finocchiaro,
One more time, Its running ok now, but data is error font with unicode (I run by source code that font ok), maybe I need to config unicode utf-8 for lightstreamer server? if need, could you show me how to config? thanks!
Gianluca Finocchiaro
Hi nttam,
could you please provide us with some examples of error in terms of sent and received data?
Thanks
Gianluca
nttam
Hi Mr Gianluca.finocchiaro,
That error happen when received message from midleware at adapter, as this example: Data -> var_fr6: [V010103]: Tra cứu dữ liá»?u thà nh công. but when running by source code its ok: [V010103]: Tra cứu thông tin khách hàng thành công.
Gianluca Finocchiaro
Hi nttam,
just to clarify the current scenario: the middleware sends "data" to the adapter and, from there, are forwarded to the clients, is it correct? So, on the client side such data appear in a wrong format. Please confirm my understanding, since we need to identify where the potential encoding/decoding issue really occurs.
Thanks,
Gianluca
nttam
Hi Mr Gianluca.finocchiaro,
Yes, it is correct. But it's error unicode font at the adapter, example which I send you above is log of lightstreammer server. Thanks!
Gianluca Finocchiaro
Ok nttam,
could you please provide us with a log excerpt from which such it is possible to analyze such issue?
Thanks
Gianluca
nttam
Hi Mr Gianluca.finocchiaro,
plz refer image below, that is log of lightstreamer server (in terminal screen), of course client show data with wrong format like that. Thanks!
Gianluca Finocchiaro
Hi mttam,
the image is not clear. Please stop the server instance and remove the current Lightstreamer.log, just to start from clean scenario.
Please also update the
lightstreamer_log_conf.xml changing the levels of the following loggers:
<logger name="LightstreamerLogger.subscriptions" level="DEBUG"/>
<logger name="LightstreamerLogger.pump" level="DEBUG"/>
<logger name="LightstreamerLogger.push" level="DEBUG"/>
then repeat your test and send to
info@lightstreamer.com the log file.
Thanks and regards,
Gianluca
nttam
Hi Mr Gianluca.finocchiaro,
I've send email with log file. Thanks so much!
Gianluca Finocchiaro
Hi nttam,
after having looked at the log and exchanged some private messages, we finally found out that the issue was due to a conversion of raw data sent by the middleware. In fact, raw data should have been encapsulated into a String object also specifying the right charset, as follows:
[SYNTAX=JAVA]new String(data, "UTF-8")[/SYNTAX].
When the Adapter Set runs from Eclipse, messages flow with no issue as you have specified UTF-8 as default text file encoding (set from Preferences->Workspace).
Thanks and Regards,
Gianluca
nttam
Hi Mr Gianluca.finocchiaro,
Yes, we found the reason of this issue, thank you very much for your support and merry Christmas! ^-^
synthi
Hello Gianluca
Is this procedure doable on IntelliJ IDEA too ? (I'm having some difficulties! :Smile_Ac: )
What I'd like to do is to have on my MAC a running LightStreamer server, and I want to go in DEBUG mode in with an adapter using IntelliJ.
Is it something possible to do ?
Thank you
Antonio
Gianluca Finocchiaro
Hi Antonio,
a similar procedure should be doable on IntelliJ IDEA as well and a detailed post on this is coming soon, stay tuned!
Thanks and Regards,
Gianluca
synthi
I was able to do it :Smile_Ad:
the problem was the declaration of the ENV VAR "LS_HOME"
I can declare it, but after is not recognized (or at least in the same project...)
I had to import all the JAR from LS directly in the project, and I had to declare the JAR creation in the right place...
so I removed all the
VM Arguments leaving only
-Xmx2048M
-ea
Gianluca Finocchiaro Hi Antonio,
a similar procedure should be doable on IntelliJ IDEA as well and a detailed post on this is coming soon, stay tuned!
Thanks and Regards,
Gianluca