Quantcast
Channel: CodeSection,代码区,数据库(综合) - CodeSec
Viewing all articles
Browse latest Browse all 6262

proxool移植到linux上出现的错误(1) proxool移植错误 linux错误 proxool移植 proxoo ...

$
0
0

将本地项目移植到linux平台上出现了如下的bug,项目可以正常启动,当进行数据库查询时报错

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: org.logicalcobwebs.proxool.ProxoolException: Attempt to refer to a unregistered pool by its alias 'Dbblog'
### The error may exist in com/blog/web/mapper/essaysMapper.xml
### The error may involve com.blog.web.show.dao.interfaces.IessaysDao.findByUserId

我的代码: web.xml

proxoolServletConfiguratororg.logicalcobwebs.proxool.configuration.ServletConfiguratorxmlFile/WEB-INF/config/proxool.xml1
applicationContext.xml
org.logicalcobwebs.proxool.ProxoolDriverproxool.Dbblog
proxool.xml
Dbblogjdbc:mysql://localhost:3306/myblog?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8com.mysql.jdbc.Driver6000020 
2020select CURRENT_DATE15s,10m,1dINFO
初看这个错误,以为是mysql-connector-java-5.1.10-bin.jar没有引入成功导致的,查询了大量的资料,先后

1.将jar包放入了jdk/jre/lib、jdk/jre/lib/ext、jdk/lib下,并配置了classpath /usr/local/java/jdk1.7.0_79/lib/mysql-connector-java-5.1.10-bin.jar

然而并没有成功

2.将applicationContext.xml的加载优先级改为2

也没什么卵用

3.因为使用的是spring4×版本,已经取消了ContextLoaderServlet ,所以跳过了使用sevlet代替listener启用spring容器

4.使用了listener优先加载proxool.xml

也失败了

明天继续与这个bug奋战

Viewing all articles
Browse latest Browse all 6262

Trending Articles