Announcement Announcement Module
Collapse
No announcement yet.
Upgraded from Grails 1.3.7 to 2.0 and am getting 'method <init>()V not found' error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upgraded from Grails 1.3.7 to 2.0 and am getting 'method <init>()V not found' error

    Environment: Eclipse Indigo w/Grails plugin 2.0.0 & STS 2.8.1. Tried jdk 1.6.0_25 and 1.7.

    Error occurs during Grail run-app startup command.

    Full Stack trace:

    2012-01-04 05:01:40,814 [Thread-7] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.InstantiationException: could not instantiate test objectcom.primetherapeutics.statusweb.StatusWebUse rDetails
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.InstantiationException: could not instantiate test objectcom.primetherapeutics.statusweb.StatusWebUse rDetails
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.jav a:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.InstantiationException: could not instantiate test objectcom.primetherapeutics.statusweb.StatusWebUse rDetails
    ... 5 more
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.InstantiationException: could not instantiate test objectcom.primetherapeutics.statusweb.StatusWebUse rDetails
    ... 5 more
    Caused by: org.hibernate.InstantiationException: could not instantiate test objectcom.primetherapeutics.statusweb.StatusWebUse rDetails
    ... 5 more
    Caused by: java.lang.reflect.InvocationTargetException
    ... 5 more
    Caused by: java.lang.NoSuchMethodError: org.springframework.security.core.userdetails.User : method <init>()V not found
    ... 5 more


    Any suggestions would be greatly appreciated!
    Last edited by dj8; Jan 4th, 2012, 02:21 PM.

  • #2
    Error solved

    The problem was that we had an intermediary UserMapper object, which was extending the User object, and we had the mapper object under the domain directory/packages. We moved it to groovy/src and all is well.

    Hope this helps someone!

    Comment


    • #3
      Originally posted by dj8 View Post
      The problem was that we had an intermediary UserMapper object, which was extending the User object, and we had the mapper object under the domain directory/packages. We moved it to groovy/src and all is well.

      Hope this helps someone!
      Many thanks. I also had the same error. Its now solved. Am using grails 2.0.3, and spring-secure-core plugin v1.1.3

      Regards,
      Simon.

      Comment

      Working...
      X