Help

We have just released 3.5.0-CR-2. The main focus for this release was bugfixes and documentation.

Please forgive the terseness of this entry. I am quite tired :)

Moving forward in the next 2 weeks we still have some documentation tasks to finish up and handle any bug reports that come back in to Jira. As we get closer to that time, we will decide whether 3.5.0.Next becomes 3.5.0-CR-3 or 3.5.0-Final.

19 comments:
 
26. Feb 2010, 05:34 CET | Link

We've been using 3.5.0-CR1 for awhile without issue, this morning I changed out poms to use CR2 and immediate hit problems with getting duplicate primary keys.

Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "rest_request_pkey" at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1343) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:304) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:477) at $Proxy47.executeUpdate(Unknown Source) at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2418) ... 73 more

For our setup we're using Hibernate 3.5.0-CR2, Atomikos JTA, PostgreSQL 8.4.

 
26. Feb 2010, 09:34 CET | Link

excelent work!!!!!!!!

 
01. Mar 2010, 19:23 CET | Link
Saboutai

Nice work i can't wait to check the new JPA support

 
05. Mar 2010, 20:53 CET | Link
Andre Geissler

with this we upgraded from 3.3.2. My today highlight: Unidirectional OneToMany with DeleteOrphan works well with EM.merge()

Congratulations to the whole package to the Core Team !

Andre

 
18. Mar 2010, 01:06 CET | Link
3.5.0-CR2 evict bug?

Hibernate 3.5.0-CR2 issue: - Deprecated method "SessionFactory.evictQueries()" => DOES NOT WORK - Considering "SessionFactory.evictQueries()" changed to "SessionFactoy.getCache().evictQueryRegions()" => ALSO DOES NOT WORK

 
18. Mar 2010, 01:18 CET | Link
DdEviL

Using "Hibernate 3.5.0-CR-2" and "EhCache 2.0" with "second_level_cache" and "query_cache". - When enabling these caches with JOIN FETCH the SELECT N+1 issue appears. If I disable both caches the N+1 issue does not happen: --------------------------------------------------------- Primary Key is (SYSTEM_CODE, NCODE) CREATE TABLE FW_STATUS_TRANSLATE ( SYSTEM_CODE VARCHAR2(3 BYTE) NOT NULL , NCODE VARCHAR2(20 BYTE) NOT NULL , NDESC VARCHAR2(255 BYTE) , ECODE VARCHAR2(10 BYTE) , EDESC VARCHAR2(255 BYTE) , ACCAO VARCHAR2(48 BYTE) , RESPONSAVEL VARCHAR2(48 BYTE) , ACCAORECURSO VARCHAR2(48 BYTE) , RESPONSAVELRECURSO VARCHAR2(48 BYTE) , EVENTSTATUS VARCHAR2(100 BYTE) DEFAULT NULL ) ---- Primary Key is (SYSTEM_CODE) CREATE TABLE PTC_SISTEMA_LEGACY ( "SYSTEM_CODE" VARCHAR2(3 BYTE) NOT NULL ENABLE, "SYSTEM_DESC" VARCHAR2(50 BYTE) ) NOTE: There is a foreign key from FW_STATUS_TRANSLATE.SYSTEM_CODE to PTC_SISTEMA_LEGACY.SYSTEM_CODE --------------------------------------------------------- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="org.ptsi.data.model.FwStatusTranslate" table="FW_STATUS_TRANSLATE" dynamic-insert="true" dynamic-update="true" lazy="false"> <cache usage="read-write"/> <composite-id mapped="true" class="org.ptsi.data.model.FwStatusTranslatePK"> <key-many-to-one name="system_code" class="org.ptsi.data.model.PtcSistemaLegacy"> <column name="SYSTEM_CODE"/> </key-many-to-one> <key-property name="ncode"> <column name="NCODE" sql-type="VARCHAR2(10 BYTE)" length="10"/> </key-property> </composite-id> <property name="ndesc"> <column name="NDESC" sql-type="VARCHAR2(255 BYTE)" length="255"/> </property> <property name="ecode"> <column name="ECODE" sql-type="VARCHAR2(10 BYTE)" length="10"/> </property> <property name="edesc"> <column name="EDESC" sql-type="VARCHAR2(255 BYTE)" length="255"/> </property> <property name="accao"> <column name="ACCAO" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="responsavel"> <column name="RESPONSAVEL" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="accaoRecurso"> <column name="ACCAORECURSO" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="responsavelRecurso"> <column name="RESPONSAVELRECURSO" sql-type="VARCHAR2(48 BYTE)" length="48"/> </property> <property name="eventStatus"> <column name="EVENTSTATUS" sql-type="VARCHAR2(100 BYTE)" length="100"/> </property> </class> </hibernate-mapping> ---------------------------- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="org.ptsi.data.model.PtcSistemaLegacy" table="PTC_SISTEMA_LEGACY" dynamic-insert="true" dynamic-update="true" lazy="false"> <cache usage="read-only"/> <composite-id mapped="true" class="org.ptsi.data.model.PtcSistemaLegacyPK"> <key-property name="system_code"> <column name="SYSTEM_CODE" sql-type="VARCHAR2(3 BYTE)" length="3"/> </key-property> </composite-id> <property name="system_desc"> <column name="SYSTEM_DESC" sql-type="VARCHAR2(50 BYTE)" length="50"/> </property> </class> </hibernate-mapping> ---------------------------- hibernateSession.createQuery( "FROM FwStatusTranslate t1 " + "LEFT JOIN FETCH t1.system_code " + "ORDER BY TO_NUMBER( SUBSTR( t1.ecode, 2 ) )" ); ---------------------------

 
18. Mar 2010, 01:20 CET | Link
DdEviL
Using "Hibernate 3.5.0-CR-2" and "EhCache 2.0" with "second_level_cache" and "query_cache".

- When enabling these caches with JOIN FETCH the SELECT N+1 issue appears. If I disable both caches the N+1 issue does not happen:

---------------------------------------------------------
Primary Key is (SYSTEM_CODE, NCODE)

CREATE TABLE FW_STATUS_TRANSLATE 
(
  SYSTEM_CODE VARCHAR2(3 BYTE) NOT NULL
, NCODE VARCHAR2(20 BYTE) NOT NULL 
, NDESC VARCHAR2(255 BYTE) 
, ECODE VARCHAR2(10 BYTE) 
, EDESC VARCHAR2(255 BYTE) 
, ACCAO VARCHAR2(48 BYTE) 
, RESPONSAVEL VARCHAR2(48 BYTE) 
, ACCAORECURSO VARCHAR2(48 BYTE) 
, RESPONSAVELRECURSO VARCHAR2(48 BYTE) 
, EVENTSTATUS VARCHAR2(100 BYTE) DEFAULT NULL )

----

Primary Key is (SYSTEM_CODE)

CREATE TABLE PTC_SISTEMA_LEGACY
  (
    SYSTEM_CODE VARCHAR2(3 BYTE) NOT NULL ENABLE,
    SYSTEM_DESC VARCHAR2(50 BYTE)
  )


NOTE: There is a foreign key from FW_STATUS_TRANSLATE.SYSTEM_CODE to PTC_SISTEMA_LEGACY.SYSTEM_CODE

---------------------------------------------------------

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
    <class name="org.ptsi.data.model.FwStatusTranslate" table="FW_STATUS_TRANSLATE"
           dynamic-insert="true" dynamic-update="true" lazy="false">
        <cache usage="read-write"/>
        <composite-id mapped="true" class="org.ptsi.data.model.FwStatusTranslatePK">
            <key-many-to-one name="system_code" class="org.ptsi.data.model.PtcSistemaLegacy">
                <column name="SYSTEM_CODE"/>
            </key-many-to-one>
            <key-property name="ncode">
                <column name="NCODE" sql-type="VARCHAR2(10 BYTE)" length="10"/>
            </key-property>
        </composite-id>
        <property name="ndesc">
            <column name="NDESC" sql-type="VARCHAR2(255 BYTE)" length="255"/>
        </property>
        <property name="ecode">
            <column name="ECODE" sql-type="VARCHAR2(10 BYTE)" length="10"/>
        </property>
        <property name="edesc">
            <column name="EDESC" sql-type="VARCHAR2(255 BYTE)" length="255"/>
        </property>
        <property name="accao">
            <column name="ACCAO" sql-type="VARCHAR2(48 BYTE)" length="48"/>
        </property>
        <property name="responsavel">
            <column name="RESPONSAVEL" sql-type="VARCHAR2(48 BYTE)" length="48"/>
        </property>
        <property name="accaoRecurso">
            <column name="ACCAORECURSO" sql-type="VARCHAR2(48 BYTE)" length="48"/>
        </property>
        <property name="responsavelRecurso">
            <column name="RESPONSAVELRECURSO" sql-type="VARCHAR2(48 BYTE)" length="48"/>
        </property>
        <property name="eventStatus">
            <column name="EVENTSTATUS" sql-type="VARCHAR2(100 BYTE)" length="100"/>
        </property>
    </class>
</hibernate-mapping>

----------------------------

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
    <class name="org.ptsi.data.model.PtcSistemaLegacy" table="PTC_SISTEMA_LEGACY"
           dynamic-insert="true" dynamic-update="true" lazy="false">
        <cache usage="read-only"/>
        <composite-id mapped="true" class="org.ptsi.data.model.PtcSistemaLegacyPK">
            <key-property name="system_code">
                <column name="SYSTEM_CODE" sql-type="VARCHAR2(3 BYTE)" length="3"/>
            </key-property>
        </composite-id>
        <property name="system_desc">
            <column name="SYSTEM_DESC" sql-type="VARCHAR2(50 BYTE)" length="50"/>
        </property>
    </class>
</hibernate-mapping>

----------------------------

hibernateSession.createQuery( "FROM FwStatusTranslate t1 " +
                              "LEFT JOIN FETCH t1.system_code " +
                              "ORDER BY TO_NUMBER( SUBSTR( t1.ecode, 2 ) )" );

---------------------------


 
18. Mar 2010, 01:22 CET | Link
DdEviL
Using "Hibernate 3.5.0-CR-2" and "EhCache 2.0" with "second_level_cache" and "query_cache".

- Deprecated method "SessionFactory.evictQueries()" => DOES NOT WORK 

- Considering "SessionFactory.evictQueries()" changed to "SessionFactoy.getCache().evictQueryRegions()" => ALSO DOES NOT WORK 
 
18. Mar 2010, 01:31 CET | Link
DdEviL
Using "Hibernate 3.5.0-CR-2" and "EhCache 2.0" with "second_level_cache" and "query_cache".

- Deprecated method "SessionFactory.evictQueries()" => DOES NOT WORK 

- Considering "SessionFactory.evictQueries()" changed to "SessionFactoy.getCache().evictQueryRegions()" => ALSO DOES NOT WORK 


NOTE: With Hibernate 3.3.2 "SessionFactory.evictQueries()" WORKED just fine.
 
18. Mar 2010, 14:11 CET | Link
3.5 CR2 ships with ehcache 1.5, not 2.0. Did you test that?

For the Ehcache 2.0 issue we will look into it and see if it is an Ehcache or a Hibernate bug. Assuming the former I have created a JIRA at https://jira.terracotta.org/jira/browse/EHC-656.

Can you please provide some more detail there and a way we can contact you to discuss the issue and how to reproduce.
 
18. Mar 2010, 18:03 CET | Link
DdEviL
- I've tried using hibernate included ehcache 1.5 and the issue is there.

- Also sometimes it happens that after I change a value directly through "Oracle SQL Developer" even if I don't evict the query cache hibernate reloads (but not the newly inserted tuple) the table but using SELECT's instead of the JOIN.

- Previously I forgot to mention that I also tried "oscache" and this behavior also happens.

 
18. Mar 2010, 18:52 CET | Link
DdEviL
I just found out the specific context for which these "evict" and reload behaviors happen. It seems that this happens when a query involves more than one table. In the before mentioned tables if I do this query:

hibernateSession.createQuery( "FROM ScdmClasseCodigo t, FwStatusTranslate t1 " +
                              "LEFT JOIN FETCH t1.system_code " +
                              "WHERE t.classe = SUBSTR( t1.ecode, 1, 1 ) " +
                              "ORDER BY TO_NUMBER( SUBSTR( t1.ecode, 2 ) )" );


 
19. Mar 2010, 19:39 CET | Link

This is not an issue tracker!

 
28. Mar 2010, 07:46 CET | Link
Jesus Rueda

First that all many thanks for everything, but I am waiting for the final version.... when this can be?

 
30. Mar 2010, 00:34 CET | Link

Where can we find documentation on JPA 2 annotations. I can't find anything save a bunch of articles on collections of elements. And how about a migration guide for migrating your hibernate entities annotations to jpa 2 annotations? I tried switching an existing project and the source code went all red from all the now suddenly unsupported hibernate annotations.

 
30. Mar 2010, 01:48 CET | Link
Marc wrote on Mar 29, 2010 18:34:
Where can we find documentation on JPA 2 annotations. I can't find anything save a bunch of articles on collections of elements. And how about a migration guide for migrating your hibernate entities annotations to jpa 2 annotations? I tried switching an existing project and the source code went all red from all the now suddenly unsupported hibernate annotations.

Huh? We have removed not a single annotation.

 
30. Mar 2010, 01:50 CET | Link
Jesus Rueda wrote on Mar 28, 2010 01:46:
First that all many thanks for everything, but I am waiting for the final version.... when this can be?

We are in the process of documentation tasks. After that we will release a final.

 
31. Mar 2010, 00:58 CET | Link
Marc
Huh? We have removed not a single annotation.

My bad, I thought rolling annotations and entity into core meant the core distribution and I had removed them from my pom.

 
31. Mar 2010, 23:25 CET | Link
Hi,


I wanna download and use hibernate .Kindly suggest the webpage where i can download hibernate latest version?
     In Anticipation
  With Regards
   Reuben Appadurai[My Link=>]