Nathan Schulte <nathan.schulte <at> ngc.com> writes:

> 
> Nathan Schulte <nathan.schulte <at> ngc.com> writes:
> > here, http://article.gmane.org/gmane.comp.jakarta.struts.user/170543,
> http://article.gmane.org/gmane.comp.jakarta.struts.user/170543
> 
> > Here is a link to the error, http://pastebin.com/m5d0d22c8.
> http://pastebin.com/m5d0d22c8
> 
> Also, here is the exception report (of a similar action) given as the HTTP
> response:
> http://pastebin.com/m21348ec5
> 

I have found a fix for this issue.  As it turns out, because the JSON Plugin is
using reflection, and the entities the JSON Plugin is reflecting on are using
Hibernate/JPA "lazy initialization magic", the JSON Plugin was serializing the
"magic" as well.  This "magic" contains references to underlying JPA
implementation, which also contains references, which also contain references,
all the way down past the JDBC layer.  I didn't go as far as to find out what
was causing this particular error/exception, but simply knew that I don't want
the Plugin to serialize the hibernateLazyInitializer instances in my entities. 
The Plugin supports property exclusion via regex, thus the simple fix.

Hey, perhaps this property exclusion property will come in handy to keep from
loading the whole database into memory for those self joins I have on my
entities... :P.

On another note, although this fixes my particular issue, perhaps there is some
more elegant solution to help with anything implementing this (or other
problematic) OOP patterns.

-Nate




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to