NoClassDefFoundError:QuerydslUtils

时间:2018-05-17 11:36:44

标签: java spring-data amazon-dynamodb

获取NoClassDefFoundError: org/springframework/data/querydsl/QuerydslUtils error。 我使用的是spring-data-commons的1.13.6.RELEASE版本。

堆栈跟踪如下:

Caused by: java.lang.NoClassDefFoundError: org/springframework/data/querydsl/QuerydslUtils
    at org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBRepositoryFactory.isQueryDslRepository(DynamoDBRepositoryFactory.java:142) ~[spring-data-dynamodb-5.0.2.jar:5.0.2]
    at org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBRepositoryFactory.getRepositoryBaseClass(DynamoDBRepositoryFactory.java:135) ~[spring-data-dynamodb-5.0.2.jar:5.0.2]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepositoryInformation(RepositoryFactorySupport.java:253) ~[spring-data-commons-1.13.6.RELEASE.jar:na]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:195) ~[spring-data-commons-1.13.6.RELEASE.jar:na]
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:277) ~[spring-data-commons-1.13.6.RELEASE.jar:na]
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:263) ~[spring-data-commons-1.13.6.RELEASE.jar:na]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
    ... 29 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.data.querydsl.QuerydslUtils
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_144]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_144]
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_144]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_144]
    ... 37 common frames omitted

1 个答案:

答案 0 :(得分:4)

@himanshuraipur概述了版本冲突:

spring-data-dynamodb 5.0.2基于spring-data 2.0 / Spring 5。

但是spring-boot 1.5.6spring-data 1一起提供。

因此,您唯一的机会就是更新您的spring-boot依赖项或返回到spring-data-dynamodb 4.54.6。 在项目页面上,有完整的compatibilty matrix

注意:我是spring-data-dynamodb项目的维护者