Closed wenfazhu closed 6 years ago
看下catalina日志,里面有没有什么异常信息。
我和你报同样的错误,用IDE调试了一下,好像是数据库连接报错了,UserFilter 这个过滤器里面,但是又没查清楚具体原因。
root cause是什么能看到吗?
报同样错,初始化配置库配置也有问题,后来手工建表,但在创建系统管理员帐号时还报相同错误,无解了
后台报错:
com.ctrip.platform.dal.exceptions.DalException: Can not get connection from DB dao
at com.ctrip.platform.dal.dao.client.DalConnectionManager.getConnectionFromDSLocator(DalConnectionManager.java:123)
at com.ctrip.platform.dal.dao.client.DalConnectionManager.getNewConnection(DalConnectionManager.java:55)
at com.ctrip.platform.dal.dao.client.DalTransactionManager.getConnection(DalTransactionManager.java:113)
at com.ctrip.platform.dal.dao.client.DalTransactionManager.getConnection(DalTransactionManager.java:88)
at com.ctrip.platform.dal.dao.client.DalDirectClient.getConnection(DalDirectClient.java:430)
at com.ctrip.platform.dal.dao.client.DalDirectClient$1.execute(DalDirectClient.java:56)
at com.ctrip.platform.dal.dao.client.DalConnectionManager._doInConnection(DalConnectionManager.java:170)
at com.ctrip.platform.dal.dao.client.DalConnectionManager.doInConnection(DalConnectionManager.java:147)
at com.ctrip.platform.dal.dao.client.DalDirectClient.doInConnection(DalDirectClient.java:419)
at com.ctrip.platform.dal.dao.client.DalDirectClient.query(DalDirectClient.java:78)
at com.ctrip.platform.dal.dao.task.QuerySqlTask.execute(QuerySqlTask.java:19)
at com.ctrip.platform.dal.dao.task.DalSqlTaskRequest$SqlTaskCallable.call(DalSqlTaskRequest.java:176)
at com.ctrip.platform.dal.dao.task.RequestTaskWrapper.call(RequestTaskWrapper.java:33)
at com.ctrip.platform.dal.dao.task.DalRequestExecutor.nonCrossShardExecute(DalRequestExecutor.java:143)
at com.ctrip.platform.dal.dao.task.DalRequestExecutor.internalExecute(DalRequestExecutor.java:121)
at com.ctrip.platform.dal.dao.task.DalRequestExecutor.execute(DalRequestExecutor.java:106)
at com.ctrip.platform.dal.dao.DalQueryDao.query(DalQueryDao.java:131)
at com.ctrip.platform.dal.daogen.dao.DaoOfLoginUser.getUserByNo(DaoOfLoginUser.java:46)
at com.ctrip.platform.dal.daogen.entity.DefaultUserInfo.getLoginUser(DefaultUserInfo.java:23)
at com.ctrip.platform.dal.daogen.entity.DefaultUserInfo.getEmployee(DefaultUserInfo.java:29)
at com.ctrip.platform.dal.daogen.resource.CustomizedResource.getEmployee(CustomizedResource.java:82)
at com.ctrip.platform.dal.daogen.filter.UserFilter.doFilter(UserFilter.java:30)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLException: null
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:727)
at com.ctrip.platform.dal.dao.datasource.tomcat.DalConnectionPool.createConnection(DalConnectionPool.java:27)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:661)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:479)
at org.apache.tomcat.jdbc.pool.ConnectionPool.
master分支上的最新版已修复这个问题。
出现了 Unable to create initial connections of pool. 但是测试数据库连接时没有错误发生, setup DataBase的时候出现了 can not connection from db dao,请问下这是什么原因造成的呢?