JavaSE 8 includes package java.xml.soap.
JavaSE 9 moved package javax.xml.soap to the module java.xml.ws.
Modules shared with JEE (like java.xml.ws) are included in JavaSE 9, but are
deprecated for removal from a future version of JavaSE, and
not on the default module path.

A quick workaround is to either
- run the jar with JRE 8: $MY_JRE8_HOME/bin/java -jar my.jar, or
- add a module for JRE 9: java --add-modules java.xml.ws -jar my.jar

Longer term, JavaSE projects that use modules like java.xml.ws must explicitly include the module like other libraries.

See https://stackoverflow.com/a/46359097
See JDK 9 Migration Guide: Modules Shared with JEE Not Resolved by Default

(Reproduced NoClassDefError and workarounds with zipped SOAP web service project at https://spring.io/guides/gs/producing-web-service/)

译文:

JavaSE 8包含包java.xml.soap
JavaSE 9将包移动javax.xml.soap到模块java.xml.ws
与JEE(如共享的模块java.xml.ws)包括在JavaSE的9,但
弃用用于去除从JavaSE中的未来版本,以及
不是默认模块路径上

一个快速的解决方法是
- 使用JRE 8运行jar:$MY_JRE8_HOME/bin/java -jar my.jar
- 为JRE 9添加模块:java --add-modules java.xml.ws -jar my.jar

从长远来看,使用类似模块的JavaSE项目java.xml.ws必须像其他库一样明确地包含模块。

请参阅https://stackoverflow.com/a/46359097
请参阅JDK 9迁移指南:与JEE共享的模块默认情况下未解析

(在https://spring.io/guides/gs/producing-web-service/上重现了NoClassDefError和压缩SOAP Web服务项目的变通方法)

 

nested exception is java.lang.NoClassDefFoundError: javax/xml/soap/SOAPElement的更多相关文章

  1. Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/jms/JMSContext

    参考链接 : https://blog.csdn.net/angus_Lucky/article/details/82811946?utm_source=blogxgwz7 org.springfra ...

  2. Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config解决

    出现这个问题往往伴随  HTTP-500错误 报错信息: HTTP Status - Handler processing failed; nested exception is java.lang. ...

  3. HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

    今天在用idea搭建spring mvc时候报了这个错误,缺少jstl的依赖包.由于是使用的spring-core的依赖,而spring-core里面是有jstl的.这就郁闷了,最后是在自己的pom. ...

  4. applicationContext-common.xml]; nested exception is java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal

    14:59:16,747 ERROR ContextLoader:350 - Context initialization failedorg.springframework.beans.factor ...

  5. could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException

    © 版权声明:本文为博主原创文章,转载请注明出处 1.问题描述 搭建SSH框架启动报错如下: 六月 07, 2017 2:34:34 下午 org.springframework.web.contex ...

  6. Java AOP nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice || Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0' 两个异常解决办法

    贴出applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans ...

  7. Spring系列: 使用aop报错:nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$Refle

    写了个最简单的aop例子 配置文件如下 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns ...

  8. jni 类初始化失败(nested exception is java.lang.NoClassDefFoundError)

    nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.netease.facedetec ...

  9. Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/util/PatternMatchUtils

    { "message": "Handler dispatch failed; nested exception is java.lang.NoClassDefFoundE ...

随机推荐

  1. Java 从入门到进阶之路(二)

    之前的文章我们介绍了一下用 IDEA 编辑器创建一个 Java 项目并输出 HelloWorld,本章我们来看一下 Java 中的变量和基本数据类型. 在这之前我们先来看一下 Java 中的关键字,这 ...

  2. CentOS 7 中配置Firewall规则

    1. 防火墙简介 动态防火墙后台程序 firewalld 提供了一个 动态管理的防火墙,用以支持网络 “zones” ,以分配对一个网络及其相关链接和界面一定程度的信任.它具备对 IPv4和 IPv6 ...

  3. springboot的异步调用

    package com.handsight.platform.fras.aapp; import java.util.Locale; import org.slf4j.Logger; import o ...

  4. python实例:利用jieba库,分析统计金庸名著《倚天屠龙记》中人物名出现次数并排序

    本实例主要用到python的jieba库 首先当然是安装pip install jieba 这里比较关键的是如下几个步骤: 加载文本,分析文本 txt=open("C:\\Users\\Be ...

  5. (三十五)c#Winform自定义控件-下拉框

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...

  6. 初识JAVA语言

    推荐阅读:  我的CSDN  我的博客园  QQ群:704621321 前言        很多游戏开发者可能会有疑问,你会C#,JS,TS,为什么还要初识JAVA呢?有人可能会说,多学点对自己有好处 ...

  7. Leetcode之深度优先搜索(DFS)专题-200. 岛屿数量(Number of Islands)

    Leetcode之深度优先搜索(DFS)专题-200. 岛屿数量(Number of Islands) 深度优先搜索的解题详细介绍,点击 给定一个由 '1'(陆地)和 '0'(水)组成的的二维网格,计 ...

  8. 模板列传值到子窗体中,子窗体中多选gridview中checkbox保存数据多项到数据库中

    <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> &l ...

  9. CentOS 源码安装MySQL5.7

    一.安装方式源码安装,源码包名称mysql-boost-5.7.27.tar.gz,此版本包含boost库,在解压后的boost路径下.安装时,可以-DDOWNLOAD_BOOST=1 -DWITH_ ...

  10. 特殊字符处理 java-jsp

    public String dealStr(String name){ String newStr=""; if(name != null && name.leng ...