Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Aug 2014
    Posts
    71

    problem in loading adapters in the new Lightstreamer 6.0

    hi,

    i downloaded the new version Lightstreamer 6.0 and attach my adapter that worked fine in the previous version.
    when i start the lightstreamer it gives the Exception :
    java.lang.ClassNotFoundException: com.lightstreamer.adapters.remote.metadata.Network edMetadataProvider

    this is my adapter.xml file

    Code:
    <?xml version="1.0"?>
    
    
    <adapters_conf id="DataPool">
    
    
       <metadata_provider>
            <adapter_class>com.lightstreamer.adapters.remote.metadata.NetworkedMetadataProvider</adapter_class>
            <param name="request_reply_port">6663</param>
        </metadata_provider>
    	
     
        <data_provider name="DataPool">
            <adapter_class>com.lightstreamer.adapters.remote.data.NetworkedDataProvider</adapter_class>
            <param name="request_reply_port">6661</param>
            <param name="notify_port">6662</param>
        </data_provider>
    	
    
    
     <data_provider name="Intraday1">
    
    
    <adapter_class>com.lightstreamer.adapters.remote.data.NetworkedDataProvider</adapter_class>
    
    
            
            <param name="request_reply_port">5661</param>
    
    
            <param name="notify_port">5662</param>
    
    
    
    
        </data_provider>
    
    
    
    
    <data_provider name="Intraday2">
    
    
    <adapter_class>com.lightstreamer.adapters.remote.data.NetworkedDataProvider</adapter_class>
    
    
            
            <param name="request_reply_port">7661</param>
    
    
            <param name="notify_port">7662</param>
    
    
    
    
        </data_provider>
    
    
    </adapters_conf>

  2. #2
    Administrator
    Join Date
    Feb 2008
    Location
    Siracusa
    Posts
    152
    Hi engcoder,

    starting from Lightstreamer server v6.0, in the adapters.xml configuration file you need to replace the old class names com.lightstreamer.adapters.remote.metadata.Network edMetadataProvider and com.lightstreamer.adapters.remote.data.NetworkedDa taProvider with one of the two brand new reserved names: PROXY_FOR_REMOTE_ADAPTER or ROBUST_PROXY_FOR_REMOTE_ADAPTER (depending on your needs).

    So, with regard to your example, the metadata_provider section will be modified as follows:
    Code:
    <metadata_provider>
      <adapter_class>PROXY_FOR_REMOTE_ADAPTER</adapter_class>
      <classloader>log-enabled</classloader>
      <param name="request_reply_port">6663</param>
    </metadata_provider>
    and all the data_provider sections become:
    Code:
    <data_provider name="DataPool">
      <adapter_class>PROXY_FOR_REMOTE_ADAPTER</adapter_class>
      <classloader>log-enabled</classloader>
      <param name="request_reply_port">6661</param>
      <param name="notify_port">6662</param>
     </data_provider>
    You can get more information here:
    • Adapter Remote Infrastructre changelog
    • Updated .NET Adapter demos and related full source code available on GitHub
    • The generic template, available under
      DOCS-SDKs/adapter_generic_infrastructure/doc/adapter_conf_template/adapters.xml
      or
      DOCS-SDKs/adapter_generic_infrastructure/doc/adapter_robust_conf_template/adapters.xml,
      of the Lightstreamer distribution.


    Hope this helps.

    Regards,
    Gianluca

  3. #3
    Senior Member
    Join Date
    Aug 2014
    Posts
    71
    hi,

    i do the replace but another error appears : Error while loading the Adapters: {}. com.lightstreamer.init.b: Common ClassLoader not supported for a Proxy Adapter

  4. #4
    Administrator
    Join Date
    Feb 2008
    Location
    Siracusa
    Posts
    152
    Hi engconder,

    thanks for reporting the issue. As you can read from the adapters.xml template available under DOCS-SDKs/adapter_generic_infrastructure/doc/adapter_conf_template or DOCS-SDKs/adapter_generic_infrastructure/doc/adapter_robust_conf_template of the Lightstreamer distribution, for Proxy Adapters it is also mandatory to specify the classloader both in the metadata_provider and in the data_provider configurations. In such case, as stated in the comment, it is advisable to use the special "log-enabled" option, as follows:
    Code:
    <metadata_provider>
      <adapter_class>PROXY_FOR_REMOTE_ADAPTER</adapter_class>
      <classloader>log-enabled</classloader>
      <param name="request_reply_port">6663</param>
    </metadata_provider>
    Code:
    <data_provider name="DataPool">
      <adapter_class>PROXY_FOR_REMOTE_ADAPTER</adapter_class>
      <classloader>log-enabled</classloader>
      <param name="request_reply_port">6661</param>
      <param name="notify_port">6662</param>
    </data_provider>>
    Such configurations are required because of newly introduced Classloader separation in Lightstreamer 6.0: you can get more on this here.

    For the sake of completeness, I have also modified the previous reply, inserting the same tag as above.

    Get back to us for any further issue.

    Regards,
    Gianluca

  5. #5
    Senior Member
    Join Date
    Aug 2014
    Posts
    71
    it works that the LS load the adapters confg. from xml succefully and open all the ports but when running the first adapter application (i have 3 adapters as shown previous at xml file) , the LS gives the following Exception


    <ERROR> Exception caught while trying to initialize the Remote Server
    com.lightstreamer.adapters.proxy.RemotingException : Timeout while waiting for an
    answer to request 10000014b30b1c427
    at com.lightstreamer.adapters.proxy.request_reply.Req uestSender.dequeueT
    imeoutChecks(RequestSender.java:291) ~[ls-proxy-adapters.jar:na]
    Last edited by engcoder; January 28th, 2015 at 01:34 PM.

  6. #6
    Administrator
    Join Date
    Feb 2008
    Location
    Siracusa
    Posts
    152
    Hi,

    how long does it take to make the first request after the initial connection by the remote Adapter? Consider that default timeout is 10 seconds, as you can read from the adapters.xml template:

    Code:
     <!-- Optional.
            Timeout for sent requests. A negative value stands for an unlimited timeout.
            Timed out requests are considered as failed and later answers are ignored.
            Default: 10000 ms (10 seconds). -->
    <!--
    <param name="timeout">10000</param>
    -->
    Could you please check the remote Adapter flow?

    Regards,
    Gianluca

  7. #7
    Senior Member
    Join Date
    Aug 2014
    Posts
    71
    thanks for reply,
    the adapters is loaded when i changed Y to N
    but the LS gives Exception after connecting to the ports :

    <ERROR> Exception caught while trying to initialize the Remote Servercom.lightstreamer.adapters.proxy.RemotingExc eption: Timeout while waiting for an
    answer to request 10000014ccb4c5f0a

  8. #8
    Administrator
    Join Date
    Feb 2008
    Location
    Siracusa
    Posts
    152
    Discussion goes on here

 

 

Similar Threads

  1. Replies: 3
    Last Post: November 14th, 2011, 09:33 AM
  2. Replies: 3
    Last Post: March 4th, 2011, 11:35 PM
  3. speed up initial loading
    By rd2008 in forum General
    Replies: 1
    Last Post: November 20th, 2008, 09:32 AM
  4. Replies: 14
    Last Post: May 13th, 2008, 03:27 AM
  5. Replies: 2
    Last Post: March 26th, 2008, 09:50 AM

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