On May 29, 2009, at 2:05 PM, Joe Little wrote:

On Fri, May 29, 2009 at 2:01 PM, Chuck Hill <ch...@global- village.net> wrote:

On May 29, 2009, at 1:59 PM, Joe Little wrote:

On Fri, May 29, 2009 at 1:52 PM, Chuck Hill <[email protected] >
wrote:

Where are you putting these under Sources? At the root? In the same package as the classes? Have you checked the build/ directory to ensure
they are ending up there?


I've tried putting at the root and at the package level.

At
workspace/KerbTest/build/KerbTest.woa/Contents/Resources/Java/edu/ stanford/ee/admit/kerbtest I have the kerberos.conf file for when I placed it in the package dir.

When I put it at the root of the Sources, it doesn't end up anywhere in
build.

KerberosAuth.class.getResource("/kerberos.conf") indicates a root level
resource
KerberosAuth.class.getResource("kerberos.conf") indicates one in the same
package

Try taking off the backslash.


I told off the forward slash, and it works when I put the
kerberos.conf file there manually in build directory.

Where in the build directory?  Details man, details!  ;-)


Basically, the
problem is that the ant scripts aren't relocating the conf files into
the build tree regardless of location. I wonder if something more
needs to be done to ant manually to load this as the pattern set
doesn't seem to be sufficient.

Check the classes.exclude.patternset too, just in case...
Try
**/*.conf

I am also unsure what the Incremental Builder does for these if you are using it, not the Ant builder.

Good fun, this!


Chuck

My classes.include.patternset
*.conf
**/*.class
*.properties


Chuck


On May 29, 2009, at 1:44 PM, Joe Little wrote:

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 protected] >
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 protected]";
 char[] password = "5...@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 (Webobjects- [email protected])
Help/Unsubscribe/Update your Subscription:



http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to [email protected]


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:


http://lists.apple.com/mailman/options/webobjects-dev/jmlittle%40gmail.com

This email sent to [email protected]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:


http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to [email protected]


--
Chuck Hill             Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/




--
Chuck Hill             Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/




--
Chuck Hill             Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to