ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: Log 4j prob
Date Fri, 10 Mar 2006 04:44:52 GMT
Hmmm, I just put it in WEB-INF/lib and it worked...

On 3/9/06, Ben Munat <bent@munat.com> wrote:
> I found, on Tomcat 5.5.*, that we *had* to put commons-logging.jar and log4j-xxx.jar
in
> common/lib or logging simply wouldn't work at all. And yes, this did mean we had to put
a
> log4j.properties in common\classes, but we just put a basic simple config in there...
> tomcat still honors the log4j.properties in WEB-INF/classes. We haven't had any problems
> with this. Have you somehow continued using per-app log jars only with tomcat 5.5 Larry?
>
> b
>
>
> Larry Meadors wrote:
> > Yes, that is correct - with tomcat, if you put the log4j.jar in
> > common/lib (IMO that is a profoundly bad idea, btw), then you have to
> > put the log4j.properties file in common/classes.
> >
> > A better place is with your webapp in WEB-INF/lib, then put the
> > log4j.properties file in WEB-INF/classes.
> >
> > Larry
> >
> >
> > On 3/9/06, Meindert <meindert@pastelebusiness.com> wrote:
> >
> >>I had a similar problem when the log4j jar was in the tomcat common lib (but
> >>then it was complaining about a other class logger)
> >>So would also think it got something to do with the place of your log4j
> >>jar/class path
> >>
> >>
> >>MEINDERT HOVING
> >>
> >>-----Original Message-----
> >>From: Richard Yee [mailto:ryee@cruzio.com]
> >>Sent: 09 March 2006 03:23 AM
> >>To: user-java@ibatis.apache.org
> >>Subject: Re: Log 4j prob
> >>
> >>Gregory,
> >>Is your log4j.properties file in the classpath?
> >>
> >>-Richard
> >>
> >>Engel, Gregory A wrote:
> >>
> >>>I don't.
> >>>Ibatis does it automatically according to the docs...
> >>>
> >>>"Configuring the commons logging services is very simply a matter of
> >>>including one or more extra
> >>>configuration files (e.g. log4j.properties) and sometimes a new JAR
> >>>file (e.g. log4j.jar)."
> >>>
> >>>This used to work fine. But I started getting the logging error
> >>>message a while back. Honestly I don't
> >>>know what I changed that could have set it off.
> >>>
> >>>    -----Original Message-----
> >>>    *From:* Yee, Richard K CTR DMDC
> >>>    [mailto:Richard.Yee.ctr@osd.pentagon.mil]
> >>>    *Sent:* Wednesday, March 08, 2006 2:22 PM
> >>>    *To:* 'user-java@ibatis.apache.org'
> >>>    *Subject:* RE: Log 4j prob
> >>>
> >>>    Gregory,
> >>>    The warning indicates that some code is logging to Log4J before
> >>>    you call PropertyConfigurator.configure(). Where do you initialize
> >>>    Log4J? Do you do it in a servlet or a ContextListener?
> >>>
> >>>    -Richard
> >>>
> >>>
> >>>        -----Original Message-----
> >>>        *From:* Engel, Gregory A [mailto:GAEngel@Tribune.com]
> >>>        *Sent:* Wednesday, March 08, 2006 10:30 AM
> >>>        *To:* 'user-java@ibatis.apache.org'
> >>>        *Subject:* Log 4j prob
> >>>
> >>>        Not really an Ibatis question per se but I'm sure someone here
> >>>        has seen this....
> >>>
> >>>        log4j:WARN No appenders could be found for logger
> >>>        (java.sql.Connection).
> >>>        log4j:WARN Please initialize the log4j system properly.
> >>>
> >>>        My log4j.properties file looks like....
> >>>
> >>>        # Set root logger level to DEBUG and its only appender to A1.
> >>>        log4j.rootLogger=INFO, Appender1
> >>>        log4j.appender.Appender1=org.apache.log4j.ConsoleAppender
> >>>        log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> >>>        log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> >>>
> >>>        # A1 uses PatternLayout.
> >>>        log4j.appender.Appender1.layout=org.apache.log4j.PatternLayout
> >>>        log4j.appender.Appender1.layout.ConversionPattern=%-5p
> >>>        %-25C{1}: %m%n
> >>>
> >>>        #log4j.rootCategory=DEBUG, Chainsaw
> >>>        #log4j.appender.Chainsaw=org.apache.log4j.net.SocketAppender
> >>>        #log4j.appender.Chainsaw.remoteHost=localhost
> >>>        #log4j.appender.Chainsaw.port=4445
> >>>        #log4j.appender.Chainsaw.locationInfo=true
> >>>
> >>>        log4j.logger.com.ibatis=DEBUG
> >>>        log4j.logger.java.sql.PreparedStatement=DEBUG
> >>>        log4j.logger.java.sql.Statement=DEBUG
> >>>        log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
> >>>
> >>>
> >>>        log4j.logger.java.sql.ResultSet=DEBUG
> >>>        log4j.logger.java.sql.Connection=DEBUG
> >>>
> >>>        This used to work fine but somewhere along the line it stopped
> >>>        working.
> >>>
> >>
> >>--
> >>No virus found in this incoming message.
> >>Checked by AVG Free Edition.
> >>Version: 7.1.375 / Virus Database: 268.2.1/277 - Release Date: 08/03/2006
> >>
> >>
> >>--
> >>No virus found in this outgoing message.
> >>Checked by AVG Free Edition.
> >>Version: 7.1.375 / Virus Database: 268.2.1/277 - Release Date: 08/03/2006
> >>
> >>
> >>
>

Mime
View raw message