-
Jun 24th, 2009, 07:21 PM
#21
log4j.logger.org.springframework.web.context=debug , stdout
This line in my log4j.properties made the trick and showed me what was the error right away
Hope it helps somebody out there...
.. cheers
-
Aug 5th, 2009, 12:31 PM
#22
Worked for me
Hi everybody.
dont know this might work for u.
i was having this error, with one line on tomcat sonsole. saying severe -- listener error. and thing else printed in console in tomcat.
could not understand what was causing the problem.
after reading this thread, i understood its some kind of logging configuration problem
then i looked at my log4j.properties, and realised it was not setup for a console log, but was set for a rolling file appender, writing to some file in my file system test.log
here is my logj configuration for rolling file.
and this was writing to test.log,
i was unable to find this log in tomcat logs folder.
but it was writing to CATALINA_HOME/bin/test.log
there in that log, i was able to see why the spring was not failing to load.
# ROLLING
log4j.appender.ROLLING=org.apache.log4j.RollingFil eAppender
log4j.appender.ROLLING.File=test.log
log4j.appender.ROLLING.layout=org.apache.log4j.Pat ternLayout
log4j.appender.ROLLING.layout.ConversionPattern=%d {ISO8601} %-5p %c{1}-%m%n
log4j.appender.ROLLING.MaxFileSize=10MB
log4j.appender.ROLLING.MaxBackupIndex=5
one more this that might help, is my spring application-context.xml contaisn an entry for loading log4j.
<bean id="log4jInitialization"
class="org.springframework.beans.factory.config.Me thodInvokingFactoryBean">
<property name="targetClass"
value="org.springframework.util.Log4jConfigurer" />
<property name="targetMethod" value="initLogging" />
<property name="arguments">
<list>
<value>classpath:log4j.properties</value>
</list>
</property>
</bean>
make sure u have similar entry that helps spring intialize and write to log4j.
hope this helps
thanks
Nagolu Sidhartha
-
Nov 10th, 2009, 06:03 AM
#23
remove log4j from WEB-INF/lib
I have found that what works for me (just had to do it again, and it still worked) is to remove the log4j jar from WEB-INF/lib within your webapp, and have it only in tomcat/common/lib
After restarting tomcat I get lots of useful error messages.
Note that if you are using maven, remember to clean after updating your pom.xml, or the log4j jar will still be there.
Hope this helps someone!
-
Aug 3rd, 2010, 11:20 AM
#24
check dis blog
http://skc-ebooks.blogspot.com
i posted a systematic way to solve the error
-
Nov 12th, 2010, 03:00 AM
#25
I had the same problem.
I was working on two different projects, one that runs in JRE 1.5 and the other runs on JRE 1.6. The problem was that I was trying to start tomcat with a project compiled with Java 1.6 on the JRE 1.5.
Hope it helps.
-
Apr 1st, 2011, 03:28 PM
#26
Thanks Sidhartha Your solution worked
Thanks Sidhartha Your solution works
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules