Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Oct 2009

    problems to trace the data adapter

    hi all, me again now i have a little problem
    well, i developed a small application that connect with the database, for now the connection parameters are static, but i try to read this parameters from a txt file


    when i try to read this values i can't connect to the DB.
    the db.txt and java classes are in the same folder. to open the file i do this:

    File f = new File("db.txt");
    brInput = new BufferedReader( new FileReader( f ) );
    line = brInput.readLine().trim();
    //i load the variables here

    when compiled an execute this code from eclipse all works fine, but when i put the complile classes into lightstreamer server nothing happneds.
    so, to see where the problem occurs i try to trace the compiled classes.
    i try to put log4j into mi class, and again, all works fine on eclipse or command line, but when i put the compiled class into lightstreamer server nothing happends.

    i think the problem is to open the file db.txt or open de file (to trace the class)

    how can i solve this???

    see you.

  2. #2
    Join Date
    Jul 2006
    There might be a difference in the default directory between the Eclipse and the direct launch.

    If you use files in your adapter, you should lean on the configDir argument you receive in the init call.
    It contains a reference to the directory in which your Adapter Set is deployed (that is, in which adapters.xml is located).

    If you want to add log4j logging to your adapter only for testing purpose,
    you could take advantage of the Server's own logging configuration file and extend it.

  3. #3
    Senior Member
    Join Date
    Oct 2009
    i was doing some tests, and i managed to identify the execution path of the classes
    LS_SERVER\bin\windows\ for windows and LS_SERVER\bin\unix-like\ for linux.

    so, when i try to read a file, i need to put the file in this directory.
    with this i could also run the log4j

    Later i see the logging configuration of lightstreamer.

    thanks for your help



Similar Threads

  1. Web Service Data Adapter ? How can I do ?
    By intelsmart in forum Adapter SDKs
    Replies: 1
    Last Post: April 11th, 2012, 09:03 AM
  2. JDBC Data Adapter [Java]
    By Alessandro in forum Adapter SDKs
    Replies: 0
    Last Post: January 27th, 2012, 03:56 PM
  3. Replies: 4
    Last Post: October 24th, 2011, 09:33 AM
  4. Tibco Rv data adapter
    By ericrosevear in forum General
    Replies: 3
    Last Post: June 18th, 2008, 10:41 AM
  5. How to create Data Adapter?
    By Hanumant in forum Adapter SDKs
    Replies: 3
    Last Post: January 29th, 2008, 03:42 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
All times are GMT +1. The time now is 02:34 PM.