A cycle in object graph detected in JPA.

Posted by Nitesh Panchal on Stack Overflow See other posts from Stack Overflow or by Nitesh Panchal
Published on 2010-04-25T04:10:34Z Indexed on 2010/04/25 4:13 UTC
Read the original article Hit count: 439

Filed under:
|
|
|

Hello, I am trying to figure out this error since 5 hours without any success. SO i finally thought of posting in here. Please help i am really in big trouble. I am stuck on this and see no way of solving this error. This is my database structure

tblBlogRegion                                   

BlogRegionId (primary key)              
BlogRegionName                                  


tblGadget

GadgetId(primary key)
GadgetName

tblBlogs

BlogId(primary key)                     
Blogname
BlogTypeId (reference key from tblSiteTerm


tblSiteTerms        

SiteTermsId(primary key)        
SiteTermsName   


tblBlogGadgets

BlogGadgetsId(primary key)
BlogRegionId(foreign key from tblBlogRegion)
BlogId(foreign key from tblBlog)
GadgetId(foreign key from tblGadget)

Is it not normal database structure? Do you see anything that is cyclic? WHen i try to fetch list from tblGadgets i get this error :-

[com.sun.istack.SAXException2: A cycle is detected in the object graph. This will cause infinitely deep XML: entity.BlogGadgets[blogGadgetsId=1] -> entity.Blogs[blogId=2] -> entity.BlogGadgets[blogGadgetsId=1]]

I am trying to get list from web service using JAS-WS.

© Stack Overflow or respective owner

Related posts about jpa

Related posts about ejb3