aspose file tools*
The moose likes Other Open Source Projects and the fly likes log4j error? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j error?" Watch "log4j error?" New topic
Author

log4j error?

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
here is my class



here is my property file
[code]
log4j.rootLogger=DEBUG, CA
log4j.appender.CA=org.apache.log4j.ConsoleAppender
log4j.appender.CA.layout=org.apache.log4j.PatternLayout
log4j.appender.CA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
[code]

here is the error
http://4.bp.blogspot.com/_bpkZ2BsqXug/S2qR72PMRDI/AAAAAAAAAFU/LUDjbIL25kU/s1600-h/log.GIF

i have already added log4j.jar file too
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10046
    
163

i have already added log4j.jar file too


But you are importing java.util.logging.*


[My Blog] [JavaRanch Journal]
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
i change class


now i got this error when i run project

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10046
    
163

As shown in the exception stacktrace, the:



isn't able to find that file. Did you try specifying an absolute path of the log4j.properties?
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
how to give absolute path?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10046
    
163

Samanthi perera wrote:how to give absolute path?


From here

An absolute pathname is complete in that no other information is required in order to locate the file that it denotes


So where exactly on your filesystem does that log4j.properties file exist. You will have to specify that entire path in the code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log4j error?