Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Random ldappc failures

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Random ldappc failures


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Paul Engle <>, "" <>
  • Subject: RE: [grouper-users] Random ldappc failures
  • Date: Wed, 29 Jul 2009 14:50:42 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US

> Tom,
> Sorry for the delay. Yes, you are correct. On a failure, I
> don't get that log message.
>
> I have managed to catch it in the act with an eclipse
> debugger attached to the process. Given the text and format of
> the fatal log message, I put in a breakpoint in line 128 of
> LdappcGrouperProvisioner.java, where the general Exception is
> caught in provisionGroups(). Unfortunately, by the time it gets
> to this point, most of the useful context of what is was doing
> is gone. The exception it's catching, however, looks very odd.
>
> It's a NullPointerException, but the detailMessage and
> stackTrace for the exception are both null. And the cause is
> another, similar NullPointerException with null detailMessage &
> stackTrace & cause that's a NullPointerException, etc. ad
> nauseam.

Since error handling and logging are of interest to me, let me join this
conversation... :)

If you can get it to stop there again while debugging in eclipse, open the
eclipse view "expressions", and add an expression:

e.printStackTrace()

That should print the stack with the cause to the console.

Or, if you can, just change:

FROM:

catch (NameNotFoundException nnfe)
{
ErrorLog.fatal(this.getClass(), "Grouper Provision Failed: " +
nnfe.getMessage() + " Exception data: "
+ nnfe.toString());
}
catch (Exception e)
{
ErrorLog.fatal(this.getClass(), "Grouper Provision Failed: " +
e.getMessage());
}

TO:

catch (NameNotFoundException nnfe)
{
ErrorLog.fatal(this.getClass(), "Grouper Provision Failed: " +
nnfe.getMessage() + " Exception data: "
+ nnfe.toString() + ", " +
ExceptionUtils.getFullStackTrace(nnfe));
}
catch (Exception e)
{
ErrorLog.fatal(this.getClass(), "Grouper Provision Failed: " +
e.getMessage() + ", " + ExceptionUtils.getFullStackTrace(e));
}

You will also need to add this import to the top:

import org.apache.commons.lang.exception.ExceptionUtils;

Alternately or in addition, you could add nnfe.printStackTrace() and
e.printStackTrace() if you want to see this in the console vs error log.

I made these changes in 2.4, so once they are propagated to public cvs
(usually takes an hour or two), you can get the latest 1.4 branch, build, and
use that. I also changed the logging in a bunch of other places to show
stacktraces...

You will know when it is ready when this file shows being updated today:

http://viewvc.internet2.edu/viewvc.py/grouper/src/grouper/edu/internet2/middleware/ldappc/ConfigManager.java?view=log&pathrev=GROUPER_1_4_BRANCH

You can get latest with these commands:

cvs
-d:pserver::/home/cvs/i2mi
login
cvs
-d:pserver::/home/cvs/i2mi
export -r GROUPER_1_4_BRANCH grouper

Thanks,
Chris



Archive powered by MHonArc 2.6.16.

Top of Page