0
votes

Why am I getting this error when i use grails run-app?

Error 2014-03-03 13:31:30,283 [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': Invocation of init method failed; nested exception is groovy.lang.MissingPropertyException: No such property: min for class: org.example.shalu.Task Possible solutions: id, all 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': Invocation of init method failed; nested exception is groovy.lang.MissingPropertyException: No such property: min for class: org.example.shalu.Task Possible solutions: id, all

3

3 Answers

0
votes

If you look closely you will see that you are trying to reference min on the class org.example.shalu.Task which doesn't exist. It's possible that you are doing something in Bootstrap.groovy?

0
votes

You probably created a Service which is does not have a coordinating logic between domain classes (that means there is no domain class for that service).

If this is the case, then add : static transactional = false to the service.

class MyService {
    **static transactional = false**
}

More info: http://grails.org/doc/2.3.x/guide/services.html

-1
votes

oh this one comes when your database setting

either not mapped with exact database``serverrunning , grails can cannot connect to it , check yourpasswordand usernameand check yourdatabase name check yourdata source setting` And check your connection String URL on datasource like

dataSource {
    pooled = true
    dbCreate = "update"
    url = "jdbc:mysql://localhost/yourDB"
    driverClassName = "com.mysql.jdbc.Driver"
    username = "yourUser"
    password = "yourPassword"
}

DUDE!!