wsdl2java icon indicating copy to clipboard operation
wsdl2java copied to clipboard

IllegalAccessError with complex builds

Open komarovd95 opened this issue 7 years ago • 2 comments

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?

komarovd95 avatar Dec 27 '17 18:12 komarovd95

Same here. Any updates on how to workaround this?

okutane avatar Apr 16 '18 11:04 okutane

@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'
  }
}

ipvolynkin avatar May 17 '18 21:05 ipvolynkin