Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Strange Grouper-Loader Error

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Strange Grouper-Loader Error


Chronological Thread 
  • 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
Sent: Wednesday, June 06, 2012 12:20 PM
To: grouper-users
Subject: [grouper-users] Strange Grouper-Loader Error

 

All,

I am seeing this error in the logs when testing the grouper loader configuration:

2012-06-06 12:03:08,956: [DefaultQuartzScheduler_Worker-9] ERROR GrouperLoaderConfig.retrieveDbProfile(243) -  - Cant have a database named 'grouper' in the grouper-loader.properties.  This is a special name for the grouper.hibernate.properties database

Which seems to be related to this code:

  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".

Otherwise it seems to work though.


Holger

Holger Dippel
Assistant Director for Infrastructure Integration
University of Massachusetts Dartmouth
285 Old Westport Road • North Dartmouth, MA 02747

508-999-9181 •

http://www.umassd.edu/


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.
For more information about password security please visit: http://www.umassd.edu/cits/security/

 




Archive powered by MHonArc 2.6.16.

Top of Page