Springcloud 与fastjson 1.2.21遇到一个坑

~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration$$EnhancerBySpringCGLIB$$7bd66fd9.eurekaClient() ~[spring-cloud-netflix-eureka-client-1.1.5.RELEASE.jar:1.1.5.RELEASE]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    ... 30 common frames omitted
Caused by: java.lang.RuntimeException: Cannot create Jersey client 
    at com.netflix.discovery.shared.transport.jersey.EurekaJerseyClientImpl$EurekaJerseyClientBuilder.build(EurekaJerseyClientImpl.java:170) ~[eureka-client-1.4.10.jar:1.4.10]
    at com.netflix.discovery.shared.transport.jersey.JerseyEurekaHttpClientFactory$JerseyEurekaHttpClientFactoryBuilder.buildLegacy(JerseyEurekaHttpClientFactory.java:205) ~[eureka-client-1.4.10.jar:1.4.10]
    at com.netflix.discovery.shared.transport.jersey.JerseyEurekaHttpClientFactory$JerseyEurekaHttpClientFactoryBuilder.build(JerseyEurekaHttpClientFactory.java:186) ~[eureka-client-1.4.10.jar:1.4.10]
    at com.netflix.discovery.shared.transport.jersey.JerseyEurekaHttpClientFactory.create(JerseyEurekaHttpClientFactory.java:143) ~[eureka-client-1.4.10.jar:1.4.10]
    at com.netflix.discovery.shared.transport.jersey.TransportClientFactories.newTransportClientFactory(TransportClientFactories.java:49) ~[eureka-client-1.4.10.jar:1.4.10]
    at com.netflix.discovery.DiscoveryClient.scheduleServerEndpointTask(DiscoveryClient.java:477) ~[eureka-client-1.4.10.jar:1.4.10]
    at com.netflix.discovery.DiscoveryClient.(DiscoveryClient.java:428) ~[eureka-client-1.4.10.jar:1.4.10]
    ... 43 common frames omitted
Caused by: java.lang.RuntimeException: Cannot create Jersey client
    at com.netflix.discovery.shared.transport.jersey.EurekaJerseyClientImpl.(EurekaJerseyClientImpl.java:56) ~[eureka-client-1.4.10.jar:1.4.10]
    at com.netflix.discovery.shared.transport.jersey.EurekaJerseyClientImpl$EurekaJerseyClientBuilder.build(EurekaJerseyClientImpl.java:168) ~[eureka-client-1.4.10.jar:1.4.10]
    ... 49 common frames omitted
Caused by: com.sun.jersey.spi.inject.Errors$ErrorMessagesException: null
    at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170) ~[jersey-core-1.19.1.jar:1.19.1]
    at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:136) ~[jersey-core-1.19.1.jar:1.19.1]
    at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:199) ~[jersey-core-1.19.1.jar:1.19.1]
    at com.sun.jersey.api.client.Client.(Client.java:188) ~[jersey-client-1.19.1.jar:1.19.1]
    at com.sun.jersey.client.apache4.ApacheHttpClient4.(ApacheHttpClient4.java:151) ~[jersey-apache-client4-1.19.1.jar:1.19.1]
    at com.sun.jersey.client.apache4.ApacheHttpClient4.(ApacheHttpClient4.java:137) ~[jersey-apache-client4-1.19.1.jar:1.19.1]
    at com.sun.jersey.client.apache4.ApacheHttpClient4.create(ApacheHttpClient4.java:181) ~[jersey-apache-client4-1.19.1.jar:1.19.1]
    at com.netflix.discovery.shared.transport.jersey.EurekaJerseyClientImpl.(EurekaJerseyClientImpl.java:48) ~[eureka-client-1.4.10.jar:1.4.10]
    ... 50 common frames omitted
 

发现fastjson版本和Jersey有冲突了

相关:

https://blog.csdn.net/fengyao1995/article/details/79598388

https://github.com/alibaba/fastjson/issues/1392

 

你可能感兴趣的:(java)