DEV Community

lekshmigvarrier
lekshmigvarrier

Posted on

Exception during converting a standalone spring-hibernate based application to web application using Springboot(STS 4)

Hi,
We are trying to convert a standalone spring-hibernate based application to web application using Springboot(STS 4). We are using applicationcontext.xml file for bean creation and configuration.We configured libraries in pom.xml,which is attached here. When running the application using Maven, following error is showing. Please help

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:350)
Enter fullscreen mode Exit fullscreen mode

The following method did not exist:

org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
Enter fullscreen mode Exit fullscreen mode

The calling method's class, org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor, was loaded from the following location:

jar:file:/C:/Users/CIG-Lekshmi1/.m2/repository/org/springframework/spring-orm/2.5.6/spring-orm-2.5.6.jar!/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.class
Enter fullscreen mode Exit fullscreen mode

The called method's class, org.springframework.beans.factory.annotation.InjectionMetadata, is available from the following locations:

jar:file:/C:/Users/CIG-Lekshmi1/.m2/repository/org/springframework/spring-beans/5.3.16/spring-beans-5.3.16.jar!/org/springframework/beans/factory/annotation/InjectionMetadata.class
Enter fullscreen mode Exit fullscreen mode

The called method's class hierarchy was loaded from the following locations:

org.springframework.beans.factory.annotation.InjectionMetadata: file:/C:/Users/CIG-Lekshmi1/.m2/repository/org/springframework/spring-beans/5.3.16/spring-beans-5.3.16.jar
Enter fullscreen mode Exit fullscreen mode

Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor and org.springframework.beans.factory.annotation.InjectionMetadata

Top comments (0)