-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate returns different data each time is invoked
PostPosted: Tue Feb 10, 2009 6:00 am 
Newbie

Joined: Wed Dec 24, 2008 5:43 am
Posts: 2
Hello:

I' using hibernate v3.2.6.ga, and I have problems retrieving some data. Using Criteria API, I obtain some results. After inserting an element in database (always using hibernate), I repeat the same query several times. The new element sometimes appears and sometimes not. I've disabled all caches in hibernate.cfg:

Code:
<property name="hibernate.current_session_context_class">org.hibernate.context.ThreadLocalSessionContext</property>
        <property name="hibernate.cache.use_second_level_cache">false</property>
        <property name="hibernate.cache.use_query_cache">false</property>
        <!-- Isolation 8=SERIALIZABLE-->
        <property name="hibernate.connection.isolation">8</property>
        <!-- Disable the second-level cache  -->
        <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>       
        <!-- Echo all executed SQL to stdout -->
        <property name="show_sql">true</property>


I've debugged the hibernate messages, and I've discover that in the case when the query returns less elements, it appears the next "extra" traces:

Code:
DEBUG [http-8081-3] (Cascade.java:115) - processing cascade ACTION_SAVE_UPDATE for: com.softwareag.helios.core.pojo.TextopredefinidoInforme
DEBUG [http-8081-3] (Cascade.java:291) - cascade ACTION_SAVE_UPDATE for collection: com.softwareag.helios.core.pojo.TextopredefinidoInforme.textopredefinidoInformes
DEBUG [http-8081-3] (Cascade.java:306) - done cascade ACTION_SAVE_UPDATE for collection: com.softwareag.helios.core.pojo.TextopredefinidoInforme.textopredefinidoInformes
DEBUG [http-8081-3] (Cascade.java:150) - done processing cascade ACTION_SAVE_UPDATE for: com.softwareag.helios.core.pojo.TextopredefinidoInforme


...and

Code:
DEBUG [http-8081-3] (Collections.java:176) - Collection found: [com.softwareag.helios.core.pojo.TextopredefinidoInforme.textopredefinidoInformes#415], was: [com.softwareag.helios.core.pojo.TextopredefinidoInforme.textopredefinidoInformes#415] (uninitialized)


...and:

Code:
DEBUG [http-8081-3] (Printer.java:90) - com.softwareag.helios.core.pojo.TextopredefinidoInforme{nombre=Carpeta 1_1, textopredefinidoInforme=com.softwareag.helios.core.pojo.TextopredefinidoInforme#415, textopredefinidoInformes=<uninitialized>, texto=null, momentoModificacion=2009-02-04 08:57:58, usuario=com.softwareag.helios.core.pojo.Usuario#1, momentoBaja=null, idtextopredefinidoInforme=416, momentoCreacion=2009-02-04 08:57:58, carpeta=true}


The element is correctly persisted in database, because it could be obtained using a SQL query tool (sqlplus)

Do you know what could be happened? A cache issue? How can I solve it?

Thanks in advance:

Carlos


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

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.