Initializing log4j is causing a NPE

2008-01-23 Thread David Avendasora
I'm sure I'm missing something obvious, but resourceManager().pathURLForResourceNamed(Resources/log4j.xml, null, null) in my Application.java class is returning null when I run my app. The log4j.xml is in the /Resources/ directory (in both the build and dist directories) and flagged as

Re: Initializing log4j is causing a NPE

2008-01-23 Thread Daniele Corti
2008/1/23, David Avendasora [EMAIL PROTECTED]: I'm sure I'm missing something obvious, but resourceManager().pathURLForResourceNamed(Resources/log4j.xml, null, null) in my Application.java class is returning null when I run my app. The log4j.xml is in the /Resources/ directory (in both the

Re: Initializing log4j is causing a NPE

2008-01-23 Thread Asa Hardcastle
Hi David, When I am testing a class outside of the context of wo, I do it this way: // Properties file config URL configURL = new URL(file:Resources/ MyFunAndExcitingLog4jConfigFileThatEveryoneWouldBeJealousOf .properties); PropertyConfigurator.configure(configURL); or for xml

Re: Initializing log4j is causing a NPE

2008-01-23 Thread David Avendasora
Well, I got it working, but I'm unsure why. I changed it from: URL configURL = resourceManager().pathURLForResourceNamed(Resources/ log4j.xml, null, null); To: URL configURL = resourceManager().pathURLForResourceNamed (log4j.xml, null, null); and the first couple times I tried running

Re: Initializing log4j is causing a NPE

2008-01-23 Thread Daniele Corti
Hi, Well I've said to change Resource/log4j.xml to log4j.xml because the API for pathURLForResourceNamed ask for parameters the name of the resource, without Resource/, now I'm a little confused, 'cause you said that it worked for long time... mmm Woodoo and Poltergeist are not valid tecnical

Re: Initializing log4j is causing a NPE

2008-01-23 Thread Asa Hardcastle
This is kind of like how my Volkswagen bus used to fix itself. It was unnerving at first, but after a while I started to expect that if I kept trying again it would suddenly work. This philosophy worked for three years, until the frame completely rusted through. When I have the

Re: Initializing log4j is causing a NPE

2008-01-23 Thread David Avendasora
On Jan 23, 2008, at 9:32 AM, Daniele Corti wrote: mmm Woodoo and Poltergeist are not valid tecnical solutions? I've been trying those too, but the problem is likely that I have too many pins stuck in my Mike Schrag doll. Maybe I should take a few out - that and quit letting the dog chew

Re: Initializing log4j is causing a NPE

2008-01-23 Thread Chuck Hill
I am pretty sure that the Resources part of the path is assumed, try taking it off. Chuck On Jan 23, 2008, at 5:09 AM, David Avendasora wrote: I'm sure I'm missing something obvious, but resourceManager().pathURLForResourceNamed(Resources/log4j.xml, null, null) in my Application.java

Re: Initializing log4j is causing a NPE

2008-01-23 Thread Chuck Hill
On Jan 23, 2008, at 6:47 AM, David Avendasora wrote: On Jan 23, 2008, at 9:32 AM, Daniele Corti wrote: mmm Woodoo and Poltergeist are not valid tecnical solutions? I've been trying those too, but the problem is likely that I have too many pins stuck in my Mike Schrag doll. Maybe I