Note that there are some explanatory texts on larger screens.

plurals
  1. POInvalid access of stack red zone when merging a complex object
    text
    copied!<p>I'm using play! framework 1.2.4 on a project who passes objects from an external context (Flex actually) to a service. The gateway uses the cinnamon framework (http://www.spicefactory.org/pimento/) to handle AMF requests to be routed to services.</p> <p>I thus receive detached objects, and I'm trying to avoid entering complex merging issues by simply calling:</p> <pre><code>JPA.em().merge(myObject) </code></pre> <p>It does the trick for simple objects, but when it comes to a more complex object, I run across the following error which simply shuts down the server (which is naughty)</p> <pre><code>Invalid access of stack red zone </code></pre> <p>Here is a simplified overview of my JPA mapping</p> <pre><code>@Entity @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) @DiscriminatorColumn(name = "templateType") ProductTemplate extends GenericModel |- @OneToMany(mappedBy = "productTemplate", cascade = CascadeType.ALL) | List&lt;ProductTemplateLang&gt; translations; | | @MappedSuperclass |_ LayeredProductTemplate | | @Entity |_ Book |- @OneToMany(mappedBy = "book", cascade = CascadeType.ALL) | List&lt;BookPage&gt; pages; </code></pre> <p>With</p> <pre><code>@Entity BookPage extends Model |- @OneToMany(mappedBy = "page", cascade = CascadeType.ALL) | List&lt;Layer&gt; layers; </code></pre> <p>And</p> <pre><code>@Entity Layer extends Model |- @OneToMany(mappedBy = "layer", cascade = CascadeType.ALL) | List&lt;LayerLang&gt; translations; </code></pre> <p>(I removed most of the properties) Can it be due to the fact the object I receive is too complex?</p> <p>I'm trying to do everything by hand but also encounter a "Found two representations of same collection" which is kind of tricky to figure out...</p> <p>Any help, thoughts, direction are greatly appreciated!</p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload