I have tried to use event tables in my execution plan and try to join table with input stream in WSO2 CEP v4.1.0 in distributed mode with Apache Storm.
Here is my Siddhi query.
#Plan:name('ExecutionPlan')
#Import('InputStream:1.0.0')
define stream InputStream (id string, param1 int, param2 double, param3 string, param4 string, param5 string, param6 string, param7 string);
#Export('outputStream:1.0.0')
define stream OutputStream (id string, param3 string);
#From(eventtable = 'rdbms' , datasource.name = 'MYSQL' , table.name = 'cep')
define table cepTable (id string, param1 int, param2 double, param3 string, param4 string, param5 string, param6 string, param7 string);
#name('query1')
#dist(parallel='2', execGroup='Filtering')
partition with ( id of InputStream )
begin
from InputStream join cepTable
on cepTable.id == InputStream.id
select InputStream.id as id, InputStream.param3 as param3
insert into OutputStream;
end;
But it provide following exceptions
TID: [-1234] [] [2016-05-13 14:19:11,847] ERROR {org.wso2.carbon.event.processor.admin.EventProcessorAdminService} - Error while initialising the connection, null
org.wso2.carbon.event.processor.core.exception.ExecutionPlanConfigurationException: Error while initialising the connection, null
at org.wso2.carbon.event.processor.core.EventProcessorDeployer.processDeploy(EventProcessorDeployer.java:154)
at org.wso2.carbon.event.processor.core.EventProcessorDeployer.executeManualDeployment(EventProcessorDeployer.java:178)
at org.wso2.carbon.event.processor.core.internal.util.EventProcessorConfigurationFilesystemInvoker.save(EventProcessorConfigurationFilesystemInvoker.java:95)
at org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService.editInactiveExecutionPlan(CarbonEventProcessorService.java:181)
at org.wso2.carbon.event.processor.admin.EventProcessorAdminService.editInactiveExecutionPlan(EventProcessorAdminService.java:108)
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.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
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.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.wso2.carbon.event.processor.stub.EventProcessorAdminServiceStub.editInactiveExecutionPlan(EventProcessorAdminServiceStub.java:2473)
at org.apache.jsp.eventprocessor.edit_005fexecution_005fplan_005fajaxprocessor_jsp._jspService(edit_005fexecution_005fplan_005fajaxprocessor_jsp.java:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.wso2.carbon.ui.filters.CSRFPreventionFilter.doFilter(CSRFPreventionFilter.java:88)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.wso2.carbon.ui.filters.CRLFPreventionFilter.doFilter(CRLFPreventionFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
at org.wso2.carbon.event.receiver.core.internal.tenantmgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:48)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.wso2.siddhi.core.exception.ExecutionPlanRuntimeException: Error while initialising the connection, null
at org.wso2.siddhi.extension.eventtable.rdbms.DBHandler.<init>(DBHandler.java:79)
at org.wso2.siddhi.extension.eventtable.RDBMSEventTable.init(RDBMSEventTable.java:119)
at org.wso2.siddhi.core.util.parser.helper.DefinitionParserHelper.addEventTable(DefinitionParserHelper.java:99)
at org.wso2.siddhi.core.util.ExecutionPlanRuntimeBuilder.defineTable(ExecutionPlanRuntimeBuilder.java:74)
at org.wso2.siddhi.core.util.parser.ExecutionPlanParser.defineTableDefinitions(ExecutionPlanParser.java:194)
at org.wso2.siddhi.core.util.parser.ExecutionPlanParser.parse(ExecutionPlanParser.java:140)
at org.wso2.siddhi.core.SiddhiManager.createExecutionPlanRuntime(SiddhiManager.java:53)
at org.wso2.siddhi.core.SiddhiManager.createExecutionPlanRuntime(SiddhiManager.java:61)
at org.wso2.carbon.event.processor.common.storm.component.SiddhiBolt.init(SiddhiBolt.java:104)
at org.wso2.carbon.event.processor.common.storm.component.SiddhiBolt.<init>(SiddhiBolt.java:86)
at org.wso2.carbon.event.processor.core.internal.storm.util.StormTopologyConstructor.constructTopologyBuilder(StormTopologyConstructor.java:114)
at org.wso2.carbon.event.processor.core.internal.storm.StormTopologyManager.submitTopology(StormTopologyManager.java:127)
at org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService.addExecutionPlan(CarbonEventProcessorService.java:314)
at org.wso2.carbon.event.processor.core.EventProcessorDeployer.processDeploy(EventProcessorDeployer.java:124)
... 76 more
Caused by: java.sql.SQLException
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
at org.wso2.siddhi.extension.eventtable.rdbms.DBHandler.<init>(DBHandler.java:73)
... 89 more
Caused by: java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:278)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:246)
... 95 more
What is the reason for it?
When the execution plan is deployed on WSO2CEP server, having following annotations would be enough,
#From(eventtable = 'rdbms' , datasource.name = 'MYSQL' , table.name = 'cep')
given that we have defined a datasource called 'MYSQL' among the datasource configurations in the WSO2CEP server.
However, when the exceution plan is deployed on Storm, datasource configuration has to be specified inline (because datasource configurations defined in the WSO2CEP server are not available within Storm).
This can be done as below:
#From(eventtable = 'rdbms' , jdbc.url='', username='', password='', driver.name='' , table.name = 'cep')
Fill in the annotation elements appropriately.
Hope this will resolve your issue.
1) Please check whether you have configured MySQL connection. For configuring MySQL connection check below link:
https://docs.wso2.com/display/CEP410/Setting+up+MySQL
Check server is reachable, schema is available on the server with the table needed(cep). Is the schema name "MYSQL" is correct. Please check.
2) Check the storm clustering configuration in event-processor.xml file. For more information on configuration check below link:
https://docs.wso2.com/display/CLUSTER44x/Clustering+CEP+4.1.0#ClusteringCEP4.1.0-DistributedmodedeploymentDistributedCEP
Related
I'm new to WSO2 and mongoDB, but when trying to use the update statement I keep getting "Error in MongoQuery.runQuery".
Here's what I'm trying to do:
I want an API that allows me to update a single row in my collection, based on the parameter I pass in. In my case I want to update the email for a customer based on the account number I pass in.
based on the WSO2 samples it gives an example to update id when I search on a hard coded string, "Bob".
<query id="mongo_update" useConfig="mongo_ds">
<expression>things.update({name:'Bob'}, {name:'Zack', id: #}, true)</expression>
<param name="id" sqlType="STRING"/>
</query>
but I want to search on ID and pass in the parameter to update, something like this:
<query id="mongo_update" useConfig="mongo_ds">
<expression>things.update({accountNo: #}, {primaryEmail:'mynew#email.com'}, true)</expression>
<param name="id" sqlType="STRING"/>
</query>
However when I do that, I always hit the following exception:
Source Data Service:-
Name: mongodb_prod_DSN
Location: /mongodb_prod_DSN.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: updEmailbyAccountNo
Current Params: {accountNo=53223345}
Nested Exception:-
java.lang.IllegalArgumentException: Unable execute update operation using query { accountNo : # }
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:75)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:354)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOutMessageReceiver.invokeBusinessLogic(DBInOutMessageReceiver.java:57)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:42)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:173)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.owasp.csrfguard.CsrfGuardFilter.doFilter(CsrfGuardFilter.java:88)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.wso2.carbon.ui.filters.CSRFPreventionFilter.doFilter(CSRFPreventionFilter.java:88)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.wso2.carbon.ui.filters.CRLFPreventionFilter.doFilter(CRLFPreventionFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.wso2.carbon.integrator.core.IntegratorValve.invoke(IntegratorValve.java:48)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1760)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1719)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in MongoQuery.runQuery: Unable execute update operation using query { accountNo : # }
DS Code: UNKNOWN_ERROR
I've searched the web and other posts, but I can't figure out what I'm doing wrong. I'm sure I've missed something basic, can anyone help?
Thanks
Maybe I'm too impatient and don't understand how WSO2/jongo implement the update command.
Anyhow I installed RESTHeart: http://restheart.org/ as a work around, it exposes the mongo commands as rest APIs, thus I can call the mongo update api, when I need to update things in mongo.
Hope this is useful for others, and if anyone knows how to get the WSO2/jongo command working properly where we can search on ID and then update the rows that match that Id, it would be much appreciated if you can post the answer here.
We are using a Rest API. On calling a login API if we pass % string then it generates this error from Application.cfc
URLDecoder: Incomplete trailing escape (%) pattern
Is there any way I can get rid of this error? I got the below error that might help to replicate issue.
URLDecoder: Incomplete trailing escape (%) pattern
javax.ws.rs.WebApplicationException
Request - struct
content : email=test#gmail.com&password=Test06489%&auth_type=0
headers
Accept-Encoding :gzip
IDFA : c4ca9c604a15254b
TOMCATCGIHTTPURL000000006A6B0000 : /rest/icon/api/v1/authorization/login
X-ORIGINAL-URL : /rest/icon/api/v1/authorization/login
X-REWRITE-URL : /rest/icon/api/v1/authorization/login
connection : Keep-Alive
content-length : 59
content-type : application/x-www-form-urlencoded
host : example.com
ndt : H_GJvwvp8wXirIvs8AV-byQCiD7mfCmDclFH3lblksw75e-4U0CReX3-J
user-agent : 2.0.2.5 rv:23 (phone; Android OS 6.0.1; en_US)
method : POST
protocol : HTTP/1.1
StackTrace
javax.ws.rs.WebApplicationException: java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern at com.sun.jersey.core.impl.provider.entity.BaseFormProvider.readFrom(BaseFormProvider.java:86) at com.sun.jersey.core.impl.provider.entity.FormProvider.readFrom(FormProvider.java:73) at com.sun.jersey.core.impl.provider.entity.FormProvider.readFrom(FormProvider.java:58) at com.sun.jersey.spi.container.ContainerRequest.getEntity(ContainerRequest.java:474) at com.sun.jersey.spi.container.ContainerRequest.getEntity(ContainerRequest.java:538) at com.sun.jersey.spi.container.AdaptingContainerRequest.getEntity(AdaptingContainerRequest.java:225) at coldfusion.rest.provider.CFContainerRequest.getEntity(CFContainerRequest.java:85) at com.sun.jersey.server.impl.model.method.dispatch.FormDispatchProvider.processForm(FormDispatchProvider.java:103) at com.sun.jersey.server.impl.model.method.dispatch.FormDispatchProvider.access$000(FormDispatchProvider.java:68) at com.sun.jersey.server.impl.model.method.dispatch.FormDispatchProvider$FormParameterProvider.getInjectableValues(FormDispatchProvider.java:115) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$EntityParamInInvoker.getParams(AbstractResourceMethodDispatchProvider.java:153) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ObjectOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:256) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at coldfusion.rest.method.dispatch.RESTMethodExecutionFilter.invoke(RESTMethodExecutionFilter.java:42) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:444) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.rest.method.dispatch.CFExceptionHandlingDispatcher.dispatch(CFExceptionHandlingDispatcher.java:67) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) at coldfusion.rest.servlet.CFRestServletContainer.service(CFRestServletContainer.java:143) at coldfusion.rest.servlet.CFRestServletContainer.service(CFRestServletContainer.java:88) at coldfusion.rest.servlet.CFRestServlet.invoke(CFRestServlet.java:384) at coldfusion.rest.servlet.RestFilter.invoke(RestFilter.java:58) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.rest.servlet.RestWrapRequestFilter.invoke(RestWrapRequestFilter.java:46) at coldfusion.rest.servlet.CFRestServlet.invoke(CFRestServlet.java:356) at coldfusion.rest.servlet.CFRestServlet.service(CFRestServlet.java:347) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:97) at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:437) at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:464) at com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36) at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:79) at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:53) at com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:41) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:450) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:197) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern at java.net.URLDecoder.decode(URLDecoder.java:187) at com.sun.jersey.core.impl.provider.entity.BaseFormProvider.readFrom(BaseFormProvider.java:80) ... 78 more
You need to url encode the % as %25. Like so, taking a hint from your error report:
email=test#gmail.com&password=Test06489%25&auth_type=0
I solved this by adding another 25 after my %25 so the API call read %2525
today I am punished with problems in WSO2 EMM.
First I have downgrade my Windows Phone to Windows 8.1.
I am in the enrolment step two. (https://docs.wso2.com/display/EMM220/Registering+a+Windows+Device+Using+the+QR+Code?preview=/53124696/53286463/4-BYOD-Register.png)
I entered the user admin#carbon.super and the password. Then I was redirected to the Page before (with manually enter the discovery server address -> https://docs.wso2.com/display/EMM220/Registering+a+Windows+Device+Using+the+QR+Code?preview=/53124696/53286462/Windows_auto_discovery_fails.png)
The Stdout logs tell me:
2016-12-23T09:30:27.102858360Z [2016-12-23 09:30:27,097] WARN {org.owasp.csrfguard.log.JavaLogger} - potential cross-site request forgery (CSRF) attack thwarted (user:<anonymous>, ip:193.200.138.72, method:POST, uri:/EnrollmentServer/Discovery.svc, error:required token is missing from the request)
2016-12-23T09:31:04.550916506Z [2016-12-23 09:31:04,550] ERROR {/app/modules/oauth/token-handler-utils.js} - {/app/modules/oauth/token-handler-utils.js} Error in retrieving access token by password grant type - getTokenPairAndScopesByPasswordGrantType(a, b, c, d)
2016-12-23T09:31:04.569858262Z [2016-12-23 09:31:04,552] ERROR {org.jaggeryjs.jaggery.core.manager.WebAppManager} - org.mozilla.javascript.JavaScriptException: Error: {/app/modules/oauth/token-handlers.js} Could not set up token pair by password grant type. Error in token retrieval - setupTokenPairByPasswordGrantType(x, y) (/emm-web-agent/app/modules/oauth/token-handlers.js#59)
2016-12-23T09:31:04.569924438Z org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.JavaScriptException: Error: {/app/modules/oauth/token-handlers.js} Could not set up token pair by password grant type. Error in token retrieval - setupTokenPairByPasswordGrantType(x, y) (/emm-web-agent/app/modules/oauth/token-handlers.js#59)
2016-12-23T09:31:04.569939090Z at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571)
2016-12-23T09:31:04.569950294Z at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
2016-12-23T09:31:04.569960418Z at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:588)
2016-12-23T09:31:04.569970546Z at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:508)
2016-12-23T09:31:04.569980120Z at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
2016-12-23T09:31:04.569989714Z at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
2016-12-23T09:31:04.569999170Z at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
2016-12-23T09:31:04.570008962Z at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
2016-12-23T09:31:04.570018588Z at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
2016-12-23T09:31:04.570028072Z at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)
2016-12-23T09:31:04.570037658Z at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
2016-12-23T09:31:04.570050954Z at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:377)
2016-12-23T09:31:04.570101376Z at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
2016-12-23T09:31:04.570123074Z at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
2016-12-23T09:31:04.570141798Z at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
2016-12-23T09:31:04.570160646Z at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
2016-12-23T09:31:04.570179138Z at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
2016-12-23T09:31:04.570195772Z at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
2016-12-23T09:31:04.570214620Z at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
2016-12-23T09:31:04.570234380Z at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120)
2016-12-23T09:31:04.570265180Z at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
2016-12-23T09:31:04.570290090Z at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
2016-12-23T09:31:04.570331922Z at org.wso2.carbon.ui.filters.cache.URLBasedCachePreventionFilter.doFilter(URLBasedCachePreventionFilter.java:57)
2016-12-23T09:31:04.570352596Z at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
2016-12-23T09:31:04.570372684Z at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
2016-12-23T09:31:04.570387446Z at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
2016-12-23T09:31:04.570396782Z at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
2016-12-23T09:31:04.570504794Z at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
2016-12-23T09:31:04.570517796Z at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
2016-12-23T09:31:04.570541300Z at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
2016-12-23T09:31:04.570558280Z at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:59)
2016-12-23T09:31:04.570572840Z at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
2016-12-23T09:31:04.570587714Z at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
2016-12-23T09:31:04.570602664Z at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
2016-12-23T09:31:04.570617204Z at org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve.invoke(WebappAuthenticationValve.java:45)
2016-12-23T09:31:04.570632290Z at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
2016-12-23T09:31:04.570664667Z at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
2016-12-23T09:31:04.570687064Z at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
2016-12-23T09:31:04.570703167Z at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
2016-12-23T09:31:04.570718014Z at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
2016-12-23T09:31:04.570732954Z at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
2016-12-23T09:31:04.570747690Z at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
2016-12-23T09:31:04.570762287Z at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082)
2016-12-23T09:31:04.570782654Z at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623)
2016-12-23T09:31:04.570819422Z at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1756)
2016-12-23T09:31:04.570837834Z at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1715)
2016-12-23T09:31:04.570863232Z at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2016-12-23T09:31:04.570878402Z at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2016-12-23T09:31:04.570887432Z at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
2016-12-23T09:31:04.570897226Z at java.lang.Thread.run(Thread.java:745)
2016-12-23T09:31:04.570908304Z Caused by: org.mozilla.javascript.JavaScriptException: Error: {/app/modules/oauth/token-handlers.js} Could not set up token pair by password grant type. Error in token retrieval - setupTokenPairByPasswordGrantType(x, y) (/emm-web-agent/app/modules/oauth/token-handlers.js#59)
2016-12-23T09:31:04.570919702Z at org.jaggeryjs.rhino.emm_web_agent.app.modules.oauth.c1._c_anonymous_2(/emm-web-agent/app/modules/oauth/token-handlers.js:59)
2016-12-23T09:31:04.570952927Z at org.jaggeryjs.rhino.emm_web_agent.app.modules.oauth.c1.call(/emm-web-agent/app/modules/oauth/token-handlers.js)
2016-12-23T09:31:04.570982854Z at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
2016-12-23T09:31:04.571014082Z at org.jaggeryjs.rhino.emm_web_agent.app.modules.enrollments.windows.c0._c_script_0(/emm-web-agent/app/modules/enrollments/windows/agent-controller.jag:52)
2016-12-23T09:31:04.571031634Z at org.jaggeryjs.rhino.emm_web_agent.app.modules.enrollments.windows.c0.call(/emm-web-agent/app/modules/enrollments/windows/agent-controller.jag)
2016-12-23T09:31:04.571050160Z at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
2016-12-23T09:31:04.571066660Z at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
2016-12-23T09:31:04.571077604Z at org.jaggeryjs.rhino.emm_web_agent.app.modules.enrollments.windows.c0.call(/emm-web-agent/app/modules/enrollments/windows/agent-controller.jag)
2016-12-23T09:31:04.571128797Z at org.jaggeryjs.rhino.emm_web_agent.app.modules.enrollments.windows.c0.exec(/emm-web-agent/app/modules/enrollments/windows/agent-controller.jag)
2016-12-23T09:31:04.571146017Z at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
2016-12-23T09:31:04.571161567Z ... 49 more
What I do wrong?
WSO2MDM_VERSION 2.2.0,
FROM ubuntu:16.04 (Docker)
Any idea?
Regards!
I have a bpmn process named "vacaciones". I launch correctly inside Java code as follows (this works):
runtimeService.startProcessInstanceByKey("vacaciones");
But using Camunda Rest api the same operation fails. I do the next POST request:
URL-Method POST
http://localhost:7002/rest/engine/default/process-definition/key/vacaciones/start
Headers
Content-Type: application/json
And I get this error response:
GRAVE: Servlet.service() para servlet default lanzó excepción
org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)
at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)
at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:372)
at org.jboss.resteasy.core.SynchronousDispatcher.invokePropagateNotFound(SynchronousDispatcher.java:217)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:224)
at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at org.camunda.bpm.engine.rest.sub.repository.impl.ProcessDefinitionResourceImpl.startProcessInstance(ProcessDefinitionResourceImpl.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)
at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140)
at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:109)
at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:135)
at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
... 23 more
Whats wrong?
What is your request body? Did you send any? If not I think you have to post an empty JSON object ({}) even if you don't have any variables.
This is the solution. I posted an empty body but if I post the next body it works:
{
"variables": { }
}
I am using STS(Spring Tool Suite) IDE, Tomcat 7, Spring 4 with Rest (#RestController) , JDK 7 and using Maven project.
I am calling Axis2 WebService and for that I have generated Axis2 Client using WSDL2Java tool by passing the WSDLLocation URL . Then one Stub(Client) class have been generated and I am trying to retrieve the "catgoryType" Element from the Axis2 Service but I am getting Error and here is the Exception Logs :-
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement categoryType
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at com.webservice.client.ProductIdentity_7_0Stub.fromOM(ProductIdentity_7_0Stub.java:3085)
at com.webservice.client.ProductIdentity_7_0Stub.findProduct(ProductIdentity_7_0Stub.java:1122)
at com.webservice.client.SOAPConsumer.getInfo(SOAPConsumer.java:125)
at com.controller.restcontroller.v1.PINDetailsRestController.getPINResult(PINDetailsRestController.java:79)
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.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:777)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:706)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement categoryType
at com.webservice.client.ProductIdentity_7_0Stub$ProduceableCategoryIdentifier$Factory.parse(ProductIdentity_7_0Stub.java:65481)
at com.webservice.client.ProductIdentity_7_0Stub$Component$Factory.parse(ProductIdentity_7_0Stub.java:38761)
at com.webservice.client.ProductIdentity_7_0Stub$Product$Factory.parse(ProductIdentity_7_0Stub.java:31880)
at com.webservice.client.ProductIdentity_7_0Stub$FindProductOP$Factory.parse(ProductIdentity_7_0Stub.java:56244)
at com..webservice.client.ProductIdentity_7_0Stub$FindProductResponse$Factory.parse(ProductIdentity_7_0Stub.java:44992)
at com.webservice.client.ProductIdentity_7_0Stub$FindProductResponseE$Factory.parse(ProductIdentity_7_0Stub.java:26859)
at com.webservice.client.ProductIdentity_7_0Stub.fromOM(ProductIdentity_7_0Stub.java:2986)
... 40 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement categoryType
at com.webservice.client.ProductIdentity_7_0Stub$ProduceableCategoryIdentifier$Factory.parse(ProductIdentity_7_0Stub.java:65407)
... 46 more
2015-12-03 12:17:31 FATAL SOAPConsumer:133 - Some Error happened due to Axis2 Client
As per my observation, in the XSD of calling Axis2 Service , the Element name is "catgoryType" but in my application , inside the generated Stub(Client) class, the Element name is "localCategoryType". So my question is how to Map the generated Stub class Element with the XSD Element in the Calling Axis2 Service?
Thanks,