c3p0 log problem

View: New views
2 Messages — Rating Filter:   Alert me  

c3p0 log problem

by FredCN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

java.lang.NullPointerException
        com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.isLoggable(Log4jMLog.java:257)
        com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:98)
        com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
        com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
        com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:531)
        com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
        com.anyisoft.cs.context.test.GenericTestServlet.doGet(GenericTestServlet.java:58)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

and my log4j properties file: 
log4j.rootLogger=ALL, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout

I want to find the bug in my code or configuration ,but i even dont know where to start.

Re: c3p0 log problem

by FredCN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am using tomcat 6.0.20 in eclipse and the "reload" attribute for my web app is set to "true",
the c3p0 jar file is under my web app's WEB-INF\lib, I implements a ServletContextListener to build a c3p0 datasource and bind it to Tomcat JNDI .