-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Tue Jan 15, 2008 8:16 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
i depends what you load and how you load it. Just providing your partial mapping and not code does not allow us to find the issue.
It's better to use the standard question template.

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Error handling isn't great
PostPosted: Mon Mar 03, 2008 12:49 pm 
Regular
Regular

Joined: Wed Dec 21, 2005 6:57 pm
Posts: 70
I'm encountering this and it seems that the problem also surfaces if the tree of eagerly-loaded entities has two bags. E.g. if Company has a bag of Employees and Employee has a bag of Address, that will do it.

Unfortunately, that also makes it that much harder to figure out what is causing the error. I used:

grep EAGER *.java

to look for files with multiple eager bags, but it turns out our problem is scattered across multiple files.

Hibernate folk: How about some help from BasicLoader to tell us which file(s) triggers the multiple bags issue? As a general rule, if you're going to through a SOL error, whatever context you have will be helpful.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 08, 2008 12:29 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Open a JIRA issue and if possible a patch for it.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 03, 2008 12:06 pm 
Newbie

Joined: Thu Apr 03, 2008 11:14 am
Posts: 10
Hi

I had the same problem with Hibernate 3.2 and Annotation 3.3, but replacing all Collection<T> types by Set<T> and using HashSet<T> instead of ArrayList<T> fixed the problem ... not only of @OneToMany items but all associations


to a Hibernate Team member:
what is the problem with ArrayList that does not matter with HashSet ?

_________________
Matthias Keller
CEO / Lead Software Developer
QueueX Software & Webdesign GbR
mail to mkeller@queuex.de

Hibernate is a solution that grows with an engaged community


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 8:02 am 
Newbie

Joined: Sat Apr 19, 2008 7:58 am
Posts: 14
push!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 8:09 am 
Newbie

Joined: Thu Apr 03, 2008 11:14 am
Posts: 10
dimitrij.zub wrote:
push!

what? everything okay with you?

_________________
Matthias Keller
CEO / Lead Software Developer
QueueX Software & Webdesign GbR
mail to mkeller@queuex.de

Hibernate is a solution that grows with an engaged community


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 8:11 am 
Newbie

Joined: Sat Apr 19, 2008 7:58 am
Posts: 14
Quote:
to a Hibernate Team member:
what is the problem with ArrayList that does not matter with HashSet ?


Still not answered.

As well. Problem with index column persists with MySQL Inno DB dialect.

Code:
   @OneToMany(mappedBy="testGroup", cascade=CascadeType.ALL, fetch=FetchType.EAGER)
   @IndexColumn(name="INDEX")
   public List<TestCase> getTestCaseList()    {return _testCaseList;}   
   public void setTestCaseList(List<TestCase> p_testCaseList) {_testCaseList = p_testCaseList;}


Will fail to create the TestCase table on MySQL.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 8:17 am 
Newbie

Joined: Thu Apr 03, 2008 11:14 am
Posts: 10
yeah, okay, but why it fails?

I asked a HB member because this might be a deep HB bug... I'm interested in the explanation of how the failure comes up... no source code

but I thank you for now

_________________
Matthias Keller
CEO / Lead Software Developer
QueueX Software & Webdesign GbR
mail to mkeller@queuex.de

Hibernate is a solution that grows with an engaged community


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 8:19 am 
Newbie

Joined: Sat Apr 19, 2008 7:58 am
Posts: 14
Quote:
I asked a HB member because this might be a deep HB bug... I'm interested in the explanation of how the failure comes up... no source code


Thats why i pushed it (up) so maybe this way someone takes the time to answer :)


Top
 Profile  
 
 Post subject: Nice explanation of the same at
PostPosted: Fri Jun 13, 2008 12:29 am 
Regular
Regular

Joined: Sun Apr 13, 2008 3:04 am
Posts: 71
Location: Bangalore
http://www.jroller.com/eyallupu/entry/s ... _multiple1

_________________
Raja Nagendra Kumar,
C.T.O
http://www.tejasoft.com
TejaSoft - Specialists in Code Audit, Unit Testing and Merciless Re-factoring - Engineering Crisis Turnaround Experts


Top
 Profile  
 
 Post subject: Way around
PostPosted: Wed Aug 06, 2008 8:11 am 
Newbie

Joined: Tue Sep 26, 2006 10:51 am
Posts: 6
Location: Berlin, Germany
Hi,
to solve the problem with MySQL and InnoDB it is possible to
@Fetch(value = FetchMode.SELECT)

It is MUCH faster than SUBSELECT for tables with many dependencies (e.g. ORDER - CONTRACTOR - PRODUCER - etc. ). In this case SUBSELECT works very slow. I made such compare JOIN vs SUBSELECT. In my case in the first approach query time was 0.01 sec and in the second ... 2.1 sec. With SELECT it works a little bit slower that INNER JOIN but it is pretty simple to define with annotations.

cheers
Albert

_________________
Albert Gorski agorski(at/)gmx(dot/)net


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 08, 2008 3:26 pm 
Newbie

Joined: Thu Jun 21, 2007 11:05 am
Posts: 5
A little late to the game here, but I think it kind of sucks that Hibernate dictates to me what type I should use for a property. When designing my object model I always use the generic Collection interface on my properties, but this doesn't work too well when you have more than one (as evidenced in this thread). Instead, I have to *break* my interfaces and use Set everywhere.

I guess I don't really understand the underlying reason why Collection causes so many problems, I hear people speak of cartesian products which might arrise because of it's use, but I don't understand why that is the case.

Just my $0.02


Top
 Profile  
 
 Post subject: www.jroller.com/eyallupu/entry/hibernate_exception_simultane
PostPosted: Sun Mar 22, 2009 5:14 pm 
Newbie

Joined: Sun Mar 22, 2009 5:11 pm
Posts: 1
www.jroller.com/eyallupu/entry/hibernat ... h_multiple

The above site has a solution, but the site link has been down for three days straight and counting .. Eyal Lupu where are you ..


Top
 Profile  
 
 Post subject: Re: cannot simultaneously fetch multiple bags
PostPosted: Wed Mar 30, 2011 12:00 am 
Newbie

Joined: Tue Mar 29, 2011 11:54 pm
Posts: 1
Ya site link is not working properly... Have you another idea...

_________________
Specialty bags

wholesale tote bags


Top
 Profile  
 
 Post subject: Re: cannot simultaneously fetch multiple bags
PostPosted: Wed Mar 30, 2011 4:00 am 
Beginner
Beginner

Joined: Wed Aug 24, 2005 5:32 am
Posts: 23
Hi,
The link is still working for me but you can also see it in my new blog:
http://blog.eyallupu.com/2010/06/hibernate-exception-simultaneously.html

_________________
-----------
Eyal Lupu
Blog:http://blog.eyallupu.com/
(Old blog: http://www.jroller.com/eyallupu)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 32 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.