Spring Boot integrated axis1.4 java.lang.NoClassDefFoundError:Could not initialize class Org.apache.axis.client.AxisClient

Source: Internet
Author: User

POM Configuration:

<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><!--Custom Node--><dependency> <groupid>org.apache.axis </groupId> <artifactId>axis</artifactId> <version>1.4</version></dependency> <dependency> <groupId>wsdl4j</groupId> <artifactId>wsdl4j</artifactId> <version& Gt;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>comm ons-logging</groupid> <artifactId>commons-logging</artifactId> </exclusion> </exclusio Ns></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><!--Remove embedded Tomcat plugin--><!--< exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId> spring-boot-starter-tomcat</artifactid> </exclusion> </exclusions>--></dependency> </dependencies>

  

Call the following code to get an error:

Service service = new service ();
Call Call Service.createcall ();

Workaround:

1,commons-discovery relies on commons-logging, so we can use it if we remove the commons-logging dependency.

2, introduction of commons-logging

Spring Boot integrated axis1.4 java.lang.NoClassDefFoundError:Could not initialize class Org.apache.axis.client.AxisClient

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.