Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to newer version of Spring Data JPA (1.8.0.RELEASE - 1.9.2.RELEASE) #245

Open
alexandrustefan opened this issue Jan 21, 2016 · 1 comment

Comments

@alexandrustefan
Copy link

While trying to integrate with lightadmin, I encountered the following exception at the initialization of the jpaMapppingContext

Caused by: java.lang.NoSuchMethodError: org.springframework.data.jpa.mapping.JpaMetamodelMappingContext.<init>(Ljavax/persistence/metamodel/Metamodel;)V

After having a look I've found the problem comes from light-admin/lightadmin-core/src/main/java/org/lightadmin/core/config/bootstrap/JpaMetamodelMappingContextFactoryBean.java file, at line 53 where the JpaMetamodelMappingContext is being initialized.

JpaMetamodelMappingContext context = new JpaMetamodelMappingContext(metamodel);

Newer versions of spring-data-jpa, changed the constructor from one instance of Metamodel to a Set, so basically in order to use light-admin you have to use an older version (e.g 1.7.0.RELEASE)

@alexandrustefan alexandrustefan changed the title Update to newer Spring Data JPA version to latest release (1.9.2.RELEASE) Update to newer version of Spring Data JPA (1.8.0.RELEASE - 1.9.2.RELEASE) Jan 21, 2016
@viruscamp
Copy link

public JpaMetamodelMappingContext(Set<Metamodel> models)

This contructor also exist in spring-data-jap-1.7.4 .
So, by using this method, it is compatible from 1.7 to 1.9 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants