• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: getResource and friends
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getResource and friends


  • Subject: Re: getResource and friends
  • From: Joe Little <email@hidden>
  • Date: Fri, 29 May 2009 13:44:11 -0700

Ok. I made a simple java project with your example code in the static
void main, and it just works. When I include it in a WebObjects
project and add *.conf to the class patternset, and still gives me the
NPEs.

I used both KerberosAuth.class.getResource as well as
Application.class.getResource. Perhaps its a different class I should
be referencing? Main?

On Thu, May 28, 2009 at 4:25 PM, Mike Schrag <email@hidden> wrote:
> if this is in a wo project, make sure your classes patternset includes conf
> files ... if it's not in the build folder's Java folder, it's not working
> right.
>
>
> On May 28, 2009, at 6:18 PM, Joe Little wrote:
>
>> I was returning to the kerberos example Mike provided a while back,
>> and I can't get the code to work at a basic level. I've stuffed a
>> krb5.conf and a kerberos.conf in my Sources folder as directed (and
>> tried others), but I always get an NPE from this:
>>
>> public class KerberosAuth {
>> public void testLogin() {
>>  String userName = "email@hidden";
>>  char[] password = "5p@rh@wk".toCharArray();
>>
>>  System.setProperty("java.security.auth.login.config",
>> KerberosAuth.class.getResource("/kerberos.conf").toExternalForm());
>>  System.setProperty("java.security.krb5.conf",
>> Application.class.getResource("/krb5.conf").toExternalForm());
>>
>> ...
>>
>> The NPE is on get setProperty line, and I think that
>> KerberosAuth.class.getResource is likely returning null and the
>> toExternalForm is causing the NPE. Is there some other newer approach
>> I'm supposed to be using with latest WOLips and WO 5.4.3?
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>>
>> This email sent to email@hidden
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: getResource and friends
      • From: Chuck Hill <email@hidden>
References: 
 >getResource and friends (From: Joe Little <email@hidden>)
 >Re: getResource and friends (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: WOComponent Editor no longer displays wod?
  • Next by Date: Re: getResource and friends
  • Previous by thread: Re: getResource and friends
  • Next by thread: Re: getResource and friends
  • Index(es):
    • Date
    • Thread