Menu

Installing Borg 1.7.7 from source with Netbeans on Ubuntu 12.04: listening on port 2929

Help
2013-01-18
2013-01-18
  • Marco Arigoni

    Marco Arigoni - 2013-01-18

    I have downloaded the src file borg_src-1.7.7.zip and imported into Netbeans.
    I can compile it well (for instance by going inside BORGCalendar/ant and issuing an
    ant main)
    When I try to run the net.sf.borg.control.Borg.java I get an error:

    Java.sql.SQLException: No suitable driver found for jdbc:h2:file:/home/mario/.borg_db/borgdb;USER=sa
    
    Your database dir is set to:jdbc:h2:file:/home/mario/.borg_db/borgdb;USER=sa
    If a bad database dir is causing the error, please click OK to change it.
    

    Then the asks for a database directory and next time I restart the same error again.
    I thought the problem was with me having previously used the binary Borg edition and having then removed the database folder so I tried removing the preferences and old database log files with a:

    rm -fr /home/mario/.java/.userPrefs/
    rm -fr .borg* 
    

    However the above error persists every time I restart the application.
    I therefore spent some hours figuring out what was wrong and finally found out the incriminating lines inside the file net.sf.borg.model.db.jdbc.JdbcDB.java the method connect(String urlIn):

    InputStream is = JdbcDB.class.getResourceAsStream("resource/borg_hsqldb.sql");
    StringBuffer sb = new StringBuffer();
    InputStreamReader r = new InputStreamReader(is);
    

    apparently resource/borg_hsqldb.sql is not found so I replaced it with a String containing the content of borg_hsqldb.sql

    String string = "CREATE TABLE bla bla bla";
    for (String t : string.split(";"))
                                {
                                    execSQL(string);
                                }
    

    Now all compiles well however now the program stops with a

    INFO: Server: listening on port 2929
    

    Can anyone help me out? what should I run now to see the cte Calendar panel??
    THANK YOU SO MUCH!

     
  • Marco Arigoni

    Marco Arigoni - 2013-01-18

    Ok I found out, however please reply me anyway.
    Basically in NetBeans for the whole project to work you need to rightclick on the project name -> properties -> libraries -> add folder and add the res/ folder inside the Borg directory for all database and icons resources to load.
    Otherwise you get a series of nullPointer exceptions every time a getClass().getResource(...) is called.
    Hope this helps..

     
MongoDB Logo MongoDB