nilsmagnus / wsdl2java

Gradle plugin for generating java source from wsdl files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IllegalAccessError with complex builds

komarovd95 opened this issue · 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?

Same here. Any updates on how to workaround this?

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