Re: [Dev] PassThroughMessageProcessor threads on Waiting State

2018-04-04 Thread Shakila Sasikaran
Hi Junior,

Which version are you using? Seems this is similar to
https://wso2.org/jira/browse/ESBJAVA-4392.

Thanks

On Thu, Apr 5, 2018 at 2:33 AM, Júnior  wrote:

> Hi,
>
> I am seeing a lot of PassThroughMessageProcessor threads in Waiting state.
>
> Is this normal? Is there a way to set then to remove stale threads?
>
> Thanks,
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Shakila Sasikaran
Software Engineer
Mobile :+94 (0) 77 526 6848
shak...@wso2.com
WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Cache mediator not working good for storing json responses.

2018-04-04 Thread Shakila Sasikaran
Hi Aditya,

I tested your API configuration with a mock backend which returns a simple
JSON payload and I didn't get the mentioned error. Please find the
configurations [2].

[1]
{
"test": "test"
}

[2]
API:
http://ws.apache.org/ns/synapse; name="cacheAPI2"
context="/cache2">
   
  
 

 
 

 
 

 
 
 

 
 

 
 
 

 
 
 
  
  
  
   


Endpoint:
http://ws.apache.org/ns/synapse; name="AgreementEP">
   http://www.mocky.io/v2/5ac4b2ae2f2a00f5fb42
*" method="get">
  
 1.0
  
  
 0
 0
  
   


Thanks

On Wed, Apr 4, 2018 at 10:25 PM, aditya shivankar <
shivankar.adit...@gmail.com> wrote:

> Respected Sir/Madam,
>
> If you are able to store any json response into cache. Using any freely
> available rest service on net. Please share me the api example.
>
> Thanks and Regards,
> Aditya
>
> On Wed, Apr 4, 2018 at 10:22 PM, aditya shivankar <
> shivankar.adit...@gmail.com> wrote:
>
>> Respected Sir/Madam,
>>
>> I am using wso2ei 6.1.1 .
>>
>> The backend service is returning a big json response of about 2000
>> lines. If I remove cache mediator both finder and collector from above
>> service.  I am able to receive the backend response in wso2ei api service.
>> The backend response contains some "$id": "2", "$type": "A.B, C.D", some
>> nested arrays etc..
>>
>> With Regards,
>> Aditya
>>
>>
>> On Wed, Apr 4, 2018 at 5:15 PM, Riyafa Abdul Hameed 
>> wrote:
>>
>>> This is similar to this issue[1]. Which version are you using?
>>>
>>> [1] https://wso2.org/jira/browse/ESBJAVA-4318
>>>
>>> On Wed, Apr 4, 2018 at 5:07 PM, Thishani Lucas 
>>> wrote:
>>>
 Hi Aditya,

 Could you please elaborate more about the response sent by the backend?
 What kind of message type does it send?

 Thanks,
 Thishani

 On Wed, Apr 4, 2018 at 4:26 PM, aditya shivankar <
 shivankar.adit...@gmail.com> wrote:

> Respected Madam,
>
> Tried adding " action="remove"/>".
>
> But still got the same error. Plus the rest service i am using is not
> returning empty response, tested it.
>
> 
> http://ws.apache.org/ns
> /synapse">
> 
> 
> 
> 
> 
>
>  maxMessageSize="1" scope="per-host" timeout="5000">
> 
> 
> 
>
> 
> 
> 
>  type="STRING" value="1392"/>
>  action="remove"/>
> 
> 
> 
> 
> 
> 
>  value="true"/>
> 
> 
> 
>
> 
>
> 
> 
> 
> 
> 
> 
>
> With Regards,
> Aditya
>
>
> On Wed, Apr 4, 2018 at 4:16 PM, Thivya Mahenthirarasa  > wrote:
>
>> Hi Adiya,
>>
>> According to the logs, you are receiving 202 accepted success code,
>> that means  the response cached for the Endpoint might returning an
>> empty body.
>>
>>  Could you please add the following property before cache mediator in
>> order to return the body from the cache to the Endpoint.
>>
>>
>>  
>>
>>
>> Try out the solution and let us know whether you could able to sort out 
>> the exception
>>
>>
>>
>> Regards,
>>
>> Thivya
>>
>>
>> On Wed, Apr 4, 2018 at 3:58 PM, aditya shivankar <
>> shivankar.adit...@gmail.com> wrote:
>>
>>> Respected Sir/Madam,
>>>
>>> Below is my api :
>>>
>>> 
>>> http://ws.apache.org/ns
>>> /synapse">
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> >> maxMessageSize="1" scope="per-host" timeout="5000">
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> >> type="STRING" value="1392"/>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> >> value="true"/>
>>> 
>>> 
>>> 
>>>
>>> 
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> and my endpoint :
>>>
>>> 
>>> http://ws.apache.org/ns/synapse
>>> ">

[Dev] PassThroughMessageProcessor threads on Waiting State

2018-04-04 Thread Júnior
Hi,

I am seeing a lot of PassThroughMessageProcessor threads in Waiting state.

Is this normal? Is there a way to set then to remove stale threads?

Thanks,
-- 
Francisco Ribeiro
*SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Cache mediator not working good for storing json responses.

2018-04-04 Thread aditya shivankar
 Respected Sir/Madam,

If you are able to store any json response into cache. Using any freely
available rest service on net. Please share me the api example.

Thanks and Regards,
Aditya

On Wed, Apr 4, 2018 at 10:22 PM, aditya shivankar <
shivankar.adit...@gmail.com> wrote:

> Respected Sir/Madam,
>
> I am using wso2ei 6.1.1 .
>
> The backend service is returning a big json response of about 2000  lines.
> If I remove cache mediator both finder and collector from above service.  I
> am able to receive the backend response in wso2ei api service.
> The backend response contains some "$id": "2", "$type": "A.B, C.D", some
> nested arrays etc..
>
> With Regards,
> Aditya
>
>
> On Wed, Apr 4, 2018 at 5:15 PM, Riyafa Abdul Hameed 
> wrote:
>
>> This is similar to this issue[1]. Which version are you using?
>>
>> [1] https://wso2.org/jira/browse/ESBJAVA-4318
>>
>> On Wed, Apr 4, 2018 at 5:07 PM, Thishani Lucas  wrote:
>>
>>> Hi Aditya,
>>>
>>> Could you please elaborate more about the response sent by the backend?
>>> What kind of message type does it send?
>>>
>>> Thanks,
>>> Thishani
>>>
>>> On Wed, Apr 4, 2018 at 4:26 PM, aditya shivankar <
>>> shivankar.adit...@gmail.com> wrote:
>>>
 Respected Madam,

 Tried adding ">>> action="remove"/>".

 But still got the same error. Plus the rest service i am using is not
 returning empty response, tested it.

 
 http://ws.apache.org/ns
 /synapse">
 
 
 
 
 

 >>> maxMessageSize="1" scope="per-host" timeout="5000">
 
 
 

 
 
 
 >>> type="STRING" value="1392"/>
 >>> action="remove"/>
 
 
 
 
 
 
 >>> value="true"/>
 
 
 

 

 
 
 
 
 
 

 With Regards,
 Aditya


 On Wed, Apr 4, 2018 at 4:16 PM, Thivya Mahenthirarasa 
 wrote:

> Hi Adiya,
>
> According to the logs, you are receiving 202 accepted success code,
> that means  the response cached for the Endpoint might returning an
> empty body.
>
>  Could you please add the following property before cache mediator in
> order to return the body from the cache to the Endpoint.
>
>
>  
>
>
> Try out the solution and let us know whether you could able to sort out 
> the exception
>
>
>
> Regards,
>
> Thivya
>
>
> On Wed, Apr 4, 2018 at 3:58 PM, aditya shivankar <
> shivankar.adit...@gmail.com> wrote:
>
>> Respected Sir/Madam,
>>
>> Below is my api :
>>
>> 
>> http://ws.apache.org/ns
>> /synapse">
>> 
>> 
>> 
>> 
>> 
>>
>> > maxMessageSize="1" scope="per-host" timeout="5000">
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> > type="STRING" value="1392"/>
>> 
>> 
>> 
>> 
>> 
>> 
>> > value="true"/>
>> 
>> 
>> 
>>
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> and my endpoint :
>>
>> 
>> http://ws.apache.org/ns/synapse
>> ">
>> 
>> 
>>
>>
>> Getting below error :
>>
>> ERROR - CacheMediator Error setting response envelope from cache :
>> mediation.cache_key
>> javax.xml.soap.SOAPException: org.apache.axiom.om.OMException: SOAP
>> message MUST NOT contain Processing Instructions(PI)
>>
>> Please find logs attached.
>>
>> With Regards,
>> Aditya
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Thivya Mahenthirarasa*
>
> *Software Engineer -Support Team | WSO2*
>
>
> *Email: thi...@wso2.com *
>
> *Mobile: +94766461966 *
> *Web: http://wso2.com *
>


 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> Regards,
>>>
>>> *Thishani Lucas*
>>> *Software Engineer*
>>> 

Re: [Dev] Cache mediator not working good for storing json responses.

2018-04-04 Thread aditya shivankar
Respected Sir/Madam,

I am using wso2ei 6.1.1 .

The backend service is returning a big json response of about 2000  lines.
If I remove cache mediator both finder and collector from above service.  I
am able to receive the backend response in wso2ei api service.
The backend response contains some "$id": "2", "$type": "A.B, C.D", some
nested arrays etc..

With Regards,
Aditya


On Wed, Apr 4, 2018 at 5:15 PM, Riyafa Abdul Hameed  wrote:

> This is similar to this issue[1]. Which version are you using?
>
> [1] https://wso2.org/jira/browse/ESBJAVA-4318
>
> On Wed, Apr 4, 2018 at 5:07 PM, Thishani Lucas  wrote:
>
>> Hi Aditya,
>>
>> Could you please elaborate more about the response sent by the backend?
>> What kind of message type does it send?
>>
>> Thanks,
>> Thishani
>>
>> On Wed, Apr 4, 2018 at 4:26 PM, aditya shivankar <
>> shivankar.adit...@gmail.com> wrote:
>>
>>> Respected Madam,
>>>
>>> Tried adding ">> action="remove"/>".
>>>
>>> But still got the same error. Plus the rest service i am using is not
>>> returning empty response, tested it.
>>>
>>> 
>>> http://ws.apache.org/ns
>>> /synapse">
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> >> maxMessageSize="1" scope="per-host" timeout="5000">
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> >> type="STRING" value="1392"/>
>>> >> action="remove"/>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> >> value="true"/>
>>> 
>>> 
>>> 
>>>
>>> 
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> With Regards,
>>> Aditya
>>>
>>>
>>> On Wed, Apr 4, 2018 at 4:16 PM, Thivya Mahenthirarasa 
>>> wrote:
>>>
 Hi Adiya,

 According to the logs, you are receiving 202 accepted success code,
 that means  the response cached for the Endpoint might returning an
 empty body.

  Could you please add the following property before cache mediator in
 order to return the body from the cache to the Endpoint.


  


 Try out the solution and let us know whether you could able to sort out 
 the exception



 Regards,

 Thivya


 On Wed, Apr 4, 2018 at 3:58 PM, aditya shivankar <
 shivankar.adit...@gmail.com> wrote:

> Respected Sir/Madam,
>
> Below is my api :
>
> 
> http://ws.apache.org/ns
> /synapse">
> 
> 
> 
> 
> 
>
>  maxMessageSize="1" scope="per-host" timeout="5000">
> 
> 
> 
>
> 
> 
> 
>  type="STRING" value="1392"/>
> 
> 
> 
> 
> 
> 
>  value="true"/>
> 
> 
> 
>
> 
>
> 
> 
> 
> 
> 
> 
>
> and my endpoint :
>
> 
> http://ws.apache.org/ns/synapse;>
> 
> 
>
>
> Getting below error :
>
> ERROR - CacheMediator Error setting response envelope from cache :
> mediation.cache_key
> javax.xml.soap.SOAPException: org.apache.axiom.om.OMException: SOAP
> message MUST NOT contain Processing Instructions(PI)
>
> Please find logs attached.
>
> With Regards,
> Aditya
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --

 *Thivya Mahenthirarasa*

 *Software Engineer -Support Team | WSO2*


 *Email: thi...@wso2.com *

 *Mobile: +94766461966 *
 *Web: http://wso2.com *

>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Regards,
>>
>> *Thishani Lucas*
>> *Software Engineer*
>> *WSO2 Lanka (Private) Limited**: http://wso2.com *
>> *lean.enterprise.middle-ware*
>>
>> *Tel: +94 77 2556931 *
>>
>> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
>> *
>>
>> 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Riyafa Abdul Hameed
> Software Engineer, WSO2 Lanka (Pvt) Ltd 
>
> 

[Dev] Problems with multiple RDBMS hits within the stream

2018-04-04 Thread Bahtiyar KARANLIK
Hi All,

I'm working on an "alarm management" test app. The idea is as follows:

- I've an EventStream with following important fields:
-- event_type = type of the event. i.e. threshold_exceeded_event
-- event_source = the entity that is going to be monitored. i.e.
region1.router1.cpu_utilization
-- level = severity of the Event (i.e. 0 -> Info, 1-> warning, 2 ->
critical)
-- level_changed = boolean flag (whether the level has changed from the
previous event item. i.e. if level is info at t0, and warning at t1, then
t1 event has this level_changed flag set to true)

Then my algorithm comes in:

1) if the level_changed flag is false and if it is not Info;
--> Then I should have an "Active" (status == 1) alarm in the DB, and
should update its occurence count.

2) if the level_changed flag is true;
2.a) I'm going to "clear" the alarm in the DB table (keywords: RDBMS Store
Extension + PostgreSQL)
2.b) check 'level' field, and if it is not "Info" (==0), then Create a NEW
alarm in the table with the current level (level = severity).

Here starts the problem;

for events with "level_changed" set to true, updating the active Alarms's
status field is not executed at all!! I can create Alarms (AlarmsToCreate),
Increment their Occurence count (AlarmsToIncrement), but can not set their
status fields (AlarmsToClear).

I guess, there is a problem with multiple DB hits (i.e. clear the Alarm-set
status to 0 for alarm with id 3 and create a new Alarm) for the same event
(within a stream). I can see that the logic can decide that it needs to
Clear an alarm, and create a new one (logs with AlarmsToClear and
AlarmsToCreate are there !. Please check below logs for further info).

*Any comments, guidance, is highly appreciated, since I'm stuck with this
issue for two weekends up to now :-( Either, there is something that I'm
completely missing related to Stream processing and DB hits or there is a
bug somewhere over there (probably with store-rdbms extension's
update-sql-compile logics..) *

Best regards,

*Please find below related part from my siddhi file:*

---
-- SELECT LEVEL CHANGED EVENTS

@info(name = 'select_level_changed_events')
-- from EventStream[cast(map:get(EventStream.context,
'level_changed'), 'string') == 'true' and
cast(map:get(EventStream.context, 'old_level'), 'string') != '0']
from EventStream[cast(map:get(context, 'level_changed'), 'string') == 'true']
--select EventStream.tenant, EventStream.event_type,
EventStream.event_uei, EventStream.event_source,
EventStream.proposed_action, EventStream.context as event_context
select *
insert into TempLevelChangedEvents;

---
-- CLEAR ALARMS
@info(name='select_alarms_to_clear')
from TempLevelChangedEvents left outer join AlarmTable[alarm_status==1]
   on (AlarmTable.alarm_status == 1 and AlarmTable.alarm_key ==
event_type and AlarmTable.alarmed_resource == event_source)
select AlarmTable.id, AlarmTable.alarm_status, AlarmTable.severity,
AlarmTable.alarm_key, AlarmTable.alarmed_resource,
AlarmTable.occurrence,  AlarmTable.source_time
insert into AlarmsToClear;

@info(name = 'clear_alarms')
from AlarmsToClear
select *
update AlarmTable
 set AlarmTable.occurrence = AlarmTable.occurrence, AlarmTable.alarm_status = 0
   on AlarmTable.id == id;

---
---
-- CREATE ALARMS

-- If level has changed to a NON-INFO severity/level, then we should
create a new Alarm !
@info(name = 'select_events_to_create_alarms')
from TempLevelChangedEvents[convert(cast(map:get(EventStream.context,
'level'), 'string'), 'int') != 0]
select cast(-1, 'long') as id, cast(1, 'long') as alarm_status,
convert(cast(map:get(context, 'level'), 'string'), 'int') as severity,
event_type as alarm_key, event_source as alarmed_resource, cast(1,
'long') as occurrence, eventTimestamp() as source_time
insert into AlarmsToCreate;

@info(name='create_alarms')
from AlarmsToCreate left outer join NextAlarmId
select next_id as id, alarm_status, severity, alarm_key,
alarmed_resource, occurrence, source_time
insert into AlarmTable;

---
---
-- Filter NON-INFO Events & load associated Alarms from the DB if exists !!

-- Severity/Level has not changed AND this is not an INFO event !
-- IF SO, we should have an active Alarm in the DB, and should
increment its "occurence"
@info(name = 'select_non_info_events')
from EventStream[ cast(map:get(context, 'level_changed'), 'string') !=
'true' and convert(cast(map:get(EventStream.context, 'level'),
'string'), 'int') != 0]
select *
insert into TmpNonInfoEventStream;

@info(name = 'load_active_alarms_for_non_info_events')
from TmpNonInfoEventStream left outer join AlarmTable[alarm_status==1]
   on (AlarmTable.alarm_status == 1 

Re: [Dev] Cluster configuration issue in Wso2 EI

2018-04-04 Thread dhanya
Hi,

I also noticed that both the EI nodes are on the same local machine so they
have the same console url defined. ie. https://:443/carbon . Could
that be an issue?

Thanks,
Dhanya



--
Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Development-f3.html
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Cache mediator not working good for storing json responses.

2018-04-04 Thread Riyafa Abdul Hameed
This is similar to this issue[1]. Which version are you using?

[1] https://wso2.org/jira/browse/ESBJAVA-4318

On Wed, Apr 4, 2018 at 5:07 PM, Thishani Lucas  wrote:

> Hi Aditya,
>
> Could you please elaborate more about the response sent by the backend?
> What kind of message type does it send?
>
> Thanks,
> Thishani
>
> On Wed, Apr 4, 2018 at 4:26 PM, aditya shivankar <
> shivankar.adit...@gmail.com> wrote:
>
>> Respected Madam,
>>
>> Tried adding "> action="remove"/>".
>>
>> But still got the same error. Plus the rest service i am using is not
>> returning empty response, tested it.
>>
>> 
>> http://ws.apache.org/ns
>> /synapse">
>> 
>> 
>> 
>> 
>> 
>>
>> > maxMessageSize="1" scope="per-host" timeout="5000">
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> > type="STRING" value="1392"/>
>> > action="remove"/>
>> 
>> 
>> 
>> 
>> 
>> 
>> > value="true"/>
>> 
>> 
>> 
>>
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> With Regards,
>> Aditya
>>
>>
>> On Wed, Apr 4, 2018 at 4:16 PM, Thivya Mahenthirarasa 
>> wrote:
>>
>>> Hi Adiya,
>>>
>>> According to the logs, you are receiving 202 accepted success code, that
>>> means  the response cached for the Endpoint might returning an empty
>>> body.
>>>
>>>  Could you please add the following property before cache mediator in
>>> order to return the body from the cache to the Endpoint.
>>>
>>>
>>>  
>>>
>>>
>>> Try out the solution and let us know whether you could able to sort out the 
>>> exception
>>>
>>>
>>>
>>> Regards,
>>>
>>> Thivya
>>>
>>>
>>> On Wed, Apr 4, 2018 at 3:58 PM, aditya shivankar <
>>> shivankar.adit...@gmail.com> wrote:
>>>
 Respected Sir/Madam,

 Below is my api :

 
 http://ws.apache.org/ns
 /synapse">
 
 
 
 
 

 >>> maxMessageSize="1" scope="per-host" timeout="5000">
 
 
 

 
 
 
 >>> type="STRING" value="1392"/>
 
 
 
 
 
 
 >>> value="true"/>
 
 
 

 

 
 
 
 
 
 

 and my endpoint :

 
 http://ws.apache.org/ns/synapse;>
 
 


 Getting below error :

 ERROR - CacheMediator Error setting response envelope from cache :
 mediation.cache_key
 javax.xml.soap.SOAPException: org.apache.axiom.om.OMException: SOAP
 message MUST NOT contain Processing Instructions(PI)

 Please find logs attached.

 With Regards,
 Aditya

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>>
>>> *Thivya Mahenthirarasa*
>>>
>>> *Software Engineer -Support Team | WSO2*
>>>
>>>
>>> *Email: thi...@wso2.com *
>>>
>>> *Mobile: +94766461966 *
>>> *Web: http://wso2.com *
>>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Regards,
>
> *Thishani Lucas*
> *Software Engineer*
> *WSO2 Lanka (Private) Limited**: http://wso2.com *
> *lean.enterprise.middle-ware*
>
> *Tel: +94 77 2556931 *
>
> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
> *
>
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Riyafa Abdul Hameed
Software Engineer, WSO2 Lanka (Pvt) Ltd 

Email: riy...@wso2.com 
Website: https://riyafa.wordpress.com/ 
  

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Cache mediator not working good for storing json responses.

2018-04-04 Thread Thishani Lucas
Hi Aditya,

Could you please elaborate more about the response sent by the backend?
What kind of message type does it send?

Thanks,
Thishani

On Wed, Apr 4, 2018 at 4:26 PM, aditya shivankar <
shivankar.adit...@gmail.com> wrote:

> Respected Madam,
>
> Tried adding " action="remove"/>".
>
> But still got the same error. Plus the rest service i am using is not
> returning empty response, tested it.
>
> 
> http://ws.apache.org/
> ns/synapse">
> 
> 
> 
> 
> 
>
>  maxMessageSize="1" scope="per-host" timeout="5000">
> 
> 
> 
>
> 
> 
> 
>  type="STRING" value="1392"/>
> 
> 
> 
> 
> 
> 
> 
>  value="true"/>
> 
> 
> 
>
> 
>
> 
> 
> 
> 
> 
> 
>
> With Regards,
> Aditya
>
>
> On Wed, Apr 4, 2018 at 4:16 PM, Thivya Mahenthirarasa 
> wrote:
>
>> Hi Adiya,
>>
>> According to the logs, you are receiving 202 accepted success code, that
>> means  the response cached for the Endpoint might returning an empty
>> body.
>>
>>  Could you please add the following property before cache mediator in
>> order to return the body from the cache to the Endpoint.
>>
>>
>>  
>>
>>
>> Try out the solution and let us know whether you could able to sort out the 
>> exception
>>
>>
>>
>> Regards,
>>
>> Thivya
>>
>>
>> On Wed, Apr 4, 2018 at 3:58 PM, aditya shivankar <
>> shivankar.adit...@gmail.com> wrote:
>>
>>> Respected Sir/Madam,
>>>
>>> Below is my api :
>>>
>>> 
>>> http://ws.apache.org/ns
>>> /synapse">
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> >> maxMessageSize="1" scope="per-host" timeout="5000">
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> >> type="STRING" value="1392"/>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> >> value="true"/>
>>> 
>>> 
>>> 
>>>
>>> 
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> and my endpoint :
>>>
>>> 
>>> http://ws.apache.org/ns/synapse;>
>>> 
>>> 
>>>
>>>
>>> Getting below error :
>>>
>>> ERROR - CacheMediator Error setting response envelope from cache :
>>> mediation.cache_key
>>> javax.xml.soap.SOAPException: org.apache.axiom.om.OMException: SOAP
>>> message MUST NOT contain Processing Instructions(PI)
>>>
>>> Please find logs attached.
>>>
>>> With Regards,
>>> Aditya
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Thivya Mahenthirarasa*
>>
>> *Software Engineer -Support Team | WSO2*
>>
>>
>> *Email: thi...@wso2.com *
>>
>> *Mobile: +94766461966 *
>> *Web: http://wso2.com *
>>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Regards,

*Thishani Lucas*
*Software Engineer*
*WSO2 Lanka (Private) Limited**: http://wso2.com *
*lean.enterprise.middle-ware*

*Tel: +94 77 2556931 *

*LinkedIn: https://www.linkedin.com/in/thishani-lucas/
*


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Cache mediator not working good for storing json responses.

2018-04-04 Thread aditya shivankar
Respected Madam,

Tried adding "".

But still got the same error. Plus the rest service i am using is not
returning empty response, tested it.


http://ws.apache.org/ns/synapse
">




































With Regards,
Aditya


On Wed, Apr 4, 2018 at 4:16 PM, Thivya Mahenthirarasa 
wrote:

> Hi Adiya,
>
> According to the logs, you are receiving 202 accepted success code, that
> means  the response cached for the Endpoint might returning an empty body.
>
>  Could you please add the following property before cache mediator in
> order to return the body from the cache to the Endpoint.
>
>
>  
>
>
> Try out the solution and let us know whether you could able to sort out the 
> exception
>
>
>
> Regards,
>
> Thivya
>
>
> On Wed, Apr 4, 2018 at 3:58 PM, aditya shivankar <
> shivankar.adit...@gmail.com> wrote:
>
>> Respected Sir/Madam,
>>
>> Below is my api :
>>
>> 
>> http://ws.apache.org/ns
>> /synapse">
>> 
>> 
>> 
>> 
>> 
>>
>> > maxMessageSize="1" scope="per-host" timeout="5000">
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> > type="STRING" value="1392"/>
>> 
>> 
>> 
>> 
>> 
>> 
>> > value="true"/>
>> 
>> 
>> 
>>
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> and my endpoint :
>>
>> 
>> http://ws.apache.org/ns/synapse;>
>> 
>> 
>>
>>
>> Getting below error :
>>
>> ERROR - CacheMediator Error setting response envelope from cache :
>> mediation.cache_key
>> javax.xml.soap.SOAPException: org.apache.axiom.om.OMException: SOAP
>> message MUST NOT contain Processing Instructions(PI)
>>
>> Please find logs attached.
>>
>> With Regards,
>> Aditya
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Thivya Mahenthirarasa*
>
> *Software Engineer -Support Team | WSO2*
>
>
> *Email: thi...@wso2.com *
>
> *Mobile: +94766461966 *
> *Web: http://wso2.com *
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Cache mediator not working good for storing json responses.

2018-04-04 Thread Thivya Mahenthirarasa
Hi Adiya,

According to the logs, you are receiving 202 accepted success code, that
means  the response cached for the Endpoint might returning an empty body.

 Could you please add the following property before cache mediator in order
to return the body from the cache to the Endpoint.


 


Try out the solution and let us know whether you could able to sort
out the exception



Regards,

Thivya


On Wed, Apr 4, 2018 at 3:58 PM, aditya shivankar <
shivankar.adit...@gmail.com> wrote:

> Respected Sir/Madam,
>
> Below is my api :
>
> 
> http://ws.apache.org/
> ns/synapse">
> 
> 
> 
> 
> 
>
>  maxMessageSize="1" scope="per-host" timeout="5000">
> 
> 
> 
>
> 
> 
> 
>  type="STRING" value="1392"/>
> 
> 
> 
> 
> 
> 
>  value="true"/>
> 
> 
> 
>
> 
>
> 
> 
> 
> 
> 
> 
>
> and my endpoint :
>
> 
> http://ws.apache.org/ns/synapse;>
> 
> 
>
>
> Getting below error :
>
> ERROR - CacheMediator Error setting response envelope from cache :
> mediation.cache_key
> javax.xml.soap.SOAPException: org.apache.axiom.om.OMException: SOAP
> message MUST NOT contain Processing Instructions(PI)
>
> Please find logs attached.
>
> With Regards,
> Aditya
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com *

*Mobile: +94766461966 *
*Web: http://wso2.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Cache mediator not working good for storing json responses.

2018-04-04 Thread aditya shivankar
Respected Sir/Madam,

Below is my api :


http://ws.apache.org/ns/synapse
">



































and my endpoint :


http://ws.apache.org/ns/synapse;>




Getting below error :

ERROR - CacheMediator Error setting response envelope from cache :
mediation.cache_key
javax.xml.soap.SOAPException: org.apache.axiom.om.OMException: SOAP message
MUST NOT contain Processing Instructions(PI)

Please find logs attached.

With Regards,
Aditya
[2018-04-04 15:51:06,021] [EI-Core]  INFO - CarbonAuthenticationUtil 
'admin@carbon.super [-1234]' logged in at [2018-04-04 15:51:06,021+0530]
[2018-04-04 15:51:18,516] [EI-Core]  INFO - ApplicationManager Undeploying 
Carbon Application : cacheAppCompositeApplication_1.0.0...
[2018-04-04 15:51:18,522] [EI-Core]  INFO - EndpointDeployer Endpoint named 
'AgreementEP1' has been undeployed
[2018-04-04 15:51:18,523] [EI-Core]  INFO - DependencyTracker API : cacheAPI 
was removed from the Synapse configuration successfully - [ Deployed From 
Artifact Container: cacheAppCompositeApplication ] 
[2018-04-04 15:51:18,524] [EI-Core]  INFO - APIDeployer API named 'cacheAPI' 
has been undeployed
[2018-04-04 15:51:18,530] [EI-Core]  INFO - ApplicationManager Successfully 
Undeployed Carbon Application : cacheAppCompositeApplication_1.0.0 
{super-tenant}
[2018-04-04 15:51:18,530] [EI-Core]  INFO - ApplicationManager Deploying Carbon 
Application : cacheAppCompositeApplication_1.0.0.car...
[2018-04-04 15:51:18,545] [EI-Core]  INFO - DependencyTracker Endpoint : 
AgreementEP1 was added to the Synapse configuration successfully - [ Deployed 
From Artifact Container: cacheAppCompositeApplication ] 
[2018-04-04 15:51:18,545] [EI-Core]  INFO - EndpointDeployer Endpoint named 
'AgreementEP1' has been deployed from file : 
C:\wso2ei-6.1.1\wso2ei-6.1.1\tmp\carbonapps\-1234\1522837278530cacheAppCompositeApplication_1.0.0.car\AgreementEP1_1.0.0\AgreementEP1-1.0.0.xml
[2018-04-04 15:51:18,548] [EI-Core]  INFO - API Initializing API: cacheAPI
[2018-04-04 15:51:18,549] [EI-Core]  INFO - DependencyTracker API : cacheAPI 
was added to the Synapse configuration successfully - [ Deployed From Artifact 
Container: cacheAppCompositeApplication ] 
[2018-04-04 15:51:18,549] [EI-Core]  INFO - APIDeployer API named 'cacheAPI' 
has been deployed from file : 
C:\wso2ei-6.1.1\wso2ei-6.1.1\tmp\carbonapps\-1234\1522837278530cacheAppCompositeApplication_1.0.0.car\cacheAPI_1.0.0\cacheAPI-1.0.0.xml
[2018-04-04 15:51:18,549] [EI-Core]  INFO - ApplicationManager Successfully 
Deployed Carbon Application : cacheAppCompositeApplication_1.0.0 {super-tenant}
[2018-04-04 15:51:32,966] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-3 
>> "GET /cache/headerapi/ HTTP/1.1[\r][\n]"
[2018-04-04 15:51:32,967] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-3 
>> "Host: localhost:8280[\r][\n]"
[2018-04-04 15:51:32,967] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-3 
>> "Connection: keep-alive[\r][\n]"
[2018-04-04 15:51:32,967] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-3 
>> "Cache-Control: no-cache[\r][\n]"
[2018-04-04 15:51:32,967] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-3 
>> "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 
(KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36[\r][\n]"
[2018-04-04 15:51:32,967] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-3 
>> "Postman-Token: 193aae6f-0f22-44d1-5c52-ecfe381736f1[\r][\n]"
[2018-04-04 15:51:32,967] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-3 
>> "Accept: */*[\r][\n]"
[2018-04-04 15:51:32,967] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-3 
>> "Accept-Encoding: gzip, deflate, br[\r][\n]"
[2018-04-04 15:51:32,967] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-3 
>> "Accept-Language: en-US,en;q=0.9[\r][\n]"
[2018-04-04 15:51:32,967] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-3 
>> "[\r][\n]"
[2018-04-04 15:51:32,969] [EI-Core]  INFO - LogMediator To: /cache/headerapi/, 
MessageID: urn:uuid:811b8add-71b4-4022-ae09-992dd41c9306, Direction: request, 
Cache_Flow = Inside Cache Flow .
[2018-04-04 15:51:33,032] [EI-Core] ERROR - CacheMediator Error setting 
response envelope from cache : mediation.cache_key
javax.xml.soap.SOAPException: org.apache.axiom.om.OMException: SOAP message 
MUST NOT contain Processing Instructions(PI)
at org.apache.axis2.saaj.SOAPPartImpl.(SOAPPartImpl.java:207)
at 
org.apache.axis2.saaj.SOAPMessageImpl.(SOAPMessageImpl.java:112)
at 
org.apache.axis2.saaj.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:132)
at 

Re: [Dev] passthrough worker thread keep-alive

2018-04-04 Thread 김대경
Hi,

Thanks for reply.

I know 60 is recommendation.
But, I want to know why that value setting is not working and which class
is closing the connection that keepalive time elapsed.

And why don't close the conmection that keepalive time elapsed.

Thanks.


2018년 4월 4일 (수) 오후 3:55, Dinusha Dissanayake 님이 작성:

> Hi,
>
> I believe you are doing a tuning in the gateway.
> However the default recommendation of the worker_thread_keepalive_sec is
> 60 sec. Anyhow, this value should be less than the socket timeout value.
>
> You can find more info by following the documentation[1].
>
> [1] https://docs.wso2.com/display/AM210/Tuning+Performance
>
> Thanks,
> DinushaD
>
>
> On Wed, Apr 4, 2018 at 12:13 PM, 김대경  wrote:
>
>> Hi,
>>
>> I'm using wso2am-2.1.0
>>
>> I changed worker_thread_keepalive_sec to 30.
>> But PassThroughMessageProcessor keep connection over that time.
>>
>> I think that connection is close only if target endpoint close connection.
>>
>> How can I set the keep-alive timeout?
>>
>> Thanks.
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Dinusha Dissanayake
> Software Engineer
> WSO2 Inc
> Mobile: +94712939439
> 
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] passthrough worker thread keep-alive

2018-04-04 Thread Dinusha Dissanayake
Hi,

I believe you are doing a tuning in the gateway.
However the default recommendation of the worker_thread_keepalive_sec is 60
sec. Anyhow, this value should be less than the socket timeout value.

You can find more info by following the documentation[1].

[1] https://docs.wso2.com/display/AM210/Tuning+Performance

Thanks,
DinushaD


On Wed, Apr 4, 2018 at 12:13 PM, 김대경  wrote:

> Hi,
>
> I'm using wso2am-2.1.0
>
> I changed worker_thread_keepalive_sec to 30.
> But PassThroughMessageProcessor keep connection over that time.
>
> I think that connection is close only if target endpoint close connection.
>
> How can I set the keep-alive timeout?
>
> Thanks.
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Dinusha Dissanayake
Software Engineer
WSO2 Inc
Mobile: +94712939439

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] passthrough worker thread keep-alive

2018-04-04 Thread 김대경
Hi,

I'm using wso2am-2.1.0

I changed worker_thread_keepalive_sec to 30.
But PassThroughMessageProcessor keep connection over that time.

I think that connection is close only if target endpoint close connection.

How can I set the keep-alive timeout?

Thanks.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev