-
December 4th, 2007, 09:27 AM
#1
How to build application based on Javascript libraries with .NET adapter
Hi,
I built my first application based on javascript libraries, It worked (thanks for support lightstreamer team). but in tutorial document used Java adapter. Now, I want to use .NET adapter.
Here, there are my steps :
-------------------
Step 1 : I modified "adapter.xml" (in folder "C:\Lightstreamer\adapters\tutorial_demo_adapters" )
<?xml version="1.0"?>
<adapters_conf id="TUTORIAL_DEMO">
<metadata_provider>
<adapter_class>com.lightstreamer.adapters.remote.m etadata.NetworkedMetadataProvider</adapter_class>
<param name="request_reply_port">6663</param>
</metadata_provider>
<data_provider>
<adapter_class>com.lightstreamer.adapters.remote.d ata.NetworkedDataProvider</adapter_class>
<param name="request_reply_port">6661</param>
<param name="notify_port">6662</param>
</data_provider>
</adapters_conf>
step 2 : copy file "ls-proxy-adapters.jar" in folder "C:\Lightstreamer\DOCS-SDKs\sdk_adapter_dotnet\examples\DotNetStockListDe mo\Deployment\Deployment_LS\StockList_sockets\lib" to "C:\Lightstreamer\adapters\tutorial_demo_adapters\ lib"
finally, in folder "C:\Lightstreamer\adapters\tutorial_demo_adapters\ lib" we have :
"ls-proxy-adapters.jar"
Step 3 : run file "Start_LS_as_Application.bat" to start LS, and then status LS server
-----------------
c:\Lightstreamer\bin\windows>call LS.bat run
Starting Lightstreamer Server...
Please check logs for detailed information.
04.Dec.07 16:30:30,781 < INFO> Starting MAC address check
04.Dec.07 16:30:30,859 < INFO> Found MAC address 00:0f:b0:cd:10:6b
04.Dec.07 16:30:30,859 < INFO> Found MAC address 00:18:de:af:ea:7f
04.Dec.07 16:30:30,859 < INFO> MAC address check successful
04.Dec.07 16:30:30,859 < INFO> License correctly bound with the following parame
ter(s):
04.Dec.07 16:30:30,859 < INFO> Client ID : EWmtleTmXioln3OLeXzCL
04.Dec.07 16:30:30,859 < INFO> Mac Address : 00:18:de:af:ea:7f
04.Dec.07 16:30:31,125 < INFO> Lightstreamer Server starting in Moderato edition
04.Dec.07 16:30:31,265 < WARN> JMX management features not available with the cu
rrent license
04.Dec.07 16:30:31,375 < INFO> Started HTML Adaptor for JMX on port 6666
04.Dec.07 16:30:31,515 < INFO> Started JMXMP Connector for JMX on port 9999
04.Dec.07 16:30:31,546 < WARN> No users defined for Internal Monitor.
04.Dec.07 16:30:31,703 < INFO> Connecting...
step 4 : I typed http://localhost:8080/tutorial_demo/default.html
But it can't run.
What steps i wrong? Can anybody help me?
Thanks!
-
December 5th, 2007, 08:26 AM
#2
Hi
You installed the so called "Proxy Adapters", but did not install and run the "Remote Adapters", the ones written in .NET.
Perhaps, you made some confusion with the two deployment policies made available by our libraries, i.e. the Networked (or Socket) based deployment and the Piped based deployment. Which piece of documentation did you follow?
Please, refer to the instructions in
DOCS-SDKs\sdk_adapter_dotnet\doc\DotNet Adapters.pdf
They take advantage of an already prepared deployment image.
You may finally check the differences with the standard java deployment.
Dario
-
December 5th, 2007, 12:33 PM
#3
I mean, if u have tutorial document written in .NET (step by step) like tutorial document based on javascript libraries is better.
In "DOCS-SDKs\sdk_adapter_dotnet\doc\DotNet Adapters.pdf", paragraph 1.5, I read over and I understand it may be read several ways, something like that.
Step 1:
Copy all file in folder "C:\Lightstreamer\DOCS-SDKs\sdk_adapter_dotnet\examples\DotNetStockListDe mo\Deployment\Deployment_LS\StockList_sockets" to "C:\Lightstreamer\adapters"
Step 2 : Remove the adapters\StockList directory, and we have in "C:\Lightstreamer\adapters" folder :
<classes>
<lib>
adapter.xml
Step 3 : Run "DotNetServers.bat", Lightstreamer Server is now ready to be relaunched.
Step 4 : Run http://localhost:8080/tutorial_demo/default.html
and i have an error in step 3, it said :
2007-12-05 20:16:00,546 [2824] INFO Lightstreamer.DotNet.Server.NetworkedServerStarter [(null)] - Connecting...
2007-12-05 20:16:00,546 [2836] INFO Lightstreamer.DotNet.Server.NetworkedServerStarter [(null)] - Connecting...
2007-12-05 20:16:01,500 [2836] WARN Lightstreamer.DotNet.Server.NetworkedServerStarter [(null)] - Connection failed, retrying in 10 seconds...
2007-12-05 20:16:07,781 [2400] INFO Lightstreamer.DotNet.Server.ServerMain [(null)] - Lightstreamer .NET Adapter Server starting...
2007-12-05 20:16:07,828 [2460] INFO Lightstreamer.DotNet.Server.NetworkedServerStarter [(null)] - Connecting...
2007-12-05 20:16:08,843 [2400] WARN Lightstreamer.DotNet.Server.NetworkedServerStarter [(null)] - Connection failed, retrying in 10 seconds...
2007-12-05 20:16:08,843 [2460] WARN Lightstreamer.DotNet.Server.NetworkedServerStarter [(null)] - Connection failed, retrying in 10 seconds...
--------
log4net: ERROR [RollingFileAppender] Unable to acquire lock on file C:\Lightstreamer\DOCS-SDKs\sdk_adapter_dotnet\examples\DotNetStockListDe mo\Deployment\Deployment_DotNet_Server\dotnet_1.1\ dotnetserver.log. The process can not access file C:\Lightstreamer\DOCS-SDKs\sdk_adapter_dotnet\examples\DotNetStockListDe mo\Deployment\Deployment_DotNet_Server\dotnet_1.1\ dotnetserver.log, because it is used by another process.
What are there step I wrong? Can anybody help me?
-
December 6th, 2007, 08:36 AM
#4
Hi,
In your step 3, you run the Remote Servers (i.e. the one for the Remote Data Adapter and the one for the Remote Metadata Adapter).
Then you report the log from the Remote Servers, which cannot connect to Lightstreamer Server and keep retrying.
( Please ignore the 'log4net: ERROR' line; it is caused by the fact that both Remote Servers share the same ".exe.config" configuration file and try to log on the same file. )
Also, according to your step 3, you should run Lightstreamer Server. After that, your Remote Servers and Lightstreamer Server should be able to connect to each other.
Did Lightstreamer Server start correctly? What is reported in its log? Is it the same as reported in your first post?
The problem may arise from a misunderstanding on the Proxy Adapter deployment, specifically on point 3 in "DotNet Adapters.pdf", reported below:
Plug the new adapter into the Server. Just copy the Deployment_LS\StockList_sockets
directory and all of its files to the "adapters" subdirectory in your Lightstreamer Server
installation.
Make sure that your final "C:\Lightstreamer\adapters" folder contains a subfolder named "StockList_sockets".
Dario
-
December 9th, 2007, 04:52 AM
#5
Dear Dario,
In my step 3, I started Lightstreamer server (by go to "C:\Lightstreamer\bin\windows" folder and run "Start_LS_as_Application.bat") first. After that, I run "DotNetServers.bat" in "C:\Lightstreamer\DOCS-SDKs\sdk_adapter_dotnet\examples\DotNetStockListDe mo\Deployment\Deployment_DotNet_Server" folder. and pop-up error message "LiteralBasedProvider" (I don't know how to upload image to forum) with information "log4net: ERROR [RollingFileAppender] Unable to acquire lock on file C:\Lightstreamer\DOCS-SDKs\sdk_adapter_dotnet\examples\DotNetStockListDe mo\Deployment\Deployment_DotNet_Server\dotnet_1.1\ dotnetserver.log. The process can not access file C:\Lightstreamer\DOCS-SDKs\sdk_adapter_dotnet\examples\DotNetStockListDe mo\Deployment\Deployment_DotNet_Server\dotnet_1.1\ dotnetserver.log, because it is used by another process."
In "C:\Lightstreamer\adapters" folder, I have a subfolder named "StockList_sockets", here my folder :
--------------------
C:\Lightstreamer\adapters
C:\Lightstreamer\adapters\StockList_sockets\classe s
C:\Lightstreamer\adapters\StockList_sockets\lib\ls-proxy-adapters.jar
----------------
And when I try http://localhost:8080/tutorial_demo/default.html , I have LS status :
----------------
09.Dec.07 12:01:16,906 < INFO> Serving request: /lightstreamer/create_session.js
?LS_phase=209&LS_requested_max_bandwidth=30&LS_pol ling=true&LS_polling_millis=10
00&LS_idle_millis=30000&LS_client_version=4.2&LS_a dapter=TUTORIAL_DEMO& from 127
.0.0.1:2414
09.Dec.07 12:01:16,906 <ERROR> Bad request: Requested Adapter, TUTORIAL_DEMO, no
t found
09.Dec.07 12:01:16,906 < INFO> Failed request from 127.0.0.1:2414
09.Dec.07 12:01:16,906 <ERROR> Failure in request processing
com.lightstreamer.a.db: com.lightstreamer.b.a: Requested Adapter, TUTORIAL_DEMO,
not found
at com.lightstreamer.a.gb.a(gb.java)
at com.lightstreamer.i.x.a(x.java)
at com.lightstreamer.i.x.a(x.java)
at com.lightstreamer.i.o.a(o.java)
at com.lightstreamer.i.h.a(h.java)
at com.lightstreamer.i.h.b(h.java)
at com.lightstreamer.h.j.a(j.java)
at com.lightstreamer.h.j.a(j.java)
at com.lightstreamer.h.v.a(v.java)
at com.lightstreamer.g.wb.run(wb.java)
at com.lightstreamer.g.b.a(b.java)
at com.lightstreamer.g.c.run(c.java)
09.Dec.07 12:01:16,906 < INFO> Closed HTTP connection on Lightstreamer HTTP Serv
er from 127.0.0.1:2414
09.Dec.07 12:01:42,906 < INFO> Accepted HTTP connection on Lightstreamer HTTP Se
rver from 127.0.0.1:2420
09.Dec.07 12:01:42,921 < INFO> Serving request: /tutorial_demo/ls/lsblank.html f
rom 127.0.0.1:2420
09.Dec.07 12:01:42,921 < INFO> Reused HTTP connection on Lightstreamer HTTP Serv
er from 127.0.0.1:2420
09.Dec.07 12:01:43,906 < INFO> Serving request: /tutorial_demo/ls/lsblank.html f
rom 127.0.0.1:2420
09.Dec.07 12:01:43,906 < INFO> Reused HTTP connection on Lightstreamer HTTP Serv
er from 127.0.0.1:2420
09.Dec.07 12:01:43,921 < INFO> Serving request: /lightstreamer/STREAMING_IN_PROG
RESS?LS_phase=210&LS_requested_max_bandwidth=30&LS _client_version=4.2&LS_adapter
=TUTORIAL_DEMO& from 127.0.0.1:2420
09.Dec.07 12:01:43,937 <ERROR> Bad request: Requested Adapter, TUTORIAL_DEMO, no
t found
09.Dec.07 12:01:43,937 < INFO> Failed request from 127.0.0.1:2420
09.Dec.07 12:01:43,937 <ERROR> Failure in request processing
com.lightstreamer.a.db: com.lightstreamer.b.a: Requested Adapter, TUTORIAL_DEMO,
not found
at com.lightstreamer.a.gb.a(gb.java)
at com.lightstreamer.i.x.a(x.java)
at com.lightstreamer.i.x.a(x.java)
at com.lightstreamer.i.o.a(o.java)
at com.lightstreamer.i.h.a(h.java)
at com.lightstreamer.i.h.b(h.java)
at com.lightstreamer.h.j.a(j.java)
at com.lightstreamer.h.j.a(j.java)
at com.lightstreamer.h.v.a(v.java)
at com.lightstreamer.g.wb.run(wb.java)
at com.lightstreamer.g.b.a(b.java)
at com.lightstreamer.g.c.run(c.java)
09.Dec.07 12:01:43,953 < INFO> Closed HTTP connection on Lightstreamer HTTP Serv
er from 127.0.0.1:2420
09.Dec.07 12:01:47,906 < INFO> Accepted HTTP connection on Lightstreamer HTTP Se
rver from 127.0.0.1:2423
09.Dec.07 12:01:47,921 < INFO> Serving request: /lightstreamer/create_session.js
?LS_phase=211&LS_requested_max_bandwidth=30&LS_pol ling=true&LS_polling_millis=10
00&LS_idle_millis=30000&LS_client_version=4.2&LS_a dapter=TUTORIAL_DEMO& from 127
.0.0.1:2423
09.Dec.07 12:01:47,921 <ERROR> Bad request: Requested Adapter, TUTORIAL_DEMO, no
t found
09.Dec.07 12:01:47,921 < INFO> Failed request from 127.0.0.1:2423
09.Dec.07 12:01:47,921 <ERROR> Failure in request processing
com.lightstreamer.a.db: com.lightstreamer.b.a: Requested Adapter, TUTORIAL_DEMO,
not found
at com.lightstreamer.a.gb.a(gb.java)
at com.lightstreamer.i.x.a(x.java)
at com.lightstreamer.i.x.a(x.java)
at com.lightstreamer.i.o.a(o.java)
at com.lightstreamer.i.h.a(h.java)
at com.lightstreamer.i.h.b(h.java)
at com.lightstreamer.h.j.a(j.java)
at com.lightstreamer.h.j.a(j.java)
at com.lightstreamer.h.v.a(v.java)
at com.lightstreamer.g.wb.run(wb.java)
at com.lightstreamer.g.b.a(b.java)
at com.lightstreamer.g.c.run(c.java)
09.Dec.07 12:01:47,937 < INFO> Closed HTTP connection on Lightstreamer HTTP Serv
er from 127.0.0.1:2423
-
December 10th, 2007, 09:02 AM
#6
Hi
ok, this last problem is just because we are trying to put together two samples (namely, the web client tutorial and the Remote Adapters example) that were not designed to operate together.
However, the tutorial demo front-end is consistent with the Remote StockList demo Adapters. I think that the configured adapter name is the only difference.
So, just change
<adapters_conf id="STOCKLISTDEMO">
into
<adapters_conf id="TUTORIAL_DEMO">
in C:\Lightstreamer\adapters\StockList_sockets\adapte rs.xml
and the streaming session should then be started.
As you remarked, no tutorial guides to .NET adapter development are available at the moment; we are working on them for the next major release.
Dario
-
December 12th, 2007, 04:45 PM
#7
Thanks Dario. I found my error (do as you do), and fixed it.
Similar Threads
-
By Alessandro in forum Client SDKs
Replies: 8
Last Post: October 8th, 2012, 09:33 AM
-
By semua60 in forum Client SDKs
Replies: 3
Last Post: February 23rd, 2011, 10:12 AM
-
By karthik in forum Client SDKs
Replies: 3
Last Post: July 7th, 2010, 10:43 AM
-
By tuongkha in forum Client SDKs
Replies: 2
Last Post: December 4th, 2007, 03:32 AM
-
By EriOor in forum Adapter SDKs
Replies: 6
Last Post: May 7th, 2007, 05:19 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 06:06 AM.
Bookmarks