Don't continue platform startup if Adempiere.properties file is missing.
This commit is contained in:
parent
916fef8565
commit
29b64b7d51
|
@ -17,6 +17,7 @@
|
|||
|
||||
package org.adempiere.webui.session;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
@ -66,6 +67,12 @@ public class WebUIServlet extends DHtmlLayoutServlet
|
|||
serverContext.put(CLogMgt.ROOT_LOGGER_NAME_PROPERTY, WEBUI_ROOT_LOGGER_NAME);
|
||||
ServerContext.setCurrentInstance(serverContext);
|
||||
|
||||
String propertyFile = Ini.getFileName(false);
|
||||
File file = new File(propertyFile);
|
||||
if (!file.exists())
|
||||
{
|
||||
throw new IllegalStateException("Adempiere.properties is not setup. PropertyFile="+propertyFile);
|
||||
}
|
||||
if (!Adempiere.isStarted())
|
||||
{
|
||||
boolean started = Adempiere.startup(false);
|
||||
|
|
Loading…
Reference in New Issue