IllegalAccessError with complex builds
komarovd95 opened this issue · comments
Dmitrii Komarov commented
When i try to generate java from wsdl in my build cycle i got this error
java.lang.IllegalAccessError: tried to access class com.sun.xml.bind.v2.Messages from class com.sun.xml.bind.v2.util.XmlFactory
It can be caused by using your own classloader in plugin. Do you really think that you need additional classloader? Maybe you can provide setting for turning off setup of URLClassLoader?
Dmitry Matveev commented
Same here. Any updates on how to workaround this?
ipvolynkin commented
@okutane
This helps:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.sun.xml.bind:jaxb-core:2.3.0'
classpath 'com.sun.xml.bind:jaxb-xjc:2.3.0'
classpath 'com.sun.xml.bind:jaxb-impl:2.3.0'
classpath 'javax.xml.bind:jaxb-api:2.3.0'
}
}