运行我的项目时,我得到的错误是:
Error occurred during initialization of boot layer java.lang.module.FindException: Module java.xml.soap not found, required by java.xml.ws据我所知, java.xml.ws是一个JRE模块而java.xml.soap不是,基于文档中提供的列表。 我开始我的程序的方式是:
java --upgrade-module-path c:/git/projectdir --add-modules java.xml.bind,java.xml.ws,java.xml.ws.annotation -cp c:/git/projectdir/Uservice.jar com.gert.DynamicService "arg1" "arg2" "arg3"当我尝试将java.xml.soap添加到add-modules时,它无法找到该模块。
我的问题是:
java.xml.soap是一个JRE模块吗? 如果java.xml.soap不是JRE模块,为什么java.xml.ws模块依赖于不在JRE中的模块? 在哪里可以找到java.xml.soap模块?我正在使用java 9.0.1
When running my project I get the error that says:
Error occurred during initialization of boot layer java.lang.module.FindException: Module java.xml.soap not found, required by java.xml.wsAs far as I understand java.xml.ws is a JRE module and java.xml.soap is not, based on the list provided in the documentation. The way I start my program is:
java --upgrade-module-path c:/git/projectdir --add-modules java.xml.bind,java.xml.ws,java.xml.ws.annotation -cp c:/git/projectdir/Uservice.jar com.gert.DynamicService "arg1" "arg2" "arg3"When I try to add java.xml.soap to add-modules it cannot find the module.
My question is:
is the java.xml.soap a JRE module? if java.xml.soap isn't a JRE module, why does the java.xml.ws module depend on a module that isn't in the JRE? where to find the java.xml.soap module?I'm using java 9.0.1
最满意答案
java.xml.soap是JRE模块吗?
不,这不是一个平台模块。 运行java --list-modules ,你不会在输出中看到java.xml.soap 。
如果java.xml.soap不是JRE模块,为什么java.xml.ws模块依赖于不在JRE中的模块?
有两个java.xml.ws模块。
第一个是平台模块,它已被弃用(您不应该使用它)。
第二个是独立模块,它作为jaxws-api部署到Maven中心(你应该使用这个模块)。
虽然这两个模块相似,但存在许多差异。 其中一个是独立的java.xml.ws有自己的依赖项。 例如, java.xml.ws依赖于java.xml.soap ,它也被部署到Maven中心(如javax.xml.soap-api )。
在哪里可以找到java.xml.soap模块?
往上看。 你可以在Maven中心找到它。 如果您使用Maven,它应该作为jaxws-api的依赖项自动选取。
我认为,可升级文件夹c:/git/projectdir缺少java.xml.soap 。 您应该从.m2\repository\javax\xml\soap\javax.xml.soap-api复制jar。
Is the java.xml.soap a JRE module?
No, this is a not a platform module. Run java --list-modules and you will not see java.xml.soap in the output.
If java.xml.soap isn't a JRE module, why does the java.xml.ws module depend on a module that isn't in the JRE?
There are two java.xml.ws modules.
The first one is a platform module and it is deprecated (you should not use it).
The second one is a standalone module which is deployed to Maven central as jaxws-api (you should use this module).
While these two modules are similar, there are a number of differences. One of them is that standalone java.xml.ws has its own dependencies. E.g. java.xml.ws depends on java.xml.soap which is deployed to Maven central too (as javax.xml.soap-api).
Where to find the java.xml.soap module?
See above. You can find it in Maven central. If you use Maven, it should be picked up automatically as a dependency of jaxws-api.
I think, java.xml.soap is missing in your upgradeable folder c:/git/projectdir. You should copy the jar from .m2\repository\javax\xml\soap\javax.xml.soap-api.
更多推荐
发布评论