-
April 8th, 2015, 11:12 AM
#1
import com.lightstreamer.interfaces.data.* error
Hi,
The directory HelloWorld\lib = contains ls-adapter-interface-remote.jar
The directory HelloWorld\src = contains HelloWorldDataAdapter.java
The directory HelloWorld\tmp_classes = nothing in it
> javac -classpath lib/ls-adapter-interface-remote.jar -d tmp_classes -sourcepath src src/HelloWorldDataAdapter.java
During compilation, I get this error message:
"import com.lightstreamer.interfaces.data.*; does not exist
Thanks for your help
![Quote](images/styles/AestheticaGreen/misc/quote_icon.png)
Originally Posted by
UweF
Hi,
I'am trying to build the HelloWorld example from here
http://cometdaily.com/2008/02/12/%E2...lightstreamer/.
I've downloaded the sources zip file. When I open the file "HelloWorldDataAdapter.java" in the IDE I get an error message on the line "import com.lightstreamer.interfaces.data.*;" that means the package does not exist.
What's wrong? Where can I find this package?
Edit: Okay, I've found the solution. Now it works perfect. This post can be deleted.
Thanks in advance.
Best regards!
Last edited by kimi; April 8th, 2015 at 01:08 PM.
-
April 9th, 2015, 09:16 AM
#2
Hi kimi,
you are trying to compile an "in-process" Java Adapter by using a wrong jar: ls-adapter-interface-remote.jar is for compiling "remote" Java Adapters.
Please put into the lib directory the ls-adapter-interface.jar you can get from DOC-SDKs/sdk_adapter_java_inprocess/lib of your Lightstreamer 6 installation, and then execute:
> javac -classpath lib/ls-adapter-interface.jar -d tmp_classes -sourcepath src src/HelloWorldDataAdapter.java.
Now everything should be ok.
For further information, please have a look at our HelloWorld Tutorial on GitHub, where you can get more detailed explanations in "Install" and "Build" sections.
Regards,
Gianluca
-
April 9th, 2015, 01:35 PM
#3
yes, everything is ok now. Thanks a lot
Could you please explain "in-process" and "remote" ?
thank you
-
April 9th, 2015, 02:58 PM
#4
As you probably know, Lightstreamer Adapters are custom server-side components attached to the Lightstreamer Server. An Adapter Set is made up of a Metadata Adapter and one or multiple Data Adapters, both developed by using provided API, currently available for Java, .NET, and Node.js.
In the case of Java, Adapters can run either in-process with the Lightstreamer Server (that means in the same Java Virtual Machine process), or in an external process (on the same machine or on a different machine).
.NET and Node.js Adapters always run in external processes.
Adapters running in external process are therefore called "Remote" because the interaction between them and the Server requires information to be exchanged over TCP sockets.
You can get more information on this by reading the General Concepts document (Paragraph 1.1.2).
Here a complete list of Remote Adapter Examples.
Regards,
Gianluca
-
January 29th, 2016, 11:02 AM
#5
Trying to build the RSS News Reader Demo. According to the readme at https://github.com/Lightstreamer/Lig...S-adapter-java in the lib section the instructions are This folder should contain all the library files needed to compile the RSS Demo Adapter. Please drop here the:
log4j-1.2.17.jar from Apache log4j;
ls-adapter-interface.jar from the /lib folder of latest Lightstreamer distribution;
informa.jar form the News Aggregation Library for Java download;
jdom.jar form the the News Aggregation Library for Java download;
commons-logging.jar file from Apache commons.
Under the "Build" instructions the same files are reiterated, followed by the 'generalized' compilation instructions, specifically:
>javac -source 1.7 -target 1.7 -nowarn -g -classpath lib/log4j-1.2.17.jar;lib/ls-adapter-interface/ls-adapter-interface.jar;lib/informa.jar;lib/jdom.jar -sourcepath src/src_feed -d tmp_classes src/src_feed/rss_demo/rss_reader/RSSReaderProvider.java
>jar cvf LS_rss_data_adapter.jar -C tmp_classes src_feed
>javac -source 1.7 -target 1.7 -nowarn -g -classpath lib/log4j-1.2.17.jar;lib/ls-adapter-interface/ls-adapter-interface.jar;LS_rss_reader.jar -sourcepath src/src_adapter -d tmp_classes src/src_adapter/rss_demo/adapters/RSSDataAdapter.java
>jar cvf LS_rss_data_adapter.jar -C tmp_classes src_adapter
>javac -source 1.7 -target 1.7 -nowarn -g -classpath lib/log4j-1.2.17.jar;lib/ls-adapter-interface/ls-adapter-interface.jar;LS_rss_data_adapter.jar -sourcepath src/src_metadata -d tmp_classes src/src_metadata/rss_demo/adapters/RSSMetadataAdapter.java
>jar cvf LS_rss_metadata_adapter.jar -C tmp_classes src_metadata
When trying to compile I get multiple errors like this one: RSSReaderProvider.java:38: error: package com.l
ightstreamer.interfaces.data does not exist
import com.lightstreamer.interfaces.data.DataProviderExce ption;
Where can I find the packages needed for compiling?
-
January 29th, 2016, 12:44 PM
#6
Hi Giacomo,
we have found some issue on our documentation on Github. We have promptly fixed it, so please have a look at the updated version here ("Build" section).
With regard to the compilation problem, please make sure to put the ls-adapters-interface.jar file into lib/ls-adapter-interface folder.
Thanks and Regards.
Gianluca
Similar Threads
-
Replies: 4
Last Post: March 2nd, 2016, 05:58 AM
-
By kpturner in forum Client SDKs
Replies: 20
Last Post: January 15th, 2015, 11:52 AM
-
By khalil78 in forum Adapter SDKs
Replies: 3
Last Post: March 28th, 2008, 02:39 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 03:07 AM.
Bookmarks