Changeset 30232

Show
Ignore:
Timestamp:
08.09.2015 20:49:03 (4 years ago)
Author:
ak19
Message:

Modifications for testing in installer

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/DerbyWrapper.java

    r30231 r30232  
    4949        String gsdl3_writablehome = System.getProperty("gsdl3.writablehome"); // set by 'ant update-userdb' cmd 
    5050 
    51         //System.err.println("@@@@@ writablehome: " + gsdl3_writablehome); 
    52         GlobalProperties.loadGlobalProperties(gsdl3_writablehome); 
     51        try { 
     52        System.err.println("@@@@@ writablehome: " + gsdl3_writablehome); 
     53        GlobalProperties.loadGlobalProperties(gsdl3_writablehome); 
     54        } catch (Exception ex){ 
     55        PORT = "1527"; 
     56        DERBYSERVER = "localhost"; 
     57        } 
    5358    } 
    5459     
    55     //System.err.println("@@@@@ GlobalProperties.getGSDL3Home(): " + GlobalProperties.getGSDL3Home()); //test 
     60    System.err.println("@@@@@ GlobalProperties.getGSDL3Home(): " + GlobalProperties.getGSDL3Home()); //test 
    5661     
    5762    // No more fallback values, use exactly what's propagated into global.properties from build.properties 
    5863    // Fallback values are only for the installer to use 
    59     PORT = GlobalProperties.getProperty("derby.server.port", "1527"); 
    60     DERBYSERVER = GlobalProperties.getProperty("derby.server", "localhost"); 
    61     PROTOCOL = "jdbc:derby://"+DERBYSERVER+":"+PORT+"/"; // "jdbc:derby://localhost:1527"; // by default 
     64    if (PORT == null) { // if these constants are not set yet because of exceptions 
     65        PORT = GlobalProperties.getProperty("derby.server.port", "1527"); 
     66        DERBYSERVER = GlobalProperties.getProperty("derby.server", "localhost"); 
     67        PROTOCOL = "jdbc:derby://"+DERBYSERVER+":"+PORT+"/"; // "jdbc:derby://localhost:1527"; // by default 
     68    } 
     69    System.err.println("@@@ PROTOCOL:" + PROTOCOL); //check in installer 
    6270    } 
    6371