spring boot 集成axis1.4 java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient
pom配置:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency> <!-- 自定义节点 --> <dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency> <dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.3</version>
</dependency> <dependency>
<groupId>javax.xml.rpc</groupId>
<artifactId>javax.xml.rpc-api</artifactId>
<version>1.1.2</version>
</dependency> <dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.5</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency> <dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.41</version>
</dependency> <dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.1</version>
</dependency> <dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>runtime</scope>
</dependency> <dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
</dependency> <dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.7.0</version>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!-- 移除嵌入式tomcat插件 -->
<!-- <exclusions> <exclusion> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> --> </dependency> </dependencies>
一调用以下代码就报错:
Service service = new Service();
Call call = (Call) service.createCall();
解决方法:
1,commons-discovery依赖commons-logging,所以我们把commons-logging依赖去掉就能正常使用了。
2,引入commons-logging
spring boot 集成axis1.4 java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient的更多相关文章
- 解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level
解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level 学习了:https://blog.csdn. ...
- Spark-HBase集成错误之 java.lang.NoClassDefFoundError: org/htrace/Trace
在进行Spark与HBase 集成的过程中遇到以下问题: java.lang.IllegalArgumentException: Error while instantiating 'org.apac ...
- 异常:Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.log4jdbc.Properties
参考文章: 使用Log4jdbc-log4j2监听MyBatis中运行的SQL和Connection 使用 log4jdbc格式化输出SQL,maven配置如下: <dependency> ...
- 异常-----java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.core.KeyFactory
SSH 类库问题 java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer2009- ...
- java.lang.NoClassDefFoundError: Could not initialize class xxx 原因
一.问题及原因 程序里有个工具类,主要是调用它的静态方法来发送mq. 调用场景如下: 结果这两天报了个错: java.lang.NoClassDefFoundError: Could not init ...
- 日志异常:java.lang.NoClassDefFoundError: Could not initialize class org.slf4j.impl.StaticLoggerBinder
今天启动开发的项目,碰到了一个日志上的bug:java.lang.NoClassDefFoundError: Could not initialize class org.slf4j.impl.Sta ...
- java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment问题解决
2018-09-29 17:45:16.905 ERROR [pool-1-thread-1]o.s.scheduling.support.TaskUtils$LoggingErrorHandler. ...
- Java 上传文件到 SFTP 抛异常 java.lang.NoClassDefFoundError: Could not initialize class sun.security.ec.SunEC 的解决办法
最近从 Op 那里报来一个问题,说是SFTP上传文件不成功.拿到的 Exception 如下: Caused by: java.lang.NoClassDefFoundError: Could not ...
- java.lang.NoClassDefFoundError: Could not initialize class net.sf.json.util.JSONUtils
页面报错: root: java.lang.NoClassDefFoundError: Could not initialize class net.sf.json.util.JSONUtils 出错 ...
随机推荐
- Codeforces Round #534 (Div. 1)
A 构造题 有一个44的方格 每次放入一个横向12或竖向2*1的方格 满了一行或一列就会消掉 求方案 不放最后一行 这样竖行就不会消 然后竖着的放前两行 横着的放第三行 循环放就可以啦 #includ ...
- python3 while-else和for-else语法
while-else: while判断条件不成立时,执行else语句: 语法: while 判断条件: 语句1.... else: 语句2.... i初始值为2,i>0成立,则执行while语句 ...
- 在不同DPI屏幕环境下,让图标显示的尺寸保持不变,使用 LoadImage() 加载图标
之前写过的一个客户端程序中,需要在状态栏上显示图标: 我当时使用的是:HICON LoadIcon(HINSTANCE hInstance, LPCTSTR lpIconName); 在DPI:125 ...
- windows下网络编程UDP
转载 C++ UDP客户端服务器Socket编程 UDPServer.cpp #include<winsock2.h>#include<stdio.h>#include< ...
- ZooKeeper-API 监听
以服务动态上下线通知为例 Client 监听服务器状态 public class DistributeClient { private String connectString = "127 ...
- hadoop记录-hadoop常用
1.hdfs目录配额 #设置配额目录hdfs dfsadmin -setSpaceQuota 10T /user/hive/warehouser/tmp查看配额目录信息hdfs dfs -count ...
- 将图片转为base64
DEMO: <input type="file" id="file" multiple="multiple"> <div ...
- element ui change 传递带自定义参数
@change="((val)=>{changeStatus(val, index)})" https://www.cnblogs.com/mmzuo-798/p/10438 ...
- manacher最长回文子串
https://www.luogu.org/blog/codesonic/manacheralgorithm 先放上洛谷的链接,毕竟讲的真好 两道例题 luogu4555 SP7586 inline ...
- jpa Auditor 自动赋值与自定义 @CreatedBy @LastModifiedBy @CreatedDate @LastModifiedDate
在spring jpa audit 中,在字段或者方法上使用注解@CreatedDate.@CreatedBy.@LastModifiedDate.@LastModifiedBy,当进行实体插入或者更 ...