1

I'm using grails 2.0.0.M1 with few plugins (spring-security-core-1.2.1, spring-cache-1.3.1). No problems cleaning and comipling the application, only running it.

This is the result executing "grails run-app --stacktrace":

ERROR [org.springframework.web.context.ContextLoader]: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
    ... 5 more
Caused by: java.lang.reflect.InvocationTargetException
    ... 5 more
Caused by: java.lang.ExceptionInInitializerError
    ... 5 more
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{}' with class 'groovy.util.ConfigObject' to class 'java.lang.Integer'
    ... 5 more
lucke84
  • 4,186
  • 3
  • 32
  • 55

1 Answers1

5

Solved: I was retrieving from a service the value of a property (still) not declared in the Config.groovy (as a static Integer variable, explained the casting exception).

Hope this helps someone else.

lucke84
  • 4,186
  • 3
  • 32
  • 55
  • @Agent404 The casting exception in the stacktrace caught my attention, I've been lucky not to spend too much time on that! :) – lucke84 Feb 25 '14 at 09:39