Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » StackOverFlow(StackOverFlow OneToOne and OneToMany)
icon9.gif  StackOverFlow [message #755308] Tue, 08 November 2011 03:33 Go to next message
Caio  is currently offline Caio
Messages: 4
Registered: November 2011
Junior Member
Hi for all,

I have started project with EclipseLink... thats great... but, I got stackoverflow with this scenario:
Entities : ClassList, lvlupgain and skilltrees.
ClassList have a column id and it can be referenced for lvlupgain and skilltrees.
ClassList -> lvlupgain (OneToOne)
ClassList -> skilltrees (OneToMany)

RecordCount:
ClassList = 89
lvlupgain = 89
skill_trees = 13722

 public void loadData() {
        EntityManagerFactory emf;
        emf = Persistence.createEntityManagerFactory("TestRelationshipPU");
        ClassListJpaController jpa = new ClassListJpaController(emf);
        List<ClassList> listData = jpa.findClassListEntities();
        for (ClassList classList : listData) {
            System.out.println("classList" + classList.getClassName());
        }
    }


Error:
[EL Info]: 2011-11-08 01:08:30.682--ServerSession(9202071)--EclipseLink, version: Eclipse Persistence Services - 2.2.0.v20110202-r8913
[EL Info]: 2011-11-08 01:08:31.644--ServerSession(9202071)--file:/D:/Projects/TestRelationship/src/_TestRelationshipPU login successful
Exception in thread "main" java.lang.StackOverflowError
	at org.eclipse.persistence.internal.sessions.AbstractSession.getDescriptor(AbstractSession.java:2067)
	at org.eclipse.persistence.internal.sessions.AbstractSession.getDescriptor(AbstractSession.java:2136)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerExistingObject(UnitOfWorkImpl.java:3816)
	at org.eclipse.persistence.mappings.ObjectReferenceMapping.buildUnitofWorkCloneForPartObject(ObjectReferenceMapping.java:96)
	at org.eclipse.persistence.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:70)


What cause this error? Thanks so much for your help and NICE Project!!!


Caio
Re: StackOverFlow [message #756020 is a reply to message #755308] Thu, 10 November 2011 13:56 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Include more of the stack trace.

Are you using LAZY relationships, does the error occur if you do?

Include your code for the classes. Have you mapped the Id correctly, what cache type are you using?


James : Wiki : Book : Blog : Twitter
Previous Topic:StackOverFlow
Next Topic:SDO/POJO Bridge
Goto Forum:
  


Current Time: Sat Oct 25 21:22:03 GMT 2014

Powered by FUDForum. Page generated in 0.01846 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software