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

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Joud Kassem
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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

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

Praneeth Reddy
Try render as JSON

On Tue, Dec 4, 2018 at 5:32 PM Joud <[hidden email]> 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 [hidden email].
To post to this group, send email to [hidden email].
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

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/CA%2BNmhRuAgWM3y7sSvR57gCRzfARrZVkU772kg4ZexsGbxGBpfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Daniel Leahy
In reply to this post by Joud Kassem
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 <[hidden email]> 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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/CAPuiA6%2Bg2Zn5%2BnJFGbp6uR93fQczrNEB-45%2BgJwymGu%3DDKBo8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Joud Kassem
In reply to this post by Praneeth Reddy
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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="gum6QN26BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">joud.k...@...> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="gum6QN26BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-dev-discuss+unsubscribe@....
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="gum6QN26BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/grails-dev-discuss/d32d02e8-f903-4dd0-88ac-bcb21c40ddbf%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/d32d02e8-f903-4dd0-88ac-bcb21c40ddbf%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/d32d02e8-f903-4dd0-88ac-bcb21c40ddbf%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/grails-dev-discuss/d32d02e8-f903-4dd0-88ac-bcb21c40ddbf%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.


--
Thanks & Regards

Praneeth Reddy Soma

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/983d5990-686a-4c90-bd03-9d46d64d31f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Joud Kassem
In reply to this post by Daniel Leahy
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

<a href="https://kylewbanks.com/blog/Customizing-JSON-Grails-Object-Marshalling" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fkylewbanks.com%2Fblog%2FCustomizing-JSON-Grails-Object-Marshalling\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEejy-vBZzRXoq_YR6k_AuqDmYsgg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fkylewbanks.com%2Fblog%2FCustomizing-JSON-Grails-Object-Marshalling\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEejy-vBZzRXoq_YR6k_AuqDmYsgg&#39;;return true;">https://kylewbanks.com/blog/Customizing-JSON-Grails-Object-Marshalling


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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="DFPatz27BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">joud.k...@...> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="DFPatz27BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-dev-discuss+unsubscribe@....
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="DFPatz27BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/grails-dev-discuss/d32d02e8-f903-4dd0-88ac-bcb21c40ddbf%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/d32d02e8-f903-4dd0-88ac-bcb21c40ddbf%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/d32d02e8-f903-4dd0-88ac-bcb21c40ddbf%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/grails-dev-discuss/d32d02e8-f903-4dd0-88ac-bcb21c40ddbf%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/edba6e29-e2f3-4831-9332-8a89d0473069%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

lmivan

On Tue, 4 Dec 2018 at 13:30, Joud <[hidden email]> 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 <[hidden email]> 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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/edba6e29-e2f3-4831-9332-8a89d0473069%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/CABRkPEq638nePcYr5hfAs0LCaV7rtUQbYVFUOnau6L7o5aZUJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.