I am new to Grails. I never touched this until this week.
Grails version: 2.5.4
Java version "1.8.0_101"
These crashes occur when I run unit tests with:
grails test-app
I have already changed a number of things, and the code appears to compile as is.
An example of a stack trace that I see:
| Failure: testUpdate(com.xyz.pdq.WidgetControllerTests)
| java.lang.NoClassDefFoundError: org/grails/datastore/mapping/query/api/BuildableCriteria
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetPublicMethods(Class.java:2902)
at java.lang.Class.getMethods(Class.java:1615)
at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1336)
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1197)
at java.beans.Introspector.getBeanInfo(Introspector.java:426)
at java.beans.Introspector.getBeanInfo(Introspector.java:173)
at grails.test.mixin.domain.TestGormEnhancer.getStaticApi(DomainClassUnitTestMixin.groovy:188)
at org.grails.datastore.gorm.GormEnhancer.addStaticMethods(GormEnhancer.groovy:118)
at org.grails.datastore.gorm.GormEnhancer.enhance(GormEnhancer.groovy:112)
at org.grails.datastore.gorm.GormEnhancer.enhance(GormEnhancer.groovy:95)
at grails.test.mixin.domain.DomainClassUnitTestMixin.mockDomains(DomainClassUnitTestMixin.groovy:99)
Caused by: java.lang.ClassNotFoundException: org.grails.datastore.mapping.query.api.BuildableCriteria
at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:179)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:151)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more
I work with the following:
plugins {
runtime ":hibernate4:4.3.5.2"
runtime ":jquery:1.11.1"
runtime ":resources:1.2.14"
build ":tomcat:7.0.52.1"
runtime ":database-migration:1.4.1"
compile ':cache:1.1.8'
}
What methodology can I keep track of this, assuming it's a dependency?
The dependency report shows that I have this:
org.grails:grails-datastore-core:3.1.0.RELEASE
... as noted here in this excerpt from the dependency report:
...
+
| \
| \
| \
| \
| \
| \
| \
| \
| \
| \
| \
| \
| \
| \
| \
| \
| \
| \
| \
| \
...
This pattern is repeated both at run time and in test.
source
share