-->
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.  [ 3 posts ] 
Author Message
 Post subject: hibernate template method problem
PostPosted: Fri Oct 15, 2010 7:35 am 
Newbie

Joined: Mon May 19, 2008 8:49 am
Posts: 5
Hi,

I am facing problem while saving the Object.
I am using hibernate template method saveOrUpdate(Object) with spring v2.5,

Whenever I save the entity, its run successfully and provide me the generated primary id,
but unable to save into the database.

my code for transaction mapping is

Code:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="
           http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://www.springframework.org/schema/tx
           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">

<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
   <property name="sessionFactory" ref="sessionFactory" />
</bean>

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="configLocation" value="classpath:hibernate.cfg.xml"/>
        <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/></bean>
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
        <property name="sessionFactory" ref="sessionFactory"/>     
</bean>
</beans>


after few googling I found that this is the hibernate session problem. but I am not be able to resolve it.

kindly help me

Thanks


Top
 Profile  
 
 Post subject: Re: hibernate template method problem
PostPosted: Mon Oct 18, 2010 12:56 am 
Newbie

Joined: Mon May 19, 2008 8:49 am
Posts: 5
Hi,

Is anyone have a solution for this, or should I post it as a bug.


Thanks


Top
 Profile  
 
 Post subject: Re: hibernate template method problem
PostPosted: Wed Oct 20, 2010 5:46 am 
Senior
Senior

Joined: Fri Oct 08, 2010 8:44 am
Posts: 130
Try to describe your problem first. It is not possible to understand anything from your current description :)


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