gpt4 book ai didi

oracle - Grails 2.4.5配置Oracle连接器

转载 作者:行者123 更新时间:2023-12-02 16:00:28 25 4
gpt4 key购买 nike

我正在使用Grails 2.4.5,我想连接到oracle数据库。
DataSource.groovy上,我添加了:

dataSource {
pooled = true
driverClassName = "oracle.jdbc.driver.OracleDriver"
dialect = "org.hibernate.dialect.Oracle10gDialect"
dbCreate = "update"
url = 'jdbc:oracle:thin:@localhost:1521:orcl'
username = "root"
password = "root"
properties {
// See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
jmxEnabled = false
initialSize = 5
maxActive = 50
minIdle = 5
maxIdle = 25
maxWait = 10000
maxAge = 10 * 60000
timeBetweenEvictionRunsMillis = 5000
minEvictableIdleTimeMillis = 60000
validationQuery = "select 1 from dual"
validationQueryTimeout = 3
validationInterval = 15000
testOnBorrow = true
testWhileIdle = true
testOnReturn = false
jdbcInterceptors = "ConnectionState;StatementCache(max=200)"
defaultTransactionIsolation = Connection.TRANSACTION_READ_COMMITTED
}
}

但是,当我运行它时,我收到一堆错误消息:

Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed



有人在Oracle上完成了Grails,请帮助我解决问题。
任何解决方案将不胜感激。谢谢。
特兰

最佳答案

您需要在lib文件夹中包含ojdbc6.jar。

另外我不确定localhost:1521:orcl,也许是localhost:1521 / orcl,其中 orcl 应该是服务名称。

关于oracle - Grails 2.4.5配置Oracle连接器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31672592/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com