rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.68k stars 1.18k forks source link

module ... reads package javax.annotation from both java.annotation and jsr305 #860

Closed dman-sol closed 3 years ago

dman-sol commented 3 years ago
error: the unnamed module reads package javax.annotation from both java.annotation and jsr305
error: module org.apache.commons.codec reads package javax.annotation from both java.annotation and jsr305
error: module okhttp3 reads package javax.annotation from both java.annotation and jsr305
error: module fastjson reads package javax.annotation from both java.annotation and jsr305
error: module javafx.fxmlEmpty reads package javax.annotation from both java.annotation and jsr305
error: module javafx.controlsEmpty reads package javax.annotation from both java.annotation and jsr305
error: module javafx.graphicsEmpty reads package javax.annotation from both java.annotation and jsr305
error: module javafx.baseEmpty reads package javax.annotation from both java.annotation and jsr305
error: module logback.classic reads package javax.annotation from both java.annotation and jsr305
error: module org.apache.httpcomponents.httpmime reads package javax.annotation from both java.annotation and jsr305
error: module org.apache.httpcomponents.httpclient reads package javax.annotation from both java.annotation and jsr305
error: module logback.core reads package javax.annotation from both java.annotation and jsr305
error: module org.slf4j reads package javax.annotation from both java.annotation and jsr305
error: module okio reads package javax.annotation from both java.annotation and jsr305
error: module jersey.media.json.jackson reads package javax.annotation from both java.annotation and jsr305
error: module jersey.hk2 reads package javax.annotation from both java.annotation and jsr305
error: module jersey.container.grizzly2.http reads package javax.annotation from both java.annotation and jsr305
error: module jersey.server reads package javax.annotation from both java.annotation and jsr305
error: module org.json reads package javax.annotation from both java.annotation and jsr305
error: module org.apache.commons.io reads package javax.annotation from both java.annotation and jsr305
error: module com.google.common reads package javax.annotation from both java.annotation and jsr305
error: module jakarta.activation reads package javax.annotation from both java.annotation and jsr305
error: module jersey.client reads package javax.annotation from both java.annotation and jsr305
error: module jersey.media.jaxb reads package javax.annotation from both java.annotation and jsr305
error: module jersey.common reads package javax.annotation from both java.annotation and jsr305
error: module hk2.locator reads package javax.annotation from both java.annotation and jsr305
error: module javassist reads package javax.annotation from both java.annotation and jsr305
error: module jersey.entity.filtering reads package javax.annotation from both java.annotation and jsr305
error: module hk2.api reads package javax.annotation from both java.annotation and jsr305
error: module hk2.utils reads package javax.annotation from both java.annotation and jsr305
error: module jakarta.inject reads package javax.annotation from both java.annotation and jsr305
error: module grizzly.http.server reads package javax.annotation from both java.annotation and jsr305
error: module java.annotation reads package javax.annotation from both java.annotation and jsr305
error: module java.validation reads package javax.annotation from both java.annotation and jsr305
error: module org.apache.httpcomponents.httpcore reads package javax.annotation from both java.annotation and jsr305
error: module commons.logging reads package javax.annotation from both java.annotation and jsr305
error: module failureaccess reads package javax.annotation from both java.annotation and jsr305
error: module listenablefuture reads package javax.annotation from both java.annotation and jsr305
error: module jsr305 reads package javax.annotation from both java.annotation and jsr305
error: module org.checkerframework.checker.qual reads package javax.annotation from both java.annotation and jsr305
error: module com.google.errorprone.annotations reads package javax.annotation from both java.annotation and jsr305
error: module j2objc.annotations reads package javax.annotation from both java.annotation and jsr305
error: module osgi.resource.locator reads package javax.annotation from both java.annotation and jsr305
error: module aopalliance.repackaged reads package javax.annotation from both java.annotation and jsr305
error: module grizzly.http reads package javax.annotation from both java.annotation and jsr305
error: module grizzly.framework reads package javax.annotation from both java.annotation and jsr305
error: module telegrambots reads package javax.annotation from both java.annotation and jsr305
error: module telegrambots.meta reads package javax.annotation from both java.annotation and jsr305
error: module org.apache.commons.lang3 reads package javax.annotation from both java.annotation and jsr305
C:\Users\DMan\IdeaProjects\TradingRobot\src\main\java\module-info.java:1: error: module TradingRobot reads package javax.annotation from both java.annotation and jsr305

How can this conflict be resolved?

My build.gradle

plugins {
    id 'application'
    id 'org.openjfx.javafxplugin' version '0.0.9'
    id 'com.gluonhq.client-gradle-plugin' version '0.1.35'
}

group 'org.dman'
version '0.0.1'

compileJava.options.encoding = 'UTF-8'

repositories {
    mavenCentral()
}

javafx {
    version = "15.0.1"
    modules = ['javafx.controls', 'javafx.fxml']
}

gluonClient {
    reflectionList = ['org.dman.Controller' ,'javafx.scene.control.MenuButton', 'javafx.scene.control.MenuItem', 'javafx.scene.control.TextField', 'javafx.scene.control.TextArea']
}

mainClassName = 'TradingRobot/org.dman.Main'

dependencies {
    implementation 'org.openjfx:javafx-controls:15.0.1'
    implementation 'org.openjfx:javafx-fxml:15.0.1'
    implementation 'org.apache.commons:commons-lang3:3.11'
    implementation 'com.alibaba:fastjson:1.2.75'
    implementation 'ch.qos.logback:logback-classic:1.2.3'
    implementation 'com.squareup.okhttp3:okhttp:3.14.9'
    implementation 'commons-codec:commons-codec:1.15'
    implementation 'org.telegram:telegrambots:5.0.1.1'
}

My module-info.java

module TradingRobot {
    requires javafx.base;
    requires javafx.fxml;
    requires javafx.controls;
    requires java.sql;
    requires org.apache.commons.lang3;
    requires fastjson;
    requires okhttp3;
    requires org.apache.commons.codec;
    requires telegrambots;
    requires telegrambots.meta;

    opens org.dman to javafx.fxml;
    exports org.dman;
}

dependencies

+--- org.openjfx:javafx-fxml:15.0.1
|    \--- org.openjfx:javafx-controls:15.0.1
|         \--- org.openjfx:javafx-graphics:15.0.1
|              \--- org.openjfx:javafx-base:15.0.1
+--- org.openjfx:javafx-base:15.0.1
+--- org.openjfx:javafx-controls:15.0.1 (*)
+--- org.openjfx:javafx-graphics:15.0.1 (*)
+--- org.apache.commons:commons-lang3:3.11
+--- com.alibaba:fastjson:1.2.75
+--- ch.qos.logback:logback-classic:1.2.3
|    +--- ch.qos.logback:logback-core:1.2.3
|    \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
+--- com.squareup.okhttp3:okhttp:3.14.9
|    \--- com.squareup.okio:okio:1.17.2
+--- commons-codec:commons-codec:1.15
\--- org.telegram:telegrambots:5.0.1.1
     +--- org.telegram:telegrambots-meta:5.0.1.1
     |    +--- com.fasterxml.jackson.core:jackson-databind:2.11.3
     |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.11.3
     |    |    \--- com.fasterxml.jackson.core:jackson-core:2.11.3
     |    +--- com.fasterxml.jackson.core:jackson-annotations:2.11.3
     |    +--- com.google.guava:guava:30.0-jre
     |    |    +--- com.google.guava:failureaccess:1.0.1
     |    |    +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
     |    |    +--- com.google.code.findbugs:jsr305:3.0.2
     |    |    +--- org.checkerframework:checker-qual:3.5.0
     |    |    +--- com.google.errorprone:error_prone_annotations:2.3.4
     |    |    \--- com.google.j2objc:j2objc-annotations:1.3
     |    +--- org.json:json:20180813
     |    \--- org.slf4j:slf4j-api:1.7.30
     +--- com.fasterxml.jackson.core:jackson-annotations:2.11.3
     +--- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.11.3
     |    +--- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.11.3
     |    |    +--- com.fasterxml.jackson.core:jackson-core:2.11.3
     |    |    \--- com.fasterxml.jackson.core:jackson-databind:2.11.3 (*)
     |    \--- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.11.3
     |         +--- com.fasterxml.jackson.core:jackson-annotations:2.11.3
     |         +--- com.fasterxml.jackson.core:jackson-core:2.11.3
     |         +--- com.fasterxml.jackson.core:jackson-databind:2.11.3 (*)
     |         +--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.2
     |         |    \--- jakarta.activation:jakarta.activation-api:1.2.1
     |         \--- jakarta.activation:jakarta.activation-api:1.2.1
     +--- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.11.3 (*)
     +--- com.fasterxml.jackson.core:jackson-databind:2.11.3 (*)
     +--- org.glassfish.jersey.inject:jersey-hk2:2.32
     |    +--- org.glassfish.jersey.core:jersey-common:2.32
     |    |    +--- jakarta.ws.rs:jakarta.ws.rs-api:2.1.6
     |    |    +--- jakarta.annotation:jakarta.annotation-api:1.3.5
     |    |    +--- org.glassfish.hk2.external:jakarta.inject:2.6.1
     |    |    \--- org.glassfish.hk2:osgi-resource-locator:1.0.3
     |    +--- org.glassfish.hk2:hk2-locator:2.6.1
     |    |    +--- org.glassfish.hk2.external:jakarta.inject:2.6.1
     |    |    +--- org.glassfish.hk2.external:aopalliance-repackaged:2.6.1
     |    |    +--- org.glassfish.hk2:hk2-api:2.6.1
     |    |    |    +--- org.glassfish.hk2.external:jakarta.inject:2.6.1
     |    |    |    +--- org.glassfish.hk2:hk2-utils:2.6.1
     |    |    |    |    \--- org.glassfish.hk2.external:jakarta.inject:2.6.1
     |    |    |    \--- org.glassfish.hk2.external:aopalliance-repackaged:2.6.1
     |    |    \--- org.glassfish.hk2:hk2-utils:2.6.1 (*)
     |    \--- org.javassist:javassist:3.25.0-GA
     +--- org.glassfish.jersey.media:jersey-media-json-jackson:2.32
     |    +--- org.glassfish.jersey.core:jersey-common:2.32 (*)
     |    +--- org.glassfish.jersey.ext:jersey-entity-filtering:2.32
     |    |    \--- jakarta.ws.rs:jakarta.ws.rs-api:2.1.6
     |    +--- com.fasterxml.jackson.core:jackson-annotations:2.10.1 -> 2.11.3
     |    +--- com.fasterxml.jackson.core:jackson-databind:2.10.1 -> 2.11.3 (*)
     |    \--- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.10.1 -> 2.11.3 (*)
     +--- org.glassfish.jersey.containers:jersey-container-grizzly2-http:2.32
     |    +--- org.glassfish.hk2.external:jakarta.inject:2.6.1
     |    +--- org.glassfish.grizzly:grizzly-http-server:2.4.4
     |    |    \--- org.glassfish.grizzly:grizzly-http:2.4.4
     |    |         \--- org.glassfish.grizzly:grizzly-framework:2.4.4
     |    +--- org.glassfish.jersey.core:jersey-common:2.32 (*)
     |    +--- org.glassfish.jersey.core:jersey-server:2.32
     |    |    +--- org.glassfish.jersey.core:jersey-common:2.32 (*)
     |    |    +--- org.glassfish.jersey.core:jersey-client:2.32
     |    |    |    +--- jakarta.ws.rs:jakarta.ws.rs-api:2.1.6
     |    |    |    +--- org.glassfish.jersey.core:jersey-common:2.32 (*)
     |    |    |    \--- org.glassfish.hk2.external:jakarta.inject:2.6.1
     |    |    +--- jakarta.ws.rs:jakarta.ws.rs-api:2.1.6
     |    |    +--- org.glassfish.jersey.media:jersey-media-jaxb:2.32
     |    |    |    +--- org.glassfish.jersey.core:jersey-common:2.32 (*)
     |    |    |    +--- org.glassfish.hk2.external:jakarta.inject:2.6.1
     |    |    |    \--- org.glassfish.hk2:osgi-resource-locator:1.0.3
     |    |    +--- jakarta.annotation:jakarta.annotation-api:1.3.5
     |    |    +--- org.glassfish.hk2.external:jakarta.inject:2.6.1
     |    |    \--- jakarta.validation:jakarta.validation-api:2.0.2
     |    \--- jakarta.ws.rs:jakarta.ws.rs-api:2.1.6
     +--- org.glassfish.jersey.core:jersey-server:2.32 (*)
     +--- org.json:json:20180813
     +--- org.apache.httpcomponents:httpclient:4.5.13
     |    +--- org.apache.httpcomponents:httpcore:4.4.13
     |    +--- commons-logging:commons-logging:1.2
     |    \--- commons-codec:commons-codec:1.11 -> 1.15
     +--- org.apache.httpcomponents:httpmime:4.5.13
     |    \--- org.apache.httpcomponents:httpclient:4.5.13 (*)
     +--- commons-io:commons-io:2.8.0
     \--- org.slf4j:slf4j-api:1.7.30
kosik commented 3 years ago

I am using maven. It seems the same issue. Lead to following cause at stacktrace:

Caused by: java.lang.AbstractMethodError: Receiver class org.hibernate.validator.internal.engine.ConfigurationImpl does not define or inherit an implementation of the resolved method 'abstract javax.validation.ParameterNameProvider getDefaultParameterNameProvider()' of interface javax.validation.Configuration.

rubenlagus commented 3 years ago

In the dependency tree, I don't see any dependency of javax.validation, from where is it picking it up?

dman-sol commented 3 years ago

I haven't been able to solve this, so I'm using a different library. I'm sorry I didn't close the subject.

carmel4a commented 2 years ago

Sadly, I have the same issue. Any ideas?