This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes log4j:ERROR Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "log4j:ERROR " Watch "log4j:ERROR " New topic
Author

log4j:ERROR

sowjan kumar
Greenhorn

Joined: Oct 09, 2004
Posts: 23
Hi,
I'm using log4j in my application..I could log things properly but the PropertyConfigurator is throwing Exception...

The controllerServlet that this error points out is the PropertyConfigurator configuration....Pls help me out on this

The error that i got was

log4j:ERROR Category option "n" not a decimal integer.
java.lang.NumberFormatException: n
at java.lang.Integer.parseInt(Integer.java:423)
at java.lang.Integer.parseInt(Integer.java:472)
at org.apache.log4j.helpers.PatternParser.extractPrecisionOption(PatternParser.java:109)
at org.apache.log4j.helpers.PatternParser.finalizeConverter(PatternParser.java:234)
at org.apache.log4j.helpers.PatternParser.parse(PatternParser.java:179)
at org.apache.log4j.PatternLayout.setConversionPattern(PatternLayout.java:439)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:196)
at org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:155)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:120)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:640)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:500)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:406)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:340)
at com.server.utils.ControllerServlet.init(ControllerServlet.java:56)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doInit(ServletManager.java:802)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(StrictLifecycleServlet.java:141)
at com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLifecycleServlet.java:254)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycleServlet.java:107)
at com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:388)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.servlet.engine.webapp.ServletManager.addServlet(ServletManager.java:84)
at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:193)
at com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:325)
at com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:1218)
at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:145)
at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:259)
at com.ibm.servlet.engine.srt.WebGroup.reload(WebGroup.java:1091)
at com.ibm.servlet.engine.srt.ClassChangeWatcher.classChanged(ClassChangeWatcher.java:55)
at com.ibm.ws.classloader.ClassLoaderManager.checkAndNotify(ClassLoaderManager.java:360)
at com.ibm.ws.classloader.ClassLoaderManager.access$100(ClassLoaderManager.java:34)
at com.ibm.ws.classloader.ClassLoaderManager$ReloadTimerTask.run(ClassLoaderManager.java:412)
at java.util.TimerThread.mainLoop(Timer.java:445)
at java.util.TimerThread.run(Timer.java:395)
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

The NumberFormatException here is probably the result of a String value that cannot be parsed into an integer. It seems likely this is a bug in your program code, not a service issue.

Moving this to...hm...well I'll figure it out in a sec.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
There seems to be an "n" in your configuration where log4j expects a number.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
sowjan kumar
Greenhorn

Joined: Oct 09, 2004
Posts: 23
Hi all,
yeah......Atlast everything is working fine...Thank you so much...One of my parameter that I had used in my properties file was the problem..

Thnx a lot.....

Sowjaya
 
jQuery in Action, 2nd edition
 
subject: log4j:ERROR