NoClassDefFoundError: Could not initialize class org.apache.cxf.jaxrs.provider.ProviderFactory org.springframework.aop.support.AopUtils.isCglibProxyClass
报错:
2018-05-03 10:35:20 377 ERROR org.apache.juli.logging.DirectJDKLog.log:181 - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.apache.cxf.jaxrs.provider.ProviderFactory] with root cause
java.lang.NoClassDefFoundError: Could not initialize class org.apache.cxf.jaxrs.provider.ProviderFactory
at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:324) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.initClient(JAXRSClientFactoryBean.java:313) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWebClient(JAXRSClientFactoryBean.java:188) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
at org.apache.cxf.jaxrs.client.WebClient.create(WebClient.java:139) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
at org.apache.cxf.jaxrs.client.WebClient.create(WebClient.java:112) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
或者
2018-05-03 11:12:02 584 ERROR org.apache.juli.logging.DirectJDKLog.log:181 - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.isCglibProxyClass(Ljava/lang/Class;)Z] with root cause
java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.isCglibProxyClass(Ljava/lang/Class;)Z
at org.apache.cxf.common.util.SpringAopClassHelper.getRealClassInternal(SpringAopClassHelper.java:85) ~[cxf-common-utilities-2.3.11.jar:2.3.11]
at org.apache.cxf.common.util.ClassHelper.getRealClass(ClassHelper.java:55) ~[cxf-common-utilities-2.3.11.jar:2.3.11]
at org.apache.cxf.jaxrs.provider.ProviderFactory.setProviders(ProviderFactory.java:394) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
at org.apache.cxf.jaxrs.provider.ProviderFactory.<clinit>(ProviderFactory.java:72) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:324) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.initClient(JAXRSClientFactoryBean.java:313) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWebClient(JAXRSClientFactoryBean.java:188) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
at org.apache.cxf.jaxrs.client.WebClient.create(WebClient.java:139) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
at org.apache.cxf.jaxrs.client.WebClient.create(WebClient.java:112) ~[cxf-rt-frontend-jaxrs-2.3.11.jar:2.3.11]
原因:
是由spring4.x和cxf2.x的版本不兼容导致的。 在Spring 4.x以上,废弃了setFactoryBean方法,而CXF 2.*采用的是调用Spring的这个方法进行Bean的设置。
解决:将cxf版本换成3.2.4就可以了
NoClassDefFoundError: Could not initialize class org.apache.cxf.jaxrs.provider.ProviderFactory org.springframework.aop.support.AopUtils.isCglibProxyClass的更多相关文章
- cxf之Exception in thread "main" java.lang.NoSuchMethodError: org.apache.cxf.jaxrs.provider.ProviderFactory.<init>(Lorg/apache/cxf/Bus;)V
pom.xml中关于cxf的配置jar包冲突??? 1.http://blog.csdn.net/yzl_8877/article/details/53216923 2.https://www.cnb ...
- cxf之java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.isCglibProxyClass(Ljava/lang/C
想用cxf发布一个web服务,但是容器启动报这个错,求高人解答啊 [问题点数:20分,无满意结帖,结帖人shijing266] 楼主好懒,主要还是jar版本的问题,spring4.2.0以上需要使用c ...
- spring boot 集成axis1.4 java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient
pom配置: <dependencies> <dependency> <groupId>org.springframework.boot</groupId&g ...
- Apache CXF 102 CXF with REST
前言 续上篇Apache CXF 101,摘抄部分REST概念性知识,以运行实例考察CXF对REST的支持. 目录 1 REST简介 2 工具 3 运行实例 内容 本Spike记录中内容,如无特别指出 ...
- Apache CXF实现Web Service(2)——不借助重量级Web容器和Spring实现一个纯的JAX-RS(RESTful) web service
实现目标 http://localhost:9000/rs/roomservice 为入口, http://localhost:9000/rs/roomservice/room为房间列表, http: ...
- Apache CXF 例子
来自:http://www.cnblogs.com/frankliiu-java/articles/1641949.html Apache CXF 是一个开放源代码框架,是在Xfire 跟Celtix ...
- weblogic 12c下jxls导出excel报错Could not initialize class org.apache.poi.xssf.usermodel.XSSFVMLDrawing
周一,开发反馈weblogic 12c下jxls导出excel报错,公司环境和UAT环境均报错,看日志如下: 2016-06-08 09:16:55,825 ERROR org.jxls.util.T ...
- Could not initialize class org.apache.log4j.LogManager 报错
部署项目的时候,在windows下一切正常,但是在centos下就发生如下错误 Caused by: java.lang.ExceptionInInitializerError at com.dsid ...
- hbase报错Could not initialize class org.apache.hadoop.hbase.protobuf.ProtobufUtil
Caused by: java.lang.RuntimeException: java.io.IOException: java.lang.reflect.InvocationTargetExcept ...
随机推荐
- wpf 获取image控件的图片并保存
XMAL代码如下: <Image Name="ImageToSave" Source="Images/pic_bg.png" Grid.RowSpan=& ...
- LINUX用户和用户组操作命令
Id Finger Pwck 检查/etc/passwd配置文件内的信息与实际主文件夹是否存在,还可比较/etc/passwd和/etc/shadow的信息是否一致,另外如果/etc/passwd中的 ...
- No packages marked for update
问题:用yum安装docker,更新yum存储时,报以下错误,导致yum坏了 [root@localhost yum.repos.d]# vi docker.repo [root@localhost ...
- Sightseeing Cows
Sightseeing Cows 给出一张图,点数为L,边数P,并给出边的边权\(\{b_i\}\),再给处每个点的点权,求一条起点和终点相同的路径,并使其点权之和除以边权之和最大,注意,路径中点权只 ...
- 一个简单的SpringBoot入门程序
1. 使用IDEA构建Maven项目 <?xml version="1.0" encoding="UTF-8"?> <project xmln ...
- 廖雪峰Java15JDBC编程-2SQL入门-2insert/select/update/delete
1. INSERT用于向数据库的表中插入1条记录 insert into 表名 (字段1,字段2,...) values (数据1,数据2,数据3...) 示例 -- 如果表存在,就删除 drop t ...
- 回首2018 | 分析型数据库AnalyticDB: 不忘初心 砥砺前行
题记 分析型数据库AnalyticDB(下文简称ADB),是阿里巴巴自主研发.唯一经过超大规模以及核心业务验证的PB级实时数据仓库.截止目前,现有外部支撑客户既包括传统的大中型企业和政府机构,也包括众 ...
- 洛谷P3376【模板】网络最大流 Dinic模板
之前的Dinic模板照着刘汝佳写的vector然后十分鬼畜跑得奇慢无比,虽然别人这样写也没慢多少但是自己的就是令人捉急. 改成邻接表之后快了三倍,虽然还是比较慢但是自己比较满意了.虽然一开始ecnt从 ...
- php curl的隐藏BUG
<?php $a = array( 'a' => 2, 'b' => 3, ); $curl = curl_init(); $b = $a; curl_setopt_array($c ...
- 06_Spring JDBCTemplate
Spring对不同持久化技术的支持 ORM持久化技术 模板类 JDBC org.springframework.jdbc.core.JdbcTemplate Hibernate3.0 org.spri ...