达梦tongweb spring 连不上数据库

达梦部署到tongweb上遇到连不上jdbc的问题

1、tongweb的lib下确认达梦的jdbc加入;

2、tongweb的jdbc资源配置正确

3、spring的配置文件配置正确

4、项目发布配置也正确

排查后发现是因为建了两个相同的项目,tongweb会把项目的war包放到autodeploy文件夹下,

 find . -maxdepth 5 -name 项目名搜了一下,发现tongweb会把项目解压缩到deployment/modules/的项目同名文件夹下,而该文件夹下的项目是另一个没有修改spring jdbc配置之前的项目,所以导致修改没有起效,连不上jdbc。

[2015-03-26 21:11:50] [INFO] [System.out] [21:11:50,245 [pool-1-thread-8] DEBUG DataSourceUtils : Fetching JDBC Connection from DataSource
]
[2015-03-26 21:11:50] [SEVERE] [org.apache.tomcat.jdbc.pool.ConnectionPool] [Unable to create initial connections of pool.
java.sql.SQLException: 网络通信异常
at dm.jdbc.dbaccess.DBError.throwSQLException(DBError.java:52)
at dm.jdbc.driver.DmdbConnection_bs.openConnection(DmdbConnection_bs.java:740)
at dm.jdbc.driver.DmdbConnection_bs.commInit(DmdbConnection_bs.java:704)
at dm.jdbc.driver.DmdbConnection_bs.initialize(DmdbConnection_bs.java:428)
at dm.jdbc.driver.DmdbConnection_bs.(DmdbConnection_bs.java:341)
at dm.jdbc.driver.DmDriver_bs.connect(DmDriver_bs.java:100)
at dm.jdbc.driver.DmDriver.connect(DmDriver.java:86)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)


。。。。。。。。。

: Invocation of init method failed; nested exception is 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: 网络通信异常

你可能感兴趣的:(达梦tongweb spring 连不上数据库)