Ignore:
Timestamp:
2018-09-03T16:08:35+12:00 (6 years ago)
Author:
ak19
Message:

ProtocolPortProperties.java constructors can throw an Exception now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/solr/trunk/src/src/java/org/greenstone/gsdl3/service/SolrSearch.java

    r32411 r32419  
    4949        //String port = globalProperties.getProperty("tomcat.port.http", "8383");
    5050        //String protocol = globalProperties.getProperty("server.protocol", "http");
    51         ProtocolPortProperties protocolPortProps = new ProtocolPortProperties(globalProperties);
    52         if(protocolPortProps.hadError()) {
    53         throw new Exception("**** ERROR with port and/or protocol in build.properties:\n" + protocolPortProps.getErrorMsg());
    54         }
     51        ProtocolPortProperties protocolPortProps = new ProtocolPortProperties(globalProperties); // can throw an Exception     
    5552        String protocol = protocolPortProps.getProtocol();
    5653        String port = protocolPortProps.getPort();
     
    8885        return false;
    8986    }
    90 
     87   
     88    if(solr_servlet_base_url == null) {
     89        logger.error("Unable to configure SolrSearch - solr_servlet_base_url is null because of issues with port/protocol in global.properties");
     90        return false;
     91    }
    9192    // initialize required number of SolrCores based on values
    9293    // in 'index_ids' that are set by LuceneSearch::configure()
Note: See TracChangeset for help on using the changeset viewer.