org.apache.axis2.AxisFault:传输错误:201错误:已创建?

时间:2014-02-27 10:49:55

标签: wso2 wso2esb

我正在使用WSO2 ESB版本4.8.1。我为REST服务端点准备了测试用例。 当服务不可用时(错误101503 - 连接失败)消息通过faultSequence存储在消息存储中(消息存储为WSO2 MB)。

我在WSO2 ESB中添加了预定消息转发处理器。 从消息存储(队列)中检索消息,然后重新发送到http端点时,我获取http状态代码= 201.

WSO2 ESB识别出代码201是错误的。

为什么?

201 - 这不是错误!!

带(非)错误的碎片日志:

TID: [0] [ESB] [2014-02-27 10:22:42,258]  INFO {org.apache.synapse.message.store.impl.jms.JmsStore} -  Store [JMSMS]. Initialized...  {org.apache.synapse.message.store.impl.jms.JmsStore}
TID: [0] [ESB] [2014-02-27 10:22:42,275]  INFO {org.apache.synapse.message.store.impl.jms.JmsStore} -  Store [JMSPSX]. Initialized...  {org.apache.synapse.message.store.impl.jms.JmsStore}
TID: [0] [ESB] [2014-02-27 10:22:42,341]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: addressing-1.6.1-wso2v10 - file:/C:/Java/WSO2ES~1.1/./repository/deployment/client/modules/addressing-1.6.1-wso2v10.mar {org.apache.axis2.deployment.ModuleDeployer}
TID: [0] [ESB] [2014-02-27 10:22:42,349]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: rampart-1.6.1-wso2v8 - file:/C:/Java/WSO2ES~1.1/./repository/deployment/client/modules/rampart-1.6.1-wso2v8.mar {org.apache.axis2.deployment.ModuleDeployer}
TID: [0] [ESB] [2014-02-27 10:22:42,361]  INFO {org.apache.axis2.transport.mail.MailTransportSender} -  MAILTO Sender started {org.apache.axis2.transport.mail.MailTransportSender}
TID: [0] [ESB] [2014-02-27 10:22:42,369]  INFO {org.apache.axis2.transport.jms.JMSSender} -  JMS Sender started {org.apache.axis2.transport.jms.JMSSender}
TID: [0] [ESB] [2014-02-27 10:22:42,369]  INFO {org.apache.axis2.transport.jms.JMSSender} -  JMS Transport Sender initialized... {org.apache.axis2.transport.jms.JMSSender}
TID: [0] [ESB] [2014-02-27 10:22:42,393]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: addressing-1.6.1-wso2v10 - file:/C:/Java/WSO2ES~1.1/./repository/deployment/client/modules/addressing-1.6.1-wso2v10.mar {org.apache.axis2.deployment.ModuleDeployer}
TID: [0] [ESB] [2014-02-27 10:22:42,401]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: rampart-1.6.1-wso2v8 - file:/C:/Java/WSO2ES~1.1/./repository/deployment/client/modules/rampart-1.6.1-wso2v8.mar {org.apache.axis2.deployment.ModuleDeployer}
TID: [0] [ESB] [2014-02-27 10:22:42,412]  INFO {org.apache.axis2.transport.mail.MailTransportSender} -  MAILTO Sender started {org.apache.axis2.transport.mail.MailTransportSender}
TID: [0] [ESB] [2014-02-27 10:22:42,414]  INFO {org.apache.axis2.transport.jms.JMSSender} -  JMS Sender started {org.apache.axis2.transport.jms.JMSSender}
TID: [0] [ESB] [2014-02-27 10:22:42,415]  INFO {org.apache.axis2.transport.jms.JMSSender} -  JMS Transport Sender initialized... {org.apache.axis2.transport.jms.JMSSender}
TID: [0] [ESB] [2014-02-27 10:22:42,419]  INFO {org.apache.synapse.ServerManager} -  Server ready for processing... {org.apache.synapse.ServerManager}
TID: [0] [ESB] [2014-02-27 10:22:42,466]  INFO {org.wso2.carbon.bam.mediationstats.data.publisher.internal.MediationStatisticsComponent} -  Statistic Reporter is Disabled {org.wso2.carbon.bam.mediationstats.data.publisher.internal.MediationStatisticsComponent}
TID: [0] [ESB] [2014-02-27 10:22:42,466]  INFO {org.wso2.carbon.bam.mediationstats.data.publisher.internal.MediationStatisticsComponent} -  Can't register an observer for mediationStatisticsStore. If you have disabled StatisticsReporter, please enable it in the Carbon.xml {org.wso2.carbon.bam.mediationstats.data.publisher.internal.MediationStatisticsComponent}
TID: [0] [ESB] [2014-02-27 10:22:42,510]  INFO {org.wso2.carbon.rule.kernel.internal.ds.RuleEngineConfigDS} -  Successfully registered the Rule Config service {org.wso2.carbon.rule.kernel.internal.ds.RuleEngineConfigDS}
TID: [0] [ESB] [2014-02-27 10:22:43,173]  INFO {org.apache.synapse.transport.passthru.PassThroughHttpSSLListener} -  Starting Pass-through HTTPS Listener... {org.apache.synapse.transport.passthru.PassThroughHttpSSLListener}
TID: [0] [ESB] [2014-02-27 10:22:43,180]  INFO {org.apache.synapse.transport.passthru.PassThroughHttpSSLListener} -  Pass-through HTTPS Listener started on 0:0:0:0:0:0:0:0:8243 {org.apache.synapse.transport.passthru.PassThroughHttpSSLListener}
TID: [0] [ESB] [2014-02-27 10:22:43,180]  INFO {org.apache.synapse.transport.passthru.PassThroughHttpListener} -  Starting Pass-through HTTP Listener... {org.apache.synapse.transport.passthru.PassThroughHttpListener}
TID: [0] [ESB] [2014-02-27 10:22:43,188]  INFO {org.apache.synapse.transport.passthru.PassThroughHttpListener} -  Pass-through HTTP Listener started on 0:0:0:0:0:0:0:0:8280 {org.apache.synapse.transport.passthru.PassThroughHttpListener}
TID: [0] [ESB] [2014-02-27 10:22:43,188]  INFO {org.apache.axis2.transport.jms.JMSListener} -  JMS listener started {org.apache.axis2.transport.jms.JMSListener}
TID: [0] [ESB] [2014-02-27 10:22:43,191]  INFO {org.apache.synapse.transport.vfs.VFSTransportListener} -  VFS listener started {org.apache.synapse.transport.vfs.VFSTransportListener}
TID: [0] [ESB] [2014-02-27 10:22:43,197]  INFO {org.apache.tomcat.util.net.NioSelectorPool} -  Using a shared selector for servlet write/read {org.apache.tomcat.util.net.NioSelectorPool}
TID: [0] [ESB] [2014-02-27 10:22:43,486]  INFO {org.apache.tomcat.util.net.NioSelectorPool} -  Using a shared selector for servlet write/read {org.apache.tomcat.util.net.NioSelectorPool}
TID: [0] [ESB] [2014-02-27 10:22:43,502]  INFO {org.wso2.carbon.registry.eventing.internal.RegistryEventingServiceComponent} -  Successfully Initialized Eventing on Registry {org.wso2.carbon.registry.eventing.internal.RegistryEventingServiceComponent}
TID: [0] [ESB] [2014-02-27 10:22:43,946]  INFO {org.wso2.carbon.core.init.JMXServerManager} -  JMX Service URL  : service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi {org.wso2.carbon.core.init.JMXServerManager}
TID: [0] [ESB] [2014-02-27 10:22:43,946]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  Server           :  WSO2 Enterprise Service Bus-4.8.1 {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent}
TID: [0] [ESB] [2014-02-27 10:22:43,946]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  WSO2 Carbon started in 133 sec {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent}
TID: [0] [ESB] [2014-02-27 10:22:44,309]  INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} -  Mgt Console URL  : https://10.104.0.44:9443/carbon/ {org.wso2.carbon.ui.internal.CarbonUIServiceComponent}
TID: [0] [ESB] [2014-02-27 10:24:06,086]  INFO {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} -  'admin@carbon.super [-1234]' logged in at [2014-02-27 10:24:06,086+0100] {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil}
TID: [0] [ESB] [2014-02-27 10:25:56,331]  INFO {org.apache.synapse.deployers.EndpointDeployer} -  Endpoint: psxRestApi has been updated from the file: C:\Java\wso2esb-4.8.1\repository\deployment\server\synapse-configs\default\endpoints\psxRestApi.xml {org.apache.synapse.deployers.EndpointDeployer}
TID: [0] [ESB] [2014-02-27 10:28:07,875]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: , From: mailto:psx.test2@eleader.biz, WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:4FA430A4BF1A31E51A1393493287596, Direction: request, sequence = **AFTER turtle mediator*, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><message><document code="common_error_raport"><record number="1">
<reporter>=?UTF-8?B?R3J6ZWdvcnogV8SFc2Fr?= &lt;gwk@eleader.biz&gt;</reporter>
<subject>XU6-C8OC-5XF3</subject>
<errorcode>XU6-C8OC-5XF3</errorcode>
<messageid>&lt;530338AD.3000008@eleader.biz&gt;</messageid>
<status>1</status>
<priorytet>2</priorytet>
<errortype>1</errortype><appversion>0.3.0rc2</appversion><errordescription>
BOARD: villec2
BOOTLOADER: 3.01.0000
BRAND: htc_europe
CPU_ABI: armeabi-v7a
CPU_ABI2: armeabi
DEVICE: villec2
DISPLAY: JRO03C
FINGERPRINT:
htc_europe/villec2/villec2:4.1.1/JRO03C/157254.101:user/release-keys
HARDWARE: villec2
HOST: abm009
ID: JRO03C
IS_DEBUGGABLE: false
MANUFACTURER: HTC
MODEL: HTC One S
PRODUCT: villec2
RADIO: unknown
SERIAL: HT25NW411199
TAGS: release-keys
TIME: 1362391289000
TYPE: user
UNKNOWN: unknown
USER: unknown
CODENAME: REL
INCREMENTAL: 157254.101
RELEASE: 4.1.1
RESOURCES_SDK_INT: 16
SDK: 16
SDK_INT: 16
</errordescription></record></document></message></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-02-27 10:28:07,891]  INFO {org.apache.synapse.core.axis2.TimeoutHandler} -  This engine will expire all callbacks after : 120 seconds, irrespective of the timeout action, after the specified or optional timeout {org.apache.synapse.core.axis2.TimeoutHandler}
TID: [0] [ESB] [2014-02-27 10:28:20,308]  WARN {org.apache.synapse.transport.passthru.ConnectCallback} -  Connection refused or failed for : psx-test:8083 {org.apache.synapse.transport.passthru.ConnectCallback}
TID: [0] [ESB] [2014-02-27 10:28:20,308]  WARN {org.apache.synapse.FaultHandler} -  ERROR_CODE : 101503 {org.apache.synapse.FaultHandler}
TID: [0] [ESB] [2014-02-27 10:28:20,308]  WARN {org.apache.synapse.FaultHandler} -  ERROR_MESSAGE : Error connecting to the back end {org.apache.synapse.FaultHandler}
TID: [0] [ESB] [2014-02-27 10:28:20,324]  WARN {org.apache.synapse.FaultHandler} -  ERROR_DETAIL : Error connecting to the back end {org.apache.synapse.FaultHandler}
TID: [0] [ESB] [2014-02-27 10:28:20,324]  WARN {org.apache.synapse.FaultHandler} -  ERROR_EXCEPTION : null {org.apache.synapse.FaultHandler}
TID: [0] [ESB] [2014-02-27 10:28:20,324]  WARN {org.apache.synapse.FaultHandler} -  FaultHandler : Endpoint [psxRestApi] {org.apache.synapse.FaultHandler}
TID: [0] [ESB] [2014-02-27 10:28:20,324]  WARN {org.apache.synapse.endpoints.EndpointContext} -  Endpoint : psxRestApi will be marked SUSPENDED as it failed {org.apache.synapse.endpoints.EndpointContext}
TID: [0] [ESB] [2014-02-27 10:28:20,324]  WARN {org.apache.synapse.endpoints.EndpointContext} -  Suspending endpoint : psxRestApi - current suspend duration is : 30000ms - Next retry after : Thu Feb 27 10:28:50 CET 2014 {org.apache.synapse.endpoints.EndpointContext}
TID: [0] [ESB] [2014-02-27 10:28:20,324]  WARN {org.apache.synapse.FaultHandler} -  FaultHandler executing impl: org.apache.synapse.mediators.MediatorFaultHandler {org.apache.synapse.FaultHandler}
TID: [0] [ESB] [2014-02-27 10:28:20,324]  WARN {org.apache.synapse.mediators.MediatorFaultHandler} -  Executing fault handler mediator : FoultMessagePSXService {org.apache.synapse.mediators.MediatorFaultHandler}
TID: [0] [ESB] [2014-02-27 10:28:20,339]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://psx-test:8083/psxrestapi/document/create, From: mailto:psx.test2@eleader.biz, WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:4FA430A4BF1A31E51A1393493287596, Direction: request, failS = ======= BestRestError: ===========, ErrorCode = 101503, MSG_SC = null, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><message xmlns="http://ws.apache.org/ns/synapse"><document code="common_error_raport"><record number="1">
<reporter>=?UTF-8?B?R3J6ZWdvcnogV8SFc2Fr?= &lt;gw@eleader.biz&gt;</reporter>
<subject>XU6-C8OC-5XF3</subject>
<errorcode>XU6-C8OC-5XF3</errorcode>
<messageid>&lt;530338AD.3000008@eleader.biz&gt;</messageid>
<status>1</status>
<priorytet>2</priorytet>
<errortype>1</errortype><appversion>0.3.0rc2</appversion><errordescription>
BOARD: villec2
BOOTLOADER: 3.01.0000
BRAND: htc_europe
CPU_ABI: armeabi-v7a
CPU_ABI2: armeabi
DEVICE: villec2
DISPLAY: JRO03C
FINGERPRINT:
htc_europe/villec2/villec2:4.1.1/JRO03C/157254.101:user/release-keys
HARDWARE: villec2
HOST: abm009
ID: JRO03C
IS_DEBUGGABLE: false
MANUFACTURER: HTC
MODEL: HTC One S
PRODUCT: villec2
RADIO: unknown
SERIAL: HT25NW411199
TAGS: release-keys
TIME: 1362391289000
TYPE: user
UNKNOWN: unknown
USER: unknown
CODENAME: REL
INCREMENTAL: 157254.101
RELEASE: 4.1.1
RESOURCES_SDK_INT: 16
SDK: 16
SDK_INT: 16
</errordescription></record></document></message></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-02-27 10:29:43,720]  INFO {org.apache.synapse.deployers.EndpointDeployer} -  Endpoint: psxRestApi has been updated from the file: C:\Java\wso2esb-4.8.1\repository\deployment\server\synapse-configs\default\endpoints\psxRestApi.xml {org.apache.synapse.deployers.EndpointDeployer}
TID: [0] [ESB] [2014-02-27 10:33:13,317]  WARN {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} -  Failed Administrator login attempt 'admin[-1234]' at [2014-02-27 10:33:13,317+0100] {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil}
TID: [0] [ESB] [2014-02-27 10:33:16,708]  INFO {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} -  'admin@carbon.super [-1234]' logged in at [2014-02-27 10:33:16,708+0100] {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil}
TID: [0] [ESB] [2014-02-27 10:33:16,882]  INFO {org.apache.synapse.message.processor.impl.ScheduledMessageProcessor} -  Successfully re-activated the message processor [FailOverPsxProcess] {org.apache.synapse.message.processor.impl.ScheduledMessageProcessor}
TID: [0] [ESB] [2014-02-27 10:33:27,750]  INFO {org.apache.axis2.transport.http.HTTPSender} -  Unable to sendViaPost to url[http://psx-test:8083/psxrestapi/document/create] {org.apache.axis2.transport.http.HTTPSender}
org.apache.axis2.AxisFault: Transport error: 201 Error: Created
    at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:308)
    at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:194)
    at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
    at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
    at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendRobust(BlockingMsgSender.java:198)
    at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:144)
    at org.apache.synapse.message.processor.impl.forwarder.ForwardingService.dispatch(ForwardingService.java:288)
    at org.apache.synapse.message.processor.impl.forwarder.ForwardingService.execute(ForwardingService.java:128)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
TID: [0] [ESB] [2014-02-27 10:33:27,754] ERROR {org.apache.synapse.message.senders.blocking.BlockingMsgSender} -  Error sending Message to url : http://psx-test:8083/psxrestapi/document/create {org.apache.synapse.message.senders.blocking.BlockingMsgSender}
org.apache.axis2.AxisFault: Transport error: 201 Error: Created
    at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:308)
    at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:194)
    at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
    at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
    at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendRobust(BlockingMsgSender.java:198)
    at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:144)
    at org.apache.synapse.message.processor.impl.forwarder.ForwardingService.dispatch(ForwardingService.java:288)
    at org.apache.synapse.message.processor.impl.forwarder.ForwardingService.execute(ForwardingService.java:128)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
TID: [0] [ESB] [2014-02-27 10:33:27,758] ERROR {org.apache.synapse.message.processor.impl.forwarder.ForwardingService} -  BlockingMessageSender of message processor [FailOverPsxProcess] failed to send message to the endpoint {org.apache.synapse.message.processor.impl.forwarder.ForwardingService}
TID: [0] [ESB] [2014-02-27 10:33:27,759]  INFO {org.apache.synapse.message.processor.impl.forwarder.ForwardingService} -  Pausing the service of message processor [FailOverPsxProcess] {org.apache.synapse.message.processor.impl.forwarder.ForwardingService}
TID: [0] [ESB] [2014-02-27 10:33:34,908]  INFO {org.apache.synapse.message.processor.impl.ScheduledMessageProcessor} -  Successfully deactivated the message processor [FailOverPsxProcess] {org.apache.synapse.message.processor.impl.ScheduledMessageProcessor}
TID: [0] [ESB] [2014-02-27 10:33:34,909]  WARN {org.apache.synapse.message.processor.impl.ScheduledMessageProcessor} -  Couldn't persist the state of the message processor [FailOverPsxProcess] {org.apache.synapse.message.processor.impl.ScheduledMessageProcessor}

提前感谢回应,Grzegorz

1 个答案:

答案 0 :(得分:0)

这是当前Axis2实现的编写方式。 WSO2有一个分叉的Axis2代码,它是WSO2 Carbon Kernel的一部分。

如堆栈跟踪所示,[HTTPSender][1]类将HTTP状态代码视为错误。实际上,如果查看HTTPSender.handleResponse(MessageContext msgContext, HttpMethodBase method),您将看到它只会检查预定义的HTTP状态代码列表。

请在ESBJAVA项目中创建JIRA。或者您可以在CARBON项目报告。

您可以在本地修补相关的Axis2 jar,作为解决此问题的方法。