java - Spring Hibernate configuration issue: org.springframework.beans.factory.BeanCreationException -


i trying create spring+hibernate application, after added hibernate configurations getting org.springframework.beans.factory.beancreationexception while starting tomcat server:

error creating bean name 'datasource' defined in servletcontext resource [/web-inf/hibernate-config.xml]: initialization of bean failed; nested exception java.lang.nosuchmethoderror:  org.springframework.core.annotation.annotationutils.getannotation(ljava/lang/reflect/annotatedelement;ljava/lang/class;)ljava/lang/annotation/annotation; 

hibernate-config.xml

<context:component-scan base-package="com.test.common"> </context:component-scan>   <bean id="sessionfactory"     class="org.springframework.orm.hibernate4.localsessionfactorybean">     <property name="datasource" ref="datasource" />     <property name="annotatedclasses">         <list>             <value>com.test.common.model.companytypes</value>             <value>com.test.common.model.employee</value>         </list>     </property>     <property name="hibernateproperties">         <props>             <!-- <prop key="hibernate.current_session_context_class">thread</prop> -->             <!--prop key="current_session_context_class">thread</prop-->             <!-- <prop key="hibernate.connection.release_mode">on_close</prop> -->             <prop key="hibernate.dialect">org.hibernate.dialect.mysqldialect</prop>             <prop key="hibernate.show_sql">true</prop>             <prop key="hibernate.format_sql">true</prop>             <prop key="hibernate.hbm2ddl.auto">update</prop>         </props>     </property> </bean>  <bean id="transactionmanager"     class="org.springframework.orm.hibernate4.hibernatetransactionmanager">     <property name="sessionfactory" ref="sessionfactory" /> </bean>  <bean id="datasource"     class="org.springframework.jdbc.datasource.drivermanagerdatasource">     <property name="driverclassname" value="com.mysql.jdbc.driver" />     <property name="url" value="jdbc:mysql://localhost:3306/testdb" />     <property name="username" value="root" />     <property name="password" value="root" /> </bean>  <tx:annotation-driven transaction-manager="transactionmanager"/> 

jars included:

enter image description here

please guide, in advance..


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -