Была предпринята попытка вызвать несуществующий метод. Попытка была предпринята из следующего местаJAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Была предпринята попытка вызвать несуществующий метод. Попытка была предпринята из следующего места

Сообщение Anonymous »

Здравствуйте, я перехожу с Springboot 2.x.x на 3.x.x. Мое приложение собиралось правильно, но в моем тестовом примере я заметил некоторые проблемы, связанные со слюнями, поэтому я пытаюсь обновить свою версию kie-ci с 7.74.1 до последней версии на 8, но теперь мое приложение не запускается. Вот ошибка
An attempt was made to call a method that does not exist. The attempt was made from the following location:

org.apache.maven.RepositoryUtils.toRepo(RepositoryUtils.java:213)

The following method did not exist:

'org.eclipse.aether.repository.RemoteRepository$Builder org.eclipse.aether.repository.RemoteRepository$Builder.setBlocked(boolean)'

The calling method's class, org.apache.maven.RepositoryUtils, was loaded from the following location:

jar:file:/Users/rf22/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-core/3.8.6/f945f1f19452214d360d453d9357275313f1cfd9/maven-core-3.8.6.jar!/org/apache/maven/RepositoryUtils.class

The called method's class, org.eclipse.aether.repository.RemoteRepository$Builder, is available from the following locations:

jar:file:/Users/rf22/.gradle/caches/modules-2/files-2.1/org.eclipse.aether/aether-api/1.0.2.v20150114/839f93a5213fb3e233b09bfd6d6b95669f7043c0/aether-api-1.0.2.v20150114.jar!/org/eclipse/aether/repository/RemoteRepository$Builder.class
jar:file:/Users/rf22/.gradle/caches/modules-2/files-2.1/org.apache.maven.resolver/maven-resolver-api/1.7.3/2602fc14676d79d1802dcc3bfcfb3628c598ee8/maven-resolver-api-1.7.3.jar!/org/eclipse/aether/repository/RemoteRepository$Builder.class

The called method's class hierarchy was loaded from the following locations:

org.eclipse.aether.repository.RemoteRepository.Builder: file:/Users/rf22/.gradle/caches/modules-2/files-2.1/org.eclipse.aether/aether-api/1.0.2.v20150114/839f93a5213fb3e233b09bfd6d6b95669f7043c0/aether-api-1.0.2.v20150114.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.apache.maven.RepositoryUtils and org.eclipse.aether.repository.RemoteRepository$Builder

вот мой build.gradle: когда я использовал старую версию kie-ci, она собиралась правильно, но теперь у меня возникла проблема, описанная выше. Я предполагаю, что он пытается вызвать метод из двух разных мест, но я не уверен. Есть ли у кого-нибудь какие-нибудь идеи?
dependencies {
//resilience4j
implementation group: 'io.github.resilience4j', name: 'resilience4j-spring-boot3', version: '2.2.0'
implementation group: 'io.github.resilience4j', name: 'resilience4j-circuitbreaker', version: '2.2.0'
implementation group: 'io.github.resilience4j', name: 'resilience4j-reactor', version: '2.2.0'
//web (Tomcat, Logging, Rest)
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
// Redis
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis'
//Mongo Starter
implementation group: 'org.springframework.boot', name:'spring-boot-starter-data-mongodb'
// Configuration processor - To Generate MetaData Files. The files are designed to let developers offer "code completion" as users are working with application.properties
implementation group: 'org.springframework.boot', name: 'spring-boot-configuration-processor'
// Actuator - Monitoring
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator'

implementation group: 'org.kie', name: 'kie-ci', version: '8.44.0.Final'
\

//Swagger
//implementation group: 'io.springfox', name: 'springfox-swagger2', version:'3.0.0'
//implementation group: 'io.springfox', name: 'springfox-swagger-ui', version:'2.7.0'
// Migrated from Swagger2 SpringFox to SpringDoc OpenAPI - Upgrade to SpringBoot 2.7.18 - Dec 2023
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.5.0'
implementation group: 'com.doctusoft', name: 'json-schema-java7', version: '1.4.1'
implementation('com.google.code.gson:gson:2.8.6')
implementation group: 'org.apache.commons', name: 'commons-collections4', version: '4.5.0-M2'
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
implementation group: 'org.apache.httpcomponents.client5', name: 'httpclient5', version: '5.3.1'
// implementation group: 'com.google.guava', name: 'guava', version: '33.0.0-jre'
implementation group: 'org.apache.maven', name: 'maven-aether-provider', version: '3.3.9'
//Lombok
compileOnly group: 'org.projectlombok', name: 'lombok', version:'1.18.26'
annotationProcessor group:'org.projectlombok', name:'lombok',version:'1.18.26'
implementation group: 'org.json', name: 'json', version: '20240303'
// testCompileOnly 'org.projectlombok:lombok:1.18.12'
// testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'

//Sleuth - Tracing
implementation('org.springframework.boot:spring-boot-starter-validation')
//implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-bootstrap', version: '3.1.0'
implementation group: 'org.mongodb', name: 'mongodb-driver-core', version: '5.0.0'
implementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '5.0.0'
implementation group: 'org.mongodb', name: 'bson', version: '5.0.0'
//JSON Schema Validator
implementation group: 'com.github.java-json-tools', name: 'json-schema-validator',
version: '2.2.14'

implementation group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '3.0.0'
implementation('org.jacoco:jacoco-maven-plugin:0.8.0')
// Cucumber dependencies (newer versions compatible with Spring Boot 3.x)
implementation 'io.cucumber:cucumber-java:7.18.0'
implementation group: 'io.cucumber', name: 'cucumber-spring', version: '7.18.0'
testImplementation('io.cucumber:cucumber-spring:7.18.0')

//Testing Embedded Redis
testImplementation group: 'com.github.kstyrc', name: 'embedded-redis', version:'0.6'
//Testing Embedded Mongo
testImplementation 'de.flapdoodle.embed:de.flapdoodle.embed.mongo.spring3x:4.16.1'

testImplementation group: 'net.javacrumbs.json-unit', name: 'json-unit', version: '1.31.1'
testImplementation group: 'junit', name: 'junit', version: '4.13'
testImplementation group: 'com.github.kstyrc', name: 'embedded-redis', version:'0.6'
testImplementation group: 'org.springframework.ws', name: 'spring-ws-test', version:'2.4.0.RELEASE'
testImplementation group: 'org.springframework.boot', name:'spring-boot-starter-test'
testImplementation('io.cucumber:cucumber-java:7.13.0')
testImplementation('io.cucumber:cucumber-junit:7.13.0')
testImplementation('io.cucumber:cucumber-spring:7.13.0')
// integrationTestImplementation("org.springframework.boot:spring-boot-starter-test"){
// testImplementation('io.cucumber:cucumber-junit:7.13.0')
// testImplementation('io.cucumber:cucumber-spring:7.13.0')
// }
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.12.0'
}



Подробнее здесь: https://stackoverflow.com/questions/793 ... was-made-f
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «JAVA»