-->
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: Hibernate loops while initializing.
PostPosted: Fri Apr 28, 2006 3:53 pm 
Newbie

Joined: Fri Apr 28, 2006 3:46 pm
Posts: 8
Hi,

I have already searched the web but with no success.

When Hibernate initializes with some different mapping files (when I include 4 new .hbm (which are all CORRECT)) Hibernate initialization loops infinitely then I have got to kill tomcat for it to stop.

Is it possible that this problem is related to redundant relations in mapping files???

Hibernate version: Hibernate 3.0

Mapping documents: Too many to list.

Code between sessionFactory.openSession() and session.close(): Does not apply

Full stack trace of any exception that occurs: No exception occur.

Name and version of the database you are using: Oracle 9i.

The generated SQL (show_sql=true): Does not apply.

Debug level Hibernate log excerpt: Does not apply.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 28, 2006 4:15 pm 
Newbie

Joined: Fri Apr 28, 2006 3:46 pm
Posts: 8
I think I have isolated the problem. Did a very boring thing (had to comment all relations from all hbm files and I've managed to isolate the problematic file).


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 28, 2006 4:34 pm 
Newbie

Joined: Fri Apr 28, 2006 3:46 pm
Posts: 8
Code:
<hibernate-mapping>
    <class name="suprimentos.dominio.Solicitacao" table="TB_SOLICITA_SUPRIMENTO">
        <id name="numeroSolicitacao" type="java.lang.Long" column="NRSOLICITACAO">
            <generator class="assigned" />
        </id>
        <property name="cpfProponente" type="string">
            <column name="CPFPROPONENTE" length="20" />
        </property>
        <property name="finalidade" type="string">
            <column name="FINALIDADE" length="20" />
        </property>
        <property name="dataSolicitacao" type="date">
            <column name="DTSOLICITACAO" length="7" />
        </property>
        <property name="cpfSuprido" type="string">
            <column name="CPF" length="20" />
        </property>
        <property name="dataInicial" type="date">
            <column name="DTINICAPLICACAO" length="7" />
        </property>
        <property name="dataFinal" type="date">
            <column name="DTFINAPLICACAO" length="7" />
        </property>
        <property name="excesso" type="java.lang.Character">
            <column name="FGEXCESSO" length="1" />
        </property>
    </class>
</hibernate-mapping>


This is the WRONG file. It makes hibernate loop infinitely. I can't see what's wrong. :(


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 28, 2006 4:59 pm 
Newbie

Joined: Fri Apr 28, 2006 3:46 pm
Posts: 8
Solved!

Mapping File wasn't wrong.

My JSF Managed Bean was initializing my DAOFactory (which initializes hibernate) before OTHER hibernate initialization wasn't even finished. This caused my problem.

I don't need more help. Anyway, thank you very much for bearing with me.


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.