0

当我使用休眠在 tomcat 服务器(6.0)上运行程序时遇到问题。我不明白它究竟来自哪里。我认为这是关于休眠连接池问题,例如未关闭的连接。我在互联网上没有找到任何关于此的信息,所以我来这里。你有什么主意吗?谢谢,

铝。

2013-09-19 10:49:05,806 INFO  dadvi.imoa.struts.actions.ged.DocumentAction - 2751
2013-09-19 16:09:49,868 INFO  org.springframework.web.context.support.XmlWebApplicationContext - Closing Root WebApplicationContext: startup date [Wed Sep 18 17:04:12 CEST 2013]; root of context hierarchy
2013-09-19 16:09:49,871 INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@692c1bef: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,securityInterceptor,cxf.config0,CreationCompteWS,DocumentWS,deviceAuthServiceClass,documentServiceClass,scanServiceClass,directoryServiceClass,deviceInterceptor,scanService,directoryService,deviceAuthService,documentService,directoryServiceWS]; root of factory hierarchy
2013-09-19 16:09:49,884 INFO  dadvi.imoa.listener.SpoolListener - Starting to stop.
2013-09-19 16:09:49,884 INFO  dadvi.imoa.listener.SpoolListener - Finished to stop.
2013-09-19 16:09:50,790 ERROR dadvi.imoa.utils.HibernateUtils - Error while hibernate connexion :
org.hibernate.exception.GenericJDBCException: Cannot open connection
                at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
                at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
                at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
                at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
                at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
                at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
                at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:160)
                at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:81)
                at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
                at dadvi.imoa.utils.HibernateUtils.startHibernateTransaction(HibernateUtils.java:53)
                at dadvi.imoa.dao.clientdadvi.impl.ClientsDadviDAOImpl.getClientByNumClient(ClientsDadviDAOImpl.java:86)
                at dadvi.imoa.struts.actions.SubscriptionAction.<clinit>(SubscriptionAction.java:83)
                at sun.misc.Unsafe.ensureClassInitialized(Native Method)
                at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source)
                at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.getFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.get(Unknown Source)
                at org.apache.catalina.loader.WebappClassLoader.clearReferencesStaticFinal(WebappClassLoader.java:2066)
                at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1929)
                at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833)
                at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740)
                at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4920)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468)
                at org.apache.catalina.core.StandardService.stop(StandardService.java:604)
                at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788)
                at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:408)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.NullPointerException
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
                at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:531)
                at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
                at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:78)
                at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
                ... 30 more
Caused by: java.lang.NullPointerException
                at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.isLoggable(Log4jMLog.java:255)
                at com.mchange.v2.resourcepool.BasicResourcePool.trace(BasicResourcePool.java:1639)
                at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:492)
                at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
                ... 33 more
2013-09-19 16:09:50,793 ERROR dadvi.imoa.dao.clientdadvi.impl.ClientsDadviDAOImpl -  >>> Error while searching client by numClient :
java.lang.NullPointerException
                at dadvi.imoa.dao.clientdadvi.impl.ClientsDadviDAOImpl.getClientByNumClient(ClientsDadviDAOImpl.java:93)
                at dadvi.imoa.struts.actions.SubscriptionAction.<clinit>(SubscriptionAction.java:83)
                at sun.misc.Unsafe.ensureClassInitialized(Native Method)
                at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source)
                at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.getFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.get(Unknown Source)
                at org.apache.catalina.loader.WebappClassLoader.clearReferencesStaticFinal(WebappClassLoader.java:2066)
                at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1929)
                at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833)
                at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740)
                at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4920)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468)
                at org.apache.catalina.core.StandardService.stop(StandardService.java:604)
                at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788)
                at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:408)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)
2013-09-19 16:09:50,795 ERROR dadvi.imoa.utils.HibernateUtils - Error while hibernate connexion :
org.hibernate.exception.GenericJDBCException: Cannot open connection
                at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
                at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
                at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
                at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
                at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
                at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
                at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:160)
                at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:81)
                at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
                at dadvi.imoa.utils.HibernateUtils.startHibernateTransaction(HibernateUtils.java:53)
                at dadvi.imoa.dao.cgv.impl.CgvDAOImpl.actualCgv(CgvDAOImpl.java:22)
                at dadvi.imoa.struts.actions.SubscriptionAction.<clinit>(SubscriptionAction.java:84)
                at sun.misc.Unsafe.ensureClassInitialized(Native Method)
                at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source)
                at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.getFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.get(Unknown Source)
                at org.apache.catalina.loader.WebappClassLoader.clearReferencesStaticFinal(WebappClassLoader.java:2066)
                at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1929)
                at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833)
                at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740)
                at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4920)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468)
                at org.apache.catalina.core.StandardService.stop(StandardService.java:604)
                at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788)
                at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:408)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.NullPointerException
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
                at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:531)
                at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
                at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:78)
                at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
                ... 30 more
Caused by: java.lang.NullPointerException
                at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.isLoggable(Log4jMLog.java:255)
                at com.mchange.v2.resourcepool.BasicResourcePool.trace(BasicResourcePool.java:1639)
                at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:492)
                at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
                ... 33 more
2013-09-19 16:09:50,805 ERROR dadvi.imoa.utils.HibernateUtils - Error while hibernate connexion :
org.hibernate.exception.GenericJDBCException: Cannot open connection
                at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
                at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
                at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
                at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
                at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
                at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
                at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:160)
                at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:81)
                at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
                at dadvi.imoa.utils.HibernateUtils.startHibernateTransaction(HibernateUtils.java:53)
                at dadvi.imoa.dao.clientdadvi.impl.ClientsDadviDAOImpl.getClientByNumClient(ClientsDadviDAOImpl.java:86)
                at dadvi.imoa.struts.actions.DialogAction.<clinit>(DialogAction.java:51)
                at sun.misc.Unsafe.ensureClassInitialized(Native Method)
                at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source)
                at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.getFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.get(Unknown Source)
                at org.apache.catalina.loader.WebappClassLoader.clearReferencesStaticFinal(WebappClassLoader.java:2066)
                at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1929)
                at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833)
                at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740)
                at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4920)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468)
                at org.apache.catalina.core.StandardService.stop(StandardService.java:604)
                at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788)
                at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:408)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.NullPointerException
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
                at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:531)
                at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
                at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:78)
                at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
                ... 30 more
Caused by: java.lang.NullPointerException
                at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.isLoggable(Log4jMLog.java:255)
                at com.mchange.v2.resourcepool.BasicResourcePool.trace(BasicResourcePool.java:1639)
                at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:492)
                at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
                ... 33 more
2013-09-19 16:09:50,806 ERROR dadvi.imoa.dao.clientdadvi.impl.ClientsDadviDAOImpl -  >>> Error while searching client by numClient :
java.lang.NullPointerException
                at dadvi.imoa.dao.clientdadvi.impl.ClientsDadviDAOImpl.getClientByNumClient(ClientsDadviDAOImpl.java:93)
                at dadvi.imoa.struts.actions.DialogAction.<clinit>(DialogAction.java:51)
                at sun.misc.Unsafe.ensureClassInitialized(Native Method)
                at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source)
                at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.getFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.get(Unknown Source)
                at org.apache.catalina.loader.WebappClassLoader.clearReferencesStaticFinal(WebappClassLoader.java:2066)
                at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1929)
                at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833)
                at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740)
                at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4920)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468)
                at org.apache.catalina.core.StandardService.stop(StandardService.java:604)
                at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788)
                at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:408)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)
2013-09-19 16:09:50,808 ERROR dadvi.imoa.utils.HibernateUtils - Error while hibernate connexion :
org.hibernate.exception.GenericJDBCException: Cannot open connection
                at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
                at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
                at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
                at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
                at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
                at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
                at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:160)
                at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:81)
                at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
                at dadvi.imoa.utils.HibernateUtils.startHibernateTransaction(HibernateUtils.java:53)
                at dadvi.imoa.dao.cgv.impl.CgvDAOImpl.actualCgv(CgvDAOImpl.java:22)
                at dadvi.imoa.struts.actions.DialogAction.<clinit>(DialogAction.java:52)
                at sun.misc.Unsafe.ensureClassInitialized(Native Method)
                at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source)
                at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.getFieldAccessor(Unknown Source)
                at java.lang.reflect.Field.get(Unknown Source)
                at org.apache.catalina.loader.WebappClassLoader.clearReferencesStaticFinal(WebappClassLoader.java:2066)
                at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1929)
                at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833)
                at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740)
                at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4920)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
                at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468)
                at org.apache.catalina.core.StandardService.stop(StandardService.java:604)
                at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788)
                at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:408)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.NullPointerException
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
                at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
                at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:531)
                at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
                at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:78)
                at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
                ... 30 more
Caused by: java.lang.NullPointerException
                at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.isLoggable(Log4jMLog.java:255)
                at com.mchange.v2.resourcepool.BasicResourcePool.trace(BasicResourcePool.java:1639)
                at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:492)
                at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
                ... 33 more
2013-09-19 16:10:50,689 INFO  dadvi.imoa.listener.SpoolListener - Starting.
2013-09-19 16:10:50,689 INFO  dadvi.imoa.listener.SpoolListener - Stopping.
4

4 回答 4

0

通用 JDBC 异常:无法打开连接

连接数据库时出现问题。请检查您的 JDBC 连接代码。

于 2013-10-01T08:42:24.040 回答
0

无法打开连接:看起来您的项目已失去与数据库的连接。我在(非生产)环境中遇到过几次,帮助我解决它的是重新启动我正在工作的 Tomcat 服务器

于 2013-10-01T08:42:51.953 回答
0

这可能有很多原因,如果没有进一步的信息,就无法判断。

  • 连接字符串是否正确
  • 登录名和密码是否正确
  • 您是否有权访问数据库
  • 您的 xml 文件是否正确
于 2013-10-01T08:43:02.360 回答
0

异常的原因是java.lang.NullPointerException堆栈跟踪的末尾。所以我用谷歌搜索了“c3p0”和“Log4jMLog”,第一个搜索结果是一个指向描述您的情况的打开错误的链接。看起来你遇到了同样的错误(2007 年报告,我不得不承认这有点可疑 - 现在应该已经解决了)。

于 2014-01-04T22:29:13.340 回答