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

将本地项目移植到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

   
  	proxoolServletConfigurator
  	org.logicalcobwebs.proxool.configuration.ServletConfigurator
  	
  		xmlFile
  		/WEB-INF/config/proxool.xml
  	
  	1
  
applicationContext.xml

	
		
			org.logicalcobwebs.proxool.ProxoolDriver
		
		
			proxool.Dbblog
		
	
proxool.xml



 
  Dbblog
  jdbc:mysql://localhost:3306/myblog?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8
  com.mysql.jdbc.Driver
  
   
   
   
      60000
      20 
      2
      0
      20
      select CURRENT_DATE
      15s,10m,1d
      INFO
   

初看这个错误,以为是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奋战



你可能感兴趣的:(解决问题)