Skip to Content.
Sympa Menu

grouper-dev - Strange grouper error on 1.3.0 rc1

Subject: Grouper Developers Forum

List archive

Strange grouper error on 1.3.0 rc1

Chronological Thread 
  • From: "Cramton, James" <>
  • To: <>
  • Subject: Strange grouper error on 1.3.0 rc1
  • Date: Wed, 30 Apr 2008 16:46:54 -0400

I’m sure this is not a problem with Grouper, but with our provisioning scripts that call the Grouper API. But I’ve beat my head against this for a bit, and my brain cells are probably in mourning for Abby Hoffman, and therefore refuse to operate above par.  Any suggestions for resolving this would be welcome, and I’ll keep this as short as possible.


We provision our grouper from a separate Java process called from a perl script that sets up a reasonable classpath, along with other environment variables. The classpath includes the grouper.jar in our tomcat webapps directory, so we know it’s in sync with the webapp, which works fine.  When we create a GrouperSession, we get the following error, which has a null message.




Apr 30, 2008 4:44:15 PM edu.internet2.middleware.grouper.ErrorLog fatal

SEVERE: [edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO] unable to initialize hibernate: null

Exception in thread "main" java.lang.ExceptionInInitializerError

        at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO.<clinit>(

        at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAOFactory.getGroup(

        at edu.internet2.middleware.grouper.GrouperSourceAdapter.getSubject(

        at edu.internet2.middleware.grouper.subj.SourcesXmlResolver.find(

        at edu.internet2.middleware.grouper.subj.CachingResolver.find(

        at edu.internet2.middleware.grouper.subj.ValidatingResolver.find(

        at edu.internet2.middleware.grouper.SubjectFinder.findById(

        at edu.brown.grouper.GrouperUtils.newSession(Unknown Source)

        at StemInfo.main(Unknown Source)

Caused by: java.lang.NoClassDefFoundError

        at org.apache.log4j.Logger.getLogger(

        at com.mchange.v2.log.log4j.Log4jMLog.getMLogger(

        at com.mchange.v2.log.MLog.getLogger(

        at com.mchange.v2.log.MLog.<clinit>(

        at com.mchange.v2.c3p0.DataSources.<clinit>(

        at org.hibernate.connection.C3P0ConnectionProvider.configure(

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(

        at org.hibernate.cfg.SettingsFactory.createConnectionProvider(

        at org.hibernate.cfg.SettingsFactory.buildSettings(

        at org.hibernate.cfg.Configuration.buildSettings(

        at org.hibernate.cfg.Configuration.buildSessionFactory(

        at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO.<clinit>(

        ... 8 more



Which I trace to the following lines of code in lines 46 – 57 of


abstract class Hib3DAO {



  private static final Configuration  CFG;

  private static final SessionFactory FACTORY;


  // STATIC //

  static {

    try {

      // Find the custom configuration file

      if (Hib3DAO.class.getResource(GrouperConfig.HIBERNATE_CF) == null) {

        throw new RuntimeException("Cant find resource " + GrouperConfig.HIBERNATE_CF + ", make sure it is on the classpath.");


// JFC: OK to here

      InputStream in  = Hib3DAO.class.getResourceAsStream(GrouperConfig.HIBERNATE_CF); 

      Properties  p   = new Properties();


      // And now load all configuration information

      CFG = new Configuration()















      // And finally create our session factory

      FACTORY = CFG.buildSessionFactory();

// JFC: Throws an exception with a null message by here


    catch (Throwable t) {

      String msg = "unable to initialize hibernate: " + t.getMessage();

      ErrorLog.fatal(Hib3DAO.class, msg);

      throw new ExceptionInInitializerError(t);


  } // static


I’ve verified that all of the classed added in the Configuration constructor are present, as are their xml files. And again, the web interface does not have this problem, so it’s clearly something environmental about our provisioning script.


Thoughts on where to look next?




James Cramton

Lead Programmer/Analyst

401 345 9795


Archive powered by MHonArc 2.6.16.

Top of Page