[Dev] Configuring rsync for Deployment Synchronization for Gateway nodes on localhost

2017-12-04 Thread Dushantha Batuwita
Hi Dev

I'm in the process of syncing the Gateway Manager and the Gateway worker
nodes which a*re on the local machine (localhost)*

I have been following the [1] document: Configuring rsync for Deployment
Synchronization

In the document, it has stated that "You must create your own SSH key and
define it as the sample pem_file".

*code given in the document for the "rsync-for-carbon-depsync.sh"  file.*

#!/bin/sh

manager_server_dir=~/wso2as-5.2.1/repository/deployment/server/
pem_file=~/.ssh/carbon-440-test.pem

#delete the lock on exit
trap 'rm -rf /var/lock/depsync-lock' EXIT


*Question*
Since my Gateway nodes are located on the local machine, do I have to
define a pem_file? Else can I leave it commented?
If I have to define a pem_file how should I do it?

Regards

-- 
*Dushantha Nayanajith Chandima Batuwita*
Software Engineer Support | WSO2
dushan...@wso2.com
mobile : 0094777453010
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] error occur when submitting POST/PUT requests via API-M : ERROR - JsonUtil #writeAsJson. Payload could not be written as JSON. MessageID:

2017-12-04 Thread Dushantha Batuwita
Hi
Pubudu/Thvya and Vinod thanks for the replies.

I indeed have enabled the response cache, pon disabling response which the
error could be prevented.

many thanks

On Tue, Dec 5, 2017 at 12:54 PM, Dushantha Batuwita 
wrote:

> Hi
> Pubudu/Thvya and Vinod thanks for the replies.
>
> I indeed have enabled the response cache, pon disabling response which the
> error could be prevented.
>
> many thanks
>
> On Tue, Dec 5, 2017 at 11:58 AM, Thivya Mahenthirarasa 
> wrote:
>
>> Hi Dushantha,
>>
>> Did you enable the response cache in your publisher node?
>> Since POST and PUT will not support for response cache you are observing
>> that.
>>
>>
>> Thanks,
>> Thivya
>>
>> On Tue, Dec 5, 2017 at 11:50 AM, Vinod Kavinda  wrote:
>>
>>> Hi Dushantha,
>>> Is this error logs from APIM or ESB node? Shall we enable wire logs and
>>> see what is actually passed to the backend? Look like an invalid JSON is
>>> passed to the backend ESB.
>>>
>>> Regards,
>>> Vinod
>>>
>>> On Tue, Dec 5, 2017 at 11:28 AM, Dushantha Batuwita 
>>> wrote:
>>>
 Hi Dev

  As a part of my work, I have to connect to a SOAP backend via an ESB
 secure proxy that accepts the REST request sent via an API-M.

 My Cluster set up is having bellow particulars


- Cluster is developed in the local machine
- consists of two Gateway Nodes
- One is a* Gateway worker offset by 3*
- Other is a *Gateway worker and Manager* *offset by 2*
- Those nodes are fronted by LB


-

 Now the cluster is up and running.

 There are 4 services defined in API-M ( refer to the attached image)
 respectively GET, POST, PUT and DELETE to perform CRUD operations on SOAP
 back-end.



 *Question*

 GET/DELETE operations are functioning absolutely as expected and
 generate the required output.

 But the POST/PUT which requires JSON payload to be defined at API_M
 throws errors from the terminal but it indeed adds the record(s) to the
 SOAP back end and Updates the record as intended.

 *Sample payload supplied to POST and PUT*
 {
 "patient":{

 "patientFullName":"Ramboda Arachchige",
   "patientId":"n...@yahoo.com",
 "insurer":{

   "insurerEmail":"q...@yahoo.com",
   "insurerName":"MUSTPAY not really",
   "insurerPhone":""

 },
 "medical":{

   "condition":"NO critical ILLNESS",
   "treatment":"Panadol and Antibiotic"

 },
 "parentGuardian":{

   "guardianEmail":"hector.batuw...@yahoo.com",
   "guardianName":"Hector Filex",
   "guardianPhone":"0322247644"

 },
 "patientContact":{

   "address":"Hatfield",
   "email":"stalb...@gamil.com",
   "phone":"0112345234"
 },
 "physician":{

   "physicianEmail":"ab.si...@ebok.com",
   "physicianName":"CDE Silva",
   "physicianPhone":"0112678908"
 }
   }
 }




 *the error:*

 ERROR - JsonUtil #writeAsJson. Payload could not be written as JSON.
 MessageID: urn:uuid:b11551de-088c-4e7e-8eab-7c4066e97866
 [2017-12-05 10:50:48,413] ERROR - PassThroughHttpSSLSender Failed to
 submit the response
 org.apache.axis2.AxisFault: Payload could not be written as JSON.
 at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUti
 l.java:276)
 at org.apache.synapse.commons.json.JsonFormatter.writeTo(JsonFo
 rmatter.java:62)
 at org.apache.synapse.transport.passthru.PassThroughHttpSender.
 submitResponse(PassThroughHttpSender.java:573)
 at org.apache.synapse.transport.passthru.PassThroughHttpSender.
 invoke(PassThroughHttpSender.java:264)
 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
 at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Send
 er.java:230)
 .
 .
 .


 [2017-12-05 10:50:48,424] ERROR - Axis2Sender
 Access-Control-Allow-Headers:authorization,Access-Control-Al
 low-Origin,Content-Type,SOAPAction,Access-Control-Allow-Meth
 ods:POST,Access-Control-Allow-Origin:*,Content-Type:application/json;
 charset=UTF-8,>>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; oapenv:Body/> Unexpected error sending message back
 org.apache.axis2.AxisFault: Failed to submit the response
 at org.apache.synapse.transport.passthru.PassThroughHttpSender.
 handleException(PassThroughHttpSender.java:632)
 at org.apache.synapse.transport.passthru.PassThroughHttpSender.
 invoke(PassThroughHttpSender.java:266)
 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
 .
 .
 .
 Caused by: org.apache.axis2.AxisFault: Payload could not be written as
 JSON.
 at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonU

Re: [Dev] [DEV] error occur when submitting POST/PUT requests via API-M : ERROR - JsonUtil #writeAsJson. Payload could not be written as JSON. MessageID:

2017-12-04 Thread Thivya Mahenthirarasa
Hi Dushantha,

Did you enable the response cache in your publisher node?
Since POST and PUT will not support for response cache you are observing
that.


Thanks,
Thivya

On Tue, Dec 5, 2017 at 11:50 AM, Vinod Kavinda  wrote:

> Hi Dushantha,
> Is this error logs from APIM or ESB node? Shall we enable wire logs and
> see what is actually passed to the backend? Look like an invalid JSON is
> passed to the backend ESB.
>
> Regards,
> Vinod
>
> On Tue, Dec 5, 2017 at 11:28 AM, Dushantha Batuwita 
> wrote:
>
>> Hi Dev
>>
>>  As a part of my work, I have to connect to a SOAP backend via an ESB
>> secure proxy that accepts the REST request sent via an API-M.
>>
>> My Cluster set up is having bellow particulars
>>
>>
>>- Cluster is developed in the local machine
>>- consists of two Gateway Nodes
>>- One is a* Gateway worker offset by 3*
>>- Other is a *Gateway worker and Manager* *offset by 2*
>>- Those nodes are fronted by LB
>>
>>
>>-
>>
>> Now the cluster is up and running.
>>
>> There are 4 services defined in API-M ( refer to the attached image)
>> respectively GET, POST, PUT and DELETE to perform CRUD operations on SOAP
>> back-end.
>>
>>
>>
>> *Question*
>>
>> GET/DELETE operations are functioning absolutely as expected and generate
>> the required output.
>>
>> But the POST/PUT which requires JSON payload to be defined at API_M
>> throws errors from the terminal but it indeed adds the record(s) to the
>> SOAP back end and Updates the record as intended.
>>
>> *Sample payload supplied to POST and PUT*
>> {
>> "patient":{
>>
>> "patientFullName":"Ramboda Arachchige",
>>   "patientId":"n...@yahoo.com",
>> "insurer":{
>>
>>   "insurerEmail":"q...@yahoo.com",
>>   "insurerName":"MUSTPAY not really",
>>   "insurerPhone":""
>>
>> },
>> "medical":{
>>
>>   "condition":"NO critical ILLNESS",
>>   "treatment":"Panadol and Antibiotic"
>>
>> },
>> "parentGuardian":{
>>
>>   "guardianEmail":"hector.batuw...@yahoo.com",
>>   "guardianName":"Hector Filex",
>>   "guardianPhone":"0322247644"
>>
>> },
>> "patientContact":{
>>
>>   "address":"Hatfield",
>>   "email":"stalb...@gamil.com",
>>   "phone":"0112345234"
>> },
>> "physician":{
>>
>>   "physicianEmail":"ab.si...@ebok.com",
>>   "physicianName":"CDE Silva",
>>   "physicianPhone":"0112678908"
>> }
>>   }
>> }
>>
>>
>>
>>
>> *the error:*
>>
>> ERROR - JsonUtil #writeAsJson. Payload could not be written as JSON.
>> MessageID: urn:uuid:b11551de-088c-4e7e-8eab-7c4066e97866
>> [2017-12-05 10:50:48,413] ERROR - PassThroughHttpSSLSender Failed to
>> submit the response
>> org.apache.axis2.AxisFault: Payload could not be written as JSON.
>> at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUti
>> l.java:276)
>> at org.apache.synapse.commons.json.JsonFormatter.writeTo(JsonFo
>> rmatter.java:62)
>> at org.apache.synapse.transport.passthru.PassThroughHttpSender.
>> submitResponse(PassThroughHttpSender.java:573)
>> at org.apache.synapse.transport.passthru.PassThroughHttpSender.
>> invoke(PassThroughHttpSender.java:264)
>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
>> at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Send
>> er.java:230)
>> .
>> .
>> .
>>
>>
>> [2017-12-05 10:50:48,424] ERROR - Axis2Sender
>> Access-Control-Allow-Headers:authorization,Access-Control-Al
>> low-Origin,Content-Type,SOAPAction,Access-Control-Allow-
>> Methods:POST,Access-Control-Allow-Origin:*,Content-Type:application/json;
>> charset=UTF-8,> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>> oapenv:Body/> Unexpected error sending message back
>> org.apache.axis2.AxisFault: Failed to submit the response
>> at org.apache.synapse.transport.passthru.PassThroughHttpSender.
>> handleException(PassThroughHttpSender.java:632)
>> at org.apache.synapse.transport.passthru.PassThroughHttpSender.
>> invoke(PassThroughHttpSender.java:266)
>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
>> .
>> .
>> .
>> Caused by: org.apache.axis2.AxisFault: Payload could not be written as
>> JSON.
>> at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUti
>> l.java:276)
>> at org.apache.synapse.commons.json.JsonFormatter.writeTo(JsonFo
>> rmatter.java:62
>>
>>
>> If you have come across such an incident or have a solution please kindly
>> share the wisdom
>>
>> Many thanks
>>
>> --
>> *Dushantha Nayanajith Chandima Batuwita*
>> Software Engineer Support | WSO2
>> dushan...@wso2.com
>> mobile : 0094777453010
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Vinod Kavinda
> Senior Software Engineer
> *WSO2 Inc. - lean . enterprise . middleware .*
> Mobile : +94 (0) 712 415544
> Blog : http://soatechflicks.blogspot.com/
> [image: http://wso2.com/signature]
> 

Re: [Dev] [DEV] error occur when submitting POST/PUT requests via API-M : ERROR - JsonUtil #writeAsJson. Payload could not be written as JSON. MessageID:

2017-12-04 Thread Pubudu Gunatilaka
Hi Dushantha,

Found a similar issue in [1] and related issue in APIM in [2]. Have you wum
updated the packs?

[1] - https://wso2.org/jira/browse/ESBJAVA-4999
[2] - https://wso2.org/jira/browse/APIMANAGER-5731

Thank you!

On Tue, Dec 5, 2017 at 11:50 AM, Vinod Kavinda  wrote:

> Hi Dushantha,
> Is this error logs from APIM or ESB node? Shall we enable wire logs and
> see what is actually passed to the backend? Look like an invalid JSON is
> passed to the backend ESB.
>
> Regards,
> Vinod
>
> On Tue, Dec 5, 2017 at 11:28 AM, Dushantha Batuwita 
> wrote:
>
>> Hi Dev
>>
>>  As a part of my work, I have to connect to a SOAP backend via an ESB
>> secure proxy that accepts the REST request sent via an API-M.
>>
>> My Cluster set up is having bellow particulars
>>
>>
>>- Cluster is developed in the local machine
>>- consists of two Gateway Nodes
>>- One is a* Gateway worker offset by 3*
>>- Other is a *Gateway worker and Manager* *offset by 2*
>>- Those nodes are fronted by LB
>>
>>
>>-
>>
>> Now the cluster is up and running.
>>
>> There are 4 services defined in API-M ( refer to the attached image)
>> respectively GET, POST, PUT and DELETE to perform CRUD operations on SOAP
>> back-end.
>>
>>
>>
>> *Question*
>>
>> GET/DELETE operations are functioning absolutely as expected and generate
>> the required output.
>>
>> But the POST/PUT which requires JSON payload to be defined at API_M
>> throws errors from the terminal but it indeed adds the record(s) to the
>> SOAP back end and Updates the record as intended.
>>
>> *Sample payload supplied to POST and PUT*
>> {
>> "patient":{
>>
>> "patientFullName":"Ramboda Arachchige",
>>   "patientId":"n...@yahoo.com",
>> "insurer":{
>>
>>   "insurerEmail":"q...@yahoo.com",
>>   "insurerName":"MUSTPAY not really",
>>   "insurerPhone":""
>>
>> },
>> "medical":{
>>
>>   "condition":"NO critical ILLNESS",
>>   "treatment":"Panadol and Antibiotic"
>>
>> },
>> "parentGuardian":{
>>
>>   "guardianEmail":"hector.batuw...@yahoo.com",
>>   "guardianName":"Hector Filex",
>>   "guardianPhone":"0322247644"
>>
>> },
>> "patientContact":{
>>
>>   "address":"Hatfield",
>>   "email":"stalb...@gamil.com",
>>   "phone":"0112345234"
>> },
>> "physician":{
>>
>>   "physicianEmail":"ab.si...@ebok.com",
>>   "physicianName":"CDE Silva",
>>   "physicianPhone":"0112678908"
>> }
>>   }
>> }
>>
>>
>>
>>
>> *the error:*
>>
>> ERROR - JsonUtil #writeAsJson. Payload could not be written as JSON.
>> MessageID: urn:uuid:b11551de-088c-4e7e-8eab-7c4066e97866
>> [2017-12-05 10:50:48,413] ERROR - PassThroughHttpSSLSender Failed to
>> submit the response
>> org.apache.axis2.AxisFault: Payload could not be written as JSON.
>> at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUti
>> l.java:276)
>> at org.apache.synapse.commons.json.JsonFormatter.writeTo(JsonFo
>> rmatter.java:62)
>> at org.apache.synapse.transport.passthru.PassThroughHttpSender.
>> submitResponse(PassThroughHttpSender.java:573)
>> at org.apache.synapse.transport.passthru.PassThroughHttpSender.
>> invoke(PassThroughHttpSender.java:264)
>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
>> at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Send
>> er.java:230)
>> .
>> .
>> .
>>
>>
>> [2017-12-05 10:50:48,424] ERROR - Axis2Sender
>> Access-Control-Allow-Headers:authorization,Access-Control-Al
>> low-Origin,Content-Type,SOAPAction,Access-Control-Allow-
>> Methods:POST,Access-Control-Allow-Origin:*,Content-Type:application/json;
>> charset=UTF-8,> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>> oapenv:Body/> Unexpected error sending message back
>> org.apache.axis2.AxisFault: Failed to submit the response
>> at org.apache.synapse.transport.passthru.PassThroughHttpSender.
>> handleException(PassThroughHttpSender.java:632)
>> at org.apache.synapse.transport.passthru.PassThroughHttpSender.
>> invoke(PassThroughHttpSender.java:266)
>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
>> .
>> .
>> .
>> Caused by: org.apache.axis2.AxisFault: Payload could not be written as
>> JSON.
>> at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUti
>> l.java:276)
>> at org.apache.synapse.commons.json.JsonFormatter.writeTo(JsonFo
>> rmatter.java:62
>>
>>
>> If you have come across such an incident or have a solution please kindly
>> share the wisdom
>>
>> Many thanks
>>
>> --
>> *Dushantha Nayanajith Chandima Batuwita*
>> Software Engineer Support | WSO2
>> dushan...@wso2.com
>> mobile : 0094777453010
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Vinod Kavinda
> Senior Software Engineer
> *WSO2 Inc. - lean . enterprise . middleware .*
> Mobile : +94 (0) 712 415544
> Blog : http://soatechflicks.blogspot.com/
> [image: htt

Re: [Dev] [DEV] error occur when submitting POST/PUT requests via API-M : ERROR - JsonUtil #writeAsJson. Payload could not be written as JSON. MessageID:

2017-12-04 Thread Vinod Kavinda
Hi Dushantha,
Is this error logs from APIM or ESB node? Shall we enable wire logs and see
what is actually passed to the backend? Look like an invalid JSON is passed
to the backend ESB.

Regards,
Vinod

On Tue, Dec 5, 2017 at 11:28 AM, Dushantha Batuwita 
wrote:

> Hi Dev
>
>  As a part of my work, I have to connect to a SOAP backend via an ESB
> secure proxy that accepts the REST request sent via an API-M.
>
> My Cluster set up is having bellow particulars
>
>
>- Cluster is developed in the local machine
>- consists of two Gateway Nodes
>- One is a* Gateway worker offset by 3*
>- Other is a *Gateway worker and Manager* *offset by 2*
>- Those nodes are fronted by LB
>
>
>-
>
> Now the cluster is up and running.
>
> There are 4 services defined in API-M ( refer to the attached image)
> respectively GET, POST, PUT and DELETE to perform CRUD operations on SOAP
> back-end.
>
>
>
> *Question*
>
> GET/DELETE operations are functioning absolutely as expected and generate
> the required output.
>
> But the POST/PUT which requires JSON payload to be defined at API_M throws
> errors from the terminal but it indeed adds the record(s) to the SOAP back
> end and Updates the record as intended.
>
> *Sample payload supplied to POST and PUT*
> {
> "patient":{
>
> "patientFullName":"Ramboda Arachchige",
>   "patientId":"n...@yahoo.com",
> "insurer":{
>
>   "insurerEmail":"q...@yahoo.com",
>   "insurerName":"MUSTPAY not really",
>   "insurerPhone":""
>
> },
> "medical":{
>
>   "condition":"NO critical ILLNESS",
>   "treatment":"Panadol and Antibiotic"
>
> },
> "parentGuardian":{
>
>   "guardianEmail":"hector.batuw...@yahoo.com",
>   "guardianName":"Hector Filex",
>   "guardianPhone":"0322247644"
>
> },
> "patientContact":{
>
>   "address":"Hatfield",
>   "email":"stalb...@gamil.com",
>   "phone":"0112345234"
> },
> "physician":{
>
>   "physicianEmail":"ab.si...@ebok.com",
>   "physicianName":"CDE Silva",
>   "physicianPhone":"0112678908"
> }
>   }
> }
>
>
>
>
> *the error:*
>
> ERROR - JsonUtil #writeAsJson. Payload could not be written as JSON.
> MessageID: urn:uuid:b11551de-088c-4e7e-8eab-7c4066e97866
> [2017-12-05 10:50:48,413] ERROR - PassThroughHttpSSLSender Failed to
> submit the response
> org.apache.axis2.AxisFault: Payload could not be written as JSON.
> at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUtil.java:276)
> at org.apache.synapse.commons.json.JsonFormatter.writeTo(
> JsonFormatter.java:62)
> at org.apache.synapse.transport.passthru.PassThroughHttpSender.
> submitResponse(PassThroughHttpSender.java:573)
> at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(
> PassThroughHttpSender.java:264)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
> at org.apache.synapse.core.axis2.Axis2Sender.sendBack(
> Axis2Sender.java:230)
> .
> .
> .
>
>
> [2017-12-05 10:50:48,424] ERROR - Axis2Sender Access-Control-Allow-Headers:
> authorization,Access-Control-Allow-Origin,Content-Type,
> SOAPAction,Access-Control-Allow-Methods:POST,Access-
> Control-Allow-Origin:*,Content-Type:application/json; charset=UTF-8, version='1.0' encoding='utf-8'?>http://schemas.xmlsoap.org/soap/envelope/";>
> Unexpected error sending message back
> org.apache.axis2.AxisFault: Failed to submit the response
> at org.apache.synapse.transport.passthru.PassThroughHttpSender.
> handleException(PassThroughHttpSender.java:632)
> at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(
> PassThroughHttpSender.java:266)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
> .
> .
> .
> Caused by: org.apache.axis2.AxisFault: Payload could not be written as
> JSON.
> at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUtil.java:276)
> at org.apache.synapse.commons.json.JsonFormatter.writeTo(
> JsonFormatter.java:62
>
>
> If you have come across such an incident or have a solution please kindly
> share the wisdom
>
> Many thanks
>
> --
> *Dushantha Nayanajith Chandima Batuwita*
> Software Engineer Support | WSO2
> dushan...@wso2.com
> mobile : 0094777453010
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Vinod Kavinda
Senior Software Engineer
*WSO2 Inc. - lean . enterprise . middleware .*
Mobile : +94 (0) 712 415544
Blog : http://soatechflicks.blogspot.com/
[image: http://wso2.com/signature]

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


Re: [Dev] [APIM] APIManagerComponent Exception occurred while creating JMS Event Adapter

2017-12-04 Thread Samitha Chathuranga
Hi Senuwan,

Please check whether the connection configs to TM is correct, in
api-manager.xml under  under 
as in [1] under the section "Step 3.5 - Configure the Gateway".

[1]
https://docs.wso2.com/display/AM210/Distributed+Deployment+of+API+Manager#DistributedDeploymentofAPIManager-Step3.5-ConfiguretheGateway

Regards,
Samitha

On Tue, Dec 5, 2017 at 9:39 AM, Krishan Wijesena  wrote:

> Hi senuwan,
>
> Before you start server as gateway worker you need to do setup [1]. please
> check you did it correctly.
>
> [1]https://docs.wso2.com/display/AM210/Product+Profiles#GWW
>
> Thanks,
> krishan.
>
> On Tue, Dec 5, 2017 at 9:22 AM, Senuwan Withana  wrote:
>
>> Hi Team,
>>
>> I have created a Gateway Cluster following the document [1]. When I
>> started the server using ./wso2server.sh -Dprofile=gateway-worker command I
>> got below errors.  Without -Dprofile server was up correctly.
>>
>> [2017-12-05 09:14:25,262]  INFO - JMSTransportHandler Starting jms topic
>> consumer thread...
>> [2017-12-05 09:14:25,284]  WARN - APIManagerComponent Exception occurred
>> while creating JMS Event Adapter. Request Blocking may not work properly
>> org.wso2.carbon.event.output.adapter.core.exception.OutputEventAdapterException:
>> Output Event Adapter not created as no adapter factory is registered with
>> type jms
>> at org.wso2.carbon.event.output.adapter.core.internal.CarbonOut
>> putEventAdapterService.create(CarbonOutputEventAdapterService.java:89)
>> at org.wso2.carbon.apimgt.impl.internal.APIManagerComponent.con
>> figureJMSPublisher(APIManagerComponent.java:574)
>> at org.wso2.carbon.apimgt.impl.internal.APIManagerComponent.act
>> ivate(APIManagerComponent.java:221)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>> ssorImpl.java:62)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>> thodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:498)
>> at org.eclipse.equinox.internal.ds.model.ServiceComponent.activ
>> ate(ServiceComponent.java:260)
>> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.a
>> ctivate(ServiceComponentProp.java:146)
>> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.b
>> uild(ServiceComponentProp.java:345)
>> at org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone
>> nt(InstanceProcess.java:620)
>> at org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone
>> nts(InstanceProcess.java:197)
>> at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolve
>> r.java:343)
>> at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SC
>> RManager.java:222)
>> at org.eclipse.osgi.internal.serviceregistry.FilteredServiceLis
>> tener.serviceChanged(FilteredServiceListener.java:107)
>> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.d
>> ispatchEvent(BundleContextImpl.java:861)
>> at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve
>> nt(EventManager.java:230)
>> at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEv
>> entSynchronous(ListenerQueue.java:148)
>> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.pu
>> blishServiceEventPrivileged(ServiceRegistry.java:819)
>> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.pu
>> blishServiceEvent(ServiceRegistry.java:771)
>> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistratio
>> nImpl.register(ServiceRegistrationImpl.java:130)
>> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.re
>> gisterService(ServiceRegistry.java:214)
>> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.r
>> egisterService(BundleContextImpl.java:433)
>> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.r
>> egisterService(BundleContextImpl.java:451)
>> at org.wso2.carbon.core.init.CarbonServerManager.initializeCarb
>> on(CarbonServerManager.java:514)
>> at org.wso2.carbon.core.init.CarbonServerManager.start(CarbonSe
>> rverManager.java:219)
>> at org.wso2.carbon.core.internal.CarbonCoreServiceComponent.act
>> ivate(CarbonCoreServiceComponent.java:94)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>> ssorImpl.java:62)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>> thodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:498)
>> at org.eclipse.equinox.internal.ds.model.ServiceComponent.activ
>> ate(ServiceComponent.java:260)
>> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.a
>> ctivate(ServiceComponentProp.java:146)
>> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.b
>> uild(ServiceComponentProp.java:345)
>> at org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone
>> nt(InstanceProcess.java:620)
>> at org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone
>> nts(InstanceProcess.java:197)
>> at org.eclipse.equinox.internal.ds.Resolver.getEligible(Reso

Re: [Dev] Gateway worker node gives org.apache.axis2.deployment.DeploymentException: org.apache.axis2.transport.jms.JMSSender cannot be found by axis2_1.6.1.wso2v20

2017-12-04 Thread Dushantha Batuwita
Hi Dev;

I have found a Jira ticket that has the error similar to the above one.

https://wso2.org/jira/browse/WSAS-2153

As per the given instruction, the patch axis2-transport-all-1.0.0.jar is
applied.

Then the Gateway worker could be started up in Dprofile without  the
aforementioned error,

@Tarika Madurapperuma and all, thanks for the offline instruction given to
further analyse the issue.

Regards


On Mon, Dec 4, 2017 at 11:07 AM, Samitha Chathuranga 
wrote:

> Hi Dushantha,
>
> Did you followed all the steps in [1] to start apim in gw worker profile?
> Probably this is an issue with it.
>
> [1] - https://docs.wso2.com/display/AM210/Product+Profiles#
> ProductProfiles-StartinganAPI-Mprofile
>
> Regards,
> Samitha
>
> On Mon, Dec 4, 2017 at 10:02 AM, Dushantha Batuwita 
> wrote:
>
>> Hi Maneesha :
>>
>> 
>>
>> The above setting of the axis2.xml of gateway nodes is already commented.
>>
>>
>>- I have observed that when I make the Gateway worker node up without
>>the  *-Dprofile=gateway-worker*  option, there is no any error.
>>- It comes only with the -DProfile option.
>>
>>
>> Many thanks
>>
>>
>> On Thu, Nov 30, 2017 at 3:27 PM, Maneesha Wijesekara 
>> wrote:
>>
>>> Hi Dushantha,
>>>
>>> Can you try by commenting below line in axis2_blocking_client.xml inside
>>> /repository/conf/axis2 folder ?
>>>
>>> 
>>>
>>> Regards
>>> Maneesha
>>>
>>> On Thu, Nov 30, 2017 at 3:21 PM, Dushantha Batuwita 
>>> wrote:
>>>
 Hi Rukshan

 I checked the configuration again and yes I have disabled the 
 *JMSEventPublisherParameters
 *in Gateway Nodes.

 Stille the error mentioned above comes when GW worker is attempting to
 run.

 Regards

 On Thu, Nov 30, 2017 at 3:06 PM, Rukshan Premathunga 
 wrote:

> Hi Dushantha,
>
> Did you disable the *JMSEventPublisherParameters* configuration from
> the api-manager.xml?
>
> Thanks and Regards
>
> On Thu, Nov 30, 2017 at 2:59 PM, Dushantha Batuwita <
> dushan...@wso2.com> wrote:
>
>> Hi  Dev
>>
>> I'm involved in developing a Gateway cluster and the particulars  are
>> as follows
>>
>>
>>- Cluster is developed in the local machine
>>- consists of two Gateway Nodes
>>- One is a* Gateway worker offset by 3*
>>- Other is a *Gateway worker and Manager* *offset by 2*
>>- Those nodes are fronted by LB
>>
>>
>>I have started the IS as *KM, PubstoreTraficManager,
>>GatewayWorkerManager* nodes without an error
>>But when try starting the* Gateway Worker *node I receive an
>>error similar to one bellow.
>>
>>
>>  ERROR - BasicAuthEntitlementServiceClient Error initializing Axis2
>> configuration context
>> org.apache.axis2.deployment.DeploymentException:
>> org.apache.axis2.transport.jms.JMSSender cannot be found by
>> axis2_1.6.1.wso2v20
>> 
>> 
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.axis2.transport.jms.JMSSender cannot be found by
>> axis2_1.6.1.wso2v20
>>
>> If you have any advice to avoid this error, I would be much grateful.
>>
>> Regards
>> --
>> *Dushantha Nayanajith Chandima Batuwita*
>> Software Engineer Support | WSO2
>> dushan...@wso2.com
>> mobile : 0094777453010
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Rukshan Chathuranga.
> Software Engineer.
> WSO2, Inc.
> +94711822074 <+94%2071%20182%202074>
>



 --
 *Dushantha Nayanajith Chandima Batuwita*
 Software Engineer Support | WSO2
 dushan...@wso2.com
 mobile : 0094777453010

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


>>>
>>>
>>> --
>>> Maneesha Wijesekara
>>> Software Engineer - QA Team
>>> WSO2 Inc.
>>>
>>> Email: manee...@wso2.com
>>> Linkedin: http://linkedin.com/in/maneeshawijesekara
>>> Mobile: +94712443119
>>>
>>
>>
>>
>> --
>> *Dushantha Nayanajith Chandima Batuwita*
>> Software Engineer Support | WSO2
>> dushan...@wso2.com
>> mobile : 0094777453010
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Samitha Chathuranga
> Software Engineer, WSO2 Inc.
> lean.enterprise.middleware
> Mobile: +94715123761
>
> [image: http://wso2.com/signature] 
>



-- 
*Dushantha Nayanajith Chandima Batuwita*
Software Engineer Support | WSO2
dushan...@wso2.com
mobile : 0094777453010
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Announce] WSO2 Committers += Menaka Jayawardena

2017-12-04 Thread Geeth Munasinghe
Hi all,

It is my pleasure to welcome Menaka Jayawardena as WSO2 Committer. He has
been a valuable contributor to EMM/IoT team and to various other projects.
In recognition of his contributions and commitment towards the
responsibilities assigned to him, he has been voted as WSO2 committer.

@Menaka, Welcome aboard and keep up the good work.

Thanks
Geeth



-- 
*Geeth Munasinghe*
*WSO2, Inc. http://wso2.com  *
*lean.enterprise.middleware.*

email: ge...@wso2.com
phone:(+94) 777911226


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


Re: [Dev] [APIM] APIManagerComponent Exception occurred while creating JMS Event Adapter

2017-12-04 Thread Krishan Wijesena
Hi senuwan,

Before you start server as gateway worker you need to do setup [1]. please
check you did it correctly.

[1]https://docs.wso2.com/display/AM210/Product+Profiles#GWW

Thanks,
krishan.

On Tue, Dec 5, 2017 at 9:22 AM, Senuwan Withana  wrote:

> Hi Team,
>
> I have created a Gateway Cluster following the document [1]. When I
> started the server using ./wso2server.sh -Dprofile=gateway-worker command I
> got below errors.  Without -Dprofile server was up correctly.
>
> [2017-12-05 09:14:25,262]  INFO - JMSTransportHandler Starting jms topic
> consumer thread...
> [2017-12-05 09:14:25,284]  WARN - APIManagerComponent Exception occurred
> while creating JMS Event Adapter. Request Blocking may not work properly
> org.wso2.carbon.event.output.adapter.core.exception.OutputEventAdapterException:
> Output Event Adapter not created as no adapter factory is registered with
> type jms
> at org.wso2.carbon.event.output.adapter.core.internal.
> CarbonOutputEventAdapterService.create(CarbonOutputEventAdapterServic
> e.java:89)
> at org.wso2.carbon.apimgt.impl.internal.APIManagerComponent.
> configureJMSPublisher(APIManagerComponent.java:574)
> at org.wso2.carbon.apimgt.impl.internal.APIManagerComponent.
> activate(APIManagerComponent.java:221)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.eclipse.equinox.internal.ds.model.ServiceComponent.
> activate(ServiceComponent.java:260)
> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.
> activate(ServiceComponentProp.java:146)
> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.
> build(ServiceComponentProp.java:345)
> at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(
> InstanceProcess.java:620)
> at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(
> InstanceProcess.java:197)
> at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
> at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(
> SCRManager.java:222)
> at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.
> serviceChanged(FilteredServiceListener.java:107)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.
> dispatchEvent(BundleContextImpl.java:861)
> at org.eclipse.osgi.framework.eventmgr.EventManager.
> dispatchEvent(EventManager.java:230)
> at org.eclipse.osgi.framework.eventmgr.ListenerQueue.
> dispatchEventSynchronous(ListenerQueue.java:148)
> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.
> publishServiceEventPrivileged(ServiceRegistry.java:819)
> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.
> publishServiceEvent(ServiceRegistry.java:771)
> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.
> register(ServiceRegistrationImpl.java:130)
> at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.
> registerService(ServiceRegistry.java:214)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.
> registerService(BundleContextImpl.java:433)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.
> registerService(BundleContextImpl.java:451)
> at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(
> CarbonServerManager.java:514)
> at org.wso2.carbon.core.init.CarbonServerManager.start(
> CarbonServerManager.java:219)
> at org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(
> CarbonCoreServiceComponent.java:94)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.eclipse.equinox.internal.ds.model.ServiceComponent.
> activate(ServiceComponent.java:260)
> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.
> activate(ServiceComponentProp.java:146)
> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.
> build(ServiceComponentProp.java:345)
> at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(
> InstanceProcess.java:620)
> at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(
> InstanceProcess.java:197)
> at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
> at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(
> SCRManager.java:222)
> at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.
> serviceChanged(FilteredServiceListener.java:107)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.
> dispatchEvent(BundleContextImpl.java:861)
> at org.eclipse.osgi.framework.eventmgr.EventManager.
> dispatchEvent(EventManager.java:230)
> at org.eclipse.osgi.framework.eventmgr.ListenerQueue.
> dispa

[Dev] [APIM] APIManagerComponent Exception occurred while creating JMS Event Adapter

2017-12-04 Thread Senuwan Withana
Hi Team,

I have created a Gateway Cluster following the document [1]. When I started
the server using ./wso2server.sh -Dprofile=gateway-worker command I got
below errors.  Without -Dprofile server was up correctly.

[2017-12-05 09:14:25,262]  INFO - JMSTransportHandler Starting jms topic
consumer thread...
[2017-12-05 09:14:25,284]  WARN - APIManagerComponent Exception occurred
while creating JMS Event Adapter. Request Blocking may not work properly
org.wso2.carbon.event.output.adapter.core.exception.OutputEventAdapterException:
Output Event Adapter not created as no adapter factory is registered with
type jms
at
org.wso2.carbon.event.output.adapter.core.internal.CarbonOutputEventAdapterService.create(CarbonOutputEventAdapterService.java:89)
at
org.wso2.carbon.apimgt.impl.internal.APIManagerComponent.configureJMSPublisher(APIManagerComponent.java:574)
at
org.wso2.carbon.apimgt.impl.internal.APIManagerComponent.activate(APIManagerComponent.java:221)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at
org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
at
org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:514)
at
org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219)
at
org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at
org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry

Re: [Dev] Resolving ClasscastException caused due to different classloaders

2017-12-04 Thread Pushpalanka Jayawardhana
Hi,

The problem was caused by backend bundle been packed with the endpoint.
After excluding it from .war file issue got resolved.

Thanks Rushmin for the clue.

Thanks,

On Mon, Dec 4, 2017 at 9:05 PM, Pushpalanka Jayawardhana 
wrote:

> Hi,
>
> I am facing below issue, trying to cast the retrieved object at a webapp
> application.
>
> java.lang.ClassCastException: org.wso2.SomeServiceImpl cannot be cast to 
> org.wso2.SomeService
> which is the interface it extends.
> This is registered into OSGI environment from a separate component and
> here I am trying to capture it to be used in an endpoint.
>
> When I check the classLoaders of the classes,
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@58e1a6d3[
> com.wso2.finance.open.banking.consent.mgt:1.0.0.SNAPSHOT(id=30)]   is
> used in the backend module,
>
> while inside the webapp it is,
> CarbonWebappClassLoader
>   context: /consent
>   delegate: false
>   repositories:
> /WEB-INF/classes/
> --> Parent Classloader:
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@20b6b38d[
> tomcat:7.0.73.wso2v1(id=527)]
>
> The difference in the class loaders seems to be reason for
> ClassCastException.
> Appreciate any inputs to resolve this.
>
> Thanks,
> --
> Pushpalanka.
> --
> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
> Mobile: +94779716248
> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/
> pushpalanka/ | Twitter: @pushpalanka
>
>


-- 
Pushpalanka.
-- 
Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
Mobile: +94779716248
Blog: pushpalankajaya.blogspot.com/ | LinkedIn:
lk.linkedin.com/in/pushpalanka/ | Twitter: @pushpalanka
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Resolving ClasscastException caused due to different classloaders

2017-12-04 Thread Pushpalanka Jayawardhana
Hi,

I am facing below issue, trying to cast the retrieved object at a webapp
application.

java.lang.ClassCastException: org.wso2.SomeServiceImpl cannot be cast
to org.wso2.SomeService
which is the interface it extends.
This is registered into OSGI environment from a separate component and here
I am trying to capture it to be used in an endpoint.

When I check the classLoaders of the classes,
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@58e1a6d3[com.wso2.finance.open.banking.consent.mgt:1.0.0.SNAPSHOT(id=30)]
  is used in the backend module,

while inside the webapp it is,
CarbonWebappClassLoader
  context: /consent
  delegate: false
  repositories:
/WEB-INF/classes/
--> Parent Classloader:
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@20b6b38d
[tomcat:7.0.73.wso2v1(id=527)]

The difference in the class loaders seems to be reason for
ClassCastException.
Appreciate any inputs to resolve this.

Thanks,
-- 
Pushpalanka.
-- 
Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
Mobile: +94779716248
Blog: pushpalankajaya.blogspot.com/ | LinkedIn:
lk.linkedin.com/in/pushpalanka/ | Twitter: @pushpalanka
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Introduce custom attributes to Identity Server embedded LDAP schema.

2017-12-04 Thread Isura Karunaratne
Hi Asela,

On Mon, Dec 4, 2017 at 1:31 PM, Asela Pathberiya  wrote:

>
>
> On Mon, Dec 4, 2017 at 12:48 PM, Isura Karunaratne  wrote:
>
>> This is done with following PRs
>>
>> https://github.com/wso2-extensions/identity-userstore-ldap/pull/15/
>>
>
>> https://github.com/wso2/carbon-identity-framework/pull/1224
>>
>> Thanks
>> Isura.
>>
>> On Wed, Nov 29, 2017 at 10:42 AM, Isura Karunaratne 
>> wrote:
>>
>>>
>>>
>>> On Wed, Nov 29, 2017 at 10:16 AM, Isura Karunaratne 
>>> wrote:
>>>
 Hi all,

 We need to update the LDIF to support following attributes by default
 in the embedded LDAP.

- verifyEmail
- askPassword
- forcePasswordReset
- failedRecoveryAttempts
- primaryChallengeQuestion
- emailVerified
- challengeQuestionUris
- failedLockoutCount
- lastLoginTime
- lastPasswordUpdate
- phoneVerified
- accountDisabled

 It looks like updating identityPerson.ldif [1] file is not enough to
 cater to requirement and need to generate the is-default-schema.zip file as
 well.

>>>
>
> In PR, it seems to be that you are updated the ldif file.  Is there any
> other thing which you did ?
>

Yes. Updated is-default-schema.zip file as well. It is also the in the PR :)

[1]
features/org.wso2.carbon.ldap.server.server.feature/resources/conf/is-default-schema.zip



Thanks
Isura.

>
> Thanks,
> Asela.
>
>
>>
 What would be the best way to generate the is-default-schema.zip?


 [1] https://github.com/wso2-extensions/identity-userstore-ldap/b
 lob/master/features/org.wso2.carbon.ldap.server.server.featu
 re/resources/conf/identityPerson.ldif

 [2] https://github.com/wso2-extensions/identity-userstore-ld
 ap/blob/master/features/org.wso2.carbon.ldap.server.server.f
 eature/resources/conf/is-default-schema.zip

 --

 *Isura Dilhara Karunaratne*
 Associate Technical Lead | WSO2
 Email: is...@wso2.com
 Mob : +94 772 254 810 <+94%2077%20225%204810>
 Blog : http://isurad.blogspot.com/




>>>
>>>
>>> --
>>>
>>> *Isura Dilhara Karunaratne*
>>> Associate Technical Lead | WSO2
>>> Email: is...@wso2.com
>>> Mob : +94 772 254 810 <+94%2077%20225%204810>
>>> Blog : http://isurad.blogspot.com/
>>>
>>>
>>>
>>>
>>
>>
>> --
>>
>> *Isura Dilhara Karunaratne*
>> Associate Technical Lead | WSO2
>> Email: is...@wso2.com
>> Mob : +94 772 254 810 <+94%2077%20225%204810>
>> Blog : http://isurad.blogspot.com/
>>
>>
>>
>>
>
>
> --
> Thanks & Regards,
> Asela
>
> ATL
> Mobile : +94 777 625 933 <+94%2077%20762%205933>
>  +358 449 228 979
>
> http://soasecurity.org/
> http://xacmlinfo.org/
>



-- 

*Isura Dilhara Karunaratne*
Associate Technical Lead | WSO2
Email: is...@wso2.com
Mob : +94 772 254 810
Blog : http://isurad.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Introduce custom attributes to Identity Server embedded LDAP schema.

2017-12-04 Thread Asela Pathberiya
On Mon, Dec 4, 2017 at 12:48 PM, Isura Karunaratne  wrote:

> This is done with following PRs
>
> https://github.com/wso2-extensions/identity-userstore-ldap/pull/15/
>

> https://github.com/wso2/carbon-identity-framework/pull/1224
>
> Thanks
> Isura.
>
> On Wed, Nov 29, 2017 at 10:42 AM, Isura Karunaratne 
> wrote:
>
>>
>>
>> On Wed, Nov 29, 2017 at 10:16 AM, Isura Karunaratne 
>> wrote:
>>
>>> Hi all,
>>>
>>> We need to update the LDIF to support following attributes by default in
>>> the embedded LDAP.
>>>
>>>- verifyEmail
>>>- askPassword
>>>- forcePasswordReset
>>>- failedRecoveryAttempts
>>>- primaryChallengeQuestion
>>>- emailVerified
>>>- challengeQuestionUris
>>>- failedLockoutCount
>>>- lastLoginTime
>>>- lastPasswordUpdate
>>>- phoneVerified
>>>- accountDisabled
>>>
>>> It looks like updating identityPerson.ldif [1] file is not enough to
>>> cater to requirement and need to generate the is-default-schema.zip file as
>>> well.
>>>
>>

In PR, it seems to be that you are updated the ldif file.  Is there any
other thing which you did ?

Thanks,
Asela.


>
>>> What would be the best way to generate the is-default-schema.zip?
>>>
>>>
>>> [1] https://github.com/wso2-extensions/identity-userstore-ldap/b
>>> lob/master/features/org.wso2.carbon.ldap.server.server.featu
>>> re/resources/conf/identityPerson.ldif
>>>
>>> [2] https://github.com/wso2-extensions/identity-userstore-ld
>>> ap/blob/master/features/org.wso2.carbon.ldap.server.server.f
>>> eature/resources/conf/is-default-schema.zip
>>>
>>> --
>>>
>>> *Isura Dilhara Karunaratne*
>>> Associate Technical Lead | WSO2
>>> Email: is...@wso2.com
>>> Mob : +94 772 254 810 <+94%2077%20225%204810>
>>> Blog : http://isurad.blogspot.com/
>>>
>>>
>>>
>>>
>>
>>
>> --
>>
>> *Isura Dilhara Karunaratne*
>> Associate Technical Lead | WSO2
>> Email: is...@wso2.com
>> Mob : +94 772 254 810 <+94%2077%20225%204810>
>> Blog : http://isurad.blogspot.com/
>>
>>
>>
>>
>
>
> --
>
> *Isura Dilhara Karunaratne*
> Associate Technical Lead | WSO2
> Email: is...@wso2.com
> Mob : +94 772 254 810 <+94%2077%20225%204810>
> Blog : http://isurad.blogspot.com/
>
>
>
>


-- 
Thanks & Regards,
Asela

ATL
Mobile : +94 777 625 933
 +358 449 228 979

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