I am trying to make a Java 11 project using Gradle, JavaFX and Hibernate. After adding Hibernate dependency i encountered a problem described in this post
How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9
Although I fixed the problem described in this post another problem occured:
Error occurred during initialization of boot layer
java.lang.module.ResolutionException: Modules stax.api and java.xml export package javax.xml.stream to module javafx.baseEmpty
This problem only appears when I am running poject using Gradle, when I run it directly from Intellij wverything is working fine.
Those are dependencies which I use:
dependencies {
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.13'
compile group: 'org.hibernate', name: 'hibernate-core', version: '5.3.6.Final'
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.2.4'
compile group: 'com.sun.xml.bind', name: 'jaxb-core', version: '2.3.0.1'
compile group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.1'
compile 'com.sun.activation:javax.activation:1.2.0'
}
Thanks for any help!