Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I get e-text from Kerberos error?

843810Jun 18 2008 — edited Jun 19 2008

My client is throwing a Kerberos Exception. The message says "description in e-text", but I can't seem to get the e-text from the KrbException. Does any one know how to get this so that I know what exactly is the error all about?

I tried the following, but the KrbException doesn't seem to have any appropriate method to extract this:

try {
token = context.initSecContext(token, 0, token.length);
} catch (org.ietf.jgss.GSSException e) {
System.out.println(e.getMessage());
KrbException e1 = (KrbException) e.getCause();
System.out.println(e1.getMessage());
System.exit(1);
}


Here is the actual stack trace:


Exception in thread "main" java.security.PrivilegedActionException: GSSException: No valid credentials provided (Mechanism level: Generic error (description in e-text) (60) - Generic error (see e-text))


at java.security.AccessController.doPrivileged(_Native Method_)


at javax.security.auth.Subject.doAs(Unknown Source)


at Jaas.loginAndAction(_Jaas.java:73_)


at GssClient.main(_GssClient.java:93_)


Caused by: GSSException: No valid credentials provided (Mechanism level: Generic error (description in e-text) (60) - Generic error (see e-text))


at sun.security.jgss.krb5.Krb5Context.initSecContext(Unknown Source)


at sun.security.jgss.GSSContextImpl.initSecContext(Unknown Source)


at sun.security.jgss.GSSContextImpl.initSecContext(Unknown Source)


at GssClient$GssClientAction.run(_GssClient.java:164_)


... 4 more


Caused by: KrbException: Generic error (description in e-text) (60) - Generic error (see e-text)


at sun.security.krb5.KrbTgsRep.<init>(Unknown Source)


at sun.security.krb5.KrbTgsReq.getReply(Unknown Source)


at sun.security.krb5.internal.CredentialsUtil.serviceCreds(Unknown Source)


at sun.security.krb5.internal.CredentialsUtil.acquireServiceCreds(Unknown Source)


at sun.security.krb5.Credentials.acquireServiceCreds(Unknown Source)


... 8 more


Caused by: KrbException: Identifier doesn't match expected value (906)


at sun.security.krb5.internal.KDCRep.init(Unknown Source)


at sun.security.krb5.internal.TGSRep.init(Unknown Source)


at sun.security.krb5.internal.TGSRep.<init>(Unknown Source)


... 13 more

Thanks a lot

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 17 2008
Added on Jun 18 2008
9 comments
4,171 views