本文介绍了NoClassDefFoundError:QuerydslUtils的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

获取 NoClassDefFoundError:org / springframework / data / querydsl / QuerydslUtils错误
我正在使用1.13.6.spring版本的通用数据的发布版本。

Getting NoClassDefFoundError: org/springframework/data/querydsl/QuerydslUtils error. I am using 1.13.6.RELEASE version of spring-data-commons.

堆栈跟踪如下:

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


推荐答案

如@himanshuraipur所述,版本之间存在冲突:

As outlined by @himanshuraipur there is a clash of versions:

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

spring-data-dynamodb 5.0.2 is based on spring-data 2.0 / Spring 5.

但是 spring -boot 1.5.6 随附 spring-data 1

因此,您唯一的机会是更新 spring-boot 依赖项或回到 spring-data-dynamodb 4.5 4.6
在项目页面上有完整的

Thus your only chance is to either update your spring-boot dependency or go back to spring-data-dynamodb 4.5 or 4.6.On the project page there is a full compatibilty matrix

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

Note: I'm the maintainer of the spring-data-dynamodb project

这篇关于NoClassDefFoundError:QuerydslUtils的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 05:28