Conexão Sybase com o grails 2.3.0
20/09/2013 20:41
dataSource {
pooled = true
driverClassName = "com.sybase.jdbc3.jdbc.SybDriver"
username = "*****"
password = "********"
}
hibernate {
cache.use_second_level_cache=true
cache.use_query_cache=true
cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider'
}
// environment specific settings
environments {
development {
dataSource { //dbCreate = "create" // one of 'create', 'create-drop','update'
url = "jdbc:sybase:Tds:sybase:5000/nomeDoBanco" }
}
test {
dataSource { //dbCreate = "update"
url = "jdbc:sybase:Tds:sybase:5000/nomeDoBanco" }
}
production {
dataSource { //dbCreate = "update"
url = "jdbc:sybase:Tds:sybase:5000/nomeDoBanco" }
}
}
Error initializing the application: 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 com.sybase.jdbc3.utils.UnimplementedOperationException: The method com.sybase.jdbc3.jdbc.SybDatabaseMetaData.getDatabaseMajorVersion() has not been completed and should not be called.
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 com.sybase.jdbc3.utils.UnimplementedOperationException: The method com.sybase.jdbc3.jdbc.SybDatabaseMetaData.getDatabaseMajorVersion() has not been completed and should not be called.
grails run-app
dialect = "org.hibernat.dialect.SybaseDialect"
dataSource {
pooled = true
driverClassName = "com.sybase.jdbc3.jdbc.SybDriver"
username = "*****"
password = "********"
dialect = "org.hibernat.dialect.SybaseDialect"[b][/b]
}
Para se registrar, clique aqui.