Java

Java is a set of computer software and specifications developed by Sun Microsystems, which was later acquired by the Oracle Corporation, that provides a system for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers.

123

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:...