在我的mule应用程序中,我用Servlet入站端点替换了HTTP入站端点,因此我可以在JBoss上部署mule应用程序。现在,当JBoss启动时,我收到此错误消息:
2012-08-16 12:13:00,416 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/oms]] (main)
Line 27 in XML document from request_flows.xml is invalid;
nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a:
Invalid content was found starting with element 'servlet:inbound-endpoint'.
One of '{"http://www.mulesoft.org/schema/mule/core":annotations,
"http://www.mulesoft.org/schema/mule/core":description,
"http://www.mulesoft.org/schema/mule/core":abstract-message-source,
"http://www.mulesoft.org/schema/mule/core":abstract-inbound-endpoint,
"http://www.mulesoft.org/schema/mule/core":abstract-message-processor,
"http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint,
"http://www.mulesoft.org/schema/mule/core":response}'
is expected. (org.mule.api.lifecycle.InitialisationException)
org.mule.api.config.ConfigurationException: Line 27 in XML document from request_flows.xml is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'servlet:inbound-endpoint'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":description, "http://www.mulesoft.org/schema/mule/core":abstract-message-source, "http://www.mulesoft.org/schema/mule/core":abstract-inbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":response}' is expected.
<flow name="ParcelRequestFlow" doc:name="ParcelRequestFlow">
<servlet:inbound-endpoint path="http://localhost:80/parcel" responseTimeout="10000" doc:name="Parcel Servlet"/>
<http:body-to-parameter-map-transformer doc:name="Body to Parameter Map"/>
<transformer ref="RequestParametersValidator1" doc:name="Validator"/>
<jdbc:outbound-endpoint exchange-pattern="request-response" queryKey="messageSelectCountMessageId" responseTimeout="10000" mimeType="text/plain" queryTimeout="-1" connector-ref="jdbcConnector" doc:name="Verify MessageId"/>
<transformer ref="MessageIdValidator" doc:name="MessageId Validator"/>
<transformer ref="parcelPayloadTransformer" doc:name="Parcel Payload Transformer"/>
<message-properties-transformer scope="session" doc:name="Add PAYLOAD_OBJECT header">
<add-message-property key="payload_object" value="#[payload]"/>
<add-message-property key="payload_id" value="#[bean:parcelDetails.UPID]"/>
</message-properties-transformer>
<transformer ref="ParcelBeanValidator" doc:name="ParcelBeanValidator"/>
<transformer ref="MessagePropertyTransformer" doc:name="Message Property Transformer"/>
<jdbc:outbound-endpoint exchange-pattern="request-response" queryKey="parcelInsert" responseTimeout="10000" mimeType="text/plain" queryTimeout="-1" connector-ref="jdbcConnector" doc:name="Create DB Message Parcel"/>
<vm:outbound-endpoint exchange-pattern="one-way" path="insurance.queue" responseTimeout="10000" connector-ref="queue.vm.connector" mimeType="text/plain" doc:name="Insurance Queue"/>
<transformer ref="MessagePropertyTransformer" doc:name="Message Property Transformer"/>
<vm:outbound-endpoint exchange-pattern="one-way" path="parcel.queue" responseTimeout="10000" connector-ref="queue.vm.connector" mimeType="text/plain" doc:name="Parcel Queue"/>
<transformer ref="HttpResponseSucCessTransformer" doc:name="Return SUCCESS" />
<custom-exception-strategy class="com.pb.oms.mule.exception.HttpRequestExceptionStrategy"></custom-exception-strategy>
</flow>
谢谢。
答案 0 :(得分:1)
请务必声明servlet
命名空间:
xmlns:servlet="http://www.mulesoft.org/schema/mule/servlet"
...
http://www.mulesoft.org/schema/mule/servlet http://www.mulesoft.org/schema/mule/servlet/current/mule-servlet.xsd
并让Servlet在类路径中传输JAR。