zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    BAT系列(一)— CNN
    图像处理基本知识总结(一)
    机器学习(二十一)— 特征工程、特征选择、归一化方法
    C++(三)— 二维容器
    代码题(19)— 组合与排列
    代码题(18)— 子集
    机器学习(二十)— 常见统计学习方法总结(一)
    【angularjs】使用angular搭建项目,获取dom元素
    【css】常用css
    【angularjs】使用angular搭建项目,图片懒加载资料
  • 原文地址:https://www.cnblogs.com/XM-CHC/p/8920454.html
Copyright © 2011-2022 走看看