Error converting Bean with class org.grails.validation.ConstrainedDelegate

172 views
Skip to first unread message

Joud

unread,
Dec 4, 2018, 7:02:07 AM12/4/18
to Grails Dev Discuss
Hi all,

I'm upgrading from grails 2 to grails 3.3.8, in my code I have to return something like "response as JSON" but this is giving the following error:

ERROR - org.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.grails.validation.ConstrainedDelegate
java.lang.RuntimeException: org.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.grails.validation.ConstrainedDelegate

Anybody knows what could be the reason? 

Thanks in advance

Praneeth Reddy

unread,
Dec 4, 2018, 7:12:23 AM12/4/18
to grails-de...@googlegroups.com
Try render as JSON

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/d32d02e8-f903-4dd0-88ac-bcb21c40ddbf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Thanks & Regards

Praneeth Reddy Soma

Daniel Leahy

unread,
Dec 4, 2018, 7:19:17 AM12/4/18
to grails-de...@googlegroups.com
Hi Joud, 
                Grails 2 to Grails 3.3.8 is a big jump.

I would guess that the object your trying to convert to JSON is failing validation somehow as grails tries and fails to marshall the object into JSON.

You could manually create the JSON with JSONBuilder and only take out the objects properties one by one to see which one is failing.

Option 2 
Custom JSON marshaller,

something like



I recommend you put your question up on the Grails Slack channel, you will get a faster response.

Regards,
               Daniel Leahy.








--

Joud

unread,
Dec 4, 2018, 7:29:44 AM12/4/18
to Grails Dev Discuss
I cannot do render in a service


On Tuesday, December 4, 2018 at 1:12:23 PM UTC+1, Praneeth Reddy wrote:
Try render as JSON

On Tue, Dec 4, 2018 at 5:32 PM Joud <joud.k...@gmail.com> wrote:
Hi all,

I'm upgrading from grails 2 to grails 3.3.8, in my code I have to return something like "response as JSON" but this is giving the following error:

ERROR - org.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.grails.validation.ConstrainedDelegate
java.lang.RuntimeException: org.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.grails.validation.ConstrainedDelegate

Anybody knows what could be the reason? 

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+unsub...@googlegroups.com.

Joud

unread,
Dec 4, 2018, 7:30:50 AM12/4/18
to Grails Dev Discuss
Thanks you, I will post it in grails slack first to see if someone had the same problem before.


On Tuesday, December 4, 2018 at 1:19:17 PM UTC+1, Daniel Leahy wrote:
Hi Joud, 
                Grails 2 to Grails 3.3.8 is a big jump.

I would guess that the object your trying to convert to JSON is failing validation somehow as grails tries and fails to marshall the object into JSON.

You could manually create the JSON with JSONBuilder and only take out the objects properties one by one to see which one is failing.

Option 2 
Custom JSON marshaller,

something like



I recommend you put your question up on the Grails Slack channel, you will get a faster response.

Regards,
               Daniel Leahy.








On Tue, Dec 4, 2018 at 12:02 PM Joud <joud.k...@gmail.com> wrote:
Hi all,

I'm upgrading from grails 2 to grails 3.3.8, in my code I have to return something like "response as JSON" but this is giving the following error:

ERROR - org.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.grails.validation.ConstrainedDelegate
java.lang.RuntimeException: org.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.grails.validation.ConstrainedDelegate

Anybody knows what could be the reason? 

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+unsub...@googlegroups.com.

Iván López

unread,
Dec 4, 2018, 9:37:22 AM12/4/18
to grails-de...@googlegroups.com

On Tue, 4 Dec 2018 at 13:30, Joud <joud.k...@gmail.com> wrote:
Thanks you, I will post it in grails slack first to see if someone had the same problem before.

On Tuesday, December 4, 2018 at 1:19:17 PM UTC+1, Daniel Leahy wrote:
Hi Joud, 
                Grails 2 to Grails 3.3.8 is a big jump.

I would guess that the object your trying to convert to JSON is failing validation somehow as grails tries and fails to marshall the object into JSON.

You could manually create the JSON with JSONBuilder and only take out the objects properties one by one to see which one is failing.

Option 2 
Custom JSON marshaller,

something like



I recommend you put your question up on the Grails Slack channel, you will get a faster response.

Regards,
               Daniel Leahy.








On Tue, Dec 4, 2018 at 12:02 PM Joud <joud.k...@gmail.com> wrote:
Hi all,

I'm upgrading from grails 2 to grails 3.3.8, in my code I have to return something like "response as JSON" but this is giving the following error:

ERROR - org.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.grails.validation.ConstrainedDelegate
java.lang.RuntimeException: org.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.grails.validation.ConstrainedDelegate

Anybody knows what could be the reason? 

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.

To post to this group, send email to grails-de...@googlegroups.com.

Erando89

unread,
Jan 7, 2019, 10:20:17 AM1/7/19
to Grails Dev Discuss
Hey Joud, were you able to resolve the problem?
Reply all
Reply to author
Forward
0 new messages