throw new ObjectStoreException(alias + " does not have an model specified"
throw new ObjectStoreException(alias + " does not have a model specified"
    public static ObjectStore getObjectStore(String alias) throws Exception {        if (alias == null) {            throw new NullPointerException("ObjectStore alias cannot be null");        }        if (alias.equals("")) {            throw new IllegalArgumentException("ObjectStore alias cannot be empty");        }        Properties props = PropertiesUtil.getPropertiesStartingWith(alias);        if (0 == props.size()) {            throw new ObjectStoreException("No ObjectStore properties were found for alias '"                                           + alias + "'");        }        props = PropertiesUtil.stripStart(alias, props);        String clsName = props.getProperty("class");        if (clsName == null) {            throw new ObjectStoreException(alias + " does not have an ObjectStore class specified"                                           + " (check properties file)");        }        String modelName = props.getProperty("model");        if (modelName == null) {            throw new ObjectStoreException(alias + " does not have an model specified"                                           + " (check properties file)");        }        Model model;        try {            model = Model.getInstanceByName(modelName);            if (model == null) {                throw new MetaDataException("Model is null despite load");            }        } catch (MetaDataException e) {            throw new ObjectStoreException(e);        }        String impl = props.getProperty("alias");        if (impl == null) {            throw new ObjectStoreException(alias + " does not have an alias specified"                                           + " (check properties file)");        }        Properties subProps = PropertiesUtil.stripStart(impl, props);        Class cls = null;        try {            cls = Class.forName(clsName);        } catch (ClassNotFoundException e) {            throw new ObjectStoreException("Cannot find specified ObjectStore class '" + clsName                                           + "' for " + alias + " (check properties file)");        }        Method m = cls.getDeclaredMethod("getInstance",                                         new Class[] {Properties.class, Model.class});        return (ObjectStore) m.invoke(null, new Object[] {subProps, model});    }