`

Cannot open connection

阅读更多

异常:

Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) 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:142) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353) at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:558) ... 81 more

 

Caused by: java.sql.SQLException: com.mchange.v2.c3p0.ComboPooledDataSource [ java.beans.IntrospectionException: java.lang.reflect.InvocationTargetException [lastAcquisitionFailureDefaultUser] ] has been closed() -- you can no longer use it. at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.assertCpds(AbstractPoolBackedDataSource.java:447) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getPoolManager(AbstractPoolBackedDataSource.java:459) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) ... 86 more log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.

 

分析:

不知道这两个Caused by之间是什么关系,承接?并列?抑或因果!?还是其它。

第一个Caused by异常提示:
Caused by: java.sql.SQLException: com.mchange.v2.c3p0.ComboPooledDataSource [ java.beans.IntrospectionException: java.lang.reflect.InvocationTargetException [lastAcquisitionFailureDefaultUser] ] has been closed() -- you can no longer use it.
是在assertCpds后报的,应该也就是assertConnectionPoolDataSource,想要确认连接池数据源是否可用,但被告知you can no longer use it.

第 二个Caused by因为某些不知道的原因,它无法基于SQLState handledSpecificException,得不到具体异常(或者根本就没有得到SQLState),只知道Cannot open connection,为什么无法得到具体异常这个原因我觉得有兴趣可以去了解一下。

还有比较值得先去解决的问题是:
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.

可能的解决方案:
http://blog.csdn.net/wang12/article/details/6659003
http://mymobile.iteye.com/blog/1058044
或者是log4j版本引起或者是设置或者其它

 

http://topic.csdn.net/u/20120524/09/6f4071b8-d551-4436-a913-58a359cde1ef.html?seed=408165219&r=78661532#r_78661532

分享到:
评论
1 楼 publicorprivate 2013-07-04  
           

相关推荐

    redis源码以及哨片分片连接池实现

    包含redis源码,哨兵多节点分片连接池扩展实现代码,ShardedJedisPool分片连接池测试类实现,JedisSentinelPool哨兵连接池测试类实现,JedisPool连接池测试实现类,

    dbcp 连接池不合理的锁导致连接耗尽解决方案

    org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot get a ...

    linux系统安装oracle数据库详解

    Exception in thread “main” java.lang.UnsatisfiedLinkError: /tmp/OraInstall2009-11-25_02-34-42PM/jre/1.4.2/lib/i386/libawt.so:libXp.so.6: cannot open shared object file: No such file or directory ...

    collectionJava源码-mysql-connection-source-codes:控制台应用程序用于连接到MySQL,如何更新行,

    https://github.com/petrfaltus/mysql-connection-source-codes.git 2.安装MySQL(作为Docker容器) 在您的计算机上安装 参考 参考 子目录docker-database包含准备好的Windows批处理: 01-run-database.cmd提取图像...

    在配置SSH免密登录时报错:/usr/bin/ssh-copy-id: ERROR: failed to open ID file ‘/root/.pub’: 没有那个文件或目录

    /usr/bin/ssh-copy-id: ERROR: failed to open ID file '/root/.pub': 没有那个文件或目录 (to install the contents of '/root/.pub' anyway, look at the -f option) 解决方法 [root@hadoop1 sbin]# ssh-keygen ...

    OMA-TS-DM_Notification

    Many devices cannot continuously listen for connections from a management server. Other devices simply do not wish to “open a port” (i.e. accept connections) for security reasons. However, most ...

    基于JSP的BBS论坛的源代码

    BBS论坛的源代码 运行方式如下: 1.将SimpleBBS\database...2.Cannot open database "StudentInfo" requested by the login. The login failed. 这个错误说明没有附加上StudentInfo.mdb的数据库,或者是用户登录失败。

    asp.net小实例解析

    throw new Exception("Quantity cannot be a negative number"); } // 新建Connection和Command实例 SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings[...

    用ASP打开远端MDB文件的方法

    如果你用ODBC connection (DSN or DSN-less)来访问远... The Microsoft Jet database engine cannot open the file ‘(unknown)’. It is already opened exclusively by another user, or yo

    微软内部资料-SQL性能优化3

    Contents Overview 1 Lesson 1: Concepts – Locks and Lock Manager 3 Lesson 2: Concepts – Batch and Transaction 31 Lesson 3: Concepts – Locks and Applications 51 Lesson 4: Information Collection and ...

    Delphi7.1 Update

    Index Open Tools API (IOTA)=d7iota.hlp Save the d7.ohi file and delete any hidden *.GID files in your Delphi7/Help folder before restarting the Help. This modification reduces the number of index ...

    Windows MicroXP 0.82[Microsoft Windows XP SP3原版加工成的微型XP系统,=99.9%个完整XP]

    For example if you have a Dial-Up connection (for example: ADSL Broadband) then it says "Dial-Up Connection" in the services as opposed to the long and overly technical descriptions put in by ...

    docker容器中crontab无法正常运行解决方案

    相信很多人看完docker容器, 需要加crontab, 加完却发现不能执行,心...Dec 29 16:39:01 web01-50794 crond[2839]: (root) FAILED to open PAM security session (Cannot make/remove an entry for the specified sessio

    word自动转化为chm

    Word-2-CHM can not open the Word document while the connection to Microsoft Word is been blocked. Two solutions are available when Word-2-CHM fails to open the Word document. Solution I: Open the ...

    TICQClient Version

    OnConnectionFailed now called when you loose connection with server or you cannot connect to it.[+] Added advanced message support(SendMessageAdvanced procedure, OnAdvancedMsgAck event). Now you can ...

    计算机网络第六版答案

    22. Five generic tasks are error control, flow control, segmentation and reassembly, multiplexing, and connection setup. Yes, these tasks can be duplicated at different layers. For example, error ...

    php.ini-development

    special sections cannot be overridden by user-defined INI files or ; at runtime. Currently, [PATH=] and [HOST=] sections only work under ; CGI/FastCGI. ; http://php.net/ini.sections ; Directives are...

    win 3.11 for workgroup tcpip支持

    The node type cannot be specified per network adapter card. In some circumstances, it may be desirable to have one or more network adapter c ards function as broadcast nodes and other network adapter...

    Linux FTP服务配置

     data_connection_timeout=120 设置数据传输超时时间  nopriv_user=ftpsecure 运行vsftpd需要的非特权系统用户默认是nobody  async_abor_enable=YES 是否允许运行特殊的ftp命令async ABOR.这里我翻译的不爽,...

    STG (SNMP Traffic Grapher)

    I cannot guarantee accuracy of displayed data. I am not liable to you for any possible damages etc... Source code is not available. Features: Single graph displays changes of two configurable...

Global site tag (gtag.js) - Google Analytics