
Thursday, April 3, 2014
Exception in thread "main" org.hibernate.HibernateException: persist is not valid without active transaction

Problem: The problem in Configuration file.<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource"></property> <!-- Configuring the Hibernate properties --> ...
java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

Problem:While doing transactions management with the annotations, prior to Spring 3.0 we are adding aopalliance.jar file. In latest Spring bundle this jar file not available. If we add below line applicationContext.xml we need to add the aopalliance.jar file other wise it will throws the java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor<tx:annotation-driven transaction-manager="hibernateTransactionManager"/> Solution:...