Problema com a execução de uma aplicação no Grails
22/10/2013 13:24
0
Boa tarde senhores,

Sou novo com no Grails e estou com um problema que não consigo solucionar, peço ajuda para que direcionem me a uma provável solução. Segue abaixo o código de erro.


Running Grails application

| Error 2013-10-21 16:31:28,440 [localhost-startStop-1] ERROR context.GrailsContextLoader - 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 '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 create PoolableConnectionFactory (Exceção de E/S: The Network Adapter could not establish the connection)

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 create PoolableConnectionFactory (Exceção de E/S: The Network Adapter could not establish the connection)

Line | Method

->> 262 | run in java.util.concurrent.FutureTask

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor

| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker

^ 724 | run in java.lang.Thread



Caused by 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 create PoolableConnectionFactory (Exceção de E/S: The Network Adapter could not establish the connection)

->> 262 | run in java.util.concurrent.FutureTask

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor

| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker

^ 724 | run in java.lang.Thread



Caused by 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 create PoolableConnectionFactory (Exceção de E/S: The Network Adapter could not establish the connection)

->> 262 | run in java.util.concurrent.FutureTask

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor

| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker

^ 724 | run in java.lang.Thread



Caused by 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 create PoolableConnectionFactory (Exceção de E/S: The Network Adapter could not establish the connection)

->> 262 | run in java.util.concurrent.FutureTask

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor

| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker

^ 724 | run in java.lang.Thread



Caused by MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Exceção de E/S: The Network Adapter could not establish the connection)

->> 262 | run in java.util.concurrent.FutureTask

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor

| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker

^ 724 | run in java.lang.Thread



Caused by SQLNestedException: Cannot create PoolableConnectionFactory (Exceção de E/S: The Network Adapter could not establish the connection)

->> 1549 | createPoolableConnectionFactory in org.apache.commons.dbcp.BasicDataSource

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

| 1388 | createDataSource in ''

| 1044 | getConnection in ''

| 262 | run in java.util.concurrent.FutureTask

| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor

| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker

^ 724 | run . . . in java.lang.Thread



Caused by SQLException: Exceção de E/S: The Network Adapter could not establish the connection

->> 112 | throwSqlException in oracle.jdbc.driver.DatabaseError

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

| 146 | throwSqlException in ''

| 255 | throwSqlException in ''

| 387 | logon in oracle.jdbc.driver.T4CConnection

| 441 | <init> . in oracle.jdbc.driver.PhysicalConnection

| 165 | <init> in oracle.jdbc.driver.T4CConnection

| 35 | getConnection in oracle.jdbc.driver.T4CDriverExtension

| 801 | connect in oracle.jdbc.driver.OracleDriver

| 38 | createConnection in org.apache.commons.dbcp.DriverConnectionFactory

| 582 | makeObject in org.apache.commons.dbcp.PoolableConnectionFactory

| 1556 | validateConnectionFactory in org.apache.commons.dbcp.BasicDataSource

| 1545 | createPoolableConnectionFactory in ''

| 1388 | createDataSource in ''

| 1044 | getConnection in ''

| 262 | run . . . in java.util.concurrent.FutureTask

| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor

| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker

^ 724 | run in java.lang.Thread
Tags: NewBie Grails Erro Oracle


0
Você criou o projeto e está rodando com as confs originais ou colocou lá no DataSource suas configurações e mandou radar ?
22/10/2013 17:04


1
Franck,
Também não tenho muita experiência em grails ainda, mas as mensagem indicam erro de conexão com o BD...
Você alterou o arquivo dataSource.grooby? dá pra postar qual URL você definiu bem como username e password?
No arquivo BuildConfig.groovy você configurou o dependencies { runtime '...'} corretamente, pode postar tbm?

abs.
22/10/2013 17:07


0
na verdade não precisa postar o username e password, epenas confirme que eles estão definidos corretamente ^^
22/10/2013 17:29


0
Obrigado por responderem, consegui solucionar. Acho que o problema era conflito com as versões do Tomcat e Hibernate após colocar a versão do Hibernate e do Tomcat no local da expressão $grailsVersion no BuildConfig.groovy a aplicação executou.
23/10/2013 14:51



Ainda não faz parte da comunidade???

Para se registrar, clique aqui.


Aprenda Groovy e Grails com a Formação itexto!

Newsletter Semana Groovy

Assinar

Envie seu link!


Livro de Grails


/dev/All

Os melhores blogs de TI (e em português) em um único lugar!

 
Creative Commons
RSS Grails Brasil é mantido por itexto Consultoria.
Em caso de problemas contacte Henrique Lobo Weissmann (Kico) por e-mail: kico@itexto.com.br
Todo o conteúdo presente neste site adota o Creative Commons como licença padrão.
Ver: 4.14.0
itexto