Doh!
On Sep 5, 2007, at 1:27 PM, Chuck Hill wrote:
>
> On Sep 5, 2007, at 11:20 AM, David Avendasora wrote:
>
>>
>> On Sep 5, 2007, at 12:33 PM, Chuck Hill wrote:
>>
>>>
>>> On Sep 5, 2007, at 10:01 AM, David Avendasora wrote:
>>>
>>>> Yep. Has the little "R". That was actually the last thing I did
>>>> before posting the question!
>>>>
>>>> So, it looks like maybe it _is_ how I'm initializing log4j then.
>>>> Here's what I have in the Application() constructor:
>>>>
>>>> URL configURL = resourceManager().pathURLForResourceNamed
>>>> ("log4j.xml", null, null);
>>>> NSLog.out.appendln("Initializing log4j from " +
>>>> configURL.toString());
>>>> DOMConfigurator.configure(configURL);
>>>
>>> That code is correct. Is the app constructor getting executed?
>>> How are you running this in Eclipse? As a WebObjects Application?
>>
>> Yep, Run As... WOApplication.
>
> Sounds like your run configuration is wrong. I'd guess that it is
> using com.webobjects.appserver.WOApplication for the application
> class.
Errrr... um.... yup. It was the default option and not having used
Eclipse/WOLips before, I just accepted the default. I re ran it using
the Run As... WOApplication and picked MY Application class this time
and all is good.
Thanks Chuck!
Dave
>
> How did you set this up? Right click on your Application.java and
> select Run As.... WOApplication?
>
>
>>>> For what it's worth, I'm not seeing the "Initializing log4j
>>>> from..." show up in the Eclipse console either, so maybe it's
>>>> not even getting called? Am I missing something really fundamental?
>>>
>>> Try a System.out to see if you get any output.
>>
>> Nope, no output from: System.out.println("Initializing log4j from
>> " + configURL.toString());
>> either.
>>
>> I guess Application() is not being called. Is there someplace else
>> that this would need to go for a servlet application?
>
> That may be the case for deployment, that is not relevant (AFIAK)
> for launching from Eclipse.
>
>
> Chuck
>
>
>>>> On Sep 5, 2007, at 11:30 AM, Chuck Hill wrote:
>>>>
>>>>> Does the icon for log4j.xml have a little black R (R is for
>>>>> Resource! ;-) on it? If not, it is not getting added to the
>>>>> incremental builder's product at <Project>/dist/
>>>>> BakeryManagement_WebUI.woa/Contents/Resources/
>>>>>
>>>>> Right click on it and select WOLips Tools - Include as Resource
>>>>>
>>>>> Chuck
>>>>>
>>>>>
>>>>>
>>>>> On Sep 5, 2007, at 9:22 AM, David Avendasora wrote:
>>>>>
>>>>>> Hello all,
>>>>>>
>>>>>> I just moved my project over from Xcode and everything seemed
>>>>>> to go smoothy, but I'm now getting the following warning about
>>>>>> log4j not being properly initialized when I run the
>>>>>> application through Eclipse.
>>>>>>
>>>>>> log4j:WARN No appenders could be found for logger
>>>>>> (com.bestmaid.bakeryManagement.scheduling.ManufacturingSchedule).
>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>
>>>>>> This is a servlet deployment to Tomcat.
>>>>>>
>>>>>> Logging worked just fine in Xcode, so I have a feeling that it
>>>>>> is simply that my log4j.xml file is not ending up in the
>>>>>> correct location. Right now it is simply sitting in the
>>>>>> "Resources" directory in the Eclipse project, and in /WEB-INF/
>>>>>> BakeryManagement_WebUI.woa/Contents/Resources/. Where should I
>>>>>> be putting the file at?
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Dave
>>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Practical WebObjects - for developers who want to increase
>>>>> their overall knowledge of WebObjects or who are trying to
>>>>> solve specific problems.
>>>>> http://www.global-village.net/products/practical_webobjects
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>>
>>> Practical WebObjects - for developers who want to increase their
>>> overall knowledge of WebObjects or who are trying to solve
>>> specific problems.
>>> http://www.global-village.net/products/practical_webobjects
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
> --
>
> Practical WebObjects - for developers who want to increase their
> overall knowledge of WebObjects or who are trying to solve specific
> problems.
> http://www.global-village.net/products/practical_webobjects
>
>
>
>
>
>
>
This archive was generated by hypermail 2.0.0 : Wed Sep 05 2007 - 14:40:17 EDT