diff --git a/OWLTools-Runner/src/main/java/owltools/cli/SolrCommandRunner.java b/OWLTools-Runner/src/main/java/owltools/cli/SolrCommandRunner.java index 70a7546b0..302fc3b25 100644 --- a/OWLTools-Runner/src/main/java/owltools/cli/SolrCommandRunner.java +++ b/OWLTools-Runner/src/main/java/owltools/cli/SolrCommandRunner.java @@ -555,13 +555,15 @@ else if (opts.nextEq("--noExitIfLoadFails")) { // Check to see if the global url has been set. String url = sortOutSolrURL(globalSolrURL); + // Ensure that legoCatalogs is defined, even is empty. + if( legoCatalogs == null ){ + legoCatalogs = new ArrayList(); + LOG.warn("Missing lego catalogs..."); + } + // Only proceed if our environment was well-defined. - if( legoCatalogs == null || legoFiles == null || legoModelPrefix == null || - legoCatalogs.isEmpty() || legoFiles.isEmpty() ){ + if( legoFiles == null || legoModelPrefix == null || legoFiles.isEmpty() ){ String details = ""; - if (legoCatalogs == null || legoCatalogs.isEmpty()) { - details += "Missing catalog"; - } if (legoFiles == null || legoFiles.isEmpty()) { details += " Missing legoFiles"; } @@ -571,10 +573,10 @@ else if (opts.nextEq("--noExitIfLoadFails")) { LOG.error("Lego environment not well defined--skipping: "+details); exit(-1); }else{ - LOG.info("Start Loading models, count: "+legoFiles.size()); + LOG.warn("Start Loading models, count: "+legoFiles.size()); // Ready the environment for every pass. ParserWrapper pw = new ParserWrapper(); - // Add all of the catalogs. + // Add all of the catalogs; possibly none. for( File legoCatalog : legoCatalogs ){ pw.addIRIMapper(new CatalogXmlIRIMapper(legoCatalog)); }