Changeset 37610


Ignore:
Timestamp:
2023-04-06T14:17:39+12:00 (13 months ago)
Author:
anupama
Message:

Changing derby fallback port to GS default derby port 8327 instead of derby out-of-box default 1527. When installing GS in textonly mode, I noticed the derby server said was started on 8327 but when the admin password failed to set as it couldn't connect to the running derby server mentioning port 1527. So this may explain why the installer had a connection exception when connecting to the server in its attempt to set the admin password. Hopefully this fixes it.

Location:
main/trunk/greenstone3/src/java/org/greenstone/gsdl3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/sql/derby/DerbySQLServer.java

    r35362 r37610  
    1212public class DerbySQLServer implements SQLServer{
    1313   
    14     static final String PORT = GlobalProperties.getProperty("derby.server.port", "1527");
     14    static final String PORT = GlobalProperties.getProperty("derby.server.port", "8327"); // GS default derby port is 8327 vs derby out-of-box default port 1527
    1515    static final String DERBYSERVER = GlobalProperties.getProperty("derby.server", "localhost");
    16     static final String PROTOCOL = "jdbc:derby://"+DERBYSERVER+":"+PORT+"/"; // "jdbc:derby://localhost:1527";
     16    static final String PROTOCOL = "jdbc:derby://"+DERBYSERVER+":"+PORT+"/"; // "jdbc:derby://localhost:8327";
    1717    static final String DRIVER = "org.apache.derby.jdbc.ClientDriver"; //"org.apache.derby.jdbc.EmbeddedDriver";
    1818    static Logger logger = Logger.getLogger(org.greenstone.gsdl3.sql.derby.DerbySQLServer.class.getName());     
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/DerbyWrapper.java

    r35362 r37610  
    6161   
    6262    // No more fallback values, use exactly what's propagated into global.properties from build.properties
    63     String port = GlobalProperties.getProperty("derby.server.port");//, "1527");
     63    String port = GlobalProperties.getProperty("derby.server.port");//, "8327"); GS' default derby port.
    6464    if(port.indexOf("@") == -1) { // if there are still @placeholders@ in global.properties, then use fallback values
    6565        PORT = port;
    6666        DERBYSERVER = GlobalProperties.getProperty("derby.server");//, "localhost");
    6767    } else {
    68         PORT = "1527";
     68        PORT = "8327"; // This setting is used by installer. 8327 is GS default derby port. Note: Out-of-box derby defaults to port 1527
    6969        DERBYSERVER = "localhost";
    7070    }
    71     PROTOCOL = "jdbc:derby://"+DERBYSERVER+":"+PORT+"/"; // "jdbc:derby://localhost:1527"; // by default
     71    PROTOCOL = "jdbc:derby://"+DERBYSERVER+":"+PORT+"/"; // "jdbc:derby://localhost:8327"; // by default
    7272    //System.out.println("@@@ PROTOCOL:" + PROTOCOL); //check in installer
    7373    }
Note: See TracChangeset for help on using the changeset viewer.