Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] StackOverflow in EclipseLink as shipped with Glassfish 3.1b21

Good idea.  Define large: I've got maybe a few dozen elements in any given collection in this graph.

L

On Thu, Oct 7, 2010 at 10:05 AM, Christopher Delahunt <christopher.delahunt@xxxxxxxxxx> wrote:
A stackoverflow doesn't always mean infinite loop.  A finite loop can still cause an overflow if your stack isn't large enough, particularly if you have a large object tree.  One of the relationships here is a Collection mapping, so it can cause a large number of objects to be brought in.  Refresh will cause a few more method calls to the stack to each level of the tree that is traversed while it is being refreshed.  Try increasing significantly increasing your JVM stack size  using the -Xss option to see if it is infinite or not, and then you can decide the best way to tune it, or reduce the tree size involved in the stack through selective lazy relationships. 

Best Regards,
Chris


On 07/10/2010 9:55 AM, Laird Nelson wrote:
Would a CascadeType.REFRESH also have something to do with it? 

On Thu, Oct 7, 2010 at 9:55 AM, Laird Nelson <ljnelson@xxxxxxxxx> wrote:
Right, and I'm not disabling the cache.

Still working on it.  Can't seem to reproduce it at the moment....

Best,
Laird


On Thu, Oct 7, 2010 at 9:53 AM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
The only pilot error that I can think of that could cause this is completely disabling our cache combined with strings of EAGER relationships.

Laird Nelson wrote:
Yeah, I have a few of those.  Even so, I shouldn't be able to cause this through pilot error, I wouldn't think.

L

On Thu, Oct 7, 2010 at 9:38 AM, Tom Ware <tom.ware@xxxxxxxxxx <mailto:tom.ware@xxxxxxxxxx>> wrote:

   Hi Laird,

    I'll be interested in seeing what the issue is.

    From what you've posted, I see a sequence of EAGER relationships.
    That's where I'd start in looking for the issue.

   -Tom

   Laird Nelson wrote:

       I have not yet found the root cause, but thought this would be
       useful anyhow.  I'm getting a stack trace from EclipseLink that
       indicates it is caught in an infinite loop.

       Here is a portion of it:

       Caused by: java.lang.StackOverflowError
          at
       org.eclipse.persistence.internal.sessions.AbstractSession.getDescriptor(AbstractSession.java:1778)
          at
       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerExistingObject(UnitOfWorkImpl.java:3888)
          at
       org.eclipse.persistence.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:67)
          at
       org.eclipse.persistence.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:72)
          at
       org.eclipse.persistence.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:181)
          at
       org.eclipse.persistence.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:3153)
          at
       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.populateAndRegisterObject(UnitOfWorkImpl.java:3694)
          at
       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.cloneAndRegisterObject(UnitOfWorkImpl.java:1005)
          at
       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.cloneAndRegisterObject(UnitOfWorkImpl.java:914)
          at
       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerExistingObject(UnitOfWorkImpl.java:3948)
          at
       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerExistingObject(UnitOfWorkImpl.java:3898)
          at
       org.eclipse.persistence.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:67)
          at
       org.eclipse.persistence.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:72)
          at
       org.eclipse.persistence.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:181)
          at
       org.eclipse.persistence.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:3153)
          at
       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.populateAndRegisterObject(UnitOfWorkImpl.java:3694)
          at
       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.cloneAndRegisterObject(UnitOfWorkImpl.java:1005)
          at
       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.cloneAndRegisterObject(UnitOfWorkImpl.java:914)
          at
       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerExistingObject(UnitOfWorkImpl.java:3948)
          at
       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerExistingObject(UnitOfWorkImpl.java:3898)
          at
       org.eclipse.persistence.mappings.CollectionMapping.buildElementClone(CollectionMapping.java:243)
          at
       org.eclipse.persistence.internal.queries.ContainerPolicy.addNextValueFromIteratorInto(ContainerPolicy.java:209)
          at
       org.eclipse.persistence.mappings.CollectionMapping.buildCloneForPartObject(CollectionMapping.java:195)
          at
       org.eclipse.persistence.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:72)
          at
       org.eclipse.persistence.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:181)

       As I work to find out more, I'll try to post a test case.

       Thanks,
       Laird


       ------------------------------------------------------------------------

       _______________________________________________
       eclipselink-users mailing list
       eclipselink-users@xxxxxxxxxxx <mailto:eclipselink-users@xxxxxxxxxxx>

       https://dev.eclipse.org/mailman/listinfo/eclipselink-users

   _______________________________________________
   eclipselink-users mailing list
   eclipselink-users@xxxxxxxxxxx <mailto:eclipselink-users@xxxxxxxxxxx>

   https://dev.eclipse.org/mailman/listinfo/eclipselink-users



------------------------------------------------------------------------

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



_______________________________________________ eclipselink-users mailing list eclipselink-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-users

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top