Java 11: Implementation of JAXB-API has not been found on module path or classpath

筅森魡賤 提交于 2019-12-05 17:10:43

The solution is very easy. First, use jaxb 2.3.1. The beta-stuff is for testing only. The real problem was the module-info.java. It is required to have 2 entries for jaxb:

requires java.xml.bind;
requires com.sun.xml.bind;

The first requires defines the implementation, the second the API.

The only two dependencies required are:

compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.3.1'

Removed maven-dependency com.sun.xml.bind from my external library which is not modular and a lot of errors like the unnamed module reads package com.sun.xml.bind.util has gone.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!