Gradle 5.2.1 java 11 does not have javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

Using jaxwx/jaxb with gradle 5.2.1 and java11. Everthing builds but in runtime I get this exception.
I have replaced compile with the new implementation and testCompile with testImplementation in my gradle files.

2019-02-21 13:29:42,879 INFO localhost-startStop-1 - [EVENT UNSPECIFIED null -> /Frameworks/org.quartz.core.QuartzScheduler] JobFactory set to: org.springframework.scheduling.quartz.AdaptableJobFactory@68987b87
2019-02-21 13:29:43,423 WARN localhost-startStop-1 - [EVENT UNSPECIFIED null -> /Frameworks/org.springframework.web.context.support.XmlWebApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘clientServiceServer’: Cannot resolve reference to bean ‘xmlProvider’ while setting bean property ‘providers’ with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘xmlProvider’ defined in class path resource [rest-beans.xml]: Instantiation of bean failed; nested exception is java.lang.InternalError:
Error occured while invoking reflection on target classes. Make sure all referenced classes are on classpath: interface javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
Exception: null
2019-02-21 13:29:43,425 INFO localhost-startStop-1 - [EVENT UNSPECIFIED null -> /Frameworks/org.springframework.scheduling.quartz.SchedulerFactoryBean] Shutting down Quartz Scheduler
2019-02-21 13:29:43,425 INFO localhost-startStop-1 - [EVENT UNSPECIFIED null -> /Frameworks/org.quartz.core.QuartzScheduler] Scheduler org.springframework.scheduling.quartz.SchedulerFactoryBean#0__NON_CLUSTERED shutting down. 2019-02-21 13:29:43,425 INFO localhost-startStop-1 - [EVENT UNSPECIFIED null -> /Frameworks/org.quartz.core.QuartzScheduler] Scheduler org.springframework.scheduling.quartz.SchedulerFactoryBean#0_NON_CLUSTERED paused.
2019-02-21 13:29:43,852 INFO localhost-startStop-1 - [EVENT UNSPECIFIED null -> /Frameworks/org.quartz.core.QuartzScheduler] Scheduler org.springframework.scheduling.quartz.SchedulerFactoryBean#0
$_NON_CLUSTERED shutdown complete.
2019-02-21 13:29:43,860 INFO localhost-startStop-1 - [EVENT UNSPECIFIED null -> /Frameworks/org.mongodb.driver.connection] Closed connection [connectionId{localValue:3, serverValue:31}] to localhost:27017 because the pool has been closed.
2019-02-21 13:29:43,878 ERROR localhost-startStop-1 - [EVENT UNSPECIFIED null -> /Frameworks/org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘clientServiceServer’: Cannot resolve reference to bean ‘xmlProvider’ while setting bean property ‘providers’ with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘xmlProvider’ defined in class path resource [rest-beans.xml]: Instantiation of bean failed; nested exception is java.lang.InternalError:
Error occured while invoking reflection on target classes. Make sure all referenced classes are on classpath: interface javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
Exception: null
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:378)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:401)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:159)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1648)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1400)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4900)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5363)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:973)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘xmlProvider’ defined in class path resource [rest-beans.xml]: Instantiation of bean failed; nested exception is java.lang.InternalError:
Error occured while invoking reflection on target classes. Make sure all referenced classes are on classpath: interface javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
Exception: null

i too getting similar error with Gradle 5.4.1 … any help will be really appreciated

Certain classes were removed from more recent Java runtime libraries (e.g. 9) and now need to be explicitly included as external libraries. See https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j for more details.