Upgrading spring version from 3.0.5.RELEASE to 5.3.17. After changing the version and build deployment, Following error is happening.
"org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxDao' defined in ServletContext resource [/WEB-INF/xxxx.xml]: Post-processing of merged bean definition failed; nested exception is java.lang.NoSuchMethodError: javax/persistence/PersistenceContext.synchronization()Ljavax/persistence/SynchronizationType; (loaded from file: .../WebSphere/AppServer/plugins/javax.j2ee.persistence.jar by org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4fdd22cb) called from class org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement"
From the above error, could see synchronization method is fetching from WebSphere location(extracted the javax.j2ee.persistence.jar and there is no such method). But previously also that jar was there before upgrading the spring version and was working fine. As workaround, tried to add javax.persistence-api-2.2.jar. But still trying to load from Websphere location.
Please help