You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2019-01-14 16:22:24.807 ERROR --- [nio-8080-exec-1] o.g.web.errors.GrailsExceptionResolver : IllegalArgumentException occurred when processing request: [GET] /foo/index.json
Model variable [foo] of with value [four.Foo : (unsaved)] type [four.Foo] is not of the correct type [four.Foo]. Stacktrace follows:
java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.grails.core.DefaultGrailsControllerClass$ReflectionInvoker.invoke(DefaultGrailsControllerClass.java:211)
at org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:188)
at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalArgumentException: Model variable [foo] of with value [four.Foo : (unsaved)] type [four.Foo] is not of the correct type [four.Foo]
at grails.views.WritableScriptTemplate.make(WritableScriptTemplate.groovy:138)
at grails.plugin.json.view.template.JsonViewTemplate.make(JsonViewTemplate.groovy:19)
at grails.views.mvc.GenericGroovyTemplateView.renderMergedOutputModel(GenericGroovyTemplateView.groovy:67)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:316)
at grails.views.mvc.renderer.DefaultViewRenderer.render(DefaultViewRenderer.groovy:117)
at grails.artefact.controller.RestResponder$Trait$Helper.internalRespond(RestResponder.groovy:192)
at grails.artefact.controller.RestResponder$Trait$Helper.respond(RestResponder.groovy:76)
at four.FooController.index(FooController.groovy:8)
... 15 common frames omitted
The text was updated successfully, but these errors were encountered:
erichelgeson
changed the title
Grails 4:
Grails 4: model type [four.Foo] is not of the correct type [four.Foo]
Jan 14, 2019
Using Grails 4 master (jdk 11.0.1) with views 2.0.0.BUILD-SNAPSHOT I am seeing issues where the model doesnt think it's correct though it is. I've re-created the sample here: https://github.com/erichelgeson/grails4/compare/eric/gsonIssue
The text was updated successfully, but these errors were encountered: