升级到mysql-connector-java:5.1.34后,grails test-app MetaDataAccessException

时间:2015-04-14 21:01:04

标签: mysql grails mysql-connector

我最近升级到了mysql:mysql-connector-java:5.1.34连接器。我的Grails版本是2.2.4。 MySQL版本是5.6.10。升级进行得非常顺利,应用程序本身似乎也很顺利。但是,我的一个测试应用程序失败了 发生以下错误:

Error Error executing script TestApp: 
org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'transactionManagerPostProcessor':
Initialization of bean failed; 
nested exception is 
org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'transactionManager': 
Cannot resolve reference to bean 'sessionFactory' 
while setting bean property 'sessionFactory'; 
nested exception is 
org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'sessionFactory': 
Cannot resolve reference to bean 'hibernateProperties' 
while setting bean property 'hibernateProperties'; 
nested exception is 
org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'hibernateProperties': 
Cannot resolve reference to bean 'dialectDetector' 
while setting bean property 'properties' with key [hibernate.dialect];
nested exception is 
org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'dialectDetector': 
Invocation of init method failed; 
nested exception is 
org.springframework.jdbc.support.MetaDataAccessException: 
Error while extracting DatabaseMetaData; 
nested exception is java.sql.SQLException: 
Access denied for user 'web'@'localhost' (using password: YES) 
(Use --stacktrace to see the full trace)

我对网络用户进行了双重检查,据我所知,该帐户已正确定义并具有与root相当的admin权限。在我的个人数据库开发盒和jenkins构建系统上都发生了这种情况。

我在日志中看不到任何内容,使用--stacktrace运行并没有给我任何有用的信息,谷歌搜索并没有将此显示为常见错误。

0 个答案:

没有答案