-->
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.  [ 4 posts ] 
Author Message
 Post subject: Problem in loading hibernate
PostPosted: Sat Dec 30, 2006 1:04 am 
Newbie

Joined: Sat Dec 30, 2006 12:48 am
Posts: 2
Hi, i am a developer from HK, currently the earthquake broken
the connection from HK to US. And let my application out of order,
i am using hibernate3.
After investigation, i found it is the problem of hibernate library, sometimes when i load the context, the mapping resources step
is much slower than normal(there are only 3 tables to map and
the tables do not have any association with others!), when calling
the session.get(), the method will execute forever without return.

So, i want to ask, what is the session.get() execute behind, is there
anything(like dtd) that need to get from other site?
Also, is there any method to identify which point cause the session.get()
execute forever?

Many Thanks!

TT


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 30, 2006 4:36 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
I'm not developping Hibernate, so what I say must be taken with caution, but it seems to me that no xml is ever accessed after the sessionfactory has been built.

It is always said that the SessionFactory is slow to be built because it has to access every mappings. So I guess this access is only done once at startup and then no more.

About session.get(), I'd advice you to try a debugger like the eclipse's one to try and see what never returns. You could also try and directly send a sql query through the underlying jdbc connection (session.connection()) to see if the same select gives something...

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Last edited by batmat on Mon Jan 01, 2007 9:18 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 01, 2007 12:28 am 
Newbie

Joined: Sat Dec 30, 2006 12:48 am
Posts: 2
Thank you for your reply.
I have suspect there is database connection problem before, but in my
application, there is other module using direct jdbc connection to the
db, which work out fine.
Let's use a debugger to find out what is attaching there...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 01, 2007 3:33 am 
Senior
Senior

Joined: Tue Aug 23, 2005 8:52 am
Posts: 181
As far as DTDs are concerned, if you turn on debug level logging(on org.hibernate.util), it should tell you if the DTDs are loaded locally or over the internet. AFAIK they should be loaded locally, but its something to eliminate out of the equation anyway.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.