wso2 getting org.apache.rampart.RampartException: Unsupported SignedSupportingToken - wso2

We are trying to do a poc in wso2 esb to invoke our BE service which is ws-security enabled. We have setup a pass thru proxy in wso2 and configured the endpoint according to www.soasecurity.org. However, we keep getting the below error when trying to use the pass thru proxy. Please advise if we are doing anything wrong...
ERROR - Axis2Sender Unexpected error during sending message out
rg.apache.axis2.AxisFault: Unsupported SignedSupportingToken : "{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken"
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:76)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:426)
at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:185)
at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:481)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:57)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:342)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:329)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:173)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.apache.rampart.RampartException: Unsupported SignedSupportingToken : "{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken"
at org.apache.rampart.builder.TransportBindingBuilder.build(TransportBindingBuilder.java:103)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:140)
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
... 20 more

What is the security policy you are using to secure the BE service?
Seems like the ESB cannot understand the security policy that is being used for the BE service.
Follow the blog and you will be able to resolve your concern.
Manisha

Related

API usages are not recorded when integrating WSO2 APIM1.10.0 cluster with WSO2 DAS 3.0.1 cluster

I am using WSO2 Kubernetes Artifacts to build WSO2 APIM 1.10.0 cluster.
Here is my configuration :
api-key-manager.yaml
api-publisher.yaml
api-store.yaml
gateway-manager.yaml
With the above configurations, APIM cluster works fine on my kubernetes environment. Then I want to get statistics from WSO2 DAS 3.0.1. Here is my steps.
Open admin-dashboard page.
Fill in DAS information.
Save configuration.
Publish the sample API and subscribe it.
Invoke the created API.
Though API returns the correct result, I can not see any statistics from DAS page. Table ORG_WSO2_APIMGT_STATISTICS_REQUEST is also empty. Moreover, there are some exceptions in gateway container as follows:
2017-02-02T10:17:05.119378825Z [2017-02-02 10:17:05,118] ERROR - APIMgtUsageHandler Cannot publish event. null
2017-02-02T10:17:05.119410635Z java.lang.NullPointerException
2017-02-02T10:17:05.119416221Z at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher.publishEvent(APIMgtUsageDataBridgeDataPublisher.java:124)
2017-02-02T10:17:05.119421345Z at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageHandler.handleRequest(APIMgtUsageHandler.java:169)
2017-02-02T10:17:05.119425422Z at org.apache.synapse.rest.API.process(API.java:322)
2017-02-02T10:17:05.119429269Z at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:86)
2017-02-02T10:17:05.119432713Z at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:65)
2017-02-02T10:17:05.119444539Z at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:295)
2017-02-02T10:17:05.119448051Z at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83)
2017-02-02T10:17:05.119451190Z at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
2017-02-02T10:17:05.119454693Z at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:317)
2017-02-02T10:17:05.119457708Z at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:149)
2017-02-02T10:17:05.119460675Z at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
2017-02-02T10:17:05.119463755Z at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2017-02-02T10:17:05.119466748Z at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2017-02-02T10:17:05.119470008Z at java.lang.Thread.run(Thread.java:745)
2017-02-02T10:17:05.292159023Z [2017-02-02 10:17:05,291] ERROR - APIMgtResponseHandler Cannot publish response event. null
2017-02-02T10:17:05.292186860Z java.lang.NullPointerException
2017-02-02T10:17:05.292191607Z at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher.publishEvent(APIMgtUsageDataBridgeDataPublisher.java:140)
2017-02-02T10:17:05.292196079Z at org.wso2.carbon.apimgt.usage.publisher.APIMgtResponseHandler.mediate(APIMgtResponseHandler.java:211)
2017-02-02T10:17:05.292199487Z at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:84)
2017-02-02T10:17:05.292202823Z at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
2017-02-02T10:17:05.292206246Z at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
2017-02-02T10:17:05.292210195Z at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:155)
2017-02-02T10:17:05.292213976Z at org.apache.synapse.rest.Resource.process(Resource.java:297)
2017-02-02T10:17:05.292216990Z at org.apache.synapse.rest.API.process(API.java:335)
2017-02-02T10:17:05.292220203Z at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:86)
2017-02-02T10:17:05.292223430Z at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:52)
2017-02-02T10:17:05.292226576Z at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:295)
2017-02-02T10:17:05.292229762Z at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529)
2017-02-02T10:17:05.292232861Z at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172)
2017-02-02T10:17:05.292236007Z at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
2017-02-02T10:17:05.292238952Z at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:251)
2017-02-02T10:17:05.292252632Z at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
2017-02-02T10:17:05.292256191Z at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2017-02-02T10:17:05.292259335Z at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2017-02-02T10:17:05.292262507Z at java.lang.Thread.run(Thread.java:745)
The problem may be same as this issue, but I don't see solution.
Edit 1
I also did 2 experiments as follow.
First:
Create a ubuntu pod.
Install WSO2 APIM 1.10.0 on the ubuntu pod container.
Open the admin-dashboard page and fill in DAS information.
Publish the sample API and subscribe it.
Invoke the created API.
Which works fine. I can see the statistics from DAS page.
Second :
Jump into APIM container.
Using telnet to verify thrift port of DAS cluster.
The thrift port was accessible for APIM cluster.
According to the exception, I think that might be caused by configurations missing in gateway container?

Using local transport within current tenant

I want to deploy Carbon Application inside tenant on WSO2 ESB and use local transport between proxies. It looks to work fine when I use absolute URI with full domain e.g.:
local://services/t/my.domain.com/MyFirstProxy
And now I would like to pass message to another proxy in the same domain (tenant):
local://services/t/my.domain.com/MySecondProxy
I expect there should be posibility to refer second proxy either by relative path (without changing domain) e.g. local://services/MySecondProxy but if I try to use it this way ESB engine throws:
[2017-01-17 09:35:41,648] ERROR - CarbonContextDataHolder Trying to set the domain from my.domain.com to carbon.super
java.lang.IllegalStateException: Trying to set the domain from my.domain.com to carbon.super
at org.wso2.carbon.context.internal.CarbonContextDataHolder.setTenantDomain(CarbonContextDataHolder.java:1390)
at org.wso2.carbon.context.PrivilegedCarbonContext.setTenantDomain(PrivilegedCarbonContext.java:152)
at org.wso2.carbon.context.PrivilegedCarbonContext.setTenantDomain(PrivilegedCarbonContext.java:141)
at org.wso2.carbon.mediation.initializer.handler.CarbonContextConfigurator.invoke(CarbonContextConfigurator.java:33)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:169)
at org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:82)
at org.wso2.carbon.core.transports.local.CarbonLocalTransportSender.finalizeSendWithToAddress(CarbonLocalTransportSender.java:45)
at org.apache.axis2.transport.local.LocalTransportSender.invoke(LocalTransportSender.java:77)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.wso2.carbon.core.multitenancy.transports.TenantTransportSender.invoke(TenantTransportSender.java:236)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:185)
at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:581)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:78)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:55)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:121)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.doSOAP(MultitenantMessageReceiver.java:281)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processRequest(MultitenantMessageReceiver.java:226)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.receive(MultitenantMessageReceiver.java:78)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:403)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I need to deploy the same application in two separate domains independently and I don't want to use absolute paths as to be complicated in maintenance.
Is there a simple solution to use local transport without fixing domain name and use current domain by default?
In your scenario, you are using local transport within tenants in ESB. So u have to use absolute path when you are going to invoke tenant-based proxies.
You are getting an error, when you invoke proxy without domain as it going to assign it to carbon super.
FYI- If you want to make calls across tenants, you should use a non Local Transport even if they run from the same VM. [1] So it is not recommended to use local transport with tenants.
If you need you can use custom proxy path and refer documentation [2]
https://buddhimawijeweera.wordpress.com/2014/11/16/local-transport-in-wso2-esb/
https://docs.wso2.com/display/Carbon440/Adding+a+Custom+Proxy+Path

WSO2 APIM GW error message for not able to publish throttle event

Running WSO2 APIM v2.0 as 2 nodes clustered and a WSO2 DAS as separate node.
Every time throttling happens in WSO2 APIM, I am seeing following error message in Gateway error log
2016-11-04 06:23:59,927 [-] [PassThroughMessageProcessor-27] ERROR APIMgtThrottleUsageHandler Cannot publish throttling event. null
java.lang.NullPointerException
at org.wso2.carbon.utils.multitenancy.MultitenantUtils.getTenantDomain(MultitenantUtils.java:90)
at org.wso2.carbon.apimgt.usage.publisher.APIMgtThrottleUsageHandler.mediate(APIMgtThrottleUsageHandler.java:71)
at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:84)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:95)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:57)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.wso2.carbon.apimgt.gateway.handlers.throttling.ThrottleHandler.handleThrottleOut(ThrottleHandler.java:612)
at org.wso2.carbon.apimgt.gateway.handlers.throttling.ThrottleHandler.doThrottle(ThrottleHandler.java:504)
at org.wso2.carbon.apimgt.gateway.handlers.throttling.ThrottleHandler.handleRequest(ThrottleHandler.java:445)
at org.apache.synapse.rest.API.process(API.java:325)
at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:90)
at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:300)
at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:75)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:319)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:152)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I also not able to see API Throttled Out Requests report from WSO2 APIM statistics.
Please advice.
This is a known issue when you have Authentication:none for resources. It's reported here, and will be fixed in a future release.

WSO2 APIM 2.0 Clustering deployment issue when try API console from API store

I deployed 2 keymanager nodes, 2 pub-store nodes, 1 gateway manager node and 2 gateway worker nodes in one server, and deployed nginx for load balance. When i try to access API via API Console, it reported below error:
TID: [-1234] [] [2016-08-29 21:10:57,237] WARN {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler} - API authentication failure due to Unclassified Authentication Failure {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler}
TID: [-1234] [] [2016-08-29 21:10:57,238] ERROR {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler} - API authentication failed with error 900900 {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler}
org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException: Error while accessing backend services for API key validation
at org.wso2.carbon.apimgt.gateway.handlers.security.keys.WSAPIKeyDataStore.getAllURITemplates(WSAPIKeyDataStore.java:77)
at org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator.getAllURITemplates(APIKeyValidator.java:635)
at org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator.doGetAPIInfo(APIKeyValidator.java:487)
at org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator.findMatchingVerb(APIKeyValidator.java:459)
at org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator.getResourceAuthenticationScheme(APIKeyValidator.java:251)
at org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator.authenticate(OAuthAuthenticator.java:119)
at org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler.handleRequest(APIAuthenticationHandler.java:117)
at org.apache.synapse.rest.API.process(API.java:325)
at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:90)
at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:300)
at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:75)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:319)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:152)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException: Error while accessing backend services for API key validation
at org.wso2.carbon.apimgt.gateway.handlers.security.keys.APIKeyValidatorClient.getAllURITemplates(APIKeyValidatorClient.java:171)
at org.wso2.carbon.apimgt.gateway.handlers.security.keys.WSAPIKeyDataStore.getAllURITemplates(WSAPIKeyDataStore.java:75)
... 18 more
Caused by: java.lang.NullPointerException
at org.wso2.carbon.apimgt.gateway.handlers.security.keys.APIKeyValidatorClient.toTemplates(APIKeyValidatorClient.java:193)
at org.wso2.carbon.apimgt.gateway.handlers.security.keys.APIKeyValidatorClient.getAllURITemplates(APIKeyValidatorClient.java:166)
... 19 more
What's the config issue?
This is a known issue, and is fixed in latest master. I'll check and update the answer if I can find a workaround.

WSO2 does not catching exception from Smooks

I am using WSO2 ESB 4.8.1 and i am using Smooks 1.5 to read a fixed length file and then parse it in raw XML. It is working fine but i have to also implement its exceptional flow.
Problem:
The problem is that if i mess up smooks config file it is throwing an exception but it is not being catched by WSO2. For all the other errors and exception WSO2 initiates the fault sequence where you can get ERROR_MESSAGE, ERROR_DETAIL properties, but in this case it just terminates the flow and the service does not goes into fault sequence. So i can't do anything about it unless service goes into fault sequence.
Sample File:
John Lock
Smooks-config File that i am using to create an exception:
<?xml version="1.0"?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:fl="http://www.milyn.org/xsd/smooks/fixed-length-1.3.xsd">
<fl:reader fields="FNAME[4],$ignore$[4],LNAME">
</fl:reader>
</smooks-resource-list>
Exception in wso2 log file:
org.milyn.cdr.SmooksConfigurationException: Error invoking #Initialize method 'initialize' on class 'org.milyn.fixedlength.FixedLengthReader'.
at org.milyn.cdr.annotation.Configurator.invoke(Configurator.java:457)
at org.milyn.cdr.annotation.Configurator.initialise(Configurator.java:439)
at org.milyn.cdr.annotation.Configurator.configure(Configurator.java:91)
at org.milyn.cdr.annotation.Configurator.configure(Configurator.java:66)
at org.milyn.delivery.JavaContentHandlerFactory.create(JavaContentHandlerFactory.java:63)
at org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.addCDU(ContentDeliveryConfigBuilder.java:623)
at org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.applyCDUStrategy(ContentDeliveryConfigBuilder.java:548)
at org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.applyStrategy(ContentDeliveryConfigBuilder.java:536)
at org.milyn.delivery.ContentDeliveryConfigBuilder$SmooksResourceConfigurationTableIterator.iterate(ContentDeliveryConfigBuilder.java:711)
at org.milyn.delivery.ContentDeliveryConfigBuilder$SmooksResourceConfigurationTableIterator.access$300(ContentDeliveryConfigBuilder.java:690)
at org.milyn.delivery.ContentDeliveryConfigBuilder.extractContentHandlers(ContentDeliveryConfigBuilder.java:484)
at org.milyn.delivery.ContentDeliveryConfigBuilder.load(ContentDeliveryConfigBuilder.java:349)
at org.milyn.delivery.ContentDeliveryConfigBuilder.getConfig(ContentDeliveryConfigBuilder.java:146)
at org.milyn.container.standalone.StandaloneExecutionContext.<init>(StandaloneExecutionContext.java:91)
at org.milyn.container.standalone.StandaloneExecutionContext.<init>(StandaloneExecutionContext.java:65)
at org.milyn.Smooks.createExecutionContext(Smooks.java:411)
at org.milyn.Smooks.createExecutionContext(Smooks.java:374)
at org.wso2.carbon.mediator.transform.SmooksMediator.mediate(SmooksMediator.java:103)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:196)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:166)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.axis2.transport.base.AbstractTransportListener.handleIncomingMessage(AbstractTransportListener.java:328)
at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:597)
at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:328)
at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:158)
at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:107)
at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1911)
at org.milyn.fixedlength.FixedLengthReader.buildFields(FixedLengthReader.java:455)
at org.milyn.fixedlength.FixedLengthReader.initialize(FixedLengthReader.java:277)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.milyn.cdr.annotation.Configurator.invoke(Configurator.java:453)
Note:
Smooks is giving the correct exception but what i don't understand is that why does not WSO2 esb service goes into fault sequence and just terminated ...? Is it some behavior by smooks..?
I think it is expected behavior of WSO2 ESB. Recently, we were working on project where we used smooks to convert fixed length data to XML in WSO2 ESB using VFS transport. we have faced same kind of issue. After contacting with WSO2 Official support, we found that it is expected behavior of WSO2 ESB. Fault sequence will be only execute, when synapse exception occurs.