我使用Apache CXF 3.0.0和Spring 4.0.3.RELEASE与jaxws:spring xmls中的客户端标记来创建客户端。当我初始化懒惰"服务"我偶尔会遇到下面粘贴的僵局。不同线程上的豆子。我能找到的唯一信息是here,它说:
Spring发射器和jaxws端点都试图访问 春豆同时映射。到目前为止,我还没有找到解决方案。
有什么想法吗?
Found one Java-level deadlock:
=============================
"Thread-14":
waiting to lock monitor 0x000000001fb0c218 (object 0x0000000704f9f558, a java.util.concurrent.ConcurrentHashMap),
which is held by "Thread-12"
"Thread-12":
waiting to lock monitor 0x00000000240d6d38 (object 0x00000007052ad1b0, a org.apache.cxf.bus.extension.Extension),
which is held by "Thread-14"
Java stack information for the threads listed above:
===================================================
"Thread-14":
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingletonNames(DefaultSingletonBeanRegistry.java:286)
- waiting to lock <0x0000000704f9f558> (a java.util.concurrent.ConcurrentHashMap)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:422)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:354)
at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1057)
at org.apache.cxf.bus.spring.SpringBeanLocator.getBeansOfType(SpringBeanLocator.java:145)
at org.apache.cxf.bus.extension.ExtensionManagerBus.getExtension(ExtensionManagerBus.java:206)
at org.apache.cxf.ws.policy.attachment.AbstractPolicyProvider.setBus(AbstractPolicyProvider.java:60)
at org.apache.cxf.ws.policy.attachment.AbstractPolicyProvider.<init>(AbstractPolicyProvider.java:54)
at org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider.<init>(ServiceModelPolicyProvider.java:35)
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:408)
at org.apache.cxf.bus.extension.Extension.load(Extension.java:208)
at org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(ExtensionManagerImpl.java:202)
- locked <0x00000007052ad1b0> (a org.apache.cxf.bus.extension.Extension)
at org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeansOfType(ExtensionManagerImpl.java:323)
- locked <0x00000007052ad1b0> (a org.apache.cxf.bus.extension.Extension)
at org.apache.cxf.bus.spring.SpringBeanLocator.getBeansOfType(SpringBeanLocator.java:153)
at org.apache.cxf.ws.policy.PolicyEngineImpl.getPolicyProviders(PolicyEngineImpl.java:141)
- locked <0x00000007052be308> (a org.apache.cxf.ws.policy.PolicyEngineImpl)
at org.apache.cxf.ws.policy.PolicyEngineImpl.getAggregatedServicePolicy(PolicyEngineImpl.java:437)
at org.apache.cxf.ws.policy.EndpointPolicyImpl.initializePolicy(EndpointPolicyImpl.java:150)
at org.apache.cxf.ws.policy.EndpointPolicyImpl.initialize(EndpointPolicyImpl.java:139)
at org.apache.cxf.ws.policy.PolicyEngineImpl.createEndpointPolicyInfo(PolicyEngineImpl.java:584)
at org.apache.cxf.ws.policy.PolicyEngineImpl.getEndpointPolicy(PolicyEngineImpl.java:313)
- locked <0x0000000789702418> (a org.apache.cxf.binding.soap.SoapTransportFactory$SoapEndpointInfo)
at org.apache.cxf.ws.policy.PolicyEngineImpl.getClientEndpointPolicy(PolicyEngineImpl.java:294)
at org.apache.cxf.ws.policy.EffectivePolicyImpl.initialisePolicy(EffectivePolicyImpl.java:164)
at org.apache.cxf.ws.policy.EffectivePolicyImpl.initialise(EffectivePolicyImpl.java:95)
at org.apache.cxf.ws.policy.PolicyEngineImpl.getEffectiveClientRequestPolicy(PolicyEngineImpl.java:205)
- locked <0x0000000789702418> (a org.apache.cxf.binding.soap.SoapTransportFactory$SoapEndpointInfo)
at org.apache.cxf.ws.policy.PolicyOutInterceptor.handle(PolicyOutInterceptor.java:98)
at org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:44)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
- locked <0x00000007897acb68> (a org.apache.cxf.phase.PhaseInterceptorChain)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:137)
at com.sun.proxy.$Proxy112.listAllNonCrudEvents(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
at com.sun.proxy.$Proxy22.listAllNonCrudEvents(Unknown Source)
at ....loadItems(EventsController.java:73)
at ...call(AbstractTableViewLoader.java:96)
- locked <0x00000007051bf468> (a ...gui.application.controller.EventsController$1)
at ....AbstractTableViewLoader$1.call(AbstractTableViewLoader.java:91)
at javafx.concurrent.Task$TaskCallable.call(Task.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)
"Thread-12":
at org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeansOfType(ExtensionManagerImpl.java:320)
- waiting to lock <0x00000007052ad1b0> (a org.apache.cxf.bus.extension.Extension)
at org.apache.cxf.bus.spring.SpringBeanLocator.getBeansOfType(SpringBeanLocator.java:153)
at org.apache.cxf.transport.jms.JMSConfigFactory.getTransactionManager(JMSConfigFactory.java:149)
at org.apache.cxf.transport.jms.JMSConfigFactory.createFromEndpoint(JMSConfigFactory.java:90)
at org.apache.cxf.transport.jms.JMSConfigFactory.createFromEndpointInfo(JMSConfigFactory.java:53)
at org.apache.cxf.transport.jms.JMSTransportFactory.getConduit(JMSTransportFactory.java:69)
at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:222)
at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:229)
at org.apache.cxf.endpoint.AbstractConduitSelector.createConduit(AbstractConduitSelector.java:145)
- locked <0x0000000789d9a968> (a org.apache.cxf.jaxws.support.JaxWsEndpointImpl)
at org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:107)
at org.apache.cxf.endpoint.UpfrontConduitSelector.selectConduit(UpfrontConduitSelector.java:77)
at org.apache.cxf.endpoint.ClientImpl.getConduit(ClientImpl.java:845)
at org.apache.cxf.transport.jms.JMSConfigFeature.initialize(JMSConfigFeature.java:48)
at org.apache.cxf.frontend.ClientFactoryBean.applyFeatures(ClientFactoryBean.java:112)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:100)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:157)
- locked <0x000000070556f020> (a org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:142)
- locked <0x000000070556f020> (a org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean)
at org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean.create(JaxWsProxyFactoryBeanDefinitionParser.java:79)
at org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean.getObject(JaxWsProxyFactoryBeanDefinitionParser.java:83)
- locked <0x000000070556f020> (a org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser$JAXWSSpringClientProxyFactoryBean)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:144)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
- locked <0x0000000704f9f558> (a java.util.concurrent.ConcurrentHashMap)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:252)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1017)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:960)
at org.springframework.context.annotation.ContextAnnotationAutowireCandidateResolver$1.getTarget(ContextAnnotationAutowireCandidateResolver.java:82)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:187)
at com.sun.proxy.$Proxy30.listDailyStatistics(Unknown Source)
at ....StatisticsController$1.loadItems(StatisticsController.java:100)
at ....AbstractTableViewLoader$1.call(AbstractTableViewLoader.java:96)
- locked <0x0000000705228170> (a ...StatisticsController$1)
at ....AbstractTableViewLoader$1.call(AbstractTableViewLoader.java:91)
at javafx.concurrent.Task$TaskCallable.call(Task.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)