org.mule.api.MuleRuntimeException: CorsManager еще не запущен - PullRequest
0 голосов
/ 20 декабря 2018

В настоящее время я работаю над приложением Mule 3.9, которое обрабатывает запросы REST и SOAP.Сторона REST работает нормально, однако я сталкиваюсь со странной проблемой с функциональностью SOAP.На данный момент файл представляет собой всего лишь прослушиватель HTTP, маршрутизатор SOAP и два потока, каждый для отдельного процесса, каждый из которых содержит один Logger.Тем не менее, когда я пытаюсь запустить проект, он не может быть развернут, ссылаясь на MuleRuntimeException: CorsManager еще не запущен.Я в замешательстве, потому что этот проект вообще не использует CORS.

Я не смог найти много об этом в Интернете, за исключением вопроса на форумах MuleSoft: https://forums.mulesoft.com/questions/71349/orgmuleapimuleruntimeexception-corsmanager-not-sta.html?childToView=78861#answer-78861. На вопрос есть ответ, но это приложение вообще не использует MQ, и поэтому решение не применимо.

Вот мой XML:

    <mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:apikit- 
   soap="http://www.mulesoft.org/schema/mule/apikit-soap" 
    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" 
    xmlns:http="http://www.mulesoft.org/schema/mule/http" 
    xmlns:spring="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core 
    http://www.mulesoft.org/schema/mule/core/current/mule.xsd
    http://www.mulesoft.org/schema/mule/http 
    http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
    http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
    http://www.mulesoft.org/schema/mule/apikit-soap 
    http://www.mulesoft.org/schema/mule/apikit-soap/current/mule-apikit- 
   soap.xsd">
      <apikit-soap:config name="/bt2dm/MuleSoapProc/api-config" 
    wsdlUrl="pdw.wsdl" serviceName="bt2m" portName="MuleSoapProc" 
    doc:name="APIkit SOAP: Configuration"/>
      <flow name="api-main">
        <http:listener path="/bt2m/MuleSoapProc" config-ref="mule-domain- 
   http-listener-config" doc:name="/bt2m/MuleSoapProc" 
    allowedMethods="POST, GET"/>
        <apikit-soap:router config-ref="/bt2m/MuleSoapProc/api-config" 
    doc:name="SOAP Router"/>
            <exception-strategy ref="apiKitGlobalExceptionMapping" 
    doc:name="Reference Exception Strategy"/>
      </flow>
      <flow name="OperationPDwCL2Way:/bt2m/MuleSoapProc/api-config">
            <logger level="INFO" doc:name="Logger"/>
            <exception-strategy ref="apiKitGlobalExceptionMapping" 
    doc:name="Reference Exception Strategy"/>
      </flow>
      <flow name="OperationPDwTL2Way:/bt2m/MuleSoapProc/api-config">
            <logger level="INFO" doc:name="Logger"/>
            <exception-strategy ref="apiKitGlobalExceptionMapping" 
    doc:name="Reference Exception Strategy"/>
      </flow>
    </mule>

ВотWSDL:

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://Mule/Claims/PDW/Mule_Claims_CC_PDW/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="CompanyPDw" targetNamespace="http://Mule/Claims/PDW/Mule_Claims_CC_PDW/">
    <wsdl:documentation>
        <CreationInfo Created="2018-12-17 08:14:00Z"/>
    </wsdl:documentation>
    <wsdl:types>
        <xsd:schema targetNamespace="http://Mule/C/PDW/MuleCDW/Imports">
            <xsd:import schemaLocation="http://localhost:8163/pdw/MuleSoapProc?xsd=xsd2" namespace="http://company.com/claimcenter/DW/DWClaim"/>
            <xsd:import schemaLocation="http://localhost:8163/pdw/MuleSoapProc?xsd=xsd3" namespace="http://company_Mule_PDW.PDwCCStatResponse"/>
            <xsd:import schemaLocation="http://localhost:8163/pdw/MuleSoapProc?xsd=xsd4" namespace="http://company.com/claimcenter/DW/DWTransaction"/>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="WcfService_Mule_Claims_CC_PDW_OperationPDwCL2Way_InputMessage">
        <wsdl:part xmlns:q1="http://company.com/DW/DWClaim" name="part" element="q1:DWClaim"/>
    </wsdl:message>
    <wsdl:message name="WcfService_Mule_Claims_CC_PDW_OperationPDwCL2Way_OutputMessage">
        <wsdl:part xmlns:q2="http://company_Mule_PDw.PDwCCStatResponse" name="part" element="q2:PDwStatResponse"/>
    </wsdl:message>
    <wsdl:message name="WcfService_Mule_Claims_CC_PDW_OperationPDwTL2Way_InputMessage">
        <wsdl:part xmlns:q3="http://company.com/DW/DWTransaction" name="part" element="q3:DWTransaction"/>
    </wsdl:message>
    <wsdl:message name="WcfService_Mule_Claims_CC_PDW_OperationPDwTL2Way_OutputMessage">
        <wsdl:part xmlns:q4="http://company_Mule_PDw.PDwCCStatResponse" name="part" element="q4:PDwStatResponse"/>
    </wsdl:message>
    <wsdl:portType name="WcfService_Mule_Claims_CC_PDW">
        <wsdl:documentation>service "*" port "*"</wsdl:documentation>
        <wsdl:operation name="OperationPDwCL2Way">
            <wsdl:documentation>operation "OperationPDwCL2Way"</wsdl:documentation>
            <wsdl:input message="tns:WcfService_Mule_Claims_CC_PDW_OperationPDwCL2Way_InputMessage"/>
            <wsdl:output message="tns:WcfService_Mule_Claims_CC_PDW_OperationPDwCL2Way_OutputMessage"/>
        </wsdl:operation>
        <wsdl:operation name="OperationPDwTL2Way">
            <wsdl:documentation>operation "OperationPDwTL2Way"</wsdl:documentation>
            <wsdl:input message="tns:WcfService_Mule_Claims_CC_PDW_OperationPDwTL2Way_InputMessage"/>
            <wsdl:output message="tns:WcfService_Mule_Claims_CC_PDW_OperationPDwTL2Way_OutputMessage"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="MuleSoapProc" type="tns:WcfService_Mule_Claims_CC_PDW">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="OperationPDwCL2Way">
            <wsdl:documentation>operation "OperationPDwCL2Way"</wsdl:documentation>
            <soap:operation soapAction="OperationPDwCL2Way" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="OperationPDwTL2Way">
            <wsdl:documentation>operation "OperationPDwTL2Way"</wsdl:documentation>
            <soap:operation soapAction="OperationPDwTL2Way" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="g1PDw">
        <wsdl:port name="MuleSoapProc" binding="tns:MuleSoapProc">
            <soap:address location="http://localhost:8163/PDw/insertService"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Вот ошибка, которая выдается при запуске приложения:

org.mule.api.MuleRuntimeException: CorsManager еще не запущен в org.mule.modules.cors.CorsPhase.runPhase (CorsPhase.java:65) ~ [mule-module-cors-gw-3.9.0.jar: 3.9.0] в org.mule.modules.cors.CorsPhase.runPhase (CorsPhase.java:39) ~ [mule-module-cors-gw-3.9.0.jar: 3.9.0] в org.mule.execution.PhaseExecutionEngine $ InternalPhaseExecutionEngine.process (PhaseExecutionEngine.java:114) ~ [mule-core-3.9.0.jar: 3.9.0] на org.mule.execution.PhaseExecutionEngine.process (PhaseExecutionEngine.java:41) ~ [mule-core-3.9.0.jar: 3.9.0] на org.mule.execution.MuleMessageProcessingManager.processMessage (MuleMessageProcessingManager.java:32) ~ [mule-core-3.9.0.jar: 3.9.0] в org.mule.module.http.internal.listener.DefaultHttpListener $ 1.handleRequestjava: 135) ~ [mule-module-http-3.9.0.jar: 3.9.0] по адресу org.mule.module.http.internal.listener.grizzly.GrizzlyRequestDispatcherFilter.handleRead (GrizzlyRequestDispatcherFilter.java:100) ~ [mule-module-http-3.9.0.jar: 3.9.0] at org.glassfish.grizzly.filterchain.ExecutorResolver $ 9.execute (ExecutorResolver.java:119) ~ [grizzly-framework-2.3.33.jar: 2.3.33] в org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter (DefaultFilterChain.java:284) ~ [grizzly-framework-2.3.33.jar: 2.3.33] в org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChater.hainterChain.executeChain.execte.java: 201) ~ [grizzly-framework-2.3.33.jar: 2.3.33] по адресу org.glassfish.grizzly.filterchain.DefaultFilterChain.execute (DefaultFilterChain.java:133) ~ [grizzly-framework-2.3.33.jar: 2.3.33] в org.glassfish.grizzly.filterchain.DefaultFilterChain.process (DefaultFilterChain.java:112) ~ [grizzly-framework-2.3.33.jar: 2.3.33] в org.glassfish.grizzly.ProcessorExecutor.execute (ProcessorExecutor.java:77) ~ [гризли-framework-2.3.33.jar: 2.3.33] at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent (TCPNIOTransport.java:539) ~ [grizzly-framework-2.3.33.jar: 2.3.33]на org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent (AbstractIOStrategy.java:112) ~ [grizzly-framework-2.3.33.jar: 2.3.33] на org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.run0 (ExecutorPerServerAddressIOStrategy.java:119) ~ [mule-module-http-3.9.0.jar: 3.9.0] в org.mule.module.http.internal.listener.grizzly.ExgySergyServerjava: 31) ~ [mule-module-http-3.9.0.jar: 3.9.0] по адресу org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy $ WorkerThreadRunnable.run (ExecutorPerServerAddressIOS:142_ava):[мулe-module-http-3.9.0.jar: 3.9.0] в java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) [?: 1.8.0_162] в java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:624) [?: 1.8.0_162] at java.lang.Thread.run (Thread.java:748) [?: 1.8.0_162]

Мне также не удалось найти упоминания о CORS в этом проекте.Приветствуется любая помощь, которую вы можете оказать.

Ответы [ 2 ]

0 голосов
/ 04 января 2019

Не уверен, в чем именно проблема, но это было связано с пространствами имен, которые я изменил в WSDL, и URL-адресами схемы.Я вернул WSDL обратно к известной рабочей версии и смог развернуть приложение.

0 голосов
/ 20 декабря 2018

Невозможно воспроизвести из-за отсутствия конфигураций wsdl и домена.

Ваш домен может быть виновником здесь: org.mule.module.http.internal.listener.grizzly.GrizzlyRequestDispatcherFilter.handleRead

Если это вообще возможно, попытайтесь извлечь ваше приложение от использования домена.Если вы можете воспроизвести, обновите вопрос с помощью упрощенного приложения.

...