Re: [Dev] [Integration Cloud] Swagger Support for ESB REST APIs

2016-09-26 Thread Jagath Sisirakumara Ariyarathne
Hi,

While implementing swagger definition for uri-template based APIs, we have
following problem.

If we have a template like "/view/{symbol}", we need to define "symbol" as
a parameter in swagger definition. According to the swagger spec for
parameters[1], if it is a query or path parameter, then it is required to
have a type (string, number etc) for this parameter. But this information
is not available in existing synapse configurations of APIs. The possible
option is to provide all parameters as "string" as Maheeka mentioned
earlier.

Appreciate any thoughts on this.

[1] - http://swagger.io/specification/#parameterObject

Thanks.

On Tue, Sep 27, 2016 at 5:38 AM, Jagath Sisirakumara Ariyarathne <
jaga...@wso2.com> wrote:

> Hi All,
>
> I have completed initial implementation for url-mapping based APIs.
> Attached sample API and its definitions. I am further working on supporting
> uri-templates based definitions.
>
> Thanks.
>
> On Thu, Sep 22, 2016 at 2:09 PM, Jagath Sisirakumara Ariyarathne <
> jaga...@wso2.com> wrote:
>
>> Hi,
>>
>> In this particular implementation for Integration Cloud, we planned to go
>> with an extension which uses existing information in synapse configurations
>> without updating synapse code base. Therefore as Maheeka mentioned in [1],
>> we are going to provide limited information at initial phase. But in long
>> run, we need to extend this to store all required API definitions in
>> synapse configurations.
>>
>> [1] - https://gist.github.com/maheeka/ec23751f21d8d7d5abaa4f9130f233f2
>>
>> Thanks.
>>
>> On Thu, Sep 22, 2016 at 8:23 AM, Joseph Fonseka  wrote:
>>
>>> Hi
>>>
>>> On Tue, Sep 20, 2016 at 4:18 PM, Maheeka Jayasuriya 
>>> wrote:
>>>

 Please note these changes were done based on the level of information
 we have on the API by referring to it's configuration. For example, we do
 not have a way of determining the request format or uri parameter types and
 content-types of the API. This will require further digging and analyzing
 on the configuration.

>>>
>>> Have you consider adding additional information as annotations/notes in
>>> the config. AFAIK we do not have a config to add annotations so currently
>>> we can define them as properties but going forward may be we can add some
>>> way to annotate synapse.
>>>
>>> In the longer run mostly synapse APIs will be generated out of swagger
>>> definitions thus having the ability to contain all the API definition
>>> information in the synapse file would be important.
>>>
>>> Thanks
>>> Jo
>>>
>>>

 Find the diff of these changes done to the Swagger definition at [4]

 To get the required information from the Rest API configuration we can
 invoke RestApiAdminServices's getApiByName operation which returns the
 following response [5] for an API created that has the PetStore resources.
 We can identify the methods and uri-template and mappings from this
 response.

 Please let know your thoughts.

 Thanks,
 Maheeka

 [1] http://petstore.swagger.io/#/pet
 [2] https://gist.github.com/maheeka/4eaedd2e2e0765959a4166865bf9adf9
 [3] https://gist.github.com/maheeka/ec23751f21d8d7d5abaa4f9130f233f2
 [4] https://www.diffchecker.com/xEu0NSNz
 [5] http://schemas.
 xmlsoap.org/soap/envelope/">

   http://org.apache.axis2/xsd;>
  http://api.rest.carbon.wso2.org/xsd; xmlns:xsi="http://www.w3.org/2
 001/XMLSchema-instance">
 
 /pet
 PetstoreAPI.xml
 
 false
 PetstoreAPI
 -1
 





POST
PUT


0

/

 
 





POST
DELETE
GET


0
/{petId}


 
 false
 false
  
   

 


 Thanks,

 Maheeka Jayasuriya
 Senior Software Engineer
 Mobile : +9450661

>>>
>>>
>>>
>>> --
>>>
>>> --
>>> *Joseph Fonseka*
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: +94 772 512 430
>>> skype: jpfonseka
>>>
>>> * *
>>>
>>>
>>
>>
>> --
>> Jagath Ariyarathne
>> Technical Lead
>> WSO2 Inc.  http://wso2.com/
>> Email: jaga...@wso2.com
>> Mob  : +94 77 386 7048
>> 
>>
>
>
>
> --
> Jagath Ariyarathne
> 

[Dev] How to get a connection from the carbon datasources

2016-09-26 Thread Chanaka Cooray
Hi Niranda,

In c5, you can fetch a datasource object using the data source service or
using the jndi context manager. [1]

[1] https://github.com/wso2/carbon-datasources

Thanks,
Chanaka.

On Tuesday, September 27, 2016, Niranda Perera > wrote:

> Hi all,
>
> I want to use a jdbc connection provided by a carbon-datasource.
>
> I found the following blog from Kishanthan [1], which was done in 2013.
>
> it uses the org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory as
> follows
>
> Hashtable environment = new Hashtable();
>  environment.put("java.naming.factory.initialoorg.wso2.carbo
> n.tomcat.jndi.CarbonJavaURLContextFactory");
> Context initContext = new InitialContext(environment);
> Object result = initContext.lookup("jdbc/MyCarbonDataSource");
> if (result != null) {
> // Do your work here
> } else {
> System.out.println(“Cannot find MyCarbonDataSource”);
> }
>
> My question is, is there a better way of doing this now (a util method may
> be?) or is this method still applicable?
>
> Best
>
> [1] https://kishanthan.wordpress.com/2013/02/11/access-
> cabon-data-sources-within-webapps-in-wso2-application-server/
>
> --
> *Niranda Perera*
> Software Engineer, WSO2 Inc.
> Mobile: +94-71-554-8430
> Twitter: @n1r44 
> https://pythagoreanscript.wordpress.com/
>


-- 
Chanaka Cooray
Software Engineer, WSO2 Inc. http://wso2.com
Email: chana...@wso2.com
Mobile: +94713149860

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


Re: [Dev] Invoking a Jaggery api via HttpURLConnection

2016-09-26 Thread Denuwanthi De Silva
Hi ,

The above get() method returned the response as null.
After several attempts finally got it working with following approach with
the help of Nipuna.
Thanks a lot Nipuna for helping to sort this out.

 var xhr = new XMLHttpRequest();
 xhr.open("GET", url);
 xhr.setRequestHeader("Accept" , "application/json");
 xhr.setRequestHeader("Content-Type" , "application/json");
 xhr.send();
print(xhr.responseText);

Thanks,

On Fri, Sep 23, 2016 at 6:32 PM, Denuwanthi De Silva 
wrote:

> Hi Sameera,
>
> I could get it working with following approach[1]:
>
> var headers ={"Accept" : "application/json"};
> var response = get(url,null,headers,'text');
>
>
>
> [1]http://stackoverflow.com/questions/34505509/jaggeryjs-
> ajax-call-get-method
>
> Thanks
>
> On Fri, Sep 23, 2016 at 5:21 PM, Denuwanthi De Silva 
> wrote:
>
>> Hi Sameera,
>>
>> Please find the stacktrace
>>
>> Stacktrace:
>> at org.apache.jasper.servlet.JspServletWrapper.handleJspExcepti
>> on(JspServletWrapper.java:568)
>> at org.apache.jasper.servlet.JspServletWrapper.service(JspServl
>> etWrapper.java:470)
>> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServl
>> et.java:395)
>> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>> lter(ApplicationFilterChain.java:303)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>> licationFilterChain.java:208)
>> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilte
>> r.java:52)
>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>> lter(ApplicationFilterChain.java:241)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>> licationFilterChain.java:208)
>> at org.apache.catalina.core.ApplicationDispatcher.invoke(Applic
>> ationDispatcher.java:748)
>> at org.apache.catalina.core.ApplicationDispatcher.processReques
>> t(ApplicationDispatcher.java:486)
>> at org.apache.catalina.core.ApplicationDispatcher.doForward(App
>> licationDispatcher.java:411)
>> at org.apache.catalina.core.ApplicationDispatcher.forward(Appli
>> cationDispatcher.java:338)
>>
>>
>> Caused by: java.lang.RuntimeException: Failed : HTTP error code : 500
>> at org.apache.jsp.login_jsp._jspService(login_jsp.java:353)
>> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>> at org.apache.jasper.servlet.JspServletWrapper.service(JspServl
>> etWrapper.java:432)
>> ... 55 more
>>
>>
>> Thanks
>>
>
>
>
> --
> Denuwanthi De Silva
> Senior Software Engineer;
> WSO2 Inc.; http://wso2.com,
> Email: denuwan...@wso2.com
> Blog: https://denuwanthi.wordpress.com/
>



-- 
Denuwanthi De Silva
Senior Software Engineer;
WSO2 Inc.; http://wso2.com,
Email: denuwan...@wso2.com
Blog: https://denuwanthi.wordpress.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Duplicate OSGI class inspector for Carbon based products

2016-09-26 Thread Rushmin Fernando
This helped a lot to figure out a class loading issue when installing
appmgt feature in to IS. Thanks a lot Ruwan !!

On Tue, Sep 27, 2016 at 10:42 AM, Ruwan Abeykoon  wrote:

> Hi All,
> I thought of improving the analysis tool by putting some of the manual
> knowledge into the code.
>
> [1] has a tool which can be used to find out why an intermittent class
> loading issue occurs. It  provides the offending bundle names.
> Please try it out next time when you come across a "intermittent class
> loader" issue in Carbon 4.x,  and provide me the feedback on any problems
> or improvement you need.
>
>
> [1] https://github.com/ruwanta/CarbonOSGI-Bundle-Verifier/
> tree/master/modules/runtime-introspection
>
> Cheers,
> Ruwan
>
>
> On Wed, Jul 29, 2015 at 11:32 AM, Ruwan Abeykoon  wrote:
>
>> @Aruna,
>> Thanks for suggestion. Will do that too. I was thinking of presenting in
>> a tabular view.
>>
>> For the time being check if "-pv" (process package versions) helps. It
>> will display duplicate packages exporting the same version.
>>
>> Cheers,
>> Ruwan
>>
>> On Wed, Jul 29, 2015 at 11:14 AM, Aruna Karunarathna 
>> wrote:
>>
>>> Great tool indeed!
>>>
>>> Small suggestion/improvement, can you specify the exported version of
>>> packages, since many issues occur when the versions are the same.
>>>
>>> Regards,
>>> Aruna
>>>
>>> On Wed, Jul 29, 2015 at 11:05 AM, Sameera Jayasoma 
>>> wrote:
>>>
 This will be a very useful tool to debug intermittent class loading
 issues.

 On Wed, Jul 29, 2015 at 10:40 AM, Ruwan Abeykoon 
 wrote:

> +1 maven plugin
> Will do when I have some time
>



 --
 Sameera Jayasoma,
 Software Architect,

 WSO2, Inc. (http://wso2.com)
 email: same...@wso2.com
 blog: http://blog.sameera.org
 twitter: https://twitter.com/sameerajayasoma
 flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
 Mobile: 0094776364456

 Lean . Enterprise . Middleware


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


>>>
>>>
>>> --
>>>
>>> *Aruna Sujith Karunarathna *| Software Engineer
>>> WSO2, Inc | lean. enterprise. middleware.
>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>> Mobile: +94 71 9040362 | Work: +94 112145345
>>> Email: ar...@wso2.com | Web: www.wso2.com
>>>
>>>
>>
>>
>>
>> --
>>
>> *Ruwan Abeykoon*
>> *Architect,*
>> *WSO2, Inc. http://wso2.com  *
>> *lean.enterprise.middleware.*
>>
>> email: ruw...@wso2.com
>> phone:(+94) 39736
>>
>
>
>
> --
>
> *Ruwan Abeykoon*
> *Associate Director/Architect**,*
> *WSO2, Inc. http://wso2.com  *
> *lean.enterprise.middleware.*
>
>


-- 
*Best Regards*

*Rushmin Fernando*
*Technical Lead*

WSO2 Inc.  - Lean . Enterprise . Middleware

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


Re: [Dev] Duplicate OSGI class inspector for Carbon based products

2016-09-26 Thread Ruwan Abeykoon
Hi All,
I thought of improving the analysis tool by putting some of the manual
knowledge into the code.

[1] has a tool which can be used to find out why an intermittent class
loading issue occurs. It  provides the offending bundle names.
Please try it out next time when you come across a "intermittent class
loader" issue in Carbon 4.x,  and provide me the feedback on any problems
or improvement you need.


[1] https://github.com/ruwanta/CarbonOSGI-Bundle-
Verifier/tree/master/modules/runtime-introspection

Cheers,
Ruwan


On Wed, Jul 29, 2015 at 11:32 AM, Ruwan Abeykoon  wrote:

> @Aruna,
> Thanks for suggestion. Will do that too. I was thinking of presenting in a
> tabular view.
>
> For the time being check if "-pv" (process package versions) helps. It
> will display duplicate packages exporting the same version.
>
> Cheers,
> Ruwan
>
> On Wed, Jul 29, 2015 at 11:14 AM, Aruna Karunarathna 
> wrote:
>
>> Great tool indeed!
>>
>> Small suggestion/improvement, can you specify the exported version of
>> packages, since many issues occur when the versions are the same.
>>
>> Regards,
>> Aruna
>>
>> On Wed, Jul 29, 2015 at 11:05 AM, Sameera Jayasoma 
>> wrote:
>>
>>> This will be a very useful tool to debug intermittent class loading
>>> issues.
>>>
>>> On Wed, Jul 29, 2015 at 10:40 AM, Ruwan Abeykoon 
>>> wrote:
>>>
 +1 maven plugin
 Will do when I have some time

>>>
>>>
>>>
>>> --
>>> Sameera Jayasoma,
>>> Software Architect,
>>>
>>> WSO2, Inc. (http://wso2.com)
>>> email: same...@wso2.com
>>> blog: http://blog.sameera.org
>>> twitter: https://twitter.com/sameerajayasoma
>>> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>>> Mobile: 0094776364456
>>>
>>> Lean . Enterprise . Middleware
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Aruna Sujith Karunarathna *| Software Engineer
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 71 9040362 | Work: +94 112145345
>> Email: ar...@wso2.com | Web: www.wso2.com
>>
>>
>
>
>
> --
>
> *Ruwan Abeykoon*
> *Architect,*
> *WSO2, Inc. http://wso2.com  *
> *lean.enterprise.middleware.*
>
> email: ruw...@wso2.com
> phone:(+94) 39736
>



-- 

*Ruwan Abeykoon*
*Associate Director/Architect**,*
*WSO2, Inc. http://wso2.com  *
*lean.enterprise.middleware.*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Architecture] WSO2 Message Broker 3.2.0-ALPHA Released !

2016-09-26 Thread Sasikala Kottegoda
Hi All,

The WSO2 Message Broker team is pleased to announce the alpha release of
WSO2 Message Broker (MB) 3.2.0.

Source & binary distribution files of WSO2 Message Broker can be found in:
https://github.com/wso2/product-mb/releases/tag/v3.2.0-ALPHA

All the known issues identified are listed in JIRA[1].

[1] https://wso2.org/jira/browse/MB

Regards,
~MB Team~

-- 
Sasikala Kottegoda
*Software Engineer*
WSO2 Inc., http://wso2.com/
lean. enterprise. middleware
Mobile: +94 774835928

[image: https://wso2.com/signature] 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to get a connection from the carbon datasources

2016-09-26 Thread Rajith Vitharana
Hi Niranda,

Since we use jndi, IMO this approach is also ok. Other than that, you can
also get carbon datasource using Ndatasource component as well. Sample will
be as below

CarbonDataSource cds = dataSourceService.getDataSource("datasourceName");

You will need to get the datasourceService[2] as osgi service.

AFAIR you need to mention datasource name from "name" tag [1]

[1] - 
WSO2_CARBON_DB
[2] - org.wso2.carbon.ndatasource.core.DataSourceService

Thanks,


On 27 September 2016 at 08:03, Niranda Perera  wrote:

> Hi all,
>
> I want to use a jdbc connection provided by a carbon-datasource.
>
> I found the following blog from Kishanthan [1], which was done in 2013.
>
> it uses the org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory as
> follows
>
> Hashtable environment = new Hashtable();
>  environment.put("java.naming.factory.initialoorg.wso2.carbon.tomcat.jndi.
> CarbonJavaURLContextFactory");
> Context initContext = new InitialContext(environment);
> Object result = initContext.lookup("jdbc/MyCarbonDataSource");
> if (result != null) {
> // Do your work here
> } else {
> System.out.println(“Cannot find MyCarbonDataSource”);
> }
>
> My question is, is there a better way of doing this now (a util method may
> be?) or is this method still applicable?
>
> Best
>
> [1] https://kishanthan.wordpress.com/2013/02/11/access-cabon-data-sources-
> within-webapps-in-wso2-application-server/
>
> --
> *Niranda Perera*
> Software Engineer, WSO2 Inc.
> Mobile: +94-71-554-8430
> Twitter: @n1r44 
> https://pythagoreanscript.wordpress.com/
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Vitharana

Senior Software Engineer,
WSO2 Inc. : wso2.com
Mobile : +94715883223
Blog : http://lankavitharana.blogspot.com/

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


Re: [Dev] [Integration Cloud] Swagger Support for ESB REST APIs

2016-09-26 Thread Jagath Sisirakumara Ariyarathne
Hi All,

I have completed initial implementation for url-mapping based APIs.
Attached sample API and its definitions. I am further working on supporting
uri-templates based definitions.

Thanks.

On Thu, Sep 22, 2016 at 2:09 PM, Jagath Sisirakumara Ariyarathne <
jaga...@wso2.com> wrote:

> Hi,
>
> In this particular implementation for Integration Cloud, we planned to go
> with an extension which uses existing information in synapse configurations
> without updating synapse code base. Therefore as Maheeka mentioned in [1],
> we are going to provide limited information at initial phase. But in long
> run, we need to extend this to store all required API definitions in
> synapse configurations.
>
> [1] - https://gist.github.com/maheeka/ec23751f21d8d7d5abaa4f9130f233f2
>
> Thanks.
>
> On Thu, Sep 22, 2016 at 8:23 AM, Joseph Fonseka  wrote:
>
>> Hi
>>
>> On Tue, Sep 20, 2016 at 4:18 PM, Maheeka Jayasuriya 
>> wrote:
>>
>>>
>>> Please note these changes were done based on the level of information we
>>> have on the API by referring to it's configuration. For example, we do not
>>> have a way of determining the request format or uri parameter types and
>>> content-types of the API. This will require further digging and analyzing
>>> on the configuration.
>>>
>>
>> Have you consider adding additional information as annotations/notes in
>> the config. AFAIK we do not have a config to add annotations so currently
>> we can define them as properties but going forward may be we can add some
>> way to annotate synapse.
>>
>> In the longer run mostly synapse APIs will be generated out of swagger
>> definitions thus having the ability to contain all the API definition
>> information in the synapse file would be important.
>>
>> Thanks
>> Jo
>>
>>
>>>
>>> Find the diff of these changes done to the Swagger definition at [4]
>>>
>>> To get the required information from the Rest API configuration we can
>>> invoke RestApiAdminServices's getApiByName operation which returns the
>>> following response [5] for an API created that has the PetStore resources.
>>> We can identify the methods and uri-template and mappings from this
>>> response.
>>>
>>> Please let know your thoughts.
>>>
>>> Thanks,
>>> Maheeka
>>>
>>> [1] http://petstore.swagger.io/#/pet
>>> [2] https://gist.github.com/maheeka/4eaedd2e2e0765959a4166865bf9adf9
>>> [3] https://gist.github.com/maheeka/ec23751f21d8d7d5abaa4f9130f233f2
>>> [4] https://www.diffchecker.com/xEu0NSNz
>>> [5] http://schemas.
>>> xmlsoap.org/soap/envelope/">
>>>
>>>   http://org.apache.axis2/xsd;>
>>>  http://api.rest.carbon.wso2.org/xsd; xmlns:xsi="http://www.w3.org/2
>>> 001/XMLSchema-instance">
>>> 
>>> /pet
>>> PetstoreAPI.xml
>>> 
>>> false
>>> PetstoreAPI
>>> -1
>>> 
>>>
>>>
>>>
>>>
>>>
>>>POST
>>>PUT
>>>
>>>
>>>0
>>>
>>>/
>>>
>>> 
>>> 
>>>
>>>
>>>
>>>
>>>
>>>POST
>>>DELETE
>>>GET
>>>
>>>
>>>0
>>>/{petId}
>>>
>>>
>>> 
>>> false
>>> false
>>>  
>>>   
>>>
>>> 
>>>
>>>
>>> Thanks,
>>>
>>> Maheeka Jayasuriya
>>> Senior Software Engineer
>>> Mobile : +9450661
>>>
>>
>>
>>
>> --
>>
>> --
>> *Joseph Fonseka*
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 772 512 430
>> skype: jpfonseka
>>
>> * *
>>
>>
>
>
> --
> Jagath Ariyarathne
> Technical Lead
> WSO2 Inc.  http://wso2.com/
> Email: jaga...@wso2.com
> Mob  : +94 77 386 7048
> 
>



-- 
Jagath Ariyarathne
Technical Lead
WSO2 Inc.  http://wso2.com/
Email: jaga...@wso2.com
Mob  : +94 77 386 7048



TestApi.json
Description: application/json


TestApi.yaml
Description: application/yaml

http://ws.apache.org/ns/synapse;
 name="TestApi"
 context="/t/abc.com/test"
 hostname="localhost"
 port="8280">
   
   
   

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


Re: [Dev] How to get a connection from the carbon datasources

2016-09-26 Thread Supun Sethunga
Similar approach is used in ml [1] too.

[1]
https://github.com/wso2/carbon-ml/blob/master/components/ml/org.wso2.carbon.ml.database/src/main/java/org/wso2/carbon/ml/database/internal/MLDataSource.java#L30

Regards,

On Tue, Sep 27, 2016 at 8:03 AM, Niranda Perera  wrote:

> Hi all,
>
> I want to use a jdbc connection provided by a carbon-datasource.
>
> I found the following blog from Kishanthan [1], which was done in 2013.
>
> it uses the org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory as
> follows
>
> Hashtable environment = new Hashtable();
>  environment.put("java.naming.factory.initialoorg.wso2.carbon.tomcat.jndi.
> CarbonJavaURLContextFactory");
> Context initContext = new InitialContext(environment);
> Object result = initContext.lookup("jdbc/MyCarbonDataSource");
> if (result != null) {
> // Do your work here
> } else {
> System.out.println(“Cannot find MyCarbonDataSource”);
> }
>
> My question is, is there a better way of doing this now (a util method may
> be?) or is this method still applicable?
>
> Best
>
> [1] https://kishanthan.wordpress.com/2013/02/11/access-cabon-data-sources-
> within-webapps-in-wso2-application-server/
>
> --
> *Niranda Perera*
> Software Engineer, WSO2 Inc.
> Mobile: +94-71-554-8430
> Twitter: @n1r44 
> https://pythagoreanscript.wordpress.com/
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Supun Sethunga*
Senior Software Engineer
WSO2, Inc.
http://wso2.com/
lean | enterprise | middleware
Mobile : +94 716546324
Blog: http://supunsetunga.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How to do authentication/authorization on JAX-RS REST service running on WSO2 AS?

2016-09-26 Thread wenxzhen
Dear all,


For a JAX-RS REST service running on WSO2 AS, what's the best way to implement 
the authentication and authorization for each REST API? Please kindly advice.


Thank you very much
Regards, Wenxing___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How to get a connection from the carbon datasources

2016-09-26 Thread Niranda Perera
Hi all,

I want to use a jdbc connection provided by a carbon-datasource.

I found the following blog from Kishanthan [1], which was done in 2013.

it uses the org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory as
follows

Hashtable environment = new Hashtable();
 
environment.put("java.naming.factory.initialoorg.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory");
Context initContext = new InitialContext(environment);
Object result = initContext.lookup("jdbc/MyCarbonDataSource");
if (result != null) {
// Do your work here
} else {
System.out.println(“Cannot find MyCarbonDataSource”);
}

My question is, is there a better way of doing this now (a util method may
be?) or is this method still applicable?

Best

[1]
https://kishanthan.wordpress.com/2013/02/11/access-cabon-data-sources-within-webapps-in-wso2-application-server/

-- 
*Niranda Perera*
Software Engineer, WSO2 Inc.
Mobile: +94-71-554-8430
Twitter: @n1r44 
https://pythagoreanscript.wordpress.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Identity Server Error with MailChimp SSO

2016-09-26 Thread Hariprasath Thanarajah
Yes sure we will provide the fix version of mailChimp Authenticator soon.

On Monday, September 26, 2016, Srikanth Puppala 
wrote:

> Hi Malaka/Hariparshath,
>
> It would be great if you provide a fix on top of Identity Server 5.2.0. I
> am even fine to go back to any of the versions where MailChimp SSO is
> functional.
>
> Thanks & Regards,
> Srikanth Puppala.
>
> On Mon, Sep 26, 2016 at 5:18 AM, Hariprasath Thanarajah <
> haripras...@wso2.com
> > wrote:
>
>> Yes noted Malaka.
>>
>>
>> On Monday, September 26, 2016, Malaka Silva > > wrote:
>>
>>> Hi Srikanth,
>>>
>>> Thank you for reporting this and we will provide a solution soon.
>>>
>>> @Hariprasath - Yes you are correct API 2.0 is deprecated and that does
>>> not mean it's currently unavailable. So we should ideally be changing this
>>> to the latest version.
>>>
>>> I managed to reproduce the issue that Srikanth has experienced. The
>>> reason for that is endpoint is dynamic. For example my access token should
>>> be using https://*us14*.api.mailchimp.com/2.0/users/profile, where as
>>> you need to use https://*us12*.api.mailchimp.com/2.0/users/profile for
>>> your account. More details can be found in [1]
>>>
>>> Can we provide a fix for this?
>>>
>>> [1] http://stackoverflow.com/questions/27875405/invalid-mailchim
>>> p-api-key-in-mailchimp-export-api
>>>
>>> On Mon, Sep 26, 2016 at 4:02 PM, Hariprasath Thanarajah <
>>> haripras...@wso2.com> wrote:
>>>
 Hi Srikanth,


 On Mon, Sep 26, 2016 at 10:07 AM, Srikanth Puppala <
 puppala.srika...@gmail.com> wrote:

> Hi Malaka,
>
> Thanks for your response. I did not set any email configuration in
> Identity Server or MailChimp. I followed the doc "
> https://docs.wso2.com/display/ISCONNECTORS/Configuring+Mail
> Chimp+Authenticator".
>
> On forums, I see a bug in WSO2 Identity Server [https://wso2.org/jira/
> browse/IDENTITY-4810]. I tried version 5.1.0 and 5.2.0 version of
> Identity Server and seeing the same problem.
>
 I have tried with 5.1.0 and it is working for me(Tried with v2.0 app).
 The issue because of the mailChimp API version, We created this for api
 v2.0 their we created the federated authenticated User from the email got
 from the response of https://apidocs.mailchimp.com/
 api/2.0/users/profile.php but now it is deprecated. Thank you for
 pointing it. We will update with mailChimp Authenticator for current API
 version.

> ,
> I am not really sure about subject identifier and how to configure it.
> Could you please share any doc which will be helpful.
>
 You don't need it to configure.

>
> Thanks & Regards,
> Srikanth Puppala.
>
>
>
>
>
>
>
> On Sun, Sep 25, 2016 at 8:53 PM, Malaka Silva  wrote:
>
>> Hi Srikanth,
>>
>> I guess you have setup this as the first step and won't be using any
>> other authenticator afterwards?
>> With mail chimp authinticator we are using email as the subject
>> identifier. Hope you have given a email for the user and set the required
>> visibility for the API?
>>
>> @Hariprasath - Please follow up on this issue.
>>
>> On Fri, Sep 23, 2016 at 9:31 PM, Srikanth Puppala <
>> puppala.srika...@gmail.com> wrote:
>>
>>>
>>> Hi,
>>>
>>> I am trying to connect to MailChimp via WSO2 server
>>> using following document:
>>> https://docs.wso2.com/display/ISCONNECTORS/Configuring+MailC
>>> himp+Authenticator
>>>
>>>
>>> *However I ended up with following error(Any Idea??):*
>>> [2016-09-23 15:53:48,353] ERROR {org.wso2.carbon.identity.appl
>>> ication.authentication.framework.handler.request.impl.DefaultRequestCoordinator}
>>> -  Exception in Authentication 
>>> Frameworkjava.lang.IllegalArgumentException:
>>> Failed to create Federated Authenticated User from the given subject
>>> identifier. Invalid argument. authenticatedSubjectIdentifier : null
>>> at org.wso2.carbon.identity.appli
>>> cation.authentication.framework.model.AuthenticatedUser.crea
>>> teFederateAuthenticatedUserFromSubjectIdentifier(Authenticat
>>> edUser.java:123)
>>> at org.wso2.carbon.identity.authe
>>> nticator.mailChimp.MailChimpAuthenticator.processAuthenticat
>>> ionResponse(MailChimpAuthenticator.java:190)
>>> at org.wso2.carbon.identity.appli
>>> cation.authentication.framework.AbstractApplicationAuthentic
>>> ator.process(AbstractApplicationAuthenticator.java:66)
>>> at org.wso2.carbon.identity.appli
>>> cation.authentication.framework.handler.step.impl.DefaultSte
>>> pHandler.doAuthentication(DefaultStepHandler.java:432)
>>> at 

Re: [Dev] Using dep sync for artifact synchronization of Analytics Cluster

2016-09-26 Thread Sashika Wijesinghe
Hi Gihan,

Thanks for the information.

Regards,
Sashika

On Fri, Sep 23, 2016 at 2:04 PM, Gihan Anuruddha  wrote:

> In a normal scenario, users will do their implementation and test on
> dev/staging environments. So simply they just upload their final CApp to
> production environment. We can avoid SVN depsync in a minimum HA cluster
> for the simplicity. User needs to upload CApp to the both nodes. Another
> option is using rsync kind of an option to sync artifacts within the
> nodes. The same thing can be applied to the fully distributed cluster as
> well.
>
> Regards,
> Gihan
>
> On Fri, Sep 23, 2016 at 12:35 PM, Sashika Wijesinghe 
> wrote:
>
>> Hi All,
>>
>> When deploying an Analytics cluster  relevant cApp is bundled with the
>> Analytics pack, therefore even without configuring SVN based deployment
>> synchronizer, Analytics cluster can be configured successfully. But if any
>> changes required (may be a bug fix etc) to the cApp later on, users have to
>> manually replace the cApp for each node.
>>
>> May I know what is the recommended way to configure analytics cluster in
>> terms of artifacts deployment?
>>
>> Thanks
>> Sashika
>>
>> --
>>
>> *Sashika WijesingheSoftware Engineer - QA Team*
>> Mobile : +94 (0) 774537487
>> sash...@wso2.com
>>
>
>
>
> --
> W.G. Gihan Anuruddha
> Senior Software Engineer | WSO2, Inc.
> M: +94772272595
>



-- 

*Sashika WijesingheSoftware Engineer - QA Team*
Mobile : +94 (0) 774537487
sash...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Identity Server Error with MailChimp SSO

2016-09-26 Thread Hariprasath Thanarajah
Yes noted Malaka.

On Monday, September 26, 2016, Malaka Silva  wrote:

> Hi Srikanth,
>
> Thank you for reporting this and we will provide a solution soon.
>
> @Hariprasath - Yes you are correct API 2.0 is deprecated and that does
> not mean it's currently unavailable. So we should ideally be changing this
> to the latest version.
>
> I managed to reproduce the issue that Srikanth has experienced. The
> reason for that is endpoint is dynamic. For example my access token should
> be using https://*us14*.api.mailchimp.com/2.0/users/profile, where as you
> need to use https://*us12*.api.mailchimp.com/2.0/users/profile for your
> account. More details can be found in [1]
>
> Can we provide a fix for this?
>
> [1] http://stackoverflow.com/questions/27875405/invalid-
> mailchimp-api-key-in-mailchimp-export-api
>
> On Mon, Sep 26, 2016 at 4:02 PM, Hariprasath Thanarajah <
> haripras...@wso2.com
> > wrote:
>
>> Hi Srikanth,
>>
>>
>> On Mon, Sep 26, 2016 at 10:07 AM, Srikanth Puppala <
>> puppala.srika...@gmail.com
>> > wrote:
>>
>>> Hi Malaka,
>>>
>>> Thanks for your response. I did not set any email configuration in
>>> Identity Server or MailChimp. I followed the doc "
>>> https://docs.wso2.com/display/ISCONNECTORS/Configuring+Mail
>>> Chimp+Authenticator".
>>>
>>> On forums, I see a bug in WSO2 Identity Server [https://wso2.org/jira/
>>> browse/IDENTITY-4810]. I tried version 5.1.0 and 5.2.0 version of
>>> Identity Server and seeing the same problem.
>>>
>> I have tried with 5.1.0 and it is working for me(Tried with v2.0 app).
>> The issue because of the mailChimp API version, We created this for api
>> v2.0 their we created the federated authenticated User from the email got
>> from the response of https://apidocs.mailchimp.com/
>> api/2.0/users/profile.php but now it is deprecated. Thank you for
>> pointing it. We will update with mailChimp Authenticator for current API
>> version.
>>
>>> ,
>>> I am not really sure about subject identifier and how to configure it.
>>> Could you please share any doc which will be helpful.
>>>
>> You don't need it to configure.
>>
>>>
>>> Thanks & Regards,
>>> Srikanth Puppala.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Sun, Sep 25, 2016 at 8:53 PM, Malaka Silva >> > wrote:
>>>
 Hi Srikanth,

 I guess you have setup this as the first step and won't be using any
 other authenticator afterwards?
 With mail chimp authinticator we are using email as the subject
 identifier. Hope you have given a email for the user and set the required
 visibility for the API?

 @Hariprasath - Please follow up on this issue.

 On Fri, Sep 23, 2016 at 9:31 PM, Srikanth Puppala <
 puppala.srika...@gmail.com
 > wrote:

>
> Hi,
>
> I am trying to connect to MailChimp via WSO2 server
> using following document:
> https://docs.wso2.com/display/ISCONNECTORS/Configuring+MailC
> himp+Authenticator
>
>
> *However I ended up with following error(Any Idea??):*
> [2016-09-23 15:53:48,353] ERROR {org.wso2.carbon.identity.appl
> ication.authentication.framework.handler.request.impl.DefaultRequestCoordinator}
> -  Exception in Authentication 
> Frameworkjava.lang.IllegalArgumentException:
> Failed to create Federated Authenticated User from the given subject
> identifier. Invalid argument. authenticatedSubjectIdentifier : null
> at org.wso2.carbon.identity.appli
> cation.authentication.framework.model.AuthenticatedUser.crea
> teFederateAuthenticatedUserFromSubjectIdentifier(Authenticat
> edUser.java:123)
> at org.wso2.carbon.identity.authe
> nticator.mailChimp.MailChimpAuthenticator.processAuthenticat
> ionResponse(MailChimpAuthenticator.java:190)
> at org.wso2.carbon.identity.appli
> cation.authentication.framework.AbstractApplicationAuthentic
> ator.process(AbstractApplicationAuthenticator.java:66)
> at org.wso2.carbon.identity.appli
> cation.authentication.framework.handler.step.impl.DefaultSte
> pHandler.doAuthentication(DefaultStepHandler.java:432)
> at org.wso2.carbon.identity.appli
> cation.authentication.framework.handler.step.impl.DefaultSte
> pHandler.handleResponse(DefaultStepHandler.java:4
> 06)
> at org.wso2.carbon.identity.appli
> cation.authentication.framework.handler.step.impl.DefaultSte
> pHandler.handle(DefaultStepHandler.java:117)
> at org.wso2.carbon.identity.appli
> cation.authentication.framework.handler.sequence.impl.Defaul
> tStepBasedSequenceHandler.handle(DefaultStepBased
> SequenceHandler.java:171)
> at org.wso2.carbon.identity.appli
> 

Re: [Dev] Developer Studio/file connector isFileExist method doesn't allow to save the proxy

2016-09-26 Thread Shazni Nazeer
Hi Vivekananthan,

Thanks. That works.

Shazni Nazeer
Associate Technical Lead | WSO2

Mob : +94 37331
LinkedIn : http://lk.linkedin.com/in/shazninazeer
Blog : http://shazninazeer.blogspot.com



On Mon, Sep 26, 2016 at 12:38 PM, Vivekananthan Sivanayagam <
vivekanant...@wso2.com> wrote:

> Hi Shazni ,
>
> I have updated the store with a fixed connector, you can find here [1].
>
> [1] https://storepreview.wso2.com/store/assets/esbconnector/
> aec1554a-29ea-4dbb-b8c5-5d529a853aa2
>
> Vivekananthan Sivanayagam
> Associate Software Engineer | WSO2
> E:vivekanant...@wso2.com
> M:+94752786138
>
> On Mon, Sep 26, 2016 at 4:33 PM, Vivekananthan Sivanayagam <
> vivekanant...@wso2.com> wrote:
>
>> Hi Shazni
>> ​ ​
>> ,
>>
>> I am looking on that.
>>
>> Thanks,
>>
>> Vivekananthan Sivanayagam
>> Associate Software Engineer | WSO2
>> E:vivekanant...@wso2.com
>> M:+94752786138
>>
>> On Mon, Sep 26, 2016 at 3:29 PM, Shazni Nazeer  wrote:
>>
>>> Hi,
>>>
>>> I'm trying to import fileconnector (version 2.0.2) into developer
>>> studio. I have a proxy in the ESB config project and it uses the
>>> fileconnector.
>>>
>>> I'm using the isFileExist call to check the whether the file being
>>> requested exist and return File Not Found error to the caller.
>>>
>>> The proxy can't be saved in the devloper studio as it doesn't recognize
>>> the is*F*ileExist. But it does recognize is*f*ileExist (Note the
>>> lowercase and uppercase 'f' character). But is*f*ileExist doesn't work
>>> in the connector it self. When called throwing the error [1]
>>>
>>> Looks like connector list also shows the method is "isfileExist" but the
>>> internal implementation expects it to be isFileExist.
>>>
>>> [1] ERROR - InvokeMediator Sequence template
>>> org.wso2.carbon.connector.fileconnector.isfileExist cannot be found
>>>
>>>
>>> Shazni Nazeer
>>> Associate Technical Lead | WSO2
>>>
>>> Mob : +94 37331
>>> LinkedIn : http://lk.linkedin.com/in/shazninazeer
>>> Blog : http://shazninazeer.blogspot.com
>>>
>>> 
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Developer Studio/file connector isFileExist method doesn't allow to save the proxy

2016-09-26 Thread Vivekananthan Sivanayagam
Hi Shazni ,

I have updated the store with a fixed connector, you can find here [1].

[1]
https://storepreview.wso2.com/store/assets/esbconnector/aec1554a-29ea-4dbb-b8c5-5d529a853aa2

Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
E:vivekanant...@wso2.com
M:+94752786138

On Mon, Sep 26, 2016 at 4:33 PM, Vivekananthan Sivanayagam <
vivekanant...@wso2.com> wrote:

> Hi Shazni
> ​ ​
> ,
>
> I am looking on that.
>
> Thanks,
>
> Vivekananthan Sivanayagam
> Associate Software Engineer | WSO2
> E:vivekanant...@wso2.com
> M:+94752786138
>
> On Mon, Sep 26, 2016 at 3:29 PM, Shazni Nazeer  wrote:
>
>> Hi,
>>
>> I'm trying to import fileconnector (version 2.0.2) into developer studio.
>> I have a proxy in the ESB config project and it uses the fileconnector.
>>
>> I'm using the isFileExist call to check the whether the file being
>> requested exist and return File Not Found error to the caller.
>>
>> The proxy can't be saved in the devloper studio as it doesn't recognize
>> the is*F*ileExist. But it does recognize is*f*ileExist (Note the
>> lowercase and uppercase 'f' character). But is*f*ileExist doesn't work
>> in the connector it self. When called throwing the error [1]
>>
>> Looks like connector list also shows the method is "isfileExist" but the
>> internal implementation expects it to be isFileExist.
>>
>> [1] ERROR - InvokeMediator Sequence template
>> org.wso2.carbon.connector.fileconnector.isfileExist cannot be found
>>
>>
>> Shazni Nazeer
>> Associate Technical Lead | WSO2
>>
>> Mob : +94 37331
>> LinkedIn : http://lk.linkedin.com/in/shazninazeer
>> Blog : http://shazninazeer.blogspot.com
>>
>> 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] OSGI Service to provision users and roles based on the SAML response.

2016-09-26 Thread Ishara Cooray
Hi Johann,

I have written a custom OSGI service that can be used to provision users
based on the SAML response which i can contribute since it is reusable in
any application that needs user provision.

Appreciate if you can suggest me suitable repository for this.



Thanks & Regards,
Ishara Cooray
Senior Software Engineer
Mobile : +9477 262 9512
WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

On Mon, Sep 5, 2016 at 10:47 PM, Ishara Cooray  wrote:

> Thanks for all your inputs.
>
> This is an independent osgi service and it does not implement
> CarbonServerAuthenticator because it needs to integrate with any jaggery
> app such as apim store /publisher, greg store/publisher.
>
> Yes, it calls external java code(the provision service) from jaggery_acs
> file and do jit operation.
> It provisions users to a central location that can be configured as
> 'ProvisioningDefaultUserstore'
>
> As the current scope this was written for the super tenant mode only. But
> we can extend it to tenant mode as well.
>
> Thanks & Regards,
> Ishara Cooray
> Senior Software Engineer
> Mobile : +9477 262 9512
> WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> On Mon, Sep 5, 2016 at 7:36 PM, Sanjeewa Malalgoda 
> wrote:
>
>> Even with current application implementation you may call external java
>> code from jaggery_acs file and do jit operation. If need you may add
>> assertion/ response validation from same java component.
>>
>> Did we think how this should work in multi tenants scenario. Do we
>> provision users to central place or tenant defined user store? Then can
>> they configure this per tenant basis?
>>
>> Thanks
>> sanjeewa.
>>
>> Sent from my phone.
>>
>> On Sep 5, 2016 1:25 PM, "Johann Nallathamby"  wrote:
>>
>>>
>>>
>>> On Mon, Sep 5, 2016 at 1:19 PM, Malaka Silva  wrote:
>>>
 Hi Ishara,

 I guess we can use application-authentication.xml for this purpose?

 We are maintaining the configs for local authenticators from store.

>>>
>>> This is the old carbon authenticators we are talking about.
>>> application-authentication.xml is for the new authentication framework.
>>> That won't work for this.
>>>
>>>

 On Mon, Sep 5, 2016 at 10:21 AM, Dimuthu Leelarathne  wrote:

>
> Hi Ishara,
>
> On Fri, Sep 2, 2016 at 11:19 AM, Ishara Cooray 
> wrote:
>
>> Hi All,
>>
>> I thought of introducing a new Authenticator config to
>> repository/conf/security/authenticators.xml
>> And it will use only below properties to do the $Subject.
>>
>> 
>> 9
>> 
>> http
>> ://wso2.org/claims/role
>> ,
>> true
>> PRIMARY
>> 
>> 
>>
>> Any objections?
>>
>
> I think the existing SAMLSSOAuthenticator should allow JIT
> provisioning when we switch on a configuration. If we keep adding more and
> more Authenticators for small functionalities it will be cluttered
> collection in the end. The same happened to Carbon components. We have so
> many components and can't make the head or tail out of it.
>
> thanks,
> Dimuthu
>
>
>> Thanks & Regards,
>> Ishara Cooray
>> Senior Software Engineer
>> Mobile : +9477 262 9512
>> WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> On Wed, Aug 31, 2016 at 1:43 PM, Ishara Cooray 
>> wrote:
>>
>>> + Prabath, Johann
>>>
>>> Thanks & Regards,
>>> Ishara Cooray
>>> Senior Software Engineer
>>> Mobile : +9477 262 9512
>>> WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> On Wed, Aug 31, 2016 at 1:27 PM, Pamod Sylvester 
>>> wrote:
>>>
 Would it make sense to have it under "user-mgt.xml" ?

 On Wed, Aug 31, 2016 at 1:00 PM, Ishara Cooray 
 wrote:

> Hi,
> I am working on the $Subject.
>
> *Motivation:*
> I have a use case where i want to authorize users who are logged
> into API publisher/ store but APIM does not have the access to 
> underline
> user store.
>
> *Plan:*
> The plan is to write an osgi service that should do the Just In
> Time provisioning before the permission check to authorize the user. 
> And it
> will get the roles from the SAML response and do the provisioning.
>
> But we will have to do the same role/permission mapping manually
> for now.
>
> If we write a generic service  we can plug it into any wso2
> product that need JIT provision initiated by the Service provider.
> However we need to maintain few 

Re: [Dev] WSO2 Identity Server Error with MailChimp SSO

2016-09-26 Thread Malaka Silva
Hi Srikanth,

Thank you for reporting this and we will provide a solution soon.

@Hariprasath - Yes you are correct API 2.0 is deprecated and that does not
mean it's currently unavailable. So we should ideally be changing this to
the latest version.

I managed to reproduce the issue that Srikanth has experienced. The reason
for that is endpoint is dynamic. For example my access token should be
using https://*us14*.api.mailchimp.com/2.0/users/profile, where as you need
to use https://*us12*.api.mailchimp.com/2.0/users/profile for your account.
More details can be found in [1]

Can we provide a fix for this?

[1]
http://stackoverflow.com/questions/27875405/invalid-mailchimp-api-key-in-mailchimp-export-api

On Mon, Sep 26, 2016 at 4:02 PM, Hariprasath Thanarajah <
haripras...@wso2.com> wrote:

> Hi Srikanth,
>
>
> On Mon, Sep 26, 2016 at 10:07 AM, Srikanth Puppala <
> puppala.srika...@gmail.com> wrote:
>
>> Hi Malaka,
>>
>> Thanks for your response. I did not set any email configuration in
>> Identity Server or MailChimp. I followed the doc "
>> https://docs.wso2.com/display/ISCONNECTORS/Configuring+Mail
>> Chimp+Authenticator".
>>
>> On forums, I see a bug in WSO2 Identity Server [https://wso2.org/jira/
>> browse/IDENTITY-4810]. I tried version 5.1.0 and 5.2.0 version of
>> Identity Server and seeing the same problem.
>>
> I have tried with 5.1.0 and it is working for me(Tried with v2.0 app). The
> issue because of the mailChimp API version, We created this for api v2.0
> their we created the federated authenticated User from the email got from
> the response of https://apidocs.mailchimp.com/api/2.0/users/profile.php
> but now it is deprecated. Thank you for pointing it. We will update with
> mailChimp Authenticator for current API version.
>
>> ,
>> I am not really sure about subject identifier and how to configure it.
>> Could you please share any doc which will be helpful.
>>
> You don't need it to configure.
>
>>
>> Thanks & Regards,
>> Srikanth Puppala.
>>
>>
>>
>>
>>
>>
>>
>> On Sun, Sep 25, 2016 at 8:53 PM, Malaka Silva  wrote:
>>
>>> Hi Srikanth,
>>>
>>> I guess you have setup this as the first step and won't be using any
>>> other authenticator afterwards?
>>> With mail chimp authinticator we are using email as the subject
>>> identifier. Hope you have given a email for the user and set the required
>>> visibility for the API?
>>>
>>> @Hariprasath - Please follow up on this issue.
>>>
>>> On Fri, Sep 23, 2016 at 9:31 PM, Srikanth Puppala <
>>> puppala.srika...@gmail.com> wrote:
>>>

 Hi,

 I am trying to connect to MailChimp via WSO2 server
 using following document:
 https://docs.wso2.com/display/ISCONNECTORS/Configuring+MailC
 himp+Authenticator


 *However I ended up with following error(Any Idea??):*
 [2016-09-23 15:53:48,353] ERROR {org.wso2.carbon.identity.appl
 ication.authentication.framework.handler.request.impl.DefaultRequestCoordinator}
 -  Exception in Authentication Frameworkjava.lang.IllegalArgumentException:
 Failed to create Federated Authenticated User from the given subject
 identifier. Invalid argument. authenticatedSubjectIdentifier : null
 at org.wso2.carbon.identity.application.authentication.framewor
 k.model.AuthenticatedUser.createFederateAuthenticatedUserFro
 mSubjectIdentifier(AuthenticatedUser.java:123)
 at org.wso2.carbon.identity.authenticator.mailChimp.MailChimpAu
 thenticator.processAuthenticationResponse(MailChimpAuthentic
 ator.java:190)
 at org.wso2.carbon.identity.application.authentication.framewor
 k.AbstractApplicationAuthenticator.process(AbstractApplicati
 onAuthenticator.java:66)
 at org.wso2.carbon.identity.application.authentication.framewor
 k.handler.step.impl.DefaultStepHandler.doAuthentication(Defa
 ultStepHandler.java:432)
 at org.wso2.carbon.identity.application.authentication.framewor
 k.handler.step.impl.DefaultStepHandler.handleResponse(Defaul
 tStepHandler.java:4
 06)
 at org.wso2.carbon.identity.application.authentication.framewor
 k.handler.step.impl.DefaultStepHandler.handle(DefaultStepHan
 dler.java:117)
 at org.wso2.carbon.identity.application.authentication.framewor
 k.handler.sequence.impl.DefaultStepBasedSequenceHandler.hand
 le(DefaultStepBased
 SequenceHandler.java:171)
 at org.wso2.carbon.identity.application.authentication.framewor
 k.handler.request.impl.DefaultAuthenticationRequestHandler.h
 andle(DefaultAuthen
 ticationRequestHandler.java:115)
 at org.wso2.carbon.identity.application.authentication.framewor
 k.handler.request.impl.DefaultRequestCoordinator.handle(Defa
 ultRequestCoordinat
 or.java:135)
 at org.wso2.carbon.identity.application.authentication.framewor
 k.servlet.CommonAuthenticationServlet.doPost(CommonAuthentic
 

Re: [Dev] Developer Studio/file connector isFileExist method doesn't allow to save the proxy

2016-09-26 Thread Vivekananthan Sivanayagam
Hi Shazni
​ ​
,

I am looking on that.

Thanks,

Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
E:vivekanant...@wso2.com
M:+94752786138

On Mon, Sep 26, 2016 at 3:29 PM, Shazni Nazeer  wrote:

> Hi,
>
> I'm trying to import fileconnector (version 2.0.2) into developer studio.
> I have a proxy in the ESB config project and it uses the fileconnector.
>
> I'm using the isFileExist call to check the whether the file being
> requested exist and return File Not Found error to the caller.
>
> The proxy can't be saved in the devloper studio as it doesn't recognize
> the is*F*ileExist. But it does recognize is*f*ileExist (Note the
> lowercase and uppercase 'f' character). But is*f*ileExist doesn't work in
> the connector it self. When called throwing the error [1]
>
> Looks like connector list also shows the method is "isfileExist" but the
> internal implementation expects it to be isFileExist.
>
> [1] ERROR - InvokeMediator Sequence template 
> org.wso2.carbon.connector.fileconnector.isfileExist
> cannot be found
>
>
> Shazni Nazeer
> Associate Technical Lead | WSO2
>
> Mob : +94 37331
> LinkedIn : http://lk.linkedin.com/in/shazninazeer
> Blog : http://shazninazeer.blogspot.com
>
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Identity Server Error with MailChimp SSO

2016-09-26 Thread Hariprasath Thanarajah
Hi Srikanth,


On Mon, Sep 26, 2016 at 10:07 AM, Srikanth Puppala <
puppala.srika...@gmail.com> wrote:

> Hi Malaka,
>
> Thanks for your response. I did not set any email configuration in
> Identity Server or MailChimp. I followed the doc "
> https://docs.wso2.com/display/ISCONNECTORS/Configuring+
> MailChimp+Authenticator".
>
> On forums, I see a bug in WSO2 Identity Server [https://wso2.org/jira/
> browse/IDENTITY-4810]. I tried version 5.1.0 and 5.2.0 version of
> Identity Server and seeing the same problem.
>
I have tried with 5.1.0 and it is working for me(Tried with v2.0 app). The
issue because of the mailChimp API version, We created this for api v2.0
their we created the federated authenticated User from the email got from
the response of https://apidocs.mailchimp.com/api/2.0/users/profile.php but
now it is deprecated. Thank you for pointing it. We will update with
mailChimp Authenticator for current API version.

> ,
> I am not really sure about subject identifier and how to configure it.
> Could you please share any doc which will be helpful.
>
You don't need it to configure.

>
> Thanks & Regards,
> Srikanth Puppala.
>
>
>
>
>
>
>
> On Sun, Sep 25, 2016 at 8:53 PM, Malaka Silva  wrote:
>
>> Hi Srikanth,
>>
>> I guess you have setup this as the first step and won't be using any
>> other authenticator afterwards?
>> With mail chimp authinticator we are using email as the subject
>> identifier. Hope you have given a email for the user and set the required
>> visibility for the API?
>>
>> @Hariprasath - Please follow up on this issue.
>>
>> On Fri, Sep 23, 2016 at 9:31 PM, Srikanth Puppala <
>> puppala.srika...@gmail.com> wrote:
>>
>>>
>>> Hi,
>>>
>>> I am trying to connect to MailChimp via WSO2 server
>>> using following document:
>>> https://docs.wso2.com/display/ISCONNECTORS/Configuring+MailC
>>> himp+Authenticator
>>>
>>>
>>> *However I ended up with following error(Any Idea??):*
>>> [2016-09-23 15:53:48,353] ERROR {org.wso2.carbon.identity.appl
>>> ication.authentication.framework.handler.request.impl.DefaultRequestCoordinator}
>>> -  Exception in Authentication Frameworkjava.lang.IllegalArgumentException:
>>> Failed to create Federated Authenticated User from the given subject
>>> identifier. Invalid argument. authenticatedSubjectIdentifier : null
>>> at org.wso2.carbon.identity.application.authentication.framewor
>>> k.model.AuthenticatedUser.createFederateAuthenticatedUserFro
>>> mSubjectIdentifier(AuthenticatedUser.java:123)
>>> at org.wso2.carbon.identity.authenticator.mailChimp.MailChimpAu
>>> thenticator.processAuthenticationResponse(MailChimpAuthentic
>>> ator.java:190)
>>> at org.wso2.carbon.identity.application.authentication.framewor
>>> k.AbstractApplicationAuthenticator.process(AbstractApplicati
>>> onAuthenticator.java:66)
>>> at org.wso2.carbon.identity.application.authentication.framewor
>>> k.handler.step.impl.DefaultStepHandler.doAuthentication(Defa
>>> ultStepHandler.java:432)
>>> at org.wso2.carbon.identity.application.authentication.framewor
>>> k.handler.step.impl.DefaultStepHandler.handleResponse(Defaul
>>> tStepHandler.java:4
>>> 06)
>>> at org.wso2.carbon.identity.application.authentication.framewor
>>> k.handler.step.impl.DefaultStepHandler.handle(DefaultStepHan
>>> dler.java:117)
>>> at org.wso2.carbon.identity.application.authentication.framewor
>>> k.handler.sequence.impl.DefaultStepBasedSequenceHandler.hand
>>> le(DefaultStepBased
>>> SequenceHandler.java:171)
>>> at org.wso2.carbon.identity.application.authentication.framewor
>>> k.handler.request.impl.DefaultAuthenticationRequestHandler.h
>>> andle(DefaultAuthen
>>> ticationRequestHandler.java:115)
>>> at org.wso2.carbon.identity.application.authentication.framewor
>>> k.handler.request.impl.DefaultRequestCoordinator.handle(Defa
>>> ultRequestCoordinat
>>> or.java:135)
>>> at org.wso2.carbon.identity.application.authentication.framewor
>>> k.servlet.CommonAuthenticationServlet.doPost(CommonAuthentic
>>> ationServlet.java:5
>>> 3)
>>> at org.wso2.carbon.identity.application.authentication.framewor
>>> k.servlet.CommonAuthenticationServlet.doGet(CommonAuthentica
>>> tionServlet.java:43
>>> )
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>>> at org.eclipse.equinox.http.helper.ContextPathServletAdaptor.se
>>> rvice(ContextPathServletAdaptor.java:37)
>>> at org.eclipse.equinox.http.servlet.internal.ServletRegistratio
>>> n.service(ServletRegistration.java:61)
>>> at org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce
>>> ssAlias(ProxyServlet.java:128)
>>> at org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi
>>> ce(ProxyServlet.java:60)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>>> at 

[Dev] Developer Studio/file connector isFileExist method doesn't allow to save the proxy

2016-09-26 Thread Shazni Nazeer
Hi,

I'm trying to import fileconnector (version 2.0.2) into developer studio. I
have a proxy in the ESB config project and it uses the fileconnector.

I'm using the isFileExist call to check the whether the file being
requested exist and return File Not Found error to the caller.

The proxy can't be saved in the devloper studio as it doesn't recognize the
is*F*ileExist. But it does recognize is*f*ileExist (Note the lowercase and
uppercase 'f' character). But is*f*ileExist doesn't work in the connector
it self. When called throwing the error [1]

Looks like connector list also shows the method is "isfileExist" but the
internal implementation expects it to be isFileExist.

[1] ERROR - InvokeMediator Sequence template
org.wso2.carbon.connector.fileconnector.isfileExist cannot be found


Shazni Nazeer
Associate Technical Lead | WSO2

Mob : +94 37331
LinkedIn : http://lk.linkedin.com/in/shazninazeer
Blog : http://shazninazeer.blogspot.com


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


Re: [Dev] Error when browsing and calculating the number of messages with QueueBrowser

2016-09-26 Thread Shazni Nazeer
Hi Hasitha,

Please find the created jiira [1]

I used AndesAdminService. I could get the number of messages successfully
by using the getMessageCount with parameter queueName and the pattern as
"queue" method as well as with getQueueByName method.

[1] https://wso2.org/jira/browse/MB-1797

Shazni Nazeer
Associate Technical Lead | WSO2

Mob : +94 37331
LinkedIn : http://lk.linkedin.com/in/shazninazeer
Blog : http://shazninazeer.blogspot.com



On Mon, Sep 26, 2016 at 5:09 AM, Hasitha Hiranya  wrote:

> Hi Shazni,
>
> Could you please raise a bug in jira for WSO2 MB. We will track and fix if
> there is an issue.
>
> Thanks
>
>
>
> On Sun, Sep 25, 2016 at 10:36 PM, Shazni Nazeer  wrote:
>
>> Hi Hasitha,
>>
>> Thanks. Yes i can use it. I'll try to use the AndesAdminService and let
>> know the results.
>>
>> However, it's better if we can determine what's wrong with the coding
>> approach. Coding would make things lot more easier to handle other
>> scenarios that may come by.
>>
>> Shazni Nazeer
>> Associate Technical Lead | WSO2
>>
>> Mob : +94 37331
>> LinkedIn : http://lk.linkedin.com/in/shazninazeer
>> Blog : http://shazninazeer.blogspot.com
>>
>> 
>>
>> On Fri, Sep 23, 2016 at 10:05 AM, Hasitha Hiranya 
>> wrote:
>>
>>> Hi Shazni,
>>>
>>> WSO2 Message Broker exposes Admin Services which you can get message
>>> count of a queue.
>>> Is there any chance of using that?
>>>
>>> Thanks
>>>
>>> On Fri, Sep 23, 2016 at 2:21 PM, Shazni Nazeer  wrote:
>>>
 HI,

 I have the following code snippet to calculate the number of message in
 the JMS queue in Message Broker.

  ctx = new InitialContext(properties);
  QueueConnectionFactory connectionFactory = 
 (QueueConnectionFactory) ctx.lookup(CF_NAME);
  queueConnection = connectionFactory.createQueueConnection();

  queueSession = queueConnection.createQueueSession(false, 
 QueueSession.AUTO_ACKNOWLEDGE);
  Queue queue = (Queue) ctx.lookup(destinationName);

  QueueBrowser queueBrowser = queueSession.createBrowser(queue);

  queueConnection.start();

  Enumeration e = queueBrowser.getEnumeration();
  int numMsgs = 0;

  while (e.hasMoreElements()) {
  Message message = (Message) e.nextElement();
  numMsgs++;
  }


 When the statement e.nextElement(); is executed it throws an
 exception. The error message I could see in the debug session when
 executing this line is "java.lang.ClassCastException:
 org.wso2.andes.client.message.CloseConsumerMessage cannot be cast to
 org.wso2.andes.client.message.AbstractJMSMessage"

 What's wrong with this snippet? Why is it retrieving
 CloseConsumerMessage?

 Is there any better way to determine the number of messages in the
 queue programmatically?

 Shazni Nazeer
 Associate Technical Lead | WSO2

 Mob : +94 37331
 LinkedIn : http://lk.linkedin.com/in/shazninazeer
 Blog : http://shazninazeer.blogspot.com

 

>>>
>>>
>>>
>>> --
>>> *Hasitha Abeykoon*
>>> Senior Software Engineer; WSO2, Inc.; http://wso2.com
>>> *cell:* *+94 719363063*
>>> *blog: **abeykoon.blogspot.com* 
>>>
>>>
>>
>
>
> --
> *Hasitha Abeykoon*
> Senior Software Engineer; WSO2, Inc.; http://wso2.com
> *cell:* *+94 719363063*
> *blog: **abeykoon.blogspot.com* 
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] NtaskTaskManager Error : No available task nodes for resolving a task location

2016-09-26 Thread Rajith Vitharana
Hi,

Can you see Member Joined logs as well? AFAIK Member joined logs are the
ones which indicates cluster is correctly  connected.

Thanks,

On 26 September 2016 at 11:36, Biruntha Gnaneswaran 
wrote:

> Hi Rajith,
>
> Yes I started worker node with -DworkerNode=true parameter.
>
> From manager :
> [2016-09-26 11:08:54,170]  INFO - MemberUtils Added member: Host:
> esb.wso2.com, Remote Host:null, Port: 4200, HTTP:-1, HTTPS:-1, Domain:
> null, Sub-domain:null, Active:true
>
> From the worker :
> [2016-09-26 09:10:11,345]  INFO - MemberUtils Added member: Host:
> mgt.esb.wso2.com, Remote Host:null, Port: 4100, HTTP:-1, HTTPS:-1,
> Domain: null, Sub-domain:null, Active:true
>
>
> Biruntha
>
> Associate Software Engineer
> WSO2
> Email : birun...@wso2.com
> Linkedin : https://lk.linkedin.com/in/biruntha
> Mobile : +94773718986
>
> On Mon, Sep 26, 2016 at 11:21 AM, Rajith Vitharana 
> wrote:
>
>> Hi,
>>
>> Have you started worker node with -DworkerNode=true parameter? does the
>> cluster connects correctly? (means can you see node joining logs in both
>> nodes?)
>>
>> Thanks,
>>
>> On 26 September 2016 at 11:05, Biruntha Gnaneswaran 
>> wrote:
>>
>>> Hi Malaka/Rajith,
>>>
>>> I followed as you suggested.
>>>
>>> When I specify taskServerCount as 2, I couldn’t access the management
>>> console. But when I specify taskServerCount as 1, I’m able to access the
>>> management console. But still I got the same error [2].
>>>
>>> [2] -
>>> at org.apache.catalina.core.StandardWrapper.load(StandardWrappe
>>> r.java:1085)
>>> at org.apache.catalina.core.StandardContext.loadOnStartup(Stand
>>> ardContext.java:5318)
>>> at org.apache.catalina.core.StandardContext.startInternal(Stand
>>> ardContext.java:5610)
>>> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.j
>>> ava:147)
>>> at org.apache.catalina.core.ContainerBase$StartChild.call(Conta
>>> inerBase.java:1572)
>>> at org.apache.catalina.core.ContainerBase$StartChild.call(Conta
>>> inerBase.java:1562)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>> Executor.java:1145)
>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>> lExecutor.java:615)
>>> at java.lang.Thread.run(Thread.java:745)
>>> [2016-09-26 10:52:11,284]  INFO - ClusterGroupCommunicator Waiting for 1
>>> [registryTasks] task executor nodes...
>>> [2016-09-26 10:52:11,284]  INFO - ClusterGroupCommunicator All task
>>> servers activated for [registryTasks].
>>> [2016-09-26 10:52:11,309]  INFO - JMXServerManager JMX Service URL  :
>>> service:jmx:rmi://localhost:2/jndi/rmi://localhost:1/jmxrmi
>>> [2016-09-26 10:52:11,313]  INFO - StartupFinalizerServiceComponent
>>> Server   :  WSO2 Enterprise Service Bus-5.0.0
>>> [2016-09-26 10:52:11,314]  INFO - StartupFinalizerServiceComponent WSO2
>>> Carbon started in 21 sec
>>> [2016-09-26 10:52:11,508]  INFO - CarbonUIServiceComponent Mgt Console
>>> URL  : https://mgt.esb.wso2.com:443/carbon/
>>>
>>> Thanks,
>>>
>>> Biruntha
>>>
>>> Associate Software Engineer
>>> WSO2
>>> Email : birun...@wso2.com
>>> Linkedin : https://lk.linkedin.com/in/biruntha
>>> Mobile : +94773718986
>>>
>>> On Mon, Sep 26, 2016 at 10:33 AM, Rajith Vitharana 
>>> wrote:
>>>
 Hi,

 That error comes when you start a *non* task node(in this case manager
 node) without starting a task node(worker node). (task node count specified
 in tasks-config.xml). So if you follow below steps, this shouldn't happen.

 1) specify task server count(1) as
 1 in task-config.xml
 2) start worker and then manager. (if worker correctly connects to the
 manger through cluster, this error message shouldn't come)

 Thanks,

>>>
>>>
>>
>>
>> --
>> Rajith Vitharana
>>
>> Senior Software Engineer,
>> WSO2 Inc. : wso2.com
>> Mobile : +94715883223
>> Blog : http://lankavitharana.blogspot.com/
>> 
>>
>
>


-- 
Rajith Vitharana

Senior Software Engineer,
WSO2 Inc. : wso2.com
Mobile : +94715883223
Blog : http://lankavitharana.blogspot.com/

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


Re: [Dev] [DEV] NtaskTaskManager Error : No available task nodes for resolving a task location

2016-09-26 Thread Biruntha Gnaneswaran
Hi Rajith,

Yes I started worker node with -DworkerNode=true parameter.

>From manager :
[2016-09-26 11:08:54,170]  INFO - MemberUtils Added member: Host:
esb.wso2.com, Remote Host:null, Port: 4200, HTTP:-1, HTTPS:-1, Domain:
null, Sub-domain:null, Active:true

>From the worker :
[2016-09-26 09:10:11,345]  INFO - MemberUtils Added member: Host:
mgt.esb.wso2.com, Remote Host:null, Port: 4100, HTTP:-1, HTTPS:-1, Domain:
null, Sub-domain:null, Active:true


Biruntha

Associate Software Engineer
WSO2
Email : birun...@wso2.com
Linkedin : https://lk.linkedin.com/in/biruntha
Mobile : +94773718986

On Mon, Sep 26, 2016 at 11:21 AM, Rajith Vitharana  wrote:

> Hi,
>
> Have you started worker node with -DworkerNode=true parameter? does the
> cluster connects correctly? (means can you see node joining logs in both
> nodes?)
>
> Thanks,
>
> On 26 September 2016 at 11:05, Biruntha Gnaneswaran 
> wrote:
>
>> Hi Malaka/Rajith,
>>
>> I followed as you suggested.
>>
>> When I specify taskServerCount as 2, I couldn’t access the management
>> console. But when I specify taskServerCount as 1, I’m able to access the
>> management console. But still I got the same error [2].
>>
>> [2] -
>> at org.apache.catalina.core.StandardWrapper.load(StandardWrappe
>> r.java:1085)
>> at org.apache.catalina.core.StandardContext.loadOnStartup(Stand
>> ardContext.java:5318)
>> at org.apache.catalina.core.StandardContext.startInternal(Stand
>> ardContext.java:5610)
>> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.
>> java:147)
>> at org.apache.catalina.core.ContainerBase$StartChild.call(Conta
>> inerBase.java:1572)
>> at org.apache.catalina.core.ContainerBase$StartChild.call(Conta
>> inerBase.java:1562)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>> Executor.java:1145)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>> lExecutor.java:615)
>> at java.lang.Thread.run(Thread.java:745)
>> [2016-09-26 10:52:11,284]  INFO - ClusterGroupCommunicator Waiting for 1
>> [registryTasks] task executor nodes...
>> [2016-09-26 10:52:11,284]  INFO - ClusterGroupCommunicator All task
>> servers activated for [registryTasks].
>> [2016-09-26 10:52:11,309]  INFO - JMXServerManager JMX Service URL  :
>> service:jmx:rmi://localhost:2/jndi/rmi://localhost:1/jmxrmi
>> [2016-09-26 10:52:11,313]  INFO - StartupFinalizerServiceComponent
>> Server   :  WSO2 Enterprise Service Bus-5.0.0
>> [2016-09-26 10:52:11,314]  INFO - StartupFinalizerServiceComponent WSO2
>> Carbon started in 21 sec
>> [2016-09-26 10:52:11,508]  INFO - CarbonUIServiceComponent Mgt Console
>> URL  : https://mgt.esb.wso2.com:443/carbon/
>>
>> Thanks,
>>
>> Biruntha
>>
>> Associate Software Engineer
>> WSO2
>> Email : birun...@wso2.com
>> Linkedin : https://lk.linkedin.com/in/biruntha
>> Mobile : +94773718986
>>
>> On Mon, Sep 26, 2016 at 10:33 AM, Rajith Vitharana 
>> wrote:
>>
>>> Hi,
>>>
>>> That error comes when you start a *non* task node(in this case manager
>>> node) without starting a task node(worker node). (task node count specified
>>> in tasks-config.xml). So if you follow below steps, this shouldn't happen.
>>>
>>> 1) specify task server count(1) as 1
>>> in task-config.xml
>>> 2) start worker and then manager. (if worker correctly connects to the
>>> manger through cluster, this error message shouldn't come)
>>>
>>> Thanks,
>>>
>>
>>
>
>
> --
> Rajith Vitharana
>
> Senior Software Engineer,
> WSO2 Inc. : wso2.com
> Mobile : +94715883223
> Blog : http://lankavitharana.blogspot.com/
> 
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev