question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spring boot starter parent 2.2.0.RELEASE breaking change -- server doesn't start

See original GitHub issue

This problem is caused because the deprecated class org.springframework.data.repository.core.support.ReflectionEntityInformation<T, ID> was removed in favor of org.springframework.data.repository.core.support.PersistentEntityInformation<T, ID>.

Expected Behavior

Spring server (Tomcat)/application loads normally.

Actual Behavior

Dynamo DB shows the following warning: WARN 25900 --- [ main] o.s.s.d.d.r.s.DynamoDBRepositoryFactory : This Spring Data DynamoDB implementation might not be compatible with the available Spring Data classes on the classpath!

Then, the following exception is thrown: Caused by: java.lang.NoClassDefFoundError: org/springframework/data/repository/core/support/ReflectionEntityInformation at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[na:na] at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na] at org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBEntityMetadataSupport.getEntityInformation(DynamoDBEntityMetadataSupport.java:125) ~[spring-data-dynamodb-5.1.0.jar:5.1.0] at org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBRepositoryFactory.getEntityInformation(DynamoDBRepositoryFactory.java:104) ~[spring-data-dynamodb-5.1.0.jar:5.1.0] at org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBRepositoryFactory.getDynamoDBRepository(DynamoDBRepositoryFactory.java:128) ~[spring-data-dynamodb-5.1.0.jar:5.1.0] at org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBRepositoryFactory.getTargetRepository(DynamoDBRepositoryFactory.java:150) ~[spring-data-dynamodb-5.1.0.jar:5.1.0] at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:312) ~[spring-data-commons-2.2.0.RELEASE.jar:2.2.0.RELEASE] at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:297) ~[spring-data-commons-2.2.0.RELEASE.jar:2.2.0.RELEASE] at org.springframework.data.util.Lazy.getNullable(Lazy.java:212) ~[spring-data-commons-2.2.0.RELEASE.jar:2.2.0.RELEASE] at org.springframework.data.util.Lazy.get(Lazy.java:94) ~[spring-data-commons-2.2.0.RELEASE.jar:2.2.0.RELEASE] at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:300) ~[spring-data-commons-2.2.0.RELEASE.jar:2.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1862) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1799) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE] ... 188 common frames omitted

Steps to Reproduce the Problem

  1. Upgrade spring boot to version 2.2.0
  2. Start the server/application

Specifications

  • Spring Data DynamoDB Version: 5.1.0
  • Spring Data Version: 2.2.0
  • AWS SDK Version: 1.11.656
  • Java Version: 11
  • Platform Details: Windows 10 Home

All those information are logged by org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBRepositoryFactory on INFO level on startup. Or use java -version and mvn dependency:tree | grep -E 'spring|aws' to provide those version numbers.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:5
  • Comments:17

github_iconTop GitHub Comments

8reactions
boostchickencommented, Nov 1, 2019

@raythien @dragneelfps

Published to OSSRH Snapshots give it a go and let me know how it works.

repositories {
        mavenCentral()
        maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
    }
`api  group: 'io.github.boostchicken', name: 'spring-data-dynamodb', version: '5.2.0-SNAPSHOT'`
7reactions
boostchickencommented, Nov 19, 2019
api  group: 'io.github.boostchicken', name: 'spring-data-dynamodb', version: '5.2.1'

Release and on central.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgraded spring boot from 2.1.9 to 2.2.0 , now getting ...
In short, issue is due to spring cloud and spring boot version incompatibility, spring boot 2.2.X requires Hoxton release train instead of ...
Read more >
Spring Boot 2.3.0 available now
For full upgrade instructions and new and noteworthy features please see the release notes. What's new in 2.3. Dependency upgrades. Spring Boot ......
Read more >
Spring Boot 2.7.0 available now
Hi, I upgraded spring boot starter parent from 2.6.13 to 2.7.5 and ... Spring Cloud release train', action = 'Change Spring Boot version...
Read more >
Spring Boot Reference Documentation
The spring-boot-starter-parent is a great way to use Spring Boot, but it might not be ... Spring Boot does not require any specific...
Read more >
Spring Boot Reference Documentation
Build systems: Maven | Gradle | Ant | Starters. Best practices: Code Structure | @Configuration | @EnableAutoConfiguration | Beans and Dependency Injection.
Read more >

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found