You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2006/08/15 23:45:10 UTC

DO NOT REPLY [Bug 40260] New: - null pointer exception in pattern layout (in spacePad method)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40260>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40260

           Summary: null pointer exception in pattern layout (in spacePad
                    method)
           Product: Log4j
           Version: 1.2
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Layout
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: dario@sinistro.net


It is being used in a worker thread by xapool 1.5.0 as seen on the
Stacktrace:

Exception in thread "Thread-3" java.lang.NullPointerException
        at org.apache.log4j.helpers.PatternConverter.spacePad
(PatternConverter.java:106)
        at org.apache.log4j.helpers.PatternConverter.format
(PatternConverter.java:82)
        at org.apache.log4j.PatternLayout.format(PatternLayout.java:503)
        at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:301)
        at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)
        at org.apache.log4j.AppenderSkeleton.doAppend
(AppenderSkeleton.java:230)
        at 
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders
(AppenderAttachableImpl.java:65)
        at org.apache.log4j.Category.callAppenders(Category.java:203)
        at org.apache.log4j.Category.forcedLog(Category.java:388)
        at org.apache.log4j.Category.log(Category.java:853)
        at org.apache.commons.logging.impl.Log4JLogger.info
(Log4JLogger.java:133)
        at org.enhydra.jdbc.util.Logger.info(Logger.java:43)
        at org.enhydra.jdbc.pool.GenericPool.cleanUp(GenericPool.java:737)
        at org.enhydra.jdbc.pool.PoolKeeper.run(PoolKeeper.java:60)
        at java.lang.Thread.run(Thread.java:595)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 40260] - null pointer exception in pattern layout (in spacePad method)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40260>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40260





------- Additional Comments From r.l.wilson@qmul.ac.uk  2007-01-15 09:00 -------
I managed to get tomcat autoDeploy to work without generating this error but
whether (a) it is the underlying cause of the original posters problem  and/or
(b) there is still something that could be improved in log4j's exception
handling i couldn't say.

Having just upgraded from Tomcat 4 where we were (for historical reasons) using
log4j's PropertyConfigurator in a servlet to load a log4j configuration file
held in our own directory for all our configuration files.  As soon as I renamed
this config file to log4j.properties and put it in the WEB-INF/classes directory
then I could autoDeploy sucessfully, as you might expect.

I appreciate that this is how we are instructed to use log4j, especially in
Tomcat5, but given how the autoDeployment worked before upgrading to tomcat 5 i
was a little surprised that it didnt still work and that the error message was
so obscure

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 40260] - null pointer exception in pattern layout (in spacePad method)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40260>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40260





------- Additional Comments From r.l.wilson@qmul.ac.uk  2007-01-15 02:12 -------
I have the jar file in both the WEB-INF/lib dir of the webapp and common/lib

"autoDeploy":  the latter.  replacing the war file and stopping/starting Tomcat
works fine, i only get this error if i replace the war file while tomcat is
already running.  I get the same error if i use Tomcat's online manager app to
stop/start/undeploy/redeploy the same war file

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 40260] - null pointer exception in pattern layout (in spacePad method)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40260>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40260


kay.abendroth@raxion.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kay.abendroth@raxion.net




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 40260] - null pointer exception in pattern layout (in spacePad method)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40260>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40260





------- Additional Comments From r.l.wilson@qmul.ac.uk  2007-01-12 10:04 -------
I am also getting the same error and same stack trace

I am using log4j-1-2.14.jar, and tomcat 5.5.17

The exception, for me at least, occurs after "auto" deploying a new application
war file in tomcat's webapps dir ie.  without stopping tomcat.

I had just installed log4j-1-2.14 after hitting bug 40159

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 40260] - null pointer exception in pattern layout (in spacePad method)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40260>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40260





------- Additional Comments From hoju@visi.com  2007-01-13 10:22 -------
Where do you have Log4j installed?  Is it in the WEB-INF/lib of each webapp,
Tomcat's common/lib, both?

When you talk about the "autodeploy", are you dropping a WAR for the first time
into Tomcat or reloading an existing application after you've made an update and
replaced the existing WAR with a new one at runtime, trigging the "autodeploy"?


Jake

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 40260] - null pointer exception in pattern layout (in spacePad method)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40260>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40260


kay.abendroth@raxion.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From kay.abendroth@raxion.net  2006-11-12 10:53 -------
There's much more information needed.
Are you using log4j-1.2.14?
What are you doing when this is going to happen?

Can you provide a TestCase to reproduce this behaviour?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org