serviceconstructionexception:未能创建服务

f4t66c6m  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(476)

每次我启动fuse 7.2服务器时,stacktrace都会出现以下错误。

2021-07-09 11:13:23,787 | ERROR |  Event Dispatcher: 1 | o.a.c.b.BlueprintCamelContext    | 58 - org.apache.camel.camel-blueprint - 2.21.0.fuse-720050-redhat-00001 | Error occurred during starting CamelContext: camel-7
org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
    at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:87) ~[?:?]
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:394) ~[?:?]
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:528) ~[?:?]
    at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:263) ~[?:?]
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199) ~[?:?]
    at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:103) ~[?:?]
    at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91) ~[?:?]
    at org.apache.camel.component.cxf.CxfEndpoint.createClient(CxfEndpoint.java:638) ~[?:?]
    at org.apache.camel.component.cxf.CxfProducer.doStart(CxfProducer.java:84) ~[?:?]
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.impl.SynchronousDelegateProducer.start(SynchronousDelegateProducer.java:66) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.impl.DeferServiceStartupListener.onCamelContextStarted(DeferServiceStartupListener.java:49) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3861) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3640) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3492) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:209) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3251) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3247) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3270) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3247) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3163) ~[60:org.apache.camel.camel-core:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:243) ~[58:org.apache.camel.camel-blueprint:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:283) ~[58:org.apache.camel.camel-blueprint:2.21.0.fuse-720050-redhat-00001]
    at org.apache.camel.blueprint.BlueprintCamelContext.blueprintEvent(BlueprintCamelContext.java:177) [58:org.apache.camel.camel-blueprint:2.21.0.fuse-720050-redhat-00001]
    at org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:190) [49:org.apache.aries.blueprint.core:1.9.0]
    at org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:188) [49:org.apache.aries.blueprint.core:1.9.0]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
    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: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://myDomainURL.net/myASMXFile.asmx?wsdl'.: java.io.IOException: Server returned HTTP response code: 403 for URL: http://myDomainURL.net/myASMXFile.asmx?wsdl
    at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2198) ~[?:?]
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390) ~[?:?]
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2422) ~[?:?]
    at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:238) ~[?:?]
    at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:163) ~[?:?]
    at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:85) ~[?:?]
    ... 37 more
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://myDomainURL.net/myASMXFile.asmx?wsdl
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) ~[?:?]
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) ~[?:?]
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) ~[?:?]
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[?:?]
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[?:?]
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) ~[?:?]
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) ~[?:?]
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) ~[?:?]
    at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2188) ~[?:?]
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390) ~[?:?]
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2422) ~[?:?]
    at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:238) ~[?:?]
    at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:163) ~[?:?]
    at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:85) ~[?:?]
    ... 37 more

现在我尝试访问 http://myDomainURL.net/myASMXFile.asmx?wsdl 在web浏览器上单独加载,并且可以无缝加载。文件也不大。
当我(备份并)删除我的 {KARAF_DATA}\tmp{KARAF_DATA}\cache 文件夹内容。这并没有为我解决问题。当然,恢复备份内容也无济于事。
我试着加上 connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11"); 因为这似乎对很多人有效,但对我无效。
作为其他工作流的一部分实现的类似代码似乎没有中断。只有这一个有。
现在我在互联网上几乎到处都找遍了,但找不到有效的解决方案。
我必须做些什么来解决这个问题吗?重新安装是我最不想做的事情。我想知道我什么时候会在这方面出错。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题