nested exception is java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory

spring boot +maven 本地启动访问正常,打包部署一直报错:

27-May-2019 14:38:11.686 严重 [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'signEnterpriseController': Unsatisfied dependency expressed through field 'signEnterpriseService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'signEnterpriseService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'signInterService' defined in file [/xx/webapps/ROOT/WEB-INF/classes/xx/SignInterService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.ty.xsjr.front.modular.front.service.SignInterService]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'signInterService' defined in file [/xx/webapps/ROOT/WEB-INF/classes/xx/SignInterService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.ty.xsjr.front.modular.front.service.SignInterService]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1270)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1164)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:525)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:630)
	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:180)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:321)
	... 43 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.ty.xsjr.front.modular.front.service.SignInterService]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:184)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1262)
	... 56 more
Caused by: java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
at esign.utils.httppool.HttpPool.e(HttpPool.java:317)
	at esign.utils.httppool.HttpPool.a(HttpPool.java:221)
	at esign.utils.httppool.HttpPool.a(HttpPool.java:133)
	at esign.utils.httpclient.f.a(HttpUtil.java:554)
	at esign.utils.httpclient.f.a(HttpUtil.java:526)
	at esign.utils.httpclient.f.a(HttpUtil.java:520)
	at esign.utils.httpclient.f.a(HttpUtil.java:230)
	at esign.utils.modeladapter.impl.rpc.a.a(ProjectUrlsRpc.java:34)
	at com.timevale.esign.sdk.tech.v3.client.d.i(V2ServiceClient.java:51)
	at com.timevale.esign.sdk.tech.v3.client.d.d(V2ServiceClient.java:28)
	at com.timevale.esign.sdk.tech.v3.client.a.i(AbstractServiceClient.java:113)
	at com.timevale.esign.sdk.tech.v3.client.a.a(AbstractServiceClient.java:106)
	at com.timevale.esign.sdk.tech.v3.client.a.<init>(AbstractServiceClient.java:97)
	at com.timevale.esign.sdk.tech.v3.client.d.<init>(V2ServiceClient.java:36)
	at com.timevale.esign.sdk.tech.v3.client.ServiceClientManager.createVersionClient(ServiceClientManager.java:138)
	at com.timevale.esign.sdk.tech.v3.client.ServiceClientManager.registVersionClient(ServiceClientManager.java:113)
	at com.timevale.esign.sdk.tech.v3.client.ServiceClientManager.registClient(ServiceClientManager.java:56)
	at com.ty.xsjr.front.modular.front.signcore.InitClientHelper.doRegistClient(InitClientHelper.java:69)
	at com.ty.xsjr.front.modular.front.service.SignInterService.<init>(SignInterService.java:54)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172)

看到最后的httpclient,想到会不会是包冲突,打开/web-inf/lib 果然2个版本的http-client在那躺着呢,果断删掉一个,正常启动了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值