关于cxf报:Cannot create URL for this address soap.udp://239.255.255.250:3702的原因
最近研究cxf的webservice,遇到了一个问题就是在tomcat下可以发布,但是移到weblogic上就报错:
?
严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'checkCode': Invocation of init method failed; nested exception is javax.
xml.ws.WebServiceException: java.lang.IllegalArgumentException: Cannot create UR
L for this address soap.udp://239.255.255.250:3702
??????? at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1422)
??????? at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
??????? at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:455)
??????? at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:293)
??????? at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:222)
??????? at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:290)
??????? at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:192)
??????? at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:585)
??????? at org.springframework.context.support.AbstractApplicationContext.finish
BeanFactoryInitialization(AbstractApplicationContext.java:895)
??????? at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:425)
??????? at org.springframework.web.context.ContextLoader.createWebApplicationCon
text(ContextLoader.java:282)
??????? at org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:204)
??????? at org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:47)
??????? at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run
(EventsManager.java:465)
??????? at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
??????? at weblogic.security.service.SecurityManager.runAs(Unknown Source)
??????? at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(Eve
ntsManager.java:175)
??????? at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
pServletContext.java:1784)
??????? at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletCon
text.java:2999)
??????? at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.jav
a:1371)
??????? at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
??????? at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
teDriver.java:204)
??????? at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:37)
??????? at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
eDriver.java:60)
??????? at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedMod
uleDriver.java:200)
??????? at weblogic.application.internal.flow.ModuleListenerInvoker.start(Module
ListenerInvoker.java:117)
??????? at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
teDriver.java:204)
??????? at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:37)
??????? at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
eDriver.java:60)
??????? at weblogic.application.internal.flow.StartModulesFlow.activate(StartMod
ulesFlow.java:27)
??????? at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.ja
va:635)
??????? at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
river.java:37)
??????? at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.
java:212)
??????? at weblogic.application.internal.SingleModuleDeployment.activate(SingleM
oduleDeployment.java:16)
??????? at weblogic.application.internal.DeploymentStateChecker.activate(Deploym
entStateChecker.java:162)
??????? at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(Ap
pContainerInvoker.java:79)
??????? at weblogic.deploy.internal.targetserver.operations.AbstractOperation.ac
tivate(AbstractOperation.java:569)
??????? at weblogic.deploy.internal.targetserver.operations.ActivateOperation.ac
tivateDeployment(ActivateOperation.java:140)
??????? at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do
Commit(ActivateOperation.java:106)
??????? at weblogic.deploy.internal.targetserver.operations.StartOperation.doCom
mit(StartOperation.java:143)
??????? at weblogic.deploy.internal.targetserver.operations.AbstractOperation.co
mmit(AbstractOperation.java:323)
??????? at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym
entCommit(DeploymentManager.java:820)
??????? at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeplo
ymentList(DeploymentManager.java:1227)
??????? at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(
DeploymentManager.java:436)
??????? at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.com
mit(DeploymentServiceDispatcher.java:163)
??????? at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
ackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
??????? at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
ackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
??????? at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
ackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
??????? at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin
gWorkManagerImpl.java:516)
??????? at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
??????? at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: javax.xml.ws.WebServiceException: java.lang.IllegalArgumentException:
?Cannot create URL for this address soap.udp://239.255.255.250:3702
??????? at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:369)
??????? at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
??????? at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:537)
??????? at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
??????? at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
?
?
????? 百度了一圈只有提问的,没有解答的,经过一天的时间研究了这个问题,终于让我找到问题所在了,我用的是cxf官方的最新jar包,版本是2.7.6,这个版本有问题啊,tomcat上没事,weblogic就报如上错误,经过各种实验,我同样一个web工程,把lib下的jar全部换成2.6.1版本的时候,奇迹出现了,weblogic能启动成功了,而且wsdl发布成功!!!不知道2.7.6这个版本为啥会有这样的问题,但是低版本就不存在,而且官方也没有给出解释,目前只能这样解决问题了。
??????? 我百度的时候只搜到问题,没有解答者,那个无助啊,所以博客分享一下吧