Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNest

本文记录了一次因JNDI名称未找到导致的JDBC连接问题,并给出了清除Tomcat缓存及重新编译项目的解决方案。

 Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNest

检查用户名密码可以正确,plsql数据库可以正常连接

检查日志后发现

2017-10-24 08:56:05, 218 DEBUG JndiLocatorDelegate:101 - Converted JNDI name [java:comp/env/spring.liveBeansView.mbeanDomain] not found - trying original name [spring.liveBeansView.mbeanDomain]. javax.naming.NameNotFoundException: Name spring.liveBeansView.mbeanDomain is not bound in this Context
2017-10-24 08:56:05, 218 DEBUG JndiTemplate:150 - Looking up JNDI object with name [spring.liveBeansView.mbeanDomain]
2017-10-24 08:56:05, 218 DEBUG JndiPropertySource:87 - JNDI lookup for name [spring.liveBeansView.mbeanDomain] threw NamingException with message: Name spring.liveBeansView.mbeanDomain is not bound in this Context. Returning null.
2017-10-24 08:56:05, 218 DEBUG PropertySourcesPropertyResolver:70 - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemProperties]
2017-10-24 08:56:05, 218 DEBUG PropertySourcesPropertyResolver:70 - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemEnvironment]
2017-10-24 08:56:05, 218 DEBUG PropertySourcesPropertyResolver:93 - Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
2017-10-24 08:56:05, 218 DEBUG DefaultListableBeanFactory:246 - Returning cached instance of singleton bean 'cxf'
2017-10-24 08:56:05, 218 DEBUG DefaultResourceManager:103 - resolving resource </WEB-INF/cxfServletStaticResourcesMap.txt> type <class java.io.InputStream>
2017-10-24 08:56:05, 218 DEBUG DefaultResourceManager:103 - resolving resource </cxfServletStaticResourcesMap.txt> type <class java.io.InputStream>
2017-10-24 8:56:06 org.apache.catalina.loader.WebappClassLoader validateJarFile

jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

据我所知这个错误是jar包重复,而几分钟之前我还正常运行程序

解决方案:

清除tomcat中之前的记录,查看tomcat中webapps里查看是否文件过多。

全部删除重新编译后问题解决。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值