我有可能重用我现有的问题。 将 groovy 应用程序连接到 SQL Server Express
但这似乎有点不同。这个问题是在配置测试应用程序时提出的,现在我正在做真实的事情,这是真正出错的时候。
如您所见,Jar 文件位于我的 lib 和类路径中
我的数据源配置如下(几乎是我的工作示例中的复制粘贴作业)
dataSource {
username = "sa"
password = "password"
url = "jdbc:sqlserver://localhost:1433;databaseName=TimeTracker"
driverClassName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
dialect = "org.hibernate.dialect.SQLServerDialect"
我在 grails run-app 上收到以下错误,任何建议都会张开双臂欢迎
Error 2013-01-27 16:09:06,772 [localhost-startStop-1] ERROR context.GrailsContextLoader
- Error executing bootstraps: 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 'lobHandlerDetector' while setting bean property
'lobHandler'; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'lobHandlerDetector':
Invocation of init method failed; nested exception is
org.springframework.jdbc.support.MetaDataAccessException:
Error while extracting DatabaseMetaData;
nested exception is org.apache.commons.dbcp.SQLNestedException:
Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
Message: 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 'lobHandlerDetector'
while setting bean property 'lobHandler'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'lobHandlerDetector': Invocation of init method failed; nested exception is
org.springframework.jdbc.support.MetaDataAccessException:
Error while extracting DatabaseMetaData; nested exception is
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class
'com.microsoft.sqlserver.jdbc.SQLServerDriver'