Skip to content

Instantly share code, notes, and snippets.

@billthornton
Created November 29, 2011 10:24
Show Gist options
  • Save billthornton/1404322 to your computer and use it in GitHub Desktop.
Save billthornton/1404322 to your computer and use it in GitHub Desktop.
Grails stackoverflow error
// ParentController.groovy
package stackoverflow
class ParentController {
def index() {
render "Parent"
}
}
// ChildController.groovy
package stackoverflow
class ChildController extends ParentController {
@Override
def index() {
// ..do something before
super.index()
}
}
// ChildControllerTests.groovy
package stackoverflow
import grails.test.mixin.*
import org.junit.*
/**
* See the API for {@link grails.test.mixin.web.ControllerUnitTestMixin} for usage instructions
*/
@TestFor(ChildController)
class ChildControllerTests {
void testOutput() {
controller.index()
assert response.text == 'Parent'
}
}
// Test error message
/*
| Failure: testOutput(stackoverflow.ChildControllerTests)
| java.lang.StackOverflowError
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152)
at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
at stackoverflow.ChildController.index(ChildController.groovy:9)
at grails.test.mixin.web.ControllerUnitTestMixin$_mockController_closure4.doCall(ControllerUnitTestMixin.groovy:320)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment