-->
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.  [ 5 posts ] 
Author Message
 Post subject: Hibernate load entire DB on startup
PostPosted: Wed Sep 28, 2005 4:40 pm 
Newbie

Joined: Thu Sep 01, 2005 12:39 pm
Posts: 16
Location: porto alegre, brazil
Hibernate version:2.1.7
.
Name and version of the database you are using:Sybase 12.5

When Hibernates is started up it loads the entire DB and I can't find why. I've been searching, but I was unnable to find something about it. I don't think it's something misconfigured [ just a guess ], instead, I think the problem is with the mapping files [ another guess ] becouse it forms a complete graph.
Anyone had this problem or could say where it could be?

Thanks for all!

ps.: hibernate is integrated with spring.

_________________
Bsc. Tiago Martins
software engineer

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 4:48 pm 
Senior
Senior

Joined: Wed Jul 13, 2005 4:31 pm
Posts: 142
Location: Seattle, WA
Is it all non-lazy loaded in the mapping definitions?

Perhaps you are loading the top of the graph or tree, and that cascades into loading everything if everything is marked for eager loading


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 8:06 am 
Newbie

Joined: Thu Sep 01, 2005 12:39 pm
Posts: 16
Location: porto alegre, brazil
i will paste some debug here, so.
- Hibernate 2.1.7
- hibernate.properties not found
- using CGLIB reflection optimizer ( wich is disabled for some beans )
- using JDK 1.4 java.sql.Timestamp handling
- Use outer join fetching: true
- Optimize cache for minimal puts: false

on the mapping files I have:
dynamic-update="false" and dynamic-insert="false" on the class tag,
on collection tags, inverse is false,lazy is equal to true, there are no outer joins seted here.
On the relational tags (<many-to-one, one-to-one, etc.) outer join is auto.

_________________
Bsc. Tiago Martins
software engineer

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 8:45 am 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
tferraz wrote:
i will paste some debug here, so.
- Hibernate 2.1.7
- hibernate.properties not found
- using CGLIB reflection optimizer ( wich is disabled for some beans )
- using JDK 1.4 java.sql.Timestamp handling
- Use outer join fetching: true
- Optimize cache for minimal puts: false

on the mapping files I have:
dynamic-update="false" and dynamic-insert="false" on the class tag,
on collection tags, inverse is false,lazy is equal to true, there are no outer joins seted here.
On the relational tags (<many-to-one, one-to-one, etc.) outer join is auto.


http://www.hibernate.org/ForumMailingli ... AskForHelp

Can you create a simplified case that behaves the same way and show the mapping files and code ?

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 9:32 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
if "lazy" is set to "true" then verify your entity implementations, probably constructor calls some method and initializes proxies .


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

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.