关于cxf的项目 放到jboss7. 启动报错,解决方法


具有集成cxf的web应用在tomcat运行非常好,但在jboss下启动报错:

报错如下:
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]
Caused by: java.lang.RuntimeException: Cannot publish wsdl to: D:\Program Files\jboss-as-7.1.1.Final\standalone\data\wsdl\paycore-web.war\WithdrawCashServiceFacadeImplService.wsdl
at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:107)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.publishContractToFilesystem(EndpointImpl.java:222)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:93)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:117)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:113)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:66)
at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.io.FileNotFoundException: D:\Program Files\jboss-as-7.1.1.Final\standalone\data\wsdl\paycore-web.war\WithdrawCashServiceFacade.wsdl (系统找不到指定的文件。)
at java.io.FileInputStream.open(Native Method) [rt.jar:1.6.0_43]
at java.io.FileInputStream.<init>(FileInputStream.java:120) [rt.jar:1.6.0_43]



解决方法如下:

注释掉standalone.xml中的

  <!--
        <subsystem xmlns="urn:jboss:domain:webservices:1.1">
            <modify-wsdl-address>true</modify-wsdl-address>
            <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
            <endpoint-config name="Standard-Endpoint-Config"/>
            <endpoint-config name="Recording-Endpoint-Config">
                <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
                    <handler class="org.jboss.ws.common.invocation.RecordingServerHandler" name="RecordingHandler"/>
                </pre-handler-chain>
            </endpoint-config>
        </subsystem>
        -->
重启应用即可。

不要由jboss容易来管理cxf

有谁知道更好的解决方案吗???小弟救指教

你可能感兴趣的:(jboss7)