I am getting the below exception when i deployed the application in my development environment.

java.lang.NoSuchMethodError: org/springframework/orm/hibernate4/LocalSessionFactoryBuilder.addAnnotatedClass(Ljava/lang/Class;)Lorg/hibernate/cfg/Configuration;

Application is running fine in my local desktop. In my development environment the maven repository is a shared/common repository for multiple applications and had multiple verions of hibernate-core and spring-orm jar versions. Is this creating the problem..?

How to resolve this issue.

i am using the both Spring and Hibernate 4.X versions in my application. in my application-servlet xml file i have configured "<property name="annotatedClasses">" ,

to my knowledge the flow should be as below..

LocalSessionFactoryBean(addAnnotatedClass) --calls-->LocalSessionFactoryBuilder(addAnnotatedClass)---calls-->org/hibernate/cfg/Configuration

i am not sure like why the application is throwing nosuchMethod exception even hibernate-core has 4.X defined in my application POM.xml