Fixed error message on mismatch between default namespace in deploy.properties and the db so that the portal name is not attached to the namespace. Also fixed typo in LuceneSetup message.
This commit is contained in:
parent
b931f50cef
commit
616c74254c
2 changed files with 9 additions and 8 deletions
|
@ -78,7 +78,7 @@ public class LuceneSetup implements javax.servlet.ServletContextListener {
|
||||||
ServletContext context = sce.getServletContext();
|
ServletContext context = sce.getServletContext();
|
||||||
|
|
||||||
String baseIndexDir = getBaseIndexDirName();
|
String baseIndexDir = getBaseIndexDirName();
|
||||||
log.info("Seting up Lucene index. Base directory of lucene index: " + baseIndexDir);
|
log.info("Setting up Lucene index. Base directory of lucene index: " + baseIndexDir);
|
||||||
|
|
||||||
setBoolMax();
|
setBoolMax();
|
||||||
|
|
||||||
|
|
|
@ -151,8 +151,8 @@ public class JenaDataSourceSetup extends JenaDataSourceSetupBase implements java
|
||||||
|
|
||||||
|
|
||||||
private void checkForNamespaceMismatch(OntModel model, String defaultNamespace) {
|
private void checkForNamespaceMismatch(OntModel model, String defaultNamespace) {
|
||||||
String defaultNamespaceFromDeployProperites = ConfigurationProperties.getProperty("Vitro.defaultNamespace");
|
String defaultNamespaceFromDeployProperties = ConfigurationProperties.getProperty("Vitro.defaultNamespace");
|
||||||
if( defaultNamespaceFromDeployProperites == null ){
|
if( defaultNamespaceFromDeployProperties == null ){
|
||||||
log.error("Could not get namespace from deploy.properties.");
|
log.error("Could not get namespace from deploy.properties.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,13 +168,14 @@ public class JenaDataSourceSetup extends JenaDataSourceSetupBase implements java
|
||||||
}
|
}
|
||||||
if( portalURIs.size() > 0 ){
|
if( portalURIs.size() > 0 ){
|
||||||
for( String portalUri : portalURIs){
|
for( String portalUri : portalURIs){
|
||||||
if( portalUri != null && ! portalUri.startsWith(defaultNamespaceFromDeployProperites)){
|
if( portalUri != null && ! portalUri.startsWith(defaultNamespaceFromDeployProperties)){
|
||||||
log.error("Namespace mismatch between db and deploy.properties.");
|
log.error("Namespace mismatch between db and deploy.properties.");
|
||||||
|
String portalNamespace = portalUri.substring(0, portalUri.lastIndexOf("/")+1);
|
||||||
log.error("Vivo will not start up correctly because the default namespace specified in deploy.properties does not match the namespace of " +
|
log.error("Vivo will not start up correctly because the default namespace specified in deploy.properties does not match the namespace of " +
|
||||||
"a portal in the database. Namespace from deploy.properties: \"" + defaultNamespaceFromDeployProperites +
|
"a portal in the database. Namespace from deploy.properties: \"" + defaultNamespaceFromDeployProperties +
|
||||||
"\" Namespace from an existing portal: \"" + portalUri + "\" To get the application to start with this " +
|
"\". Namespace from an existing portal: \"" + portalNamespace + "\". To get the application to start with this " +
|
||||||
"database change the default namespace in deploy.properties " + portalUri.substring(0, portalUri.lastIndexOf("/")+1) +
|
"database, change the default namespace in deploy.properties to \"" + portalNamespace +
|
||||||
" Another possibility is that deploy.properties does not specify the intended database.");
|
"\". Another possibility is that deploy.properties does not specify the intended database.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue