-->
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: Issue with Hibernate 4.3.5 upgrade
PostPosted: Thu Jul 24, 2014 12:40 pm 
Newbie

Joined: Thu Jul 24, 2014 9:45 am
Posts: 1
I'm really new to Hibernate and currently upgrading Hibernate from 4.1.9 to 4.3.5. Here is the list of existing hibernate jars:

antlr-2.7.7.jar,hibenate-commons-annotations-4.0.1.Final.jar ,hibernate-core-4.1.9.Final.jar ,hibernate-jpa-2.0-api-1.0.1.Final.jar ,javassist-3.17.1-GA.jar ,jboss-logging-3.1.0.GA.jar,jboss-transaction-api_1.1_spec-1.0.0.Final.jar

I've replaced these jars with the latest Hibernate jars. Here is the list:

antlr-2.7.7.jar,hibernate-commons-annotations-4.0.4.Final.jar,hibernate-core-4.3.5.Final.jar,hibernate-jpa-2.1-api-1.0.0.Final.jar,javassist-3.18.1-GA.jar,jboss-logging-3.1.3.GA.jar,jboss-transaction-api_1.2_spec-1.0.0.Final.jar

After replacing the jars I get a compilation error, and I've changed the below code to fix the issue:

/* Existing code */
ServiceRegistry serviceRegistry =
new ServiceRegistryBuilder()
.applySettings(config.getProperties())
.buildServiceRegistry();

/* Modified code */
ServiceRegistry serviceRegistry =
new ServiceRegistryBuilder()
.applySettings(config.getProperties())
.build();
Issue: As I run my application one of the operations is getting an empty HashSet, whereas with the earlier version of the Hibernate jars it was getting a PersistentSet. I'm checking if the object is empty or not. With the PersistentSet it clears the check, but with the HashSet it fails the check for the same data.

Is there anything else I need to do this upgrade? Is there anything which I need to change to handle this kind of situation while doing this upgrade?

The application is using Hibernate mapping. Here is the mapping for the set I was talking about above:

<set name="Code" cascade="all-delete-orphan" inverse="true" where="created_date=(select max(c.created_date) from dma_step_code c where c.step_id=step_id)">
<key column="step_id"/>
<one-to-many class="com.hp.dma.data.action.SOPActionCode" />
</set>


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.