• 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: log4j initialization problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: log4j initialization problem


  • Subject: Re: log4j initialization problem
  • From: Steven Mark McCraw <email@hidden>
  • Date: Wed, 15 Aug 2007 12:10:19 -0400

Don't leave us hanging ;-) What was the fix?
On Aug 15, 2007, at 12:04 PM, James Cicenia wrote:

never mind.


On Aug 15, 2007, at 10:22 AM, James Cicenia wrote:

Hello -

I am now getting serious.   ;-)

I want to use logging and in particular log4j.

In my Application constructor I have:

String log4jFile = resourceManager().pathURLForResourceNamed ("log4j.properties", null, null).toString();

then I have:

System.out.println("Log4j file (from .woa): " + log4jFile);
PropertyConfigurator.configure(log4jFile);
log = Logger.getLogger( Application.class );
log.debug("Log4j has been initialized");

And I get this outputed in my current log:

Log4j file (from .woa): file:/usr/local/apple/Library/WebObjects/ Applications/Blakey.woa/Contents/Resources/log4j.properties
log4j:ERROR Could not read configuration file [file:/usr/local/ apple/Library/WebObjects/Applications/Blakey.woa/Contents/ Resources/log4j.properties].
java.io.FileNotFoundException: file:/usr/local/apple/Library/ WebObjects/Applications/Blakey.woa/Contents/Resources/ log4j.properties (No such file or directo
ry)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at org.apache.log4j.PropertyConfigurator.doConfigure (PropertyConfigurator.java:297)
at org.apache.log4j.PropertyConfigurator.configure (PropertyConfigurator.java:315)
at com.tos.Application.<init>(Application.java:242)



HOWEVER that file referenced is there and with completely opened permissions (777)


What obvious thing am I doing wrong?

Thanks
James Cicenia

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40jimijon.com


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:
40bluecollarsoftware.com


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: log4j initialization problem
      • From: James Cicenia <email@hidden>
References: 
 >log4j initialization problem (From: James Cicenia <email@hidden>)
 >Re: log4j initialization problem (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: log4j initialization problem
  • Next by Date: Re: log4j initialization problem
  • Previous by thread: Re: log4j initialization problem
  • Next by thread: Re: log4j initialization problem
  • Index(es):
    • Date
    • Thread