How to assign an invoke response value to an output variable of a bpel process in wso2 - bpel

I am trying to push a bpel variable LVSProxyPLResponse to the output variable of the bpel process by using the assign action as shown in code
<bpel:copy>
<bpel:from>
<bpel:literal xml:space="preserve"><tns:LVMathProxyResponse xmlns:tns="http://lvmathproxy.bpel.bps" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:Mathresult></tns:Mathresult>
</tns:LVMathProxyResponse>
</bpel:literal>
</bpel:from>
<bpel:to variable="output" part="payload"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="LVSProxyPLResponse">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[result]]>
</bpel:query>
</bpel:from>
<bpel:to part="payload" variable="output">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[tns:Mathresult]]>
</bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
The REST proxy web service on ESB is being invoked through the invoke action in my bpel process and I can verify that when I read the output variable LVSProxyPLResponse on the BPS.
The output variable has a complex type element as shown in code below
<element name="LVMathProxyResponse">
<complexType>
<sequence>
<element name="Mathresult" type="tns:LVMathType"></element>
</sequence>
</complexType>
</element>
For some reason I cannot get to push the value to the output variable as I get the following error.
[2012-03-29 20:27:39,380] INFO - AxisService - The system is attempting to engage a module that is already engaged: ServerAdminModule
[2012-03-29 20:27:39,511] ERROR - BpelEngineImpl - Scheduled job failed; jobDetail=JobDetails( instanceId: null mexId: hqejbhcnphr75sbpnvnci6 processId: {http://lvmathproxy.bpel.bps}LVMathProxy-58 type: INVOKE_INTERNAL channel: null correlatorId: null correlationKeySet: null retryCount: null inMem: false detailsExt: {enqueue=false})
java.lang.IllegalArgumentException: null parent
at org.apache.ode.utils.DOMUtils.findChildByName(DOMUtils.java:776)
at org.apache.ode.utils.DOMUtils.findChildByName(DOMUtils.java:771)
at org.apache.ode.bpel.runtime.ASSIGN.evalQuery(ASSIGN.java:658)
at org.apache.ode.bpel.runtime.ASSIGN.evalRValue(ASSIGN.java:207)
at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:386)
at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:89)
at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451)
at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:879)
at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeNewInstance(PartnerLinkMyRoleImpl.java:205)
at org.apache.ode.bpel.engine.BpelProcess$1.invoke(BpelProcess.java:309)
at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:250)
at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:305)
at org.apache.ode.bpel.engine.BpelProcess.handleJobDetails(BpelProcess.java:458)
at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:553)
at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:445)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:537)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:531)
at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:284)
at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:239)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:531)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:515)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
What am I missing or doing wrong ?
i also am getting the following error
2012-03-30 20:21:09,062] ERROR - BPELProcessProxy - Timeout or execution error when waiting for response to MEX {MyRoleMex#hqejbhcnphr75w46k8n8wm [Client hqejbhcnphr75w46k8n8wl] calling {http://lvmathprocess.bpel.bps}LVMService.process(...)} java.util.concurrent.TimeoutException: Message exchange org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl$ResponseFuture#1d1339b timed out(120000 ms) when waiting for a response!
java.util.concurrent.TimeoutException: Message exchange org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl$ResponseFuture#1d1339b timed out(120000 ms) when waiting for a response! at org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl$ResponseFuture.get(MyRoleMessageExchangeImpl.java:250)
I cannot see any instance of the process when I run on BPS version 2.1.0. But I can see the instance on version 2.1.2 and can view relevant variables, but still get the above errors when using try this service.

Just curious - your output content is an XSD? It should be be in XML format if I'm right.

Related

CICS Error Unable to create connection mainframe system

One of my applications is integrated with the mainframe system. Through CICS / CTG. I am facing an error while executing a request.also, i have used ASN1 encoding for request
The error I am getting while executing the request
com.ibm.connector2.cics.CICSUserInputException: CTG9627E IOException occurred when writing to the Output Record
org.springframework.dao.NonTransientDataAccessResourceException: Unable to create a connection to the remote application; nested exception is com.ibm.connector2.cics.CICSUserInputException:
CTG9627E IOException occurred when writing to the Output Record
com.ibm.connector2.cics.CICSUserInputException: CTG9627E IOException occurred when writing to the Output Record
at com.ibm.connector2.cics.ECIManagedConnection.call(Unknown Source)
at com.ibm.connector2.cics.ECIConnection.call(Unknown Source)
at com.ibm.connector2.cics.ECIInteraction.execute(Unknown Source)
java.io.IOException: messagelength in header greater than existing data length - common area too short?
at com.ibm.connector2.cics.ECIManagedConnection.call(Unknown Source)
at com.ibm.connector2.cics.ECIConnection.call(Unknown Source)
at com.ibm.connector2.cics.ECIInteraction.execute(Unknown Source)
i am using
cics version : c900-20160704-0205
Does anyone have any insights about this?
Error description is available at https://www.ibm.com/docs/en/cics-tg-multi/9.0?topic=SSZHFX_9.0.0/cclaj/CTG9627E.htm
It seems like the data you are passing is not a isntanceof javax.resource.cci.Streamable. Could you verify that.
Solved the issue with the below resolution
messagelength in header greater than existing data length - common area too short? as per this error message length is short so I have tried to increase length in a common area as per this documentation https://www.ibm.com/docs/en/cics-ts/5.6?topic=applications-transferring-data-between-programs-using-channels
added code in CTG Service executor >> CTG Record
setCommonAreaLength(32500)
After applying this resolution issue is resolved
Hope some one helps this ans

Logstash 6.2 - full persistent queue (wrong mapping?)

My queue is almost full and I see this errors in my log file:
[2018-05-16T00:01:33,334][WARN ][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"2018.05.15-el-mg_papi-prod", :_type=>"doc", :_routing=>nil}, #<LogStash::Event:0x608d85c1>], :response=>{"index"=>{"_index"=>"2018.05.15-el-mg_papi-prod", "_type"=>"doc", "_id"=>"mHvSZWMB8oeeM9BTo0V2", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse [papi_request_json.query.disableFacets]", "caused_by"=>{"type"=>"i_o_exception", "reason"=>"Current token (VALUE_TRUE) not numeric, can not use numeric value accessors\n at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper#56b8442f; line: 1, column: 555]"}}}}}
[2018-05-16T00:01:37,145][INFO ][org.logstash.beats.BeatsHandler] [local: 0:0:0:0:0:0:0:1:5000, remote: 0:0:0:0:0:0:0:1:50222] Handling exception: org.logstash.beats.BeatsParser$InvalidFrameProtocolException: Invalid Frame Type, received: 69
[2018-05-16T00:01:37,147][INFO ][org.logstash.beats.BeatsHandler] [local: 0:0:0:0:0:0:0:1:5000, remote: 0:0:0:0:0:0:0:1:50222] Handling exception: org.logstash.beats.BeatsParser$InvalidFrameProtocolException: Invalid Frame Type, received: 84
...
[2018-05-16T15:28:09,981][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({"type"=>"cluster_block_exception", "reason"=>"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"})
[2018-05-16T15:28:09,982][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({"type"=>"cluster_block_exception", "reason"=>"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"})
[2018-05-16T15:28:09,982][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({"type"=>"cluster_block_exception", "reason"=>"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"})
If I understand first warning, problem is with mapping. I have a lot of files in my queue Logstash folder. My questions is:
How to empty my queue, can i just delete all files from logstash queue folder(all logs will be lost)? And then resend all the data to logstash to proper index?
How can I determine where exactly is problem in mapping, or which servers sending data of wrong type?
I have pipeline on port 5000 named testing-pipeline just for checking if Logstash is active from nagios. What is that [INFO ][org.logstash.beats.BeatsHandler] logs?
If I understand correctly, [INFO ][logstash.outputs.elasticsearch] is just logs about retrying to process logstash queue?
On all servers is FIlebeat 6.2.2. Thank you for your help.
All pages in queue could be deleted but it is not the proper solution. In my case, the queue was full because there was events with different mapping of index. In Elasticsearch 6, you cannot send documents with different mapping to the same index so the logs stacked in queue because of this logs (even if there is only one wrong event, all others will not be processed). So how to process all data you can process an skip the wrong one? Solution is to configure DLQ (dead letter queue). Every event with response code 400 or 404 is moved to DLQ so others could be process. The data from DLQ can be processed later with pipeline.
Wrong mapping can be determined by error log "error"=>{"type"=>"mapper_parsing_exception", ..... }. To specify exact place with wrong mapping, you have to compare mapping of events and indices.
[INFO ][org.logstash.beats.BeatsHandler] was caused by Nagios server. The check did not consist of valid request, that's why the Handling exception. The check should test if Logstash service is active. Now I check Logstas service on localhost:9600, for more info here.
[INFO ][logstash.outputs.elasticsearch] means that Logstash trying to process the queue but index is locked ([FORBIDDEN/12/index read-only / allow delete (api)]) because the indices was set to read-only state. Elasticsearch, when there is not enough space on server, automatically configure indices to read-only. This can be change by cluster.routing.allocation.disk.watermark.low, for more info here.

Unable to join race on local server

I installed the code rally server following th guide on IBM.
It runs, I can access the server information page and see the leaderboard.
But when I try to enter with Eclipse I get a
"Unable to enter Keepertje on Localhost"
I also try to connect with the nodeclient found on Github, but there I also cannot authenticate. Am I missing something?
Kind regards,.
Cindy
My Server.xml:
<!-- Enable features -->
<featureManager>
<feature>webProfile-7.0</feature>
<feature>localConnector-1.0</feature>
<feature>websocket-1.1</feature>
</featureManager>
<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>
<!-- Automatically expand WAR files and EAR files -->
<applicationManager autoExpand="true"/>
<applicationMonitor updateTrigger="mbean"/>
<webApplication id="CodeRallyWeb" location="CodeRallyWeb.war" name="CodeRallyWeb"/>
Error:
------Start of DE processing------ = [9-2-17 15:17:13:214 CET]
Exception = javax.servlet.ServletException
Source = com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters
probeid = 1064
Stack Dump = javax.servlet.ServletException: java.lang.IllegalArgumentException: There is no value matching -1 id
at com.ibm.coderally.web.service.DatabaseServletUbi.doPost(DatabaseServletUbi.java:64)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:778)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1157)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4956)
at com.ibm.ws.webcontainer31.osgi.webapp.WebApp31.handleRequest(WebApp31.java:525)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.handleRequest(DynamicVirtualHost.java:315)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1014)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:280)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:967)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:359)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:318)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:471)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:405)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:285)
at com.ibm.ws.http.channel.internal.inbound.HttpICLReadCallback.complete(HttpICLReadCallback.java:66)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: There is no value matching -1 id
at com.ibm.coderally.api.ai.CheckpointAI.getById(CheckpointAI.java:109)
at com.ibm.coderally.web.service.SubmitVehicle.buildIntermediateRaceCar(SubmitVehicle.java:421)
at com.ibm.coderally.web.service.SubmitVehicle.doPost(SubmitVehicle.java:307)
at com.ibm.coderally.web.service.DatabaseServletUbi.doPost(DatabaseServletUbi.java:61)
... 25 more
Dump of callerThis
null
Make Vehicle
All Vehicles in the corner
Server.json
{"servers":[{"alias":"IBM Cloud","host":"http://www.coderallycloud.com","username":"someone","oauthType":null,"logoutURL":null,"port":80,"userId":77},{"alias":"NA Contest Server","host":"http://challenge-na.coderallycloud.com","username":"","oauthType":null,"logoutURL":null,"port":80,"userId":-1},{"alias":"EU Contest Server","host":"http://challenge-eu.coderallycloud.com","username":"","oauthType":null,"logoutURL":null,"port":80,"userId":-1},{"alias":"Brazil Contest Server","host":"http://challenge-br.coderallycloud.com","username":"","oauthType":null,"logoutURL":null,"port":80,"userId":-1},{"alias":"India Contest Server","host":"http://challenge-in.coderallycloud.com","username":"","oauthType":null,"logoutURL":null,"port":80,"userId":-1},{"alias":"China Contest Server","host":"http://challenge-cn.coderallycloud.com","username":"","oauthType":null,"logoutURL":null,"port":80,"userId":-1},{"alias":"MyOwnServer","host":"http://localhost","username":"Keepertje","oauthType":null,"logoutURL":null,"port":9080,"userId":1}]}
OK so you have not yet logged into the server according to the error message. To do so please click on the servers browser in Eclipse (the grey square icon next to the green + for creating new AIs). Once you have done that select your local server and login using the login button to the right - if the username does not exist it will create it and log you in. Once logged in you can request a new race and it should work (the user ID of -1 error message is displayed if you're not logged in - I'll have a look at getting that text changed for this circumstance to make it clearer).

MyFaces: exceeding maximum Paramaters allowed per request

The application I'm involved in was deployed to test server (WebSphere 7) from where we're getting errors we've never seen before:
This is the message about exceeding maximum number of parameters allowed per request, additionally written with error:
28.01.2013 15:51:38 SEVERE exceeding maximum Paramaters allowed per request -> 1000 ,current parameterSize-> 1000 cannot add more.
28.01.2013 15:51:38 SEVERE An exception occurred
javax.faces.FacesException: java.lang.IllegalArgumentException
org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241)
org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156)
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:191)
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
I've never seen a parameter for configuring maximul parameters count, neither have I found it in http://myfaces.apache.org/core20/myfaces-impl/webconfig.html. So, what is this parameterSize param, where can I configure it?
The application is embedded as EAR, is using MyFaces 2.0.7 and PrimeFaces 3.4.
Thanks BalusC for quick response, through the exception comes from MyFaces class, it is the WebSphere setting
com.ibm.ws.webcontainer.maxParamPerRequest
You can use this property to change the maximum number of parameters allowed in your inbound requests, based on your applications and environment. The maximum number of parameters allowed per inbound request (GET or POST) defaults to 10000.
source: http://www-01.ibm.com/support/docview.wss?uid=swg21592923

Cross-Site Scripting and Web Parameter Tampering prevention in Playframework

After launching our first public alpha release of http://wwww.trademango.com which is built with Play framework. I have been experience Web Parameter Tampering attempts being made by someone or something (i.e bots). These attempts has been going on for a while now. We are looking into boosting our security. I was wondering if someone has experience integrating tools like owsap with Playframework. I will like to get some community feedback on what other people are doing against such attacks.
Below are few Web Parameter Tampering attempt in action:
#69mkklokf
Internal Server Error (500) for request GET /supplier/:q/:page?q=:supplierUUID
Execution exception (In {module:common-model}/app/models/services/ID.java around line 46)
NumberFormatException occured : For input string: ""
play.exceptions.JavaExecutionException: For input string: ""
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:231)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:450)
at java.lang.Long.valueOf(Long.java:508)
at models.services.ID.base36ToUUID(ID.java:46)
at controllers.Application.supplier(Application.java:177)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:548)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:502)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:478)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:473)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)
... 1 more
22 Mar 2012 07:20:57,270 ERROR play:570 -
#69mkklokg
phpmyadmin.translators.html action not found
Action not found
Action phpmyadmin.translators.html could not be found. Error raised is Controller controllers.phpmyadmin.translators not found
play.exceptions.ActionNotFoundException: Action phpmyadmin.translators.html not found
at play.mvc.ActionInvoker.getActionMethod(ActionInvoker.java:590)
at play.mvc.ActionInvoker.resolve(ActionInvoker.java:85)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.Exception: Controller controllers.phpmyadmin.translators not found
... 3 more
22 Mar 2012 10:13:16,611 ERROR play:570 -
#69mkklokh
nice ports,.Trinity.txt.bak action not found
Action not found
Action nice ports,.Trinity.txt.bak could not be found. Error raised is Controller controllers.nice ports,.Trinity.txt not found
play.exceptions.ActionNotFoundException: Action nice ports,.Trinity.txt.bak not found
at play.mvc.ActionInvoker.getActionMethod(ActionInvoker.java:590)
at play.mvc.ActionInvoker.resolve(ActionInvoker.java:85)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.Exception: Controller controllers.nice ports,.Trinity.txt not found
... 3 more
I would suggest removing the 'catch all' route
# Catch all
* /{controller}/{action} {controller}.{action}
Remove this, and have explicit mappings to all your controllers and actions.

Resources