grouper-users - RE: [grouper-users] Strange Grouper-Loader Error
Subject: Grouper Users - Open Discussion List
List archive
- From: Chris Hyzer <>
- To: Holger Dippel <>, "grouper-users " <>
- Subject: RE: [grouper-users] Strange Grouper-Loader Error
- Date: Wed, 6 Jun 2012 16:47:03 +0000
- Accept-language: en-US
Yeah, I found this and fixed it for 2.1.1 the other day… it’s a harmless message. The “grouper” loader database name will just use the grouper-hibernate.properties
connect info… https://bugs.internet2.edu/jira/browse/GRP-800 Thanks, Chris From: [mailto:]
On Behalf Of Holger Dippel All, public static GrouperLoaderDb retrieveDbProfile(String name) {
String pass = null;
String url = "null;
String driver = null;
boolean isGrouper = StringUtils.equals(name, GROUPER_DB_NAME);
String user = null;
if (isGrouper) {
//the name "hibernate" is a special term, which could be in the grouper-loader.properties,
//but defaults to grouper.hibernate.properties
Properties properties = GrouperUtil.propertiesFromResourceName(
"grouper.hibernate.properties");
user = properties.getProperty("hibernate.connection.username");
pass = properties.getProperty("hibernate.connection.password");
url = "properties.getProperty("hibernate.connection.url");
driver = properties.getProperty("hibernate.connection.driver_class");
} else {
//first look in grouper-loader.properties:
user = getPropertyString("db." + name + ".user");
if (!StringUtils.isBlank(user)) {
if (isGrouper) {
throw new RuntimeException("Cant have a database named 'grouper' in " +
"the grouper-loader.properties. This is a special name for the " +
"grouper.hibernate.properties database");
}
pass = getPropertyString("db." + name + ".pass");
url = "getPropertyString("db."" + name + ".url");
driver = getPropertyString("db." + name + ".driver");
} else {
throw new RuntimeException("Cant find the db connection named: '" + name + "' in " +
"the grouper-loader.properties. Should have entries: db." + name + ".user, db." + name
+ ".pass, db." + name + ".url, db." + name + ".driver");
}
}
//might be in external file
pass = Morph.decryptIfFile(pass);
GrouperLoaderDb grouperLoaderDb = new GrouperLoaderDb(user, pass, url, driver);
return grouperLoaderDb;
}
Our loader database name is "dev_db" which clearly bypasses the first
if (isGrouper) check because isGrouper = false but then throws the exception in the second
if (isGrouper) for no good reason. From what I can tell there's nothing related to database config in our grouper-loader.properties
file that is named "grouper". Holger Dippel 508-999-9181 •
CITS will never ask you for your password or other confidential information via email. Beware of phishing scams where email and/or malicious web sites try to trick users into entering their username and password.
|
- [grouper-users] Strange Grouper-Loader Error, Holger Dippel, 06/06/2012
- RE: [grouper-users] Strange Grouper-Loader Error, Chris Hyzer, 06/06/2012
Archive powered by MHonArc 2.6.16.