Re: [Dev] api-manager.xml loading location

2018-03-09 Thread Sumedha Rubasinghe
Nuwan,
Not sure how frequently this is being used, but I also noticed following
location via a github search.

https://github.com/wso2/carbon-apimgt/blob/c6393f215050e57201eddf307deec6ec430f7c4e/components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/util/ThrottleConstants.java#L33



On Sat, Mar 10, 2018 at 9:48 AM, Geeth Munasinghe <ge...@wso2.com> wrote:

> Hi all,
>
> api-manager.xml is read as following way and it causing an issue in IoT
> server due to change of folder structure.
>
>
> protected String getFilePath() {
> return CarbonUtils.getCarbonHome() + File.separator + "repository"
> +
> File.separator + "conf" + File.separator +
> "api-manager.xml";
> }
>
>
> But I think the correct way is to get the CarbonConfigDirPath()
>
>protected String getFilePath() {
> return CarbonUtils.getCarbonConfigDirPath() + File.separator +
> "api-manager.xml";
> }
>
> I have fixed it in following PR.
>
> https://github.com/wso2/carbon-apimgt/pull/5195
>
> Thanks
> Geeth
>
>
> --
> *Geeth Munasinghe*
> *WSO2, Inc. http://wso2.com <http://wso2.com/> *
> *lean.enterprise.middleware.*
>
> email: ge...@wso2.com
> phone:(+94) 777911226 <077%20791%201226>
>
> <http://wso2.com/signature>
>



-- 
---
Sumedha Rubasinghe
Director - IoT Architecture,
WSO2
m: +94 773017743
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 IoT Server 3.2.0 RC4

2018-03-02 Thread Sumedha Rubasinghe
Installed on a remote machine against MySQL 5.5.
Tested
-Device type API
-Message broker functionality
-stream processing


[+] Stable - Go ahead and release

On Mar 2, 2018 3:02 AM, "Rasika Perera"  wrote:

Hi Devs,

We are pleased to announce the release candidate of WSO2 IoT Server 3.2.0.

This is the fourth release candidate (RC) of the WSO2 IoT Server 3.2.0
release.

This release carries 275+ issue fixes [1-12] over the last GA (3.1.0)
release.

Reported Issues:

   - https://github.com/wso2/product-iots/issues

Source and distribution packages:

   - https://github.com/wso2/product-iots/releases/tag/v3.2.0-RC4

Tag to be voted upon:

   - https://github.com/wso2/product-iots/releases/tag/v3.2.0-RC4

Please download, test, and vote. The README file under the distribution
contains guide and instructions on how to try it out locally.

[+] Stable - Go ahead and release
[-] Broken - Do not release (explain why)

[1] https://github.com/wso2/product-iots/milestone/3?closed=1
[2] https://github.com/wso2/product-iots/milestone/4?closed=1
[3] https://github.com/wso2/product-iots/milestone/5?closed=1
[4] https://github.com/wso2/product-iots/milestone/6?closed=1
[5] https://github.com/wso2/product-iots/milestone/7?closed=1
[6] https://github.com/wso2/product-iots/milestone/11?closed=1
[7] https://github.com/wso2/product-iots/milestone/12?closed=1
[8] https://github.com/wso2/product-iots/milestone/13?closed=1
[9] https://github.com/wso2/product-iots/milestone/14?closed=1
[10] https://github.com/wso2/product-iots/milestone/18?closed=1
[11] https://github.com/wso2/product-iots/milestone/19?closed=1
[12] https://github.com/wso2/product-iots/milestone/20?closed=1

Regards,
The WSO2 IoT Team.

-- 
With Regards,

*Rasika Perera*
Senior Software Engineer
LinkedIn: http://lk.linkedin.com/in/rasika90



WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 IoT Server 3.2.0 RC3

2018-03-01 Thread Sumedha Rubasinghe
Installed on a remote machine against MySQL 5.5.
Tested Device type API, Message broker functionality and stream processing.

[+] Stable - Go ahead and release

On Thu, Mar 1, 2018 at 2:40 AM, Rasika Perera <rasi...@wso2.com> wrote:

> Hi Devs,
>
> We are pleased to announce the release candidate of WSO2 IoT Server 3.2.0.
>
> This is the third release candidate (RC) of the WSO2 IoT Server 3.2.0
> release.
>
> This release carries 275+ issue fixes [1-12] over the last GA (3.1.0)
> release.
>
> Reported Issues:
>
>- https://github.com/wso2/product-iots/issues
>
> Source and distribution packages:
>
>- https://github.com/wso2/product-iots/releases/tag/v3.2.0-RC3
>
> Tag to be voted upon:
>
>- https://github.com/wso2/product-iots/releases/tag/v3.2.0-RC3
>
> Please download, test, and vote. The README file under the distribution
> contains guide and instructions on how to try it out locally.
>
> [+] Stable - Go ahead and release
> [-] Broken - Do not release (explain why)
>
> [1] https://github.com/wso2/product-iots/milestone/3?closed=1
> [2] https://github.com/wso2/product-iots/milestone/4?closed=1
> [3] https://github.com/wso2/product-iots/milestone/5?closed=1
> [4] https://github.com/wso2/product-iots/milestone/6?closed=1
> [5] https://github.com/wso2/product-iots/milestone/7?closed=1
> [6] https://github.com/wso2/product-iots/milestone/11?closed=1
> [7] https://github.com/wso2/product-iots/milestone/12?closed=1
> [8] https://github.com/wso2/product-iots/milestone/13?closed=1
> [9] https://github.com/wso2/product-iots/milestone/14?closed=1
> [10] https://github.com/wso2/product-iots/milestone/18?closed=1
> [11] https://github.com/wso2/product-iots/milestone/19?closed=1
> [12] https://github.com/wso2/product-iots/milestone/20?closed=1
>
> Regards,
> The WSO2 IoT Team.
>
> --
> With Regards,
>
> *Rasika Perera*
> Senior Software Engineer
> LinkedIn: http://lk.linkedin.com/in/rasika90
>
> <http://wso2.com/signature>
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>



-- 
---
Sumedha Rubasinghe
Director - IoT Architecture,
WSO2
m: +94 773017743
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IoTS] IoTS 3.1.0-Update11 throw intermittent exception due to concurrency issue.

2018-01-23 Thread Sumedha Rubasinghe
 Session #59 (user: WSO2CARBON) on thread http-nio-9443-exec-27 is
>>>>>>> waiting to lock PUBLIC.DM_OPERATION while locking
>>>>>>> PUBLIC.DM_ENROLMENT_OP_MAPPING (exclusive),
>>>>>>> PUBLIC.DM_DEVICE_OPERATION_RESPONSE (exclusive)."; SQL statement:
>>>>>>> INSERT INTO DM_DEVICE_OPERATION_RESPONSE(OPERATION_ID, ENROLMENT_ID,
>>>>>>> EN_OP_MAP_ID, OPERATION_RESPONSE, RECEIVED_TIMESTAMP) VALUES(?, ?, ?, 
>>>>>>> ?, ?)
>>>>>>> [40001-175]
>>>>>>> at
>>>>>>> org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
>>>>>>> at org.h2.message.DbException.get(DbException.java:172)
>>>>>>> at org.h2.message.DbException.get(DbException.java:149)
>>>>>>> at org.h2.table.RegularTable.doLock(RegularTable.java:504)
>>>>>>> at org.h2.table.RegularTable.lock(RegularTable.java:450)
>>>>>>> at
>>>>>>> org.h2.constraint.ConstraintReferential.existsRow(ConstraintReferential.java:375)
>>>>>>> at
>>>>>>> org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:367)
>>>>>>> at
>>>>>>> org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:310)
>>>>>>> at org.h2.table.Table.fireConstraints(Table.java:894)
>>>>>>> at org.h2.table.Table.fireAfterRow(Table.java:911)
>>>>>>> at org.h2.command.dml.Insert.insertRows(Insert.java:162)
>>>>>>> at org.h2.command.dml.Insert.update(Insert.java:115)
>>>>>>> at org.h2.command.CommandContainer.update(CommandContainer.java:79)
>>>>>>> at org.h2.command.Command.executeUpdate(Command.java:253)
>>>>>>> at
>>>>>>> org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:154)
>>>>>>> at
>>>>>>> org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:140)
>>>>>>> at
>>>>>>> org.wso2.carbon.device.mgt.core.operation.mgt.dao.impl.GenericOperationDAOImpl.addOperationResponse(GenericOperationDAOImpl.java:211)
>>>>>>> ... 59 more
>>>>>>>
>>>>>>>
>>>>>>> Thanks & regards,
>>>>>>> /charithag
>>>>>>> --
>>>>>>> *Charitha Goonetilleke*
>>>>>>> Senior Software Engineer
>>>>>>> WSO2 Inc.; http://wso2.com
>>>>>>> lean.enterprise.middleware
>>>>>>>
>>>>>>> mobile: +94 77 751 3669 <%2B94777513669>
>>>>>>> Twitter:@CharithaWs <https://twitter.com/CharithaWs>, fb: charithag
>>>>>>> <https://www.facebook.com/charithag>, linkedin: charithag
>>>>>>> <http://www.linkedin.com/in/charithag>
>>>>>>>
>>>>>>> <http://wso2.com/signature>
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "WSO2 IoT Team Group" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to iot-group+unsubscr...@wso2.com.
>>>>>>> For more options, visit
>>>>>>> https://groups.google.com/a/wso2.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> With Regards,
>>>>>>
>>>>>> *Rasika Perera*
>>>>>> Senior Software Engineer
>>>>>> LinkedIn: http://lk.linkedin.com/in/rasika90
>>>>>>
>>>>>> <http://wso2.com/signature>
>>>>>>
>>>>>> WSO2 Inc. www.wso2.com
>>>>>> lean.enterprise.middleware
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Charitha Goonetilleke*
>>>>> Senior Software Engineer
>>>>> WSO2 Inc.; http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> mobile: +94 77 751 3669 <%2B94777513669>
>>>>> Twitter:@CharithaWs <https://twitter.com/CharithaWs>, fb: charithag
>>>>> <https://www.facebook.com/charithag>, linkedin: charithag
>>>>> <http://www.linkedin.com/in/charithag>
>>>>>
>>>>> <http://wso2.com/signature>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Charitha Goonetilleke*
>>>> Senior Software Engineer
>>>> WSO2 Inc.; http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> mobile: +94 77 751 3669 <%2B94777513669>
>>>> Twitter:@CharithaWs <https://twitter.com/CharithaWs>, fb: charithag
>>>> <https://www.facebook.com/charithag>, linkedin: charithag
>>>> <http://www.linkedin.com/in/charithag>
>>>>
>>>> <http://wso2.com/signature>
>>>>
>>>
>>>
>>>
>>> --
>>> With Regards,
>>>
>>> *Rasika Perera*
>>> Senior Software Engineer
>>> LinkedIn: http://lk.linkedin.com/in/rasika90
>>>
>>> <http://wso2.com/signature>
>>>
>>> WSO2 Inc. www.wso2.com
>>> lean.enterprise.middleware
>>>
>>
>>
>>
>> --
>> *Geeth Munasinghe*
>> *WSO2, Inc. http://wso2.com <http://wso2.com/> *
>> *lean.enterprise.middleware.*
>>
>> email: ge...@wso2.com
>> phone:(+94) 777911226 <+94%2077%20791%201226>
>>
>> <http://wso2.com/signature>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sajith Janaprasad Ariyarathna
> Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
> <https://wso2.com/signature>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
-- 
---
Sumedha Rubasinghe
Director - IoT Architecture,
WSO2
m: +94 773017743
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [VOTE] Release of WSO2 IoT Server 3.1.0 RC version 4

2017-08-14 Thread Sumedha Rubasinghe
I tested following:
Virtual firealarm (control operations,analytics - realtime & batch)
Android Device Mgt(enrollment, ring, message)
Device Type creation (HTTP,MQTT)
Device pushing data (via API)

No blockers were found.

[+] Stable - Go ahead and release.

Thanks,
Sumedha



On Mon, Aug 14, 2017 at 3:07 PM, Pubudu D.P  wrote:

> Hi all,
>
> Tested following areas on Windows and Mac with an Android device.
>
>- Device enrollment
>- Push notifications
>- Device grouping
>- Device location
>- Geo Fencing
>- Device status update
>- Device search
>- Operations
>- Policy
>- App install
>
> Also, verified bug fixes at [1].
>
> [1] https://github.com/wso2/product-iots/issues?utf8=%E2%
> 9C%93=is%3Aissue%20label%3A3.1.0-RC3%20is%3Aclosed%20author%3Apubudup%20
>
> No blocking issues encountered.
>
> [+] Stable - Go ahead and release.
>
> Cheers,
> Pubudu D.P
> Senior Software Engineer - QA Team | WSO2 inc.
> Mobile : +94775464547 <077%20546%204547>
>
> Linkedin: https://uk.linkedin.com/in/pubududp
> Medium: https://medium.com/@pubududp
>
>
> On Sun, Aug 13, 2017 at 10:13 PM, Megala Uthayakumar 
> wrote:
>
>> Hi,
>>
>> I tested followings
>>
>>- Mobile Device and App Management Quick Start guide with android.
>>- User Management and Role Management functionalities through device
>>management console.
>>- Android device enrollment as a normal user. Tested with some
>>operations as well.
>>- Android sense enrollment as a normal user. Was able to see the
>>relevant graphs.
>>
>> Did not encounter any issues. Hence,
>> [+] Stable - Go ahead and release.
>>
>> Thanks.
>>
>> Regards,
>> Megala
>>
>> On Fri, Aug 11, 2017 at 7:06 PM, Milan Perera  wrote:
>>
>>> Hi Devs,
>>>
>>> We are pleased to announce the release candidate version 4 of WSO2 IoT 
>>> Server
>>> 3.1.0.
>>>
>>> Please download, test the product and vote. Vote will be open for 72
>>> hours or as needed.
>>>
>>> Known issues : https://github.com/wso2/product-iots/issues-RC4
>>> 
>>>
>>> Source and binary distribution files:
>>> https://github.com/wso2/product-iots/releases/tag/v3.1.0-RC4
>>>
>>> The tag to be voted upon:
>>> https://github.com/wso2/product-iots/tree/v3.1.0-RC4
>>>
>>> Please vote as follows.
>>> [+] Stable - go ahead and release
>>> [-] Broken - do not release (explain why)
>>>
>>> Thank you
>>>
>>> Regards,
>>> --
>>> *Milan Perera *| Senior Software Engineer
>>> WSO2, Inc | lean. enterprise. middleware.
>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>> Mobile: +94 77 309 7088 | Work: +94 11 214 5345
>>> Email: mi...@wso2.com  | Web: www.wso2.com
>>> 
>>> 
>>>
>>
>>
>>
>> --
>> Megala Uthayakumar
>>
>> Software Engineer
>> Mobile : 0779967122 <077%20996%207122>
>>
>> ___
>> Architecture mailing list
>> architect...@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
> ___
> 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] [IOTS] Use maven build source in windows 7, the command line over the windows Maximum Length of Command Line String

2017-08-02 Thread Sumedha Rubasinghe
You can try moving your folders closer to D drive. That will remove the
lengthy repetitive string appearing for every jar file.

On Aug 3, 2017 8:01 AM, "姜仁杰"  wrote:

> hi all:
>
>
>
>
> ​
>
>
> When use maven build source in windows 7, the command line over the
> windows Maximum Length of Command Line String
>
>
> Does anyone has an idea on how to fix this?
>
> Thanks
>
> jiangrenjie
>
> ___
> 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] [IOTS] MQTTAdapterListener Failed to create an https connection after change the SSL certificate in wso2carbon.jks in IOTS alpha version

2017-05-12 Thread Sumedha Rubasinghe
Hi Jason,
What is the exact version your using? IOTS alpha?

On Fri, May 12, 2017 at 11:29 AM, 云展智创  wrote:

> hi,
>
> Another error after change the dcrUrl of the plugins’ mqtt receivers:
>
> [2017-05-12 13:56:32,005] ERROR - JWTBearerGrantHandler Signature or
> Message Authentication invalid.
> [2017-05-12 13:56:32,007] ERROR - JWTBearerGrantHandler Signature or
> Message Authentication invalid.
> Exception in thread "Thread-91" java.lang.NullPointerException
> at org.wso2.carbon.identity.jwt.client.extension.JWTClient.
> getTokenInfo(JWTClient.java:120)
> at org.wso2.carbon.identity.jwt.client.extension.JWTClient.
> getAccessToken(JWTClient.java:80)
> at org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.
> MQTTAdapterListener.startListener(MQTTAdapterListener.java:184)
> at org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.
> MQTTAdapterListener.run(MQTTAdapterListener.java:274)
> at java.lang.Thread.run(Thread.java:745)
> Exception in thread "Thread-90" java.lang.NullPointerException
> at org.wso2.carbon.identity.jwt.client.extension.JWTClient.
> getTokenInfo(JWTClient.java:120)
> at org.wso2.carbon.identity.jwt.client.extension.JWTClient.
> getAccessToken(JWTClient.java:80)
> at org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.
> MQTTAdapterListener.startListener(MQTTAdapterListener.java:184)
> at org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.
> MQTTAdapterListener.run(MQTTAdapterListener.java:274)
> at java.lang.Thread.run(Thread.java:745)
> [2017-05-12 13:56:33,199] ERROR - JWTBearerGrantHandler Signature or
> Message Authentication invalid.
> Exception in thread "Thread-95" java.lang.NullPointerException
> at org.wso2.carbon.identity.jwt.client.extension.JWTClient.
> getTokenInfo(JWTClient.java:120)
> at org.wso2.carbon.identity.jwt.client.extension.JWTClient.
> getAccessToken(JWTClient.java:80)
> at org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.
> MQTTAdapterListener.startListener(MQTTAdapterListener.java:184)
> at org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.
> MQTTAdapterListener.run(MQTTAdapterListener.java:274)
> at java.lang.Thread.run(Thread.java:745)
>
> --
> Zhanwen Zhou (Jason)
> +86 13922218435 <+86%20139%202221%208435>
> zhanwen.z...@smartcloudex.com
> Guangzhou Smart Cloudex Technology Co., Ltd.
> Business: IOT, API Management
>
> 在 2017年5月11日,下午4:22,云展智创  写道:
>
> Hi team,
>
> I created a new wso2carbon.jks key store file with mydomain certificate in
> it. But when I started the IOTS server (alpha version), I got the following
> errors about mismatch hostname. Could you tell me which config files I need
> to change to solve this problem? I have tried to change some config files
> with my domain name to replace default localhost but didn’t work. And it
> seems ok for other components in startup… Thanks.
>
> [2017-05-11 15:40:30,098] ERROR - MQTTAdapterListener Failed to create an
> https connection.
> javax.net.ssl.SSLException: hostname in certificate didn't match:
>  !=  OR 
> at org.apache.http.conn.ssl.AbstractVerifier.verify(
> AbstractVerifier.java:231)
> at org.apache.http.conn.ssl.BrowserCompatHostnameVerifier.verify(
> BrowserCompatHostnameVerifier.java:54)
> at org.apache.http.conn.ssl.AbstractVerifier.verify(
> AbstractVerifier.java:152)
> at org.apache.http.conn.ssl.AbstractVerifier.verify(
> AbstractVerifier.java:133)
> at org.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(
> SSLConnectionSocketFactory.java:291)
> at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(
> SSLConnectionSocketFactory.java:262)
> at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(
> HttpClientConnectionOperator.java:118)
> at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(
> PoolingHttpClientConnectionManager.java:314)
> at org.apache.http.impl.execchain.MainClientExec.
> establishRoute(MainClientExec.java:357)
> at org.apache.http.impl.execchain.MainClientExec.
> execute(MainClientExec.java:218)
> at org.apache.http.impl.execchain.ProtocolExec.
> execute(ProtocolExec.java:194)
> at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85)
> at org.apache.http.impl.execchain.RedirectExec.
> execute(RedirectExec.java:108)
> at org.apache.http.impl.client.InternalHttpClient.doExecute(
> InternalHttpClient.java:186)
> at org.apache.http.impl.client.CloseableHttpClient.execute(
> CloseableHttpClient.java:82)
> at org.apache.http.impl.client.CloseableHttpClient.execute(
> CloseableHttpClient.java:106)
> at org.apache.http.impl.client.CloseableHttpClient.execute(
> CloseableHttpClient.java:57)
> at org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.
> MQTTAdapterListener.startListener(MQTTAdapterListener.java:174)
> at org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.
> MQTTAdapterListener.run(MQTTAdapterListener.java:274)
> at java.lang.Thread.run(Thread.java:745)
> [2017-05-11 15:40:30,302] ERROR - MQTTAdapterListener 

Re: [Dev] [MB] ValueEvent exception occurred on disruptor for MQTT

2017-04-27 Thread Sumedha Rubasinghe
Pamod,
What is the most longest running MB deployment we have?

Is this case, we have had 8 devices pushing data to MB several time within
a minute and a DAS listener picking them up. We had this setup running for
more than 1 month.

On Thu, Apr 27, 2017 at 8:18 PM, Pamod Sylvester <pa...@wso2.com> wrote:

> We've not come across this issue before.
>
> it seems, this has occurred in one of the disruptor handlers in Moquette.
> Shall we enable debug/tracing logs in Moquette side to further drill down
> the issue,
>
> The following logs will be useful,
>
>  1. org.dna.mqtt.moquette.messaging.spi.impl.SimpleMessaging
>  2. org.dna.mqtt.moquette.messaging.spi.impl.ProtocolProcessor
>
> Thanks,
> Pamod
>
> On Thu, Apr 27, 2017 at 6:59 PM, Sumedha Rubasinghe <sume...@wso2.com>
> wrote:
>
>> MB guys,
>> You can consider this as a real production issue. We have been running
>> the server for few weeks now.
>>
>> On Thu, Apr 27, 2017 at 4:22 PM, Ayyoob Hamza <ayy...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> We did a long running test for a couple of weeks and in MB we see
>>> following logs getting printed continuously and devices are failing to
>>> publish data. Is this a known issue?
>>>
>>> TID: [] [] [2017-04-27 16:03:21,390] ERROR 
>>> {org.dna.mqtt.wso2.MQTTLogExceptionHandler}
>>> -  ValueEvent exception occurred on disruptor.
>>> {org.dna.mqtt.wso2.MQTTLogExceptionHandler}
>>> java.lang.NullPointerException
>>>
>>>
>>> Thanks,
>>> *Ayyoob Hamza*
>>> *Senior Software Engineer*
>>> WSO2 Inc.; http://wso2.com
>>> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> /sumedha
>> m: +94 773017743 <077%20301%207743>
>> b :  bit.ly/sumedha
>>
>
>
>
> --
> *Pamod Sylvester *
>
> *WSO2 Inc.; http://wso2.com <http://wso2.com>*
> cell: +94 77 7779495 <077%20777%209495>
>



-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB] ValueEvent exception occurred on disruptor for MQTT

2017-04-27 Thread Sumedha Rubasinghe
MB guys,
You can consider this as a real production issue. We have been running the
server for few weeks now.

On Thu, Apr 27, 2017 at 4:22 PM, Ayyoob Hamza  wrote:

> Hi All,
>
> We did a long running test for a couple of weeks and in MB we see
> following logs getting printed continuously and devices are failing to
> publish data. Is this a known issue?
>
> TID: [] [] [2017-04-27 16:03:21,390] ERROR 
> {org.dna.mqtt.wso2.MQTTLogExceptionHandler}
> -  ValueEvent exception occurred on disruptor.
> {org.dna.mqtt.wso2.MQTTLogExceptionHandler}
> java.lang.NullPointerException
>
>
> Thanks,
> *Ayyoob Hamza*
> *Senior Software Engineer*
> WSO2 Inc.; http://wso2.com
> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IoTS] Can not open management console of broker server with the port 9446 in IoTS 3.0.0 release

2017-02-03 Thread Sumedha Rubasinghe
Hi Zhanwen,
Though we have closed this, we are in the process of creating a UI to
provide access to MQTT configurations and statistics.
Some of the design discussions can be found on
http://wso2-oxygen-tank.10903.n7.nabble.com/IoTS-MB-Backend-APIs-for-MQTT-related-informations-and-MQTT-management-UI-td145972.html
.

Supun CCed is working on it.


On Sat, Feb 4, 2017 at 12:33 AM, Ayyoob Hamza  wrote:

> Hi Zhanwen,
>
> we blocked broker console UI intentionally since there are no use of
> exposing broker carbon console. In the current released version we don't
> have any UI for mqtt.
>
> Thanks.
>
> *Ayyoob Hamza*
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
>
> On Fri, Feb 3, 2017 at 2:41 PM, 云展智创  wrote:
>
>> Hi team,
>>
>> After I started the broker server of IoTS, I opened the management
>> console of it and got the following errors. Is that right?
>> https://localhost:9446/carbon/
>>
>>
>> btw, I could successfully open and login the management console of core
>> and analytics server.
>>
>> Thanks.
>>
>> --
>> Zhanwen Zhou (Jason),
>> +86 13922218435 <+86%20139%202221%208435>
>> zhanwen.z...@smartcloudex.com
>> Business: IOT, API
>>
>>
>>
>> ___
>> 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
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error when tenant admin tries to login at the first time

2017-01-30 Thread Sumedha Rubasinghe
It looks like throttling tier 'Unlimited' is not available.  Tenant loading
issue?

Is it the same on API cloud?

On Jan 31, 2017 10:01 AM, "Geeth Munasinghe"  wrote:

> Following error occurrs while tenant admin tries to login first time.
> Second time it works.
>
> TID: [-1234] [] [2017-01-31 04:20:40,089]  INFO {org.wso2.carbon.user.core.
> ldap.ReadWriteLDAPUserStoreManager} -  LDAP connection created
> successfully in read-write mode {org.wso2.carbon.user.core.ldap.
> ReadWriteLDAPUserStoreManager}
>
> TID: [10346] [] [2017-01-31 04:20:40,368] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.core.multitenancy.TenantAxisConfigurator} -  Creating
> tenant AxisConfiguration for tenant: myworld[10346] {org.wso2.carbon.core.
> multitenancy.TenantAxisConfigurator}
>
> TID: [10346] [] [2017-01-31 04:20:40,428] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.identity.user.store.configuration.deployer.
> UserStoreConfigurationDeployer} -  User Store Configuration Deployer
> initiated. {org.wso2.carbon.identity.user.store.configuration.deployer.
> UserStoreConfigurationDeployer}
>
> TID: [10346] [] [2017-01-31 04:20:40,428] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.identity.user.store.configuration.deployer.
> UserStoreConfigurationDeployer} -  User Store Configuration Deployer
> initiated. {org.wso2.carbon.identity.user.store.configuration.deployer.
> UserStoreConfigurationDeployer}
>
> TID: [10346] [] [2017-01-31 04:20:40,767] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.initializer.multitenancy.TenantServiceBusInitializer}
> -  Intializing the ESB Configuration for the tenant domain : myworld
> {org.wso2.carbon.mediation.initializer.multitenancy.
> TenantServiceBusInitializer}
>
> TID: [10346] [] [2017-01-31 04:20:40,798] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.initializer.CarbonSynapseController} -
> Loading the mediation configuration from the file system
> {org.wso2.carbon.mediation.initializer.CarbonSynapseController}
>
> TID: [10346] [] [2017-01-31 04:20:45,176] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager} -  Task
> scheduled: [-1234][ESB_TASK][SSS-Salesforce_Gmail-Task]
> {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager}
>
> TID: [10346] [] [2017-01-31 04:20:45,177] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.ntask.NTaskTaskManager} -  Initialized task
> manager. Tenant [10346] {org.wso2.carbon.mediation.ntask.NTaskTaskManager}
>
> TID: [10346] [] [2017-01-31 04:20:45,204] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker} -  Sequence
> : main was added to the Synapse configuration successfully
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker}
>
> TID: [10346] [] [2017-01-31 04:20:45,218] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker} -  Sequence
> : fault was added to the Synapse configuration successfully
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker}
>
> TID: [10346] [] [2017-01-31 04:20:45,237] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker} -  Sequence
> : _cors_request_handler_ was added to the Synapse configuration
> successfully {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker}
>
> TID: [10346] [] [2017-01-31 04:20:45,241] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker} -  Sequence
> : _production_key_error_ was added to the Synapse configuration
> successfully {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker}
>
> TID: [10346] [] [2017-01-31 04:20:45,247] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker} -  Sequence
> : _auth_failure_handler_ was added to the Synapse configuration
> successfully {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker}
>
> TID: [10346] [] [2017-01-31 04:20:45,247] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker} -  Sequence
> : _resource_mismatch_handler_ was added to the Synapse configuration
> successfully {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker}
>
> TID: [10346] [] [2017-01-31 04:20:45,248] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker} -  Sequence
> : _throttle_out_handler_ was added to the Synapse configuration
> successfully {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker}
>
> TID: [10346] [] [2017-01-31 04:20:45,249] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker} -  Sequence
> : _sandbox_key_error_ was added to the Synapse configuration successfully
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker}
>
> TID: [10346] [] [2017-01-31 04:20:45,249] @myworld [10346] [IOT] INFO
> {org.wso2.carbon.mediation.dependency.mgt.DependencyTracker} -  Local
> entry : SERVER_HOST was added to the Synapse configuration 

Re: [Dev] Integration tests for WSO2 IOT Server

2017-01-03 Thread Sumedha Rubasinghe
Menaka,
For now, shall we not start the servers using this single script?. It's bit
complex to trouble shoot with all logs going to a single file.

On Tue, Jan 3, 2017 at 12:48 PM, Menaka Jayawardena  wrote:

> Hi,
>
> In IOTS we have 3 separate servers (Analytics, Broker and IOT Core), which
> are invoked by a single shell script. (Or we can manually start each server
> individually). And in order to execute a full IOT scenario, all the three
> servers have to be up and running.
>
> There were some integration tests which were written before this change
> (Separating the servers), which test scenarios such as user login, device
> type installation, and virtual device enrollment etc.
>
> As Test Automation Framework looks for wso2server.sh in {carbon_home}/bin
> directory, I renamed the script. (was start-all.sh)
>
> When running, I got the following error.
>
> I think as the servers are started in processes forked by the 'start-all'
> script TAF does not have the access to the logs.
>
> Is there any fix for this issue?
>
> Can we change the script location in test configuration file?
>
> - ERROR MSG --
>
> INFO: Starting carbon server.
> Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.ext
> ensions.servers.carbonserver.CarbonServerExtension handleException
> SEVERE: Fail to start carbon server
> java.lang.RuntimeException: Port 9763 is not open
> at org.wso2.carbon.automation.extensions.servers.utils.ClientCo
> nnectionUtil.waitForPort(ClientConnectionUtil.java:248)
> at org.wso2.carbon.automation.extensions.servers.carbonserver.C
> arbonServerManager.startServerUsingCarbonHome(CarbonServerMa
> nager.java:120)
> at org.wso2.carbon.automation.extensions.servers.carbonserver.T
> estServerManager.startServer(TestServerManager.java:116)
> at org.wso2.carbon.automation.extensions.servers.carbonserver.C
> arbonServerExtension.onExecutionStart(CarbonServerExtension.java:50)
> 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.wso2.carbon.automation.engine.extensions.TestNGExtension
> Executor.executeExtensible(TestNGExtensionExecutor.java:75)
> at org.wso2.carbon.automation.engine.testlisteners.TestExecutio
> nListener.onExecutionStart(TestExecutionListener.java:47)
> at org.testng.TestNG.runExecutionListeners(TestNG.java:1068)
> at org.testng.TestNG.run(TestNG.java:1015)
> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx
> ecutor.java:295)
> at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> TestNGXmlTestSuite.java:84)
> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestN
> GProvider.java:90)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProvider
> InSameClassLoader(ForkedBooter.java:203)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInPro
> cess(ForkedBooter.java:155)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBoo
> ter.java:103)
>
> Jan 03, 2017 12:08:15 PM org.wso2.carbon.automation.eng
> ine.testlisteners.TestExecutionListener handleException
> SEVERE: Execution error occurred in TestExecutionListener:-
> java.lang.reflect.InvocationTargetException
> 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.wso2.carbon.automation.engine.extensions.TestNGExtension
> Executor.executeExtensible(TestNGExtensionExecutor.java:75)
> at org.wso2.carbon.automation.engine.testlisteners.TestExecutio
> nListener.onExecutionStart(TestExecutionListener.java:47)
> at org.testng.TestNG.runExecutionListeners(TestNG.java:1068)
> at org.testng.TestNG.run(TestNG.java:1015)
> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGEx
> ecutor.java:295)
> at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> TestNGXmlTestSuite.java:84)
> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestN
> GProvider.java:90)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProvider
> InSameClassLoader(ForkedBooter.java:203)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInPro
> cess(ForkedBooter.java:155)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBoo
> ter.java:103)
> Caused by: java.lang.RuntimeException: Fail to start carbon server
> at org.wso2.carbon.automation.extensions.servers.carbonserver.C
> arbonServerExtension.handleException(CarbonServerExtension.java:70)
> at org.wso2.carbon.automation.extensions.servers.carbonserver.C
> arbonServerExtension.onExecutionStart(CarbonServerExtension.java:54)
> ... 14 more
> Caused by: 

Re: [Dev] [UUF] How to do i18n with UUF?

2016-11-04 Thread Sumedha Rubasinghe
Guys,
We need to support both (browser locale and system language settings) going
forward. For UUF it's just a parameter value we accept. So it's just a
matter of from where we read it and set the value.

On Thu, Nov 3, 2016 at 8:57 PM, Udara Rathnayake  wrote:

>
>
> On Thu, Nov 3, 2016 at 7:14 PM, Thusitha Kalugamage 
> wrote:
>
>> Hi Ruwan,
>>
>> I think it is decided by the Browser locale,
>> Not sure about it's implementation.
>> @Udara?
>>
> ​You are correct Thusitha. We are using the HTTP Accept-Language header​
>
> ​and the maximum quality value to determine the locale of the user.​
>
>>
>> Regards,
>>
>> On Thu, Nov 3, 2016 at 6:55 PM, Ruwan Abeykoon  wrote:
>>
>>> Hi Thusitha,
>>> Thank you. It works!
>>>
>>> What triggers change of the language bundle? is it a system property or
>>> the browser locale?
>>>
>>> Cheers,
>>> Ruwan
>>>
>>>
>>> On Thu, Nov 3, 2016 at 6:20 PM, Thusitha Kalugamage 
>>> wrote:
>>>
 Hi Ruwan,

 You can refer the sample that is with carbon-uuf [1]
 Inside [2] you'll find file called en_US.properties. This is the
 property file which you can use to store keys and values of keywords or
 messages which written in English.
 You can put key values pairs as below.

 :
 *Ex:- pets-store.all=See all our amazing pets*

 When you need to refer these values inside a .hbs you can use the
 following handlebar helper.

 *{{t ""}}*
 *Ex:-  {{t "pets-store.all”}}*


 [1] https://github.com/wso2/carbon-uuf/tree/master/samples
 
 [2] https://github.com/wso2/carbon-uuf/blob/master/samples/a
 pps/org.wso2.carbon.uuf.sample.pets-store/src/main/lang/en_U
 S.properties
 

 Hope this helps.
 Regards,

 On Thu, Nov 3, 2016 at 5:47 PM, Ruwan Abeykoon  wrote:

> Hi Devs,
> What is the recommended way for $subject
>
> Cheers,
> Ruwan
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Thusitha Kalugamage
 *Software Engineer*
 Mobile : +94 (0) 774 074370
 Tel   : +94 (0) 112 145 345
 thusi...@wso2.com

>>>
>>>
>>>
>>> --
>>>
>>> *Ruwan Abeykoon*
>>> *Associate Director/Architect**,*
>>> *WSO2, Inc. http://wso2.com  *
>>> *lean.enterprise.middleware.*
>>>
>>>
>>
>>
>> --
>> Thusitha Kalugamage
>> *Software Engineer*
>> Mobile : +94 (0) 774 074370
>> Tel   : +94 (0) 112 145 345
>> thusi...@wso2.com
>>
>
>
>
> --
> Regards,
> UdaraR
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Shall we change the convention for placement of DB Query String in Java Code.

2016-10-27 Thread Sumedha Rubasinghe
I am actually in favour of what Ruwan is suggesting.

1. When a problem comes we  usually start by looking at the particular
query. There is no need to look at all queries together.

2. Having the query close to rest of the jdbc code is easier.

3. Regardless of where it is, all queries should be formatted for
readability than putting it as a single liner string

On Oct 28, 2016 7:27 AM, "Selvaratnam Uthaiyashankar" 
wrote:

> Do we have any requirements to see all queries together? If so, defining
> in a single place would be easy. However, I am not sure whether we have
> used that requirement ever. We normally look at the query local to the
> method? If so, I am +1 for Ruwan's proposal. Being local constant to the
> method seems good.
>
> On Thu, Oct 27, 2016 at 9:42 PM, Sagara Gunathunga 
> wrote:
>
>>
>> Personally I don't have strong preference on one style over other, what
>> mostly important for me is maintain one style consistently within the
>> product and if possible across the company.
>>
>> I'm adding few other people for their opinion.
>>
>> Thanks !
>>
>> On Thu, Oct 27, 2016 at 5:34 PM, Ruwan Abeykoon  wrote:
>>
>>> Hi Devs,
>>> We have been following a convention to put Database query string in a
>>> constant elsewhere in the code when performing DB CRUD operations.
>>>
>>> e.g.
>>>
>>> try {
>>> String sqlStmt = IdPManagementConstants.SQLQueries.GET_IDP_BY_NAME_SQL;
>>> prepStmt = dbConnection.prepareStatement(sqlStmt);
>>> prepStmt.setInt(1, tenantId);
>>> prepStmt.setInt(2, MultitenantConstants.SUPER_TENANT_ID);
>>> prepStmt.setString(3, idPName);
>>> rs = prepStmt.executeQuery();
>>>
>>> ...
>>>
>>>
>>> However I would propose to keep the query in the same location as the SQL 
>>> parameter binding and result set reading. Shall we make it within local 
>>> final variable(constant) in  the method itself.
>>>
>>> The advantage is that the Query is visible on the same screen as it is 
>>> being used. This reduces number of screen flips. Also remembering the query 
>>> at somewhere else is error prone.
>>>
>>> This also help easy review and do query optimizations.
>>>
>>>
>>> e.g.
>>>
>>> final String INSERT_IDP_SQL = "INSERT INTO IDP (NAME, DISPLAY_NAME, 
>>> DESCRIPTION) VALUES(?,?,?)";
>>>
>>> this.jdbcTemplate.executeUpdate(INSERT_IDP_SQL, (preparedStatement, bean) 
>>> -> {
>>> MetaIdentityProvider metaIdentityProvider = 
>>> identityProvider.getMetaIdentityProvider();
>>> preparedStatement.setString(1, metaIdentityProvider.getName());
>>> preparedStatement.setString(2, metaIdentityProvider.getDisplayName());
>>> preparedStatement.setString(3, metaIdentityProvider.getDescription());
>>>
>>> ...
>>>
>>>
>>> Please note that they are the same in terms of memory use and
>>> performance wise as compiler make them constants.
>>> Putting them as constants serve no purpose as the query will never be
>>> reused in proper designed Data Access layer. We should reuse the code, not
>>> the query.
>>>
>>> WDYT?
>>>
>>> --
>>>
>>> *Ruwan Abeykoon*
>>> *Associate Director/Architect**,*
>>> *WSO2, Inc. http://wso2.com  *
>>> *lean.enterprise.middleware.*
>>>
>>>
>>
>>
>> --
>> Sagara Gunathunga
>>
>> Associate Director / Architect; WSO2, Inc.;  http://wso2.com
>> V.P Apache Web Services;http://ws.apache.org/
>> Linkedin; http://www.linkedin.com/in/ssagara
>> Blog ;  http://ssagara.blogspot.com
>>
>>
>
>
> --
> S.Uthaiyashankar
> VP Engineering
> WSO2 Inc.
> http://wso2.com/ - "lean . enterprise . middleware"
>
> Phone: +94 774895474
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IoTS] when will the IoTS be GA?

2016-07-31 Thread Sumedha Rubasinghe
Hi Jason,
UIs in IoTS Master is not fully functional due to on going work I mentioned
b4.

Will get back to you with an alternative plan by tomorrow.

On Jul 31, 2016 2:48 PM, "云展智创" <i...@smartcloudex.com> wrote:

Hi Sumedha,

Yes, I thought the IoTS would be GA on mid of July. I have a project using
IoTS to manage some smart devices. IoTS is the core backend component in
the project.  I also need the cdmf-devicetype-archetype tools to create the
plugins. Could you give me some advices on how to build the latest stable
release from the code?

by the way, I found that the real time device statistics data could not be
showed on the graph of device view in 1.0.0 Alpha release. Is that a know
error? Thanks.

--
Zhanwen Zhou (Jason), General Manager
+86 13922218435
zhanwen.z...@smartcloudex.com
Guangzhou Smart Cloudex Technology Co., Ltd.
Business: API Management, IOT

On Jul 31, 2016, at 11:20 AM, Sumedha Rubasinghe <sume...@wso2.com> wrote:

Hi Jason,
After the IoTS 1.0.0 Alpha, we are in the middle of a strategic change
which involves our mobile device management capabilities.
As you may already be aware, we have brought down all core device
management capabilities into one level and implementing specific device
management plugins on top of this. These device management plugins also
cover our Android, iOS, Windows mobile plugins (as well as plugins for all
other devices).

Originally 1.0.0 GA release date of IoTS was scheduled for July. But due to
a customer commitment we have shifted our focus to stabilising Android
device management until end of August.

Specific new release date of IoTS 1.0.0 GA will be decided after August.

If you have a project that gets impacted due to this shift please fill up
our contact us form @ http://wso2.com/contact/ with your concern and we
will see what we can do.

Thanks,
Sumedha


On Sat, Jul 30, 2016 at 3:03 PM, 云展智创 <i...@smartcloudex.com> wrote:

> Hi,
>
> Could anyone tell me when will the IoTS be GA? Thanks a lot.
>
> --
> Zhanwen Zhou (Jason),
> +86 13922218435
> zhanwen.z...@smartcloudex.com
> Guangzhou Smart Cloudex Technology Co., Ltd.
> Business: API Management, IOT
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IoTS] when will the IoTS be GA?

2016-07-30 Thread Sumedha Rubasinghe
Hi Jason,
After the IoTS 1.0.0 Alpha, we are in the middle of a strategic change
which involves our mobile device management capabilities.
As you may already be aware, we have brought down all core device
management capabilities into one level and implementing specific device
management plugins on top of this. These device management plugins also
cover our Android, iOS, Windows mobile plugins (as well as plugins for all
other devices).

Originally 1.0.0 GA release date of IoTS was scheduled for July. But due to
a customer commitment we have shifted our focus to stabilising Android
device management until end of August.

Specific new release date of IoTS 1.0.0 GA will be decided after August.

If you have a project that gets impacted due to this shift please fill up
our contact us form @ http://wso2.com/contact/ with your concern and we
will see what we can do.

Thanks,
Sumedha


On Sat, Jul 30, 2016 at 3:03 PM, 云展智创  wrote:

> Hi,
>
> Could anyone tell me when will the IoTS be GA? Thanks a lot.
>
> --
> Zhanwen Zhou (Jason),
> +86 13922218435
> zhanwen.z...@smartcloudex.com
> Guangzhou Smart Cloudex Technology Co., Ltd.
> Business: API Management, IOT
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ES] Too many mysql connections when starting ES instances

2016-07-14 Thread Sumedha Rubasinghe
Guys,
Some food for thought.

1. A single MySQL Server has a globally defined max_connections figure (151
as Dilini mentioned)

So on a clustered setup, when you point to a single MySQL Server from
various WSO2 products, depending on no of keep alive connections specified,
you will at some point will hit too many connections from server side @
some point.

So you have to rethink the deployment and use a different database server.

2. If ES has a tendency to perform too many database calls @ startup,
- You can temporally eliminate that by controlling node start up order


On Thu, Jul 14, 2016 at 12:04 PM, Rajith Vitharana  wrote:

> Hi,
>
> We faced the same issue in ESB latest when clustering enabled, with 4 node
> cluster, number of connections goes to around 395 and gradually comes down
> to 20 or less, even with the exception happened(mysql having default max
> connections 151), it seems it gets stable to 20 or less connections after
> some time. Created a public jira to track this issue at [1]
>
> [1] - https://wso2.org/jira/browse/REGISTRY-3771
>
> Thanks,
>
> On Wed, Jul 13, 2016 at 4:42 PM, Dilini Gunatilake 
> wrote:
>
>> Hi All,
>>
>> I have set up a 4 node cluster for ES 2.1.0 Alpha2 pack with mysql 5.7.
>> When I started one store node I got an error [3].
>>
>> Then, I checked the connections in the mysql server and found that the
>> default number of max_connections (151) have been exceeded while the store
>> node is starting. But initially without starting any ES instances there
>> were only around 20 connections. So, what we observed was when starting ES
>> instances substantially high amount of connections will be created and they
>> will be gradually reduced after sometime. Is this an acceptable behavior?
>>
>> Also, we could find the recommended max_connections to configure in some
>> products [1][2], but couldn't find anything for ES. So, what is the
>> recommended value for ES?
>> For the time being we will increase the max connections to 300 and
>> proceed with testing.
>>
>> Your earliest response is highly appreciated.
>>
>> [1] https://docs.wso2.com/display/AM200/Tuning+Performance
>> [2]
>> https://docs.wso2.com/display/Governance510/Performance+Tuning+Recommendations
>>
>> [3]
>>
>> [2016-07-13 07:50:40,014] ERROR
>> {org.wso2.carbon.registry.core.dataaccess.TransactionManager} -  Failed to
>> start new registry transaction.
>> com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
>> Could not create connection to database server. Attempted reconnect 3
>> times. Giving up.
>> at sun.reflect.GeneratedConstructorAccessor107.newInstance(Unknown Source)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
>> at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
>> at com.mysql.jdbc.Util.getInstance(Util.java:387)
>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:917)
>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896)
>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885)
>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
>> at
>> com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2165)
>> at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2090)
>> at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:795)
>> at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44)
>> at sun.reflect.GeneratedConstructorAccessor76.newInstance(Unknown Source)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
>> at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
>> at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)
>> at
>> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327)
>> at
>> org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
>> at
>> org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
>> at
>> org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
>> at
>> org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
>> at
>> org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
>> at
>> org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128)
>> at
>> org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCTransactionManager.beginTransaction(JDBCTransactionManager.java:80)
>> at
>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.beginTransaction(EmbeddedRegistry.java:443)
>> at
>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.get(EmbeddedRegistry.java:505)
>> at
>> org.wso2.carbon.registry.core.session.UserRegistry.getInternal(UserRegistry.java:617)
>> at
>> 

Re: [Dev] IoT Server - Andriod agent is not publishing light measurements correctly

2016-06-04 Thread Sumedha Rubasinghe
Other values being sent correctly?
On Jun 5, 2016 12:54 AM, "Sinthuja Ragendran"  wrote:

> Hi,
>
> I see the light is being correctly measured in the phone app, and the
> values are correctly changing. But it's not getting sent to IoT server, I
> checked the data explorer (DAS component) in IoT server, but this seems to
> be not there. Is it know issue?
>
> Thanks,
> Sinthuja.
>
> --
> *Sinthuja Rajendran*
> Technical Lead
> WSO2, Inc.:http://wso2.com
>
> Blog: http://sinthu-rajan.blogspot.com/
> Mobile: +94774273955
>
>
>
> ___
> 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] WSO2 IoT Server 1.0.0-alpha Released

2016-05-20 Thread Sumedha Rubasinghe
Dulitha,
Just to reconfirm. This is on Windows. right?

On Sat, May 21, 2016 at 1:04 AM, Dulitha Wijewantha 
wrote:

> Hi guys,
> Getting below error in startup. Any idea how hadoop crept into the pack?
> Cheers~
>
> [2016-05-20 14:48:48,984] ERROR - Shell Failed to locate the winutils
> binary in the hadoop binary path
> java.io.IOException: Could not locate executable null\bin\winutils.exe in
> the Hadoop binaries.
> at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:355)
> at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:370)
> at org.apache.hadoop.util.Shell.(Shell.java:363)
> at org.apache.hadoop.util.StringUtils.(StringUtils.java:79)
> at
> org.apache.hadoop.security.Groups.parseStaticMapping(Groups.java:104)
> at org.apache.hadoop.security.Groups.(Groups.java:86)
> at org.apache.hadoop.security.Groups.(Groups.java:66)
> at
> org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:280)
> at
> org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:271)
> at
> org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:248)
> at
> org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:763)
> at
> org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:748)
> at
> org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:621)
> at
> org.apache.spark.util.Utils$$anonfun$getCurrentUserName$1.apply(Utils.scala:2042)
> at
> org.apache.spark.util.Utils$$anonfun$getCurrentUserName$1.apply(Utils.scala:2042)
> at scala.Option.getOrElse(Option.scala:120)
> at
> org.apache.spark.util.Utils$.getCurrentUserName(Utils.scala:2042)
> at org.apache.spark.SparkContext.(SparkContext.scala:301)
> at
> org.apache.spark.api.java.JavaSparkContext.(JavaSparkContext.scala:61)
> at
> org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.initializeSparkContext(SparkAnalyticsExecutor.java:346)
> at
> org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.initializeClient(SparkAnalyticsExecutor.java:359)
> at
> org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.initializeSparkServer(SparkAnalyticsExecutor.java:188)
> at
> org.wso2.carbon.analytics.spark.core.internal.AnalyticsComponent.activate(AnalyticsComponent.java:77)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.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.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:950)
> at
> 

Re: [Dev] API Requirements for EMM Dashboard

2016-04-22 Thread Sumedha Rubasinghe
>>
>> {
>>
>> "group": "non-compliant-5",
>>
>> "label": "non-compliant-5",
>>
>> "count": randint(100, 500)
>>
>> }
>>
>> ]
>>
>> }
>>
>> ]
>>
>>
>> 4. Retrieve grouping: This has two types of requests request 1 without
>> mentioning any filters and request 2 with a filter
>>
>>
>>> *Request1: *POST /nonCompliantDevices
>>> *[]*
>>
>> *response1:*[
>>> {
>>> "context": "platforms",
>>> "data": [
>>> {
>>> "group": "ios",
>>> "label": "iOS",
>>> "count": randint(100, 500)
>>> },
>>> {
>>> "group": "android",
>>> "label": "Android",
>>> "count": randint(100, 500)
>>> }
>>> ]
>>> },
>>> {
>>> "context": "ownerships",
>>> "data": [
>>> {
>>> "group": "cope",
>>> "label": "COPE",
>>> "count": randint(100, 500)
>>> },
>>> {
>>> "group": "byod",
>>> "label": "BYOD",
>>> "count": randint(100, 500)
>>> }
>>> ]
>>> },
>>> {
>>> "context": "userGroups",
>>> "data": [
>>> {
>>> "group": "sales",
>>> "label": "Sales",
>>> "count": randint(100, 500)
>>> },
>>> {
>>> "group": "marketing",
>>> "label": "Marketing",
>>> "count": randint(100, 500)
>>> },
>>> {
>>> "group": "engineering",
>>> "label": "Engineering",
>>> "count": randint(100, 500)
>>> }
>>> ]
>>> }
>>
>> ]
>>
>>
>>
>>> *Request2: *POST /nonCompliantDevices
>>> {
>>> "filters": [
>>>{
>>> "filteringContext": "platform",
>>> "filteringGroups" : ["Android"]
>>>}
>>
>> ]
>>
>> }
>>>
>> *response2:*[
>>> {
>>> "context": "platforms",
>>> "data": [
>>> {
>>> "group": "ios",
>>> "label": "iOS",
>>> "count": randint(100, 500)
>>> },
>>> {
>>> "group": "android",
>>> "label": "Android",
>>> "count": randint(100, 500)
>>> }
>>> ]
>>> },
>>> {
>>> "context": "ownerships",
>>> "data": [
>>> {
>>> "group": "cope",
>>> "label": "COPE",
>>> "count": randint(100, 500)
>>> },
>>> {
>>> "group": "byod",
>>> "label": "BYOD",
>>> "count": randint(100, 500)
>>> }
>>> ]
>>> },
>>> {
>>> "context": "userGroups",
>>> "data": [
>>> {
>>> "group": "sales",
>>> "label": "Sales",
>>> "count": randin

Re: [Dev] C5 Server startup hangs intermittently

2016-04-11 Thread Sumedha Rubasinghe
I added the logs. But it did not get reproduced during the short time I
worked with it afterwards.

Sajith/Rasika,
Do you guys also get this?


On Mon, Apr 11, 2016 at 1:53 PM, Afkham Azeez <az...@wso2.com> wrote:

> Was this resolved?
>
> On Mon, Apr 4, 2016 at 4:06 PM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> Can we enable debug logs for "org.wso2.carbon.kernel.
>> internal.startupresolver" package and check which component is causing
>> the issue? I can take a look at this and find the root cause, if needed.
>>
>> On Mon, Apr 4, 2016 at 1:11 PM, Sumedha Rubasinghe <sume...@wso2.com>
>> wrote:
>>
>>> But it's intermittent. Manu also said he has faced this several times.
>>> AFAIU, fix to be applied @ C5 level?
>>>
>>>
>>>
>>>
>>> On Mon, Apr 4, 2016 at 1:08 PM, Sameera Jayasoma <same...@wso2.com>
>>> wrote:
>>>
>>>> Hi Sumedha,
>>>>
>>>> This because of a failure in netty component. It has failed to register
>>>> transports.
>>>>
>>>> Thanks,
>>>> Sameera.
>>>>
>>>> On Mon, Apr 4, 2016 at 1:01 PM, Sumedha Rubasinghe <sume...@wso2.com>
>>>> wrote:
>>>>
>>>>> # Normal server bootup
>>>>> #
>>>>>
>>>>> Sumedha-2:wso2uuf-1.0.0-SNAPSHOT sumedha$ bin/carbon.sh
>>>>> JAVA_HOME environment variable is set to
>>>>> /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
>>>>> CARBON_HOME environment variable is set to
>>>>> /Volumes/data/projects/wso2/uuf/M3/wso2uuf-1.0.0-SNAPSHOT
>>>>> osgi> [2016-04-04 09:46:13,407]  INFO
>>>>> {org.wso2.msf4j.internal.MicroservicesServerSC} - All microservices are
>>>>> available
>>>>> [2016-04-04 09:46:13,422]  INFO
>>>>> {org.wso2.carbon.transport.http.netty.internal.NettyTransportServiceComponent}
>>>>> - All CarbonNettyServerInitializers are available
>>>>> [2016-04-04 09:46:13,423]  INFO
>>>>> {org.wso2.carbon.transport.http.netty.listener.NettyListener} - Starting
>>>>> Netty Http Transport Listener
>>>>> [2016-04-04 09:46:13,428]  INFO
>>>>> {org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
>>>>> org.wso2.carbon.uuf.UUFService@7f932479
>>>>> [2016-04-04 09:46:13,509]  INFO
>>>>> {org.wso2.carbon.transport.http.netty.listener.NettyListener} - Netty
>>>>> Listener starting on port 8080
>>>>> [2016-04-04 09:46:13,511]  INFO
>>>>> {org.wso2.carbon.kernel.internal.CarbonStartupHandler} - WSO2 Carbon
>>>>> started in 1.303 sec
>>>>>
>>>>>
>>>>>
>>>>> # Same Server, hanged during bootup
>>>>> #
>>>>> Sumedha-2:wso2uuf-1.0.0-SNAPSHOT sumedha$ bin/carbon.sh
>>>>> JAVA_HOME environment variable is set to
>>>>> /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
>>>>> CARBON_HOME environment variable is set to
>>>>> /Volumes/data/projects/wso2/uuf/M3/wso2uuf-1.0.0-SNAPSHOT
>>>>> osgi> [2016-04-04 09:45:12,668]  INFO
>>>>> {org.wso2.carbon.transport.http.netty.internal.NettyTransportServiceComponent}
>>>>> - All CarbonNettyServerInitializers are available
>>>>> [2016-04-04 09:45:12,672]  INFO
>>>>> {org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
>>>>> org.wso2.carbon.uuf.UUFService@51f5356e
>>>>> [2016-04-04 09:45:42,625]  WARN
>>>>> {org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
>>>>> - Waiting on pending capability registration. Capability:
>>>>> org.wso2.msf4j.Interceptor
>>>>> [2016-04-04 09:45:42,626]  WARN
>>>>> {org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
>>>>> - Waiting on pending capability registration. Capability:
>>>>> org.wso2.msf4j.Microservice
>>>>> [2016-04-04 09:45:42,626]  WARN
>>>>> {org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
>>>>> - Waiting on pending capability registration. Capability:
>>>>> org.wso2.msf4j.internal.MicroservicesServerSC
>>>>> [2016-04-04 09:45:42,626] 

Re: [Dev] C5 Server startup hangs intermittently

2016-04-04 Thread Sumedha Rubasinghe
But it's intermittent. Manu also said he has faced this several times.
AFAIU, fix to be applied @ C5 level?



On Mon, Apr 4, 2016 at 1:08 PM, Sameera Jayasoma <same...@wso2.com> wrote:

> Hi Sumedha,
>
> This because of a failure in netty component. It has failed to register
> transports.
>
> Thanks,
> Sameera.
>
> On Mon, Apr 4, 2016 at 1:01 PM, Sumedha Rubasinghe <sume...@wso2.com>
> wrote:
>
>> # Normal server bootup
>> #
>>
>> Sumedha-2:wso2uuf-1.0.0-SNAPSHOT sumedha$ bin/carbon.sh
>> JAVA_HOME environment variable is set to
>> /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
>> CARBON_HOME environment variable is set to
>> /Volumes/data/projects/wso2/uuf/M3/wso2uuf-1.0.0-SNAPSHOT
>> osgi> [2016-04-04 09:46:13,407]  INFO
>> {org.wso2.msf4j.internal.MicroservicesServerSC} - All microservices are
>> available
>> [2016-04-04 09:46:13,422]  INFO
>> {org.wso2.carbon.transport.http.netty.internal.NettyTransportServiceComponent}
>> - All CarbonNettyServerInitializers are available
>> [2016-04-04 09:46:13,423]  INFO
>> {org.wso2.carbon.transport.http.netty.listener.NettyListener} - Starting
>> Netty Http Transport Listener
>> [2016-04-04 09:46:13,428]  INFO
>> {org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
>> org.wso2.carbon.uuf.UUFService@7f932479
>> [2016-04-04 09:46:13,509]  INFO
>> {org.wso2.carbon.transport.http.netty.listener.NettyListener} - Netty
>> Listener starting on port 8080
>> [2016-04-04 09:46:13,511]  INFO
>> {org.wso2.carbon.kernel.internal.CarbonStartupHandler} - WSO2 Carbon
>> started in 1.303 sec
>>
>>
>>
>> # Same Server, hanged during bootup #
>> Sumedha-2:wso2uuf-1.0.0-SNAPSHOT sumedha$ bin/carbon.sh
>> JAVA_HOME environment variable is set to
>> /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
>> CARBON_HOME environment variable is set to
>> /Volumes/data/projects/wso2/uuf/M3/wso2uuf-1.0.0-SNAPSHOT
>> osgi> [2016-04-04 09:45:12,668]  INFO
>> {org.wso2.carbon.transport.http.netty.internal.NettyTransportServiceComponent}
>> - All CarbonNettyServerInitializers are available
>> [2016-04-04 09:45:12,672]  INFO
>> {org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
>> org.wso2.carbon.uuf.UUFService@51f5356e
>> [2016-04-04 09:45:42,625]  WARN
>> {org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
>> - Waiting on pending capability registration. Capability:
>> org.wso2.msf4j.Interceptor
>> [2016-04-04 09:45:42,626]  WARN
>> {org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
>> - Waiting on pending capability registration. Capability:
>> org.wso2.msf4j.Microservice
>> [2016-04-04 09:45:42,626]  WARN
>> {org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
>> - Waiting on pending capability registration. Capability:
>> org.wso2.msf4j.internal.MicroservicesServerSC
>> [2016-04-04 09:45:42,626]  WARN
>> {org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
>> - Waiting on pending capability registration. Capability:
>> org.wso2.carbon.kernel.transports.CarbonTransport
>> [2016-04-04 09:45:42,626]  WARN
>> {org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
>> - Waiting on pending capability registration. Capability:
>> org.wso2.carbon.kernel.deployment.DeploymentService
>> [2016-04-04 09:45:42,626]  WARN
>> {org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
>> - Waiting on pending capability registration. Capability:
>> org.wso2.carbon.transport.http.netty.internal.NettyTransportServiceComponent
>>
>>
>>
>>
>>
>> --
>> /sumedha
>> m: +94 773017743
>> b :  bit.ly/sumedha
>>
>
>
>
> --
> 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
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] C5 Server startup hangs intermittently

2016-04-04 Thread Sumedha Rubasinghe
# Normal server bootup #

Sumedha-2:wso2uuf-1.0.0-SNAPSHOT sumedha$ bin/carbon.sh
JAVA_HOME environment variable is set to
/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
CARBON_HOME environment variable is set to
/Volumes/data/projects/wso2/uuf/M3/wso2uuf-1.0.0-SNAPSHOT
osgi> [2016-04-04 09:46:13,407]  INFO
{org.wso2.msf4j.internal.MicroservicesServerSC} - All microservices are
available
[2016-04-04 09:46:13,422]  INFO
{org.wso2.carbon.transport.http.netty.internal.NettyTransportServiceComponent}
- All CarbonNettyServerInitializers are available
[2016-04-04 09:46:13,423]  INFO
{org.wso2.carbon.transport.http.netty.listener.NettyListener} - Starting
Netty Http Transport Listener
[2016-04-04 09:46:13,428]  INFO
{org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
org.wso2.carbon.uuf.UUFService@7f932479
[2016-04-04 09:46:13,509]  INFO
{org.wso2.carbon.transport.http.netty.listener.NettyListener} - Netty
Listener starting on port 8080
[2016-04-04 09:46:13,511]  INFO
{org.wso2.carbon.kernel.internal.CarbonStartupHandler} - WSO2 Carbon
started in 1.303 sec



# Same Server, hanged during bootup #
Sumedha-2:wso2uuf-1.0.0-SNAPSHOT sumedha$ bin/carbon.sh
JAVA_HOME environment variable is set to
/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
CARBON_HOME environment variable is set to
/Volumes/data/projects/wso2/uuf/M3/wso2uuf-1.0.0-SNAPSHOT
osgi> [2016-04-04 09:45:12,668]  INFO
{org.wso2.carbon.transport.http.netty.internal.NettyTransportServiceComponent}
- All CarbonNettyServerInitializers are available
[2016-04-04 09:45:12,672]  INFO
{org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
org.wso2.carbon.uuf.UUFService@51f5356e
[2016-04-04 09:45:42,625]  WARN
{org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
- Waiting on pending capability registration. Capability:
org.wso2.msf4j.Interceptor
[2016-04-04 09:45:42,626]  WARN
{org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
- Waiting on pending capability registration. Capability:
org.wso2.msf4j.Microservice
[2016-04-04 09:45:42,626]  WARN
{org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
- Waiting on pending capability registration. Capability:
org.wso2.msf4j.internal.MicroservicesServerSC
[2016-04-04 09:45:42,626]  WARN
{org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
- Waiting on pending capability registration. Capability:
org.wso2.carbon.kernel.transports.CarbonTransport
[2016-04-04 09:45:42,626]  WARN
{org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
- Waiting on pending capability registration. Capability:
org.wso2.carbon.kernel.deployment.DeploymentService
[2016-04-04 09:45:42,626]  WARN
{org.wso2.carbon.kernel.internal.startupresolver.RequireCapabilityCoordinator}
- Waiting on pending capability registration. Capability:
org.wso2.carbon.transport.http.netty.internal.NettyTransportServiceComponent





-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] C5 - mention the port in use as part of error message

2016-04-03 Thread Sumedha Rubasinghe
It's port 8080 that is being used here. But no way to find that through the
exception through from
Netty HTTP Transport listener.



[2016-04-04 08:37:03,872]  INFO
{org.wso2.carbon.transport.http.netty.listener.NettyListener} - Starting
Netty Http Transport Listener
[2016-04-04 08:37:03,876]  INFO
{org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
org.wso2.carbon.uuf.UUFService@5f33122c
Exception in thread "Timer-0" java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at
io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
at
io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:485)
at
io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1089)
at
io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:430)
at
io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:415)
at
io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:903)
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
at
io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:348)
at
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:356)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
at
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
at
io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
>>>


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


[Dev] Can we get following folders removed from IoT Server pack?

2016-04-02 Thread Sumedha Rubasinghe
IMO, removing following won't impact IoTS perspective.

wso2iots-1.0.0-SNAPSHOT/repository/deployment/server/jaggeryapps/publisher/themes
wso2iots-1.0.0-SNAPSHOT/repository/deployment/server/jaggeryapps/store/themes/

Rename wso2iots-1.0.0-SNAPSHOT/repository/deployment/server/jaggeryapps/
*publisher*/
to wso2iots-1.0.0-SNAPSHOT/repository/deployment/server/jaggeryapps/
*app-publisher*/

wso2iots-1.0.0-SNAPSHOT/repository/deployment/server/jaggeryapps/api-publisher/site/themes

wso2iots-1.0.0-SNAPSHOT/repository/deployment/server/jaggeryapps/api-store/site/themes/fancy/
wso2iots-1.0.0-SNAPSHOT/repository/deployment/server/jaggeryapps/api-store/site/themes/responsive/

wso2iots-1.0.0-SNAPSHOT/repository/deployment/server/jaggeryapps/api-store/tests


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DAS] Is there a way to retrieve selected fields from a given table

2016-03-23 Thread Sumedha Rubasinghe
Gihan,
Can't we implement the same functionality for REST API?

This will help to prevent maintaining two client logics for REST API &
Admin API.

On Wed, Mar 23, 2016 at 1:27 PM, Gihan Anuruddha  wrote:

> There is a parameter that you can specify which column you need for
> response.
>
> On Wed, Mar 23, 2016 at 11:36 AM, Geesara Prathap 
> wrote:
>
>> Thanks for the information. In admin service how to do $subject. Just to
>> know
>>
>> On Wed, Mar 23, 2016 at 11:28 AM, Gihan Anuruddha  wrote:
>>
>>> AFAIK, you can't do this when you use the REST API. But if you use the
>>> admin service you should able to do this.
>>>
>>> On Wed, Mar 23, 2016 at 10:39 AM, Geesara Prathap 
>>> wrote:
>>>
 Hi All,

 As an example, *ORG_WSO2_IOT_DEVICES_TEMPERATURE *table consists of
 five fields: META_OWNER, META_DEVICETYPE, META_DEVICEID, META_TIME,
 TEMPERATURE and _TIMESTAMP. But interested only less number of fields. When
 querying this

 *meta_owner:admin AND meta_deviceId:1iexrfgp2jwa8 AND
 meta_time:[1456467843079 TO 1456468494817]* which retrieved all fields
 it contains. So how to get selected some of the fields only which are
 required?

 Thanks,
 Geesara
 --
 Geesara Prathap Kulathunga
 Software Engineer
 WSO2 Inc; http://wso2.com
 Mobile : +940772684174


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


>>>
>>>
>>> --
>>> W.G. Gihan Anuruddha
>>> Senior Software Engineer | WSO2, Inc.
>>> M: +94772272595
>>>
>>
>>
>>
>> --
>> Geesara Prathap Kulathunga
>> Software Engineer
>> WSO2 Inc; http://wso2.com
>> Mobile : +940772684174
>>
>>
>
>
> --
> W.G. Gihan Anuruddha
> Senior Software Engineer | WSO2, Inc.
> M: +94772272595
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Improvement to Maven archtype

2016-03-09 Thread Sumedha Rubasinghe
Resending. Bounced back.

On Wed, Mar 9, 2016 at 2:28 PM, Sumedha Rubasinghe <sume...@wso2.com> wrote:

> But this a programmer that we are talking about.
>
> It's contract first vs code first IMO.
> Our current approach is more close to code first now (and its not that bad
> IMO).
>
>
>
> On Wed, Mar 9, 2016 at 2:09 PM, Ruwan Yatawara <ruw...@wso2.com> wrote:
>
>> Hi All,
>>
>> Had a chat with Joe, to gain some feedback on his experience of using the
>> IoTServer to declare his custom device type.
>>
>> One complaint that came up was that the hardware vendor needs to navigate
>> to the controller and manager interfaces and declare the structure and
>> outputs of the APIs, in code. We could very well automate this by giving
>> users the option to draft the structure of the API and output via a
>> definition language like swagger. Based on these inputs we may go ahead and
>> declare the stubs that can be later filled in by the user.
>>
>> This would make life easier for the vendor, and will also be invaluable
>> IMHO in our tolling strategy when we integrate the archtype to DevStudio.
>>
>> Thanks and Regards,
>>
>> Ruwan Yatawara
>>
>> Senior Software Engineer,
>> WSO2 Inc.
>>
>> email : ruw...@wso2.com
>> mobile : +94 77 9110413
>> blog : http://ruwansrants.blogspot.com/
>> www: :http://wso2.com
>>
>>
>
>
> --
> /sumedha
> m: +94 773017743
> b :  bit.ly/sumedha
>



-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Gsoc 2016] [CDMF] Calculate Device Health Status using Analytics and API Calls

2016-03-04 Thread Sumedha Rubasinghe
Hi Geethika,
No Sirs here.. Just Ayyoob would do. :)

Hope you find the project interesting.

On Fri, Mar 4, 2016 at 2:40 PM, Geethika Kumari 
wrote:

> Hello sir,
> Thank you for help. There are several branches in these repositories. What
> branch I need to use.
>
> Thanks and Regards.
> Nuwan Sameera.
>
> On Thu, Mar 3, 2016 at 12:20 AM, Ayyoob Hamza  wrote:
>
>> Hi Geethika,
>> Thank you for your interest in this project. CDMF is a framework that is
>> used for device management and one of the requirement is for the user to
>> monitor the device status. There are two ways to check the status of a
>> device
>> 1) Send a device health check ping to the device and then depict the
>> status.
>> 2) Get the device to server communication data and then co relate with
>> past communication to find the status of the device.
>>
>> In here we are focusing with a generalised solution that incorporates the
>> idea from the second approach. In the first approach we are limiting the
>> capability by asking the device manufacture to incorporate the capability.
>>
>> You can find the source code for CDMF in
>> https://github.com/wso2/carbon-device-mgt
>>
>> You can find the source code for device type implementation such as
>> android, windows and few IoT device samples in :
>> https://github.com/wso2/carbon-device-mgt-plugins
>>
>> We have two products that are built on CDMF
>> 1) EMM -
>> https://docs.wso2.com/display/EMM200/WSO2+Enterprise+Mobility+Manager
>> https://github.com/wso2/product-mdm - You can find the official release
>> EMM 2.0.0 in the product listing page
>>
>> 2) IoT Server - https://docs.wso2.com/display/IoTS100/About+IoT+Server
>> https://github.com/wso2-incubator/product-iot-server - This is still
>> under development.
>>
>> Please go through the documentation and try to build EMM to understand
>> the behaviour of the product.
>>
>> Thanks
>>
>>
>> *Ayyoob Hamza*
>> *Software Engineer*
>> WSO2 Inc.; http://wso2.com
>> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
>>
>> On Wed, Mar 2, 2016 at 11:38 PM, Geethika Kumari 
>> wrote:
>>
>>> Dear sir,
>>>
>>> I am Geethika Kumari Abeysinghe third year student of University of
>>> Moratuwa. I am interestig with this project.
>>> I have knowledge and hand on experiences on java programming, restful
>>> web services and maven project implementations.
>>> Please let me to be clarified about the objectives and the exact
>>> deliverables you are expecting from GSOC interns.
>>> Let me know how to get started with this project.
>>>
>>> Thanks and Regards.
>>> Geethika Abeysinghe.
>>>
>>
>>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] Solution requires to remove/reallocate resources assigned to deleted user

2016-02-25 Thread Sumedha Rubasinghe
If we introduce a state to user (like what we have done for access tokens)
this problem can be easily solved at the first level.

Then it's just a matter of deciding what to do with removed users and their
data later on as a clean up task by infra.
On Feb 26, 2016 11:30 AM, "Rasika Perera"  wrote:

> Hi All,
>
> My suggestion is that we need to facilitate *both* approaches(soft delete
> and hard delete).
>
> Glad that at least we have some sort of agreed norms for creating, reading
> and updating users. *But*; W*hat does "delete" mean in the context of
> this system/application? *this is a sort of a question that we(middleware
> provider) might not be able to answer when building the EMM/IoT. For some
> customers this might be completely forgetting that there was a user X, for
> some others; it might be that there was a user X who is so and so and did
> these things.
>
> I am suggesting a two level approach.
>
> Firstly, if we facilitating deleting a user *inside* our application, when
> it is triggered it should be a *soft* delete. What it would mean is we delete
> the user logically. I would recommend this blog Don't Delete, Just Dont!
> [1] with a simple
> example in favour of soft delete. Certainly there might be statistical
> requirements that need to be drilled down into historical data. And
> deleting a user from the system should not be a gone-gone at least for some
> grace period.
>
> Secondly, there can be requirements such as reclaim disk space,
> hard-deletion required as per retention/privacy policy. In that case, we
> need to provide some sort of a workflow that would clear the stuff. There's
> a possibility that existence of shared resources might cause even far more
> complex filtering. On the other hand, as Prabath mentioned when
> user-management is handed by outside of the system, third party products
> such as LDAPs. Once a user is removed by an outside functionality there is
> no default way to listen an event or make a workflow to get triggered this
> into our application. This is why we need to implement *manually* triggered
> workflow which can be consumed by system administrators.
>
> I think we can decide the best approach if we decide whether to maintain
> historical data on meta data repositories or not?
>
> WDYT?
>
> Regards,
> Rasika
>
> [1] http://udidahan.com/2009/09/01/dont-delete-just-dont/
>
>
> On Thu, Feb 25, 2016 at 5:41 PM, Prabath Abeysekera 
> wrote:
>
>> To my understanding, the most commonly practised use-case in many
>> organizations is that, user management is handled outside third party
>> products. For instance, in a typical EMM deployment, which utilizes IS as a
>> key manager, it is highly unlikely that user provisioning/de-provisioning
>> is done via IS itself, unless IS is what's primarily used for the same.
>> Most of the people typically prefer to provision/de-provision user
>> management related resources by directly accessing some in-house
>> infrastructure that controls access to the underlying LDAPs, etc. In that
>> sort of a scenario, there's literally no way that you can listen to some
>> event and make a workflow or some other similar mechanism to get triggered
>> automatically. Instead, system administrators would have to manually
>> trigger a workflow or something to clean-up the orphaned resources. So,
>> there has to be some functionality, IMO, in EMM to support that aspect.
>>
>> If all user-mgt tasks are done through IS, however, you have the
>> opportunity to use the workflow extension feature to clean-up the aforesaid
>> resources irrespective of the fact that the user is fully removed from the
>> underlying user-mgt system or made inactive. Note that, in both cases, the
>> associated resources have to be cleaned up so, the need of triggering a
>> workflow to detach all stale resources is must.
>>
>> Maintaining statistics is a whole different other aspect, IMO. Without
>> relying on the primary metadata repositories used by the underlying
>> user-mgt systems for keeping historical data, some appropriate monitoring
>> infrastructure has to be used, which would analyze and bring us who is
>> active in the system and who is not, in the form of a audit trail or a
>> report. Certain organizations do practice certain steps "not to duplicate
>> identity", whereas certain others do not, primarily because letting the
>> user base grow with some users who no longer exist in the system is
>> pointless. Even for the people who avoid user duplication, IMO, it is a
>> must for the system administrators that their resources are cleaned up when
>> they leave an organization.
>>
>> All considered, IMO, we can have some workflow-based mechanism bound to
>> EMM/IoTS, which not only can be manually triggered when the users are
>> removed externally, but also gets triggered when users are deleted or made
>> inactive. WDYT?
>>
>> Cheers,
>> Prabath
>>
>>
>>
>>
>> On 

Re: [Dev] [Architecture] WSO2 IoT Server 1.0.0 M3 Released

2016-02-15 Thread Sumedha Rubasinghe
Shavantha,
Can you go through the documentation and getting started guide?


https://docs.wso2.com/display/IoTS100/Getting+Started+with+WSO2+IoT+Server
https://docs.wso2.com/display/IoTS100/Quick+Start+Guide




On Mon, Feb 15, 2016 at 5:13 PM, Ruwan Yatawara  wrote:

> Sure Shavantha,
>
> We are a bit busy these days as we are doing some work for WSO2Con, how
> about we have a session on Friday?
>
> Thanks and Regards,
>
> Ruwan Yatawara
>
> Senior Software Engineer,
> WSO2 Inc.
>
> email : ruw...@wso2.com
> mobile : +94 77 9110413
> blog : http://ruwansrants.blogspot.com/
> www: :http://wso2.com
>
>
> On Mon, Feb 15, 2016 at 4:54 PM, Shavantha Weerasinghe  > wrote:
>
>> Hi Ruwan
>>
>> My self and jason have been assigned to the QA cycles, can we arrange for
>> a KT session
>>
>> regards,shavantha
>>
>> Shavantha Weerasinghe
>> Senior Software Engineer QA
>> WSO2, Inc.
>> lean.enterprise.middleware.
>> http://wso2.com
>> http://wso2.org
>> Tel : 94 11 214 5345
>> Fax :94 11 2145300
>>
>>
>> On Mon, Feb 8, 2016 at 7:17 PM, Ruwan Yatawara  wrote:
>>
>>> *WSO2 IoT Server 1.0.0 M3 Released*
>>> Please find below, download link of the third Milestone of WSO2
>>> IoTServer 1.0.0.
>>>
>>>
>>> https://github.com/wso2-incubator/product-iot-server/releases/tag/IoTS-1.0.0-M3
>>>
>>>
>>> The list of new features & Bug fixes are as follows.
>>>
>>> Features
>>>
>>>- Merging with CDMF/CDMF-Plugins Master Branch
>>>- New Device Type Implemented (Water Dispenser)
>>>
>>>
>>> Bug Fixes
>>>
>>> - [IOTS-30 ] - QR Code is not
>>> shown when user is added
>>> - [IOTS-32 ] - Doesn't allow to
>>> edit a user without adding PW value
>>> - [IOTS-40 ] - Incorrect
>>> information sequence on the Drone Analyzer device UI page
>>> - [IOTS-41 ] - Missing
>>> wso2Agent.sh file for the Digital Display agent
>>> - [IOTS-42 ] - Page not navigated
>>> to success page after adding new user
>>>
>>> Sub-task
>>>
>>>- Enhanced packaging structure of device types
>>>
>>>
>>>
>>>
>>> Thanks and Regards,
>>>
>>> *~ EMM / IOT Team ~*
>>>
>>>
>>>
>>> Thanks and Regards,
>>>
>>> Ruwan Yatawara
>>>
>>> Senior Software Engineer,
>>> WSO2 Inc.
>>>
>>> email : ruw...@wso2.com
>>> mobile : +94 77 9110413
>>> blog : http://ruwansrants.blogspot.com/
>>> www: :http://wso2.com
>>>
>>>
>>> ___
>>> Architecture mailing list
>>> architect...@wso2.org
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>
> ___
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 MSF4J 1.0.0 RC6

2016-02-13 Thread Sumedha Rubasinghe
Tested following:
1. Developed a service using archetype
2. Deployed and tested
3. Tested @QueryParam, @PathParam and @DefaultValue
4. Load tested GET with 100 concurrency for 10mins

[x] Stable - go ahead and release - subjected to following documentation
fixes.


Following section should be changed:

Run the following command or simply go to http://localhost:8080/hello/wso2
from your browser.
curl http://localhost:8080/hello/wso2
You should see a response that prints "Hello wso2"

To:
Run the following command or simply go to *http://localhost:8080/service
* from your browser.
curl *http://localhost:8080/service *
You should see a response that prints "*Hello from WSO2 MSF4J*"

Also archetype generates a file called 'dependency-reduced-pom.xml'.
License is missing there.



On Fri, Feb 12, 2016 at 8:24 PM, Samiyuru Senarathne 
wrote:

> Hi Devs,
>
> This is the 6th Release Candidate of WSO2 Microservices Framework for
> Java 1.0.0.
>
> Please download, test the framework and vote.
> Refer to github readmes for guides.
>
> *​Source and binary distribution files:*
> *https://github.com/wso2/msf4j/releases/tag/v1.0.0-RC6
> *
>
> *Maven staging repository:*
> *http://maven.wso2.org/nexus/content/repositories/orgwso2-333/
> *
>
> *The tag to be voted upon:*
> *https://github.com/wso2/msf4j/tree/v1.0.0-RC6
> *
>
> *Note*
> When developing MSF4J applications, we need to use several poms provided
> by MSF4J. Since they are not yet uploaded to the maven central, we have
> to add the MSF4J maven repo url to the project to resolve them. For that,
> the following segment should be added to the project pom before building.
>
> 
>> 
>> wso2-nexus
>> *http://maven.wso2.org/nexus/content/repositories/orgwso2-333/
>> *
>> 
>> 
>
>
>
> [ ] Broken - do not release (explain why)
> [ ] Stable - go ahead and release
>
> Thank you,
> Carbon Team
>
> --
> Samiyuru Senarathne
> *Software Engineer*
> Mobile : +94 (0) 71 134 6087
> samiy...@wso2.com
>



-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 MSF4J 1.0.0 RC6

2016-02-13 Thread Sumedha Rubasinghe
On Sun, Feb 14, 2016 at 12:11 AM, Sumedha Rubasinghe <sume...@wso2.com>
wrote:

> Tested following:
> 1. Developed a service using archetype
> 2. Deployed and tested
> 3. Tested @QueryParam, @PathParam and @DefaultValue
> 4. Load tested GET with 100 concurrency for 10mins
>
> [x] Stable - go ahead and release - subjected to following documentation
> fixes.
>
>
> Following section should be changed:
>
> Sorry. Following section need not be changed.
I created the project using archetype and used testing instructions in
getting started page. :)

Code and instructions on getting started page are matching.



> Run the following command or simply go to http://localhost:8080/hello/wso2
> from your browser.
> curl http://localhost:8080/hello/wso2
> You should see a response that prints "Hello wso2"
>
> To:
> Run the following command or simply go to *http://localhost:8080/service
> <http://localhost:8080/service>* from your browser.
> curl *http://localhost:8080/service <http://localhost:8080/service>*
> You should see a response that prints "*Hello from WSO2 MSF4J*"
>
> Also archetype generates a file called 'dependency-reduced-pom.xml'.
> License is missing there.
>
>
>
> On Fri, Feb 12, 2016 at 8:24 PM, Samiyuru Senarathne <samiy...@wso2.com>
> wrote:
>
>> Hi Devs,
>>
>> This is the 6th Release Candidate of WSO2 Microservices Framework for
>> Java 1.0.0.
>>
>> Please download, test the framework and vote.
>> Refer to github readmes for guides.
>>
>> *​Source and binary distribution files:*
>> *https://github.com/wso2/msf4j/releases/tag/v1.0.0-RC6
>> <https://github.com/wso2/msf4j/releases/tag/v1.0.0-RC6>*
>>
>> *Maven staging repository:*
>> *http://maven.wso2.org/nexus/content/repositories/orgwso2-333/
>> <http://maven.wso2.org/nexus/content/repositories/orgwso2-333/>*
>>
>> *The tag to be voted upon:*
>> *https://github.com/wso2/msf4j/tree/v1.0.0-RC6
>> <https://github.com/wso2/msf4j/tree/v1.0.0-RC6>*
>>
>> *Note*
>> When developing MSF4J applications, we need to use several poms provided
>> by MSF4J. Since they are not yet uploaded to the maven central, we have
>> to add the MSF4J maven repo url to the project to resolve them. For
>> that, the following segment should be added to the project pom before
>> building.
>>
>> 
>>> 
>>> wso2-nexus
>>> *http://maven.wso2.org/nexus/content/repositories/orgwso2-333/
>>> <http://maven.wso2.org/nexus/content/repositories/orgwso2-333/>*
>>> 
>>> 
>>
>>
>>
>> [ ] Broken - do not release (explain why)
>> [ ] Stable - go ahead and release
>>
>> Thank you,
>> Carbon Team
>>
>> --
>> Samiyuru Senarathne
>> *Software Engineer*
>> Mobile : +94 (0) 71 134 6087
>> samiy...@wso2.com
>>
>
>
>
> --
> /sumedha
> m: +94 773017743
> b :  bit.ly/sumedha
>



-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] IoTServer taking much longer time to start

2016-01-27 Thread Sumedha Rubasinghe
But this does not seem to be noticeable on Macs.

On Thu, Jan 28, 2016 at 12:04 AM, Charitha Goonetilleke 
wrote:

> Hi All,
>
> After looking into server startup with RuwanA, found that 
> *org.eclipse.osgi.internal.resolver.VersionConstraintImpl
> *class getting much more CPU time by causing the $subject. Also HashMap
> get() method invoking too many times from above class. This is happening
> when OSGi framework tried to resolve bundles when starting the runtime.
>
> Since IoT server has relatively large number of bundles (786) with size of
> 346.6MB, it might have large number of dependencies to check and verify
> during bundle resolving stage. Seems it is the reason for that time delay
> and can't fix $subject without reducing the number of bundles inside the
> IoTServer product.
>
> Please let me know if there any other concerns or ideas.
>
> Thanks & Regards,
> /charithag
>
> On Mon, Jan 25, 2016 at 10:49 PM, Charitha Goonetilleke <
> charit...@wso2.com> wrote:
>
>> Hi all,
>>
>> When we are doing developments with IoTServer, we realized that,
>> IoTServer takes some time to start from wso2server.sh script. Usually it
>> takes nearly 120 seconds. I think it is much more higher than our other
>> products. By the way when analyzing the server logs, I found that, there is
>> a time gap between 1st INFO level log and last output from the startup
>> shell script. It is nearly around 1 minute.
>>
>> WDYT about this? Is there any work around to fix this issue?
>>
>> *[charitha@charithag-wso2 bin]$ ./wso2server.sh*
>> *JAVA_HOME environment variable is set to /usr/java/jdk1.7.0_79*
>> *CARBON_HOME environment variable is set to
>> /home/charitha/git/EMM-Merge/product-iot-server/modules/distribution/target/wso2iots-1.0.0-SNAPSHOT*
>>
>> *[2016-01-25 22:31:37,285]  INFO
>> {org.wso2.andes.wso2.internal.QpidBundleActivator} -  Setting BundleContext
>> in PluginManager*
>> *[2016-01-25 22:31:39,747]  INFO
>> {org.wso2.carbon.appmgt.impl.internal.AppDiscoveryComponent} -  WebApp
>> Discovery component activated*
>> *[2016-01-25 22:31:39,772]  INFO
>> {org.wso2.carbon.appmgt.mobile.internal.AppManagerMobileComponent} -
>>  WSO2EMM MDM is bound to App Manager*
>> *[2016-01-25 22:31:39,772]  INFO
>> {org.wso2.carbon.appmgt.mobile.internal.AppManagerMobileComponent} -  App
>> Manger Mobile Component activated*
>> *[2016-01-25 22:31:39,846]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Starting WSO2
>> Carbon...*
>> *[2016-01-25 22:31:39,846]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Operating System :
>> Linux 4.3.3-300.fc23.x86_64, amd64*
>> *[2016-01-25 22:31:39,847]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Home:
>> /usr/java/jdk1.7.0_79/jre*
>> *[2016-01-25 22:31:39,847]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Version :
>> 1.7.0_79*
>> *[2016-01-25 22:31:39,847]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java VM  :
>> Java HotSpot(TM) 64-Bit Server VM 24.79-b02,Oracle Corporation*
>> *[2016-01-25 22:31:39,847]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Carbon Home  :
>> /home/charitha/git/EMM-Merge/product-iot-server/modules/distribution/target/wso2iots-1.0.0-SNAPSHOT*
>> *[2016-01-25 22:31:39,847]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Temp Dir:
>> /home/charitha/git/EMM-Merge/product-iot-server/modules/distribution/target/wso2iots-1.0.0-SNAPSHOT/tmp*
>> *[2016-01-25 22:31:39,847]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  User :
>> charitha, en-US, Asia/Colombo*
>> *[2016-01-25 22:31:40,122]  INFO
>> {org.wso2.carbon.event.output.adapter.kafka.internal.ds.KafkaEventAdapterServiceDS}
>> -  Successfully deployed the Kafka output event adaptor service*
>> *[2016-01-25 22:31:40,404]  INFO
>> {org.wso2.carbon.identity.authenticator.backend.oauth.internal.OauthAuthenticatorServiceComponent}
>> -  Initiating*
>> *Activating org.wso2.jaggery.scxml with RealmService enabled*
>> *...*
>> *...*
>> *...*
>> *[2016-01-25 22:32:39,155]  INFO
>> {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  Server
>>   :  WSO2 IoT Server-1.0.0-SNAPSHOT*
>> *[2016-01-25 22:32:39,156]  INFO
>> {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  WSO2
>> Carbon started in 119 sec*
>>
>>
>> Thanks & Regards,
>> /charithag
>>
>> --
>> *Charitha Goonetilleke*
>> Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 77 751 3669 <%2B94777513669>
>> Twitter:@CharithaWs , fb: charithag
>> , linkedin: charithag
>> 
>>
>
>
>
> --
> *Charitha Goonetilleke*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 77 751 3669 <%2B94777513669>
> Twitter:@CharithaWs 

[Dev] Random errors from UUF

2016-01-11 Thread Sumedha Rubasinghe
Sajith/Manu,
Experiencing some random UI errors from UUF/template App.
Attached some screenshots @ https://wso2.org/jira/browse/IOTS-13.

Could you please check?



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


Re: [Dev] [EMM200] Performance & Load Testing

2015-12-21 Thread Sumedha Rubasinghe
Prabath,
API Manager has the same setup and it uses a Thrift client for the same (in
the place of using a stub for admin service)
Can't we use the same Thrift server/client pattern?We had a similar
situation in BAM data publisher. There also we used Thrift for performance
reasons.

Stubs are known to have performance problems for high concurrent scenarios
due to marshalling/un-marshalling.



On Mon, Dec 21, 2015 at 3:20 PM, Prabath Abeysekera 
wrote:

> One of the performance hits identified while analysing the JFR dumps taken
> out of EMM 2.0 set-ups is the time taken for token validation. The nature
> of the aforesaid token validation is that, a service stub is used to invoke
> an admin service deployed as part of EMM's Key Manager profile for token
> validation and the stub instances are created per-request to avoid the
> impact that is likely to be caused by stubs being less thread-safe. This
> pattern proved to be very expensive as it was quite evident that the stub
> instantiation is expensive. As a fix, a pool of stubs was introduced to
> mitigate the above explained impact with appropriate means to cleanup
> metadata just before the pooled stubs are returned to the pool. This helped
> doubling the numbers obtained for a properly distributed set-up of EMM 2.0.
> Please refer [1] for the source code.
>
> [1]
> https://github.com/wso2/carbon-device-mgt/commit/11957f1e478f884cc1f100debb4bbc8290c0901c
>
> Cheers,
> Prabath
>
> On Mon, Dec 21, 2015 at 2:44 PM, Dileesha Rajapakse 
> wrote:
>
>> 1. Install Jmeter
>> *sudo apt-get install jmeter*
>>
>> 2. Replace the '*/usr/share/jmeter/lib/*' directory with the 'lib'
>> directory which could be downloaded from below link. (This file contains
>> all the necessary library files needed to run test scripts)
>>
>> https://drive.google.com/file/d/0B1raQ3vGHU8uMjlhZU1EVzR0VGc/view?usp=sharing
>>
>> 3. Download and extract the scripts file
>>
>> https://drive.google.com/file/d/0B1raQ3vGHU8uaXhULTZzQUQwamc/view?usp=sharing
>>
>> The above '*EMM200LoadTests.zip*' file contains a total of 5 files.
>>
>>- *emm_devices.csv *- Contains information about 50 unique devices
>>- *EnrollDevices.jmx* - Enrolls Devices
>>- *AddOperations.jmx* - Adds Operations to enrolled devices (2
>>operations per each device)
>>- *GetPendingOperations.jmx* - Hits the
>>'/mdm-android-agent/operation' endpoint which is the most heavily used API
>>of the EMM
>>- *MDM2LoadTesting.jmx* - This script contains a sample Jmeter test
>>plan which has several additional useful test ThreadGroups which can be
>>used to simulate scenarios such as Operation Execution, Policy Creation 
>> and
>>Policy Monitoring
>>
>> *[Important]* Make sure the 'emm_devices.csv' file and the script files
>> are in the same folder.
>> 4. Specify these parameters when running test scripts
>>
>> *JHOST* --> Server Host
>> *JPORT* --> Server Port
>> *JUSERS* --> Number of Users (Concurrency)
>> *JLOOPCOUNT* --> Number of Iterations per User
>>
>>
>> Device Enrollment
>>
>> jmeter -n -JHOST= -JPORT=
>> -JUSERS= -JLOOPCOUNT= -t EnrollDevices.jmx -l
>> errors.log
>>
>>
>>- To enroll a '*n*' number of devices set the parameters as follows, 
>> *(-JUSERS)*(-JLOOPCOUNT)
>>= n*
>>
>>
>> Add Operations
>>
>> jmeter -n -JHOST= -JPORT=
>> -JUSERS= -JLOOPCOUNT= -t AddOperations.jmx -l
>> errors.log
>>
>>
>> Get Pending Operations
>>
>> jmeter -n -JHOST= -JPORT=
>> -JUSERS= -JLOOPCOUNT= -t
>> GetPendingOperations.jmx -l errors.log
>>
>>
>> --
>> Dileesha Rajapakse
>> *Intern - Engineering*
>> Mobile : +94 (0) 772 555 933
>> Tel  : +94 112 741 505
>> dilee...@wso2.com
>>
>
>
>
> --
> Prabath Abeysekara
> Technical Lead
> WSO2 Inc.
> Email: praba...@wso2.com
> Mobile: +94774171471
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] UUF/Jaggery - unformatted error

2015-12-18 Thread Sumedha Rubasinghe
Malithi,
Can we fix this? If not errors from Jaggery are not readable.

On Fri, Dec 18, 2015 at 2:37 PM, Sajith Ariyarathna <sajit...@wso2.com>
wrote:

> Hi Sumedha,
>
> This happens due to a security fix done for Carbon 4.4.2. Please refer Dev
> mail thread [1].
>
>
> [1] [Dev] Issue in carbon logs after changing carbon.kernel.version from
> 4.4.1 to 4.4.2
>
> Thanks.
>
>
> On Fri, Dec 18, 2015 at 1:12 PM, Sumedha Rubasinghe <sume...@wso2.com>
> wrote:
>
>> Sajith,
>> What is the reason for following exception to be printed in an
>> unformatted manner?
>>
>> >>>>>>>>>
>>
>> [2015-12-18 13:01:35,127] ERROR {JAGGERY.config.app:js} -
>>  org.mozilla.javascript.WrappedException: Wrapped
>> java.lang.ArrayIndexOutOfBoundsException: 1
>> (/publisher/modules/data/driver.js#40)_ at
>> org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)_ at
>> org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)_ at
>> org.mozilla.javascript.FunctionObject.call(FunctionObject.java:392)_ at
>> org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:343)_ at
>> org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2349)_ at
>> org.jaggeryjs.rhino.publisher.modules.data.c4._c_anonymous_4(/publisher/modules/data/driver.js:40)_
>>  at
>> org.jaggeryjs.rhino.publisher.modules.data.c4.call(/publisher/modules/data/driver.js)_
>>  at
>> org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)_ at
>> org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_10(/publisher/modules/data/model.manager.js:104)_
>>  at
>> org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
>>  at
>> org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)_ at
>> org.jaggeryjs.rhino..scripts.c0._c_anonymous_17(/scripts/server.js:266)_
>>  at
>> org.jaggeryjs.rhino..scripts.c0.call(/scripts/server.js)_ at
>> org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)_ at
>> org.jaggeryjs.rhino..scripts.c0._c_anonymous_16(/scripts/server.js:246)_
>>  at
>> org.jaggeryjs.rhino..scripts.c0.call(/scripts/server.js)_ at
>> org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)_ at
>> org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_9(/publisher/modules/data/model.manager.js:103)_
>>  at
>> org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
>>  at
>> org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)_ at
>> org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_17(/publisher/modules/data/model.manager.js:151)_
>>  at
>> org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
>>  at
>> org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)_ at
>> org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_5(/publisher/modules/data/model.manager.js:76)_
>>  at
>> org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
>>  at
>> org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)_ at
>> org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_4(/publisher/modules/data/model.manager.js:42)_
>>  at
>> org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
>>  at
>> org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)_ at
>> org.jaggeryjs.rhino.publisher.modules.c8._c_anonymous_13(/publisher/modules/bundler.js:168)_
>>  at
>> org.jaggeryjs.rhino.publisher.modules.c8.call(/publisher/modules/bundler.js)_
>>  at
>> org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)_ at
>> org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_3(/publisher/modules/data/model.manager.js:40)_
>>  at
>> org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
>>  at
>> org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)_ at
>> org.jaggeryjs.rhino.publisher.modules.data.c1._c_ModelManager_2(/publisher/modules/data/model.manager.js:24)_
>>  at
>> org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
>>  at
>> org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:338)_ at
>> org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2349)_ at
>> org.jaggeryjs.rhino.publisher.modules.data.c0._c_anonymous_3(/publisher/modules/data/storage.js:74)_
>>  at
>> org.jaggeryjs.rhin

[Dev] "No bam.xml" - Is this required to be present when embedding DAS?

2015-12-18 Thread Sumedha Rubasinghe
Getting following error.

[2015-12-18 15:33:57,538]  WARN
{org.wso2.carbon.bam.service.data.publisher.internal.StatisticsServiceComponent}
-  No bam.xml found in
/Volumes/data/projects/wso2/iot-server/src/product-iot-server/modules/distribution/target/wso2iot-1.0.0-SNAPSHOT/repository/conf/etc/bam.xml
[2015-12-18 15:33:57,538]  WARN
{org.wso2.carbon.bam.service.data.publisher.internal.StatisticsServiceComponent}
-  Invalid bam.xml. Disabling service publishing.


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


[Dev] Is it possible to install a feature into a Carbon server from target folder?

2015-12-17 Thread Sumedha Rubasinghe
Wondering if $subject is possible without building whole feature repo?



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


[Dev] NPE when deploying API Store on IoT Server

2015-12-17 Thread Sumedha Rubasinghe
[2015-12-18 13:01:34,068]  INFO
{org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer} -  Deployed
webapp:
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/api-store].File[/Volumes/data/projects/wso2/iot-server/src/product-iot-server/modules/distribution/target/wso2iot-1.0.0-SNAPSHOT/repository/deployment/server/jaggeryapps/api-store]
[2015-12-18 13:01:34,095] ERROR
{org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer} -
 org.jaggeryjs.scriptengine.exceptions.ScriptException:
java.lang.NullPointerException
org.jaggeryjs.scriptengine.exceptions.ScriptException:
org.jaggeryjs.scriptengine.exceptions.ScriptException:
java.lang.NullPointerException
at
org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at
org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer.executeScripts(TomcatJaggeryWebappsDeployer.java:501)
at
org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer.access$500(TomcatJaggeryWebappsDeployer.java:64)
at
org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer$JaggeryConfListener.lifecycleEvent(TomcatJaggeryWebappsDeployer.java:316)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:347)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5591)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at
org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:290)
at
org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:212)
at
org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer.handleWebappDeployment(TomcatJaggeryWebappsDeployer.java:213)
at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleExplodedWebappDeployment(TomcatGenericWebappsDeployer.java:247)
at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:173)
at
org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer.deploy(TomcatJaggeryWebappsDeployer.java:116)
at
org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp(AbstractWebappDeployer.java:224)
at
org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy(AbstractWebappDeployer.java:114)
at
org.jaggeryjs.jaggery.deployer.JaggeryDeployer.deploy(JaggeryDeployer.java:59)
at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at
org.apache.synapse.Axis2SynapseController.deployMediatorExtensions(Axis2SynapseController.java:743)
at
org.apache.synapse.Axis2SynapseController.createSynapseEnvironment(Axis2SynapseController.java:388)
at org.apache.synapse.ServerManager.start(ServerManager.java:181)
at
org.wso2.carbon.mediation.initializer.ServiceBusInitializer.initESB(ServiceBusInitializer.java:441)
at
org.wso2.carbon.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.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

[Dev] Can we suppress DAS message for schedule task execution?

2015-12-17 Thread Sumedha Rubasinghe
It can fill up the logs quite easily when there are lot of scheduled
scripts running @ low intervals.

As an alternative,
Make it a DEBUG & have an UI option to see when was the script last ran.


eg:

[2015-12-18 13:05:34,067]  INFO
{org.wso2.carbon.device.mgt.iot.controlqueue.mqtt.MqttSubscriber} -
 Subscribed with client id: f9560:virtual_firealarm
[2015-12-18 13:05:34,067]  INFO
{org.wso2.carbon.device.mgt.iot.controlqueue.mqtt.MqttSubscriber} -
 Subscribed to topic: WSO2IoTServer/+/virtual_firealarm/+/publisher
[2015-12-18 13:06:00,002]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Accelerometer_Sensor_Script for tenant id: -1234
[2015-12-18 13:06:00,002]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Battery_Sensor_Script for tenant id: -1234
[2015-12-18 13:06:00,003]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: GPS_Sensor_Script for tenant id: -1234
[2015-12-18 13:06:00,004]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Gravity_Sensor_Script for tenant id: -1234
[2015-12-18 13:06:00,004]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Gyroscope_Sensor_Script for tenant id: -1234
[2015-12-18 13:06:00,005]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Light_Sensor_Script for tenant id: -1234
[2015-12-18 13:06:00,006]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Magnetic_Sensor_Script for tenant id: -1234
[2015-12-18 13:06:00,006]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Pressure_Sensor_Script for tenant id: -1234
[2015-12-18 13:06:00,007]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Proximity_Sensor_Script for tenant id: -1234
[2015-12-18 13:06:00,008]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Rotation_Sensor_Script for tenant id: -1234
[2015-12-18 13:06:00,008]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Temperature_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:00,001]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Accelerometer_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:00,001]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Battery_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:00,002]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: GPS_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:00,002]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Gravity_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:00,003]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Gyroscope_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:00,004]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Light_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:00,004]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Magnetic_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:00,004]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Pressure_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:00,005]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Proximity_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:00,005]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Rotation_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:00,006]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Temperature_Sensor_Script for tenant id: -1234
[2015-12-18 13:07:28,405] ERROR
{org.eclipse.paho.client.mqttv3.internal.ClientState} -  b942b:raspberrypi:
Timed out as no activity, keepAlive=60,000
lastOutboundActivity=1,450,424,128,407 lastInboundActivity=1,450,424,068,623
[2015-12-18 13:07:28,406]  WARN
{org.wso2.carbon.device.mgt.iot.controlqueue.mqtt.MqttSubscriber} -  Lost
Connection for client: b942b:raspberrypi to tcp://204.232.188.214:1883._This
was due to - Timed out waiting for a response from the server (Sanitized)
[2015-12-18 13:07:29,273]  INFO
{org.wso2.carbon.device.mgt.iot.controlqueue.mqtt.MqttSubscriber} -
 Subscribed with client id: b942b:raspberrypi
[2015-12-18 13:07:29,273]  INFO
{org.wso2.carbon.device.mgt.iot.controlqueue.mqtt.MqttSubscriber} -
 Subscribed to topic: WSO2IoTServer/+/raspberrypi/+/publisher
[2015-12-18 13:08:00,001]  INFO

[Dev] UUF/Jaggery - unformatted error

2015-12-17 Thread Sumedha Rubasinghe
Sajith,
What is the reason for following exception to be printed in an unformatted
manner?

>

[2015-12-18 13:01:35,127] ERROR {JAGGERY.config.app:js} -
 org.mozilla.javascript.WrappedException: Wrapped
java.lang.ArrayIndexOutOfBoundsException: 1
(/publisher/modules/data/driver.js#40)_ at
org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)_ at
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)_ at
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:392)_ at
org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:343)_ at
org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2349)_ at
org.jaggeryjs.rhino.publisher.modules.data.c4._c_anonymous_4(/publisher/modules/data/driver.js:40)_
at
org.jaggeryjs.rhino.publisher.modules.data.c4.call(/publisher/modules/data/driver.js)_
at
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)_ at
org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_10(/publisher/modules/data/model.manager.js:104)_
at
org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
at
org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)_ at
org.jaggeryjs.rhino..scripts.c0._c_anonymous_17(/scripts/server.js:266)_
at
org.jaggeryjs.rhino..scripts.c0.call(/scripts/server.js)_ at
org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)_ at
org.jaggeryjs.rhino..scripts.c0._c_anonymous_16(/scripts/server.js:246)_
at
org.jaggeryjs.rhino..scripts.c0.call(/scripts/server.js)_ at
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)_ at
org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_9(/publisher/modules/data/model.manager.js:103)_
at
org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
at
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)_ at
org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_17(/publisher/modules/data/model.manager.js:151)_
at
org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
at
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)_ at
org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_5(/publisher/modules/data/model.manager.js:76)_
at
org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
at
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)_ at
org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_4(/publisher/modules/data/model.manager.js:42)_
at
org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
at
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)_ at
org.jaggeryjs.rhino.publisher.modules.c8._c_anonymous_13(/publisher/modules/bundler.js:168)_
at
org.jaggeryjs.rhino.publisher.modules.c8.call(/publisher/modules/bundler.js)_
at
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)_ at
org.jaggeryjs.rhino.publisher.modules.data.c1._c_anonymous_3(/publisher/modules/data/model.manager.js:40)_
at
org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
at
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)_ at
org.jaggeryjs.rhino.publisher.modules.data.c1._c_ModelManager_2(/publisher/modules/data/model.manager.js:24)_
at
org.jaggeryjs.rhino.publisher.modules.data.c1.call(/publisher/modules/data/model.manager.js)_
at
org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:338)_ at
org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2349)_ at
org.jaggeryjs.rhino.publisher.modules.data.c0._c_anonymous_3(/publisher/modules/data/storage.js:74)_
at
org.jaggeryjs.rhino.publisher.modules.data.c0.call(/publisher/modules/data/storage.js)_
at
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)_ at
org.jaggeryjs.rhino.publisher.modules.data.c0._c_StorageManager_2(/publisher/modules/data/storage.js:54)_
at
org.jaggeryjs.rhino.publisher.modules.data.c0.call(/publisher/modules/data/storage.js)_
at
org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:338)_ at
org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2349)_ at
org.jaggeryjs.rhino.publisher.modules.c7._c_Deployer_2(/publisher/modules/asset.deployment.js:50)_
at
org.jaggeryjs.rhino.publisher.modules.c7.call(/publisher/modules/asset.deployment.js)_
at
org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:338)_ at
org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2349)_ at
org.jaggeryjs.rhino.publisher.modules.c6._c_anonymous_3(/publisher/modules/publisher.js:76)_
at
org.jaggeryjs.rhino.publisher.modules.c6.call(/publisher/modules/publisher.js)_
at
org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)_ at
org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)_ at

[Dev] DAS going OOM frequently

2015-12-16 Thread Sumedha Rubasinghe
We have DAS Lite included in IoT Server and several summarisation scripts
deployed. Server is going OOM frequently with following exception.

Shouldn't this[1] method be synchronised?

[1]
https://github.com/wso2/carbon-analytics/blob/master/components/analytics-core/org.wso2.carbon.analytics.dataservice.core/src/main/java/org/wso2/carbon/analytics/dataservice/core/indexing/AnalyticsIndexedTableStore.java#L45


>>>
[2015-12-16 15:11:00,004]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Light_Sensor_Script for tenant id: -1234
[2015-12-16 15:11:00,005]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Magnetic_Sensor_Script for tenant id: -1234
[2015-12-16 15:11:00,005]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Pressure_Sensor_Script for tenant id: -1234
[2015-12-16 15:11:00,006]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Proximity_Sensor_Script for tenant id: -1234
[2015-12-16 15:11:00,006]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Rotation_Sensor_Script for tenant id: -1234
[2015-12-16 15:11:00,007]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Temperature_Sensor_Script for tenant id: -1234
[2015-12-16 15:11:01,132] ERROR
{org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter} -  Error in
executing task: null
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:922)
at java.util.HashMap$KeyIterator.next(HashMap.java:956)
at java.util.AbstractCollection.toArray(AbstractCollection.java:195)
at
org.wso2.carbon.analytics.dataservice.core.indexing.AnalyticsIndexedTableStore.refreshIndexedTableArray(AnalyticsIndexedTableStore.java:46)
at
org.wso2.carbon.analytics.dataservice.core.indexing.AnalyticsIndexedTableStore.addIndexedTable(AnalyticsIndexedTableStore.java:37)
at
org.wso2.carbon.analytics.dataservice.core.AnalyticsDataServiceImpl.refreshIndexedTableStoreEntry(AnalyticsDataServiceImpl.java:512)
at
org.wso2.carbon.analytics.dataservice.core.AnalyticsDataServiceImpl.invalidateAnalyticsTableInfo(AnalyticsDataServiceImpl.java:525)
at
org.wso2.carbon.analytics.dataservice.core.AnalyticsDataServiceImpl.checkAndInvalidateTableInfo(AnalyticsDataServiceImpl.java:504)
at
org.wso2.carbon.analytics.dataservice.core.AnalyticsDataServiceImpl.setTableSchema(AnalyticsDataServiceImpl.java:495)
at
org.wso2.carbon.analytics.spark.core.sources.AnalyticsRelation.insert(AnalyticsRelation.java:162)
at org.apache.spark.sql.sources.InsertIntoDataSource.run(commands.scala:53)
at
org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult$lzycompute(commands.scala:57)
at
org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult(commands.scala:57)
at
org.apache.spark.sql.execution.ExecutedCommand.doExecute(commands.scala:68)
at
org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:88)
at
org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:88)
at
org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:147)
at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:87)
at
org.apache.spark.sql.SQLContext$QueryExecution.toRdd$lzycompute(SQLContext.scala:950)
at
org.apache.spark.sql.SQLContext$QueryExecution.toRdd(SQLContext.scala:950)
at org.apache.spark.sql.DataFrame.(DataFrame.scala:144)
at org.apache.spark.sql.DataFrame.(DataFrame.scala:128)
at org.apache.spark.sql.DataFrame$.apply(DataFrame.scala:51)
at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:755)
at
org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.executeQueryLocal(SparkAnalyticsExecutor.java:710)
at
org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.executeQuery(SparkAnalyticsExecutor.java:692)
at
org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeQuery(CarbonAnalyticsProcessorService.java:199)
at
org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeScript(CarbonAnalyticsProcessorService.java:149)
at
org.wso2.carbon.analytics.spark.core.AnalyticsTask.execute(AnalyticsTask.java:57)
at
org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:67)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[2015-12-16 15:12:00,001]  INFO
{org.wso2.carbon.analytics.spark.core.AnalyticsTask} -  Executing the
schedule task for: Accelerometer_Sensor_Script for tenant id: -1234

-- 

Re: [Dev] Is it okay to depend on auto commit when writing JDBC code?

2015-11-23 Thread Sumedha Rubasinghe
Isuru,
By allowing autocommit = true, your giving control of your JDBC logic
completely to database engine.
This will be problematic when you want to perform a rollback resulted by
multiple SQL statements.

For example:

with autocommit=true

insertOrder()
//order saved to database
insertPayment()
//payment save to database
Here no way of rollbacking Order if payment is not successful.


with autocommit=false
beginTxn {
  insertOrder()
  insertPayment()
} finally{
  commitTxn()
} error {
  rollback()
}

rollback operation can remove both payment and order records as they are
part of a single txn.





On Mon, Nov 23, 2015 at 4:03 PM, Isuru Perera  wrote:

> Hi,
>
> When we write JDBC code, is it okay if we depend on auto commit in the
> connection we get from the DataSource?
>
> The JDBC Reporter for Metrics [1] depends on auto commit "true" value set
> in the DataSource configuration. The JDBC reporter doesn't have any complex
> transactions and I thought it should be okay to depend on auto commit.
>
> WDYT?
>
> Thanks!
>
> Best Regards,
>
> [1]
> https://github.com/wso2/carbon-metrics/blob/v1.1.1/components/org.wso2.carbon.metrics.jdbc.reporter/src/main/java/org/wso2/carbon/metrics/reporter/JDBCReporter.java#L233-L258
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [VOTE] Release WSO2 DSS 3.5.0 RC2

2015-10-27 Thread Sumedha Rubasinghe
Hi,
I tested the latest pack.
I enabled OData on RDBMSSample.

I was able to access following endpoints and get results as expected.
https://localhost:9443/odata/RDBMSSample/default
https://localhost:9443/odata/RDBMSSample/default/CUSTOMERS

But following did not work. May be my filter criteria is wrong.
https://localhost:9443/odata/RDBMSSample/default/CUSTOMERS?$filter=city


I have a small complain about service name. In service detail page, service
name appears as 'services/RDBMSSample'.  So if someone follows Madawa's
blog, the endpoint would look like,

https://localhost:9443/odata*/services/RDBMSSample*/default

Docs (https://docs.wso2.com/display/DSS350/OData+Sample) on OData on public
doc portal should also improve to show more filter criteria.

[x ] Stable - go ahead and release

OData feature is stable subjected to above minor fixes.


Sumedha


On Sat, Oct 24, 2015 at 1:33 AM, Rajith Vitharana  wrote:

> Hi,
>
> This is the second release candidate of WSO2 DSS 3.5.0
>
> This release fixes the following issues:
> *https://wso2.org/jira/issues/?filter=12469
> *
>
> Please download, test and vote. The vote will be open for 72 hours or as
> needed.
>
> Source & binary distribution files:
> https://svn.wso2.org/repos/wso2/scratch/DSS/3.5.0/RC2/wso2dss-3.5.0.zip
> 
>
> JavaDocs
> https://svn.wso2.org/repos/wso2/scratch/DSS/3.5.0/RC2/javaDocs/index.html
>
> Maven staging repo:
> *http://maven.wso2.org/nexus/content/repositories/orgwso2dss-058/
> *
>
> The tag to be voted upon:
> *https://github.com/wso2/product-dss/tree/v3.5.0-RC2
> *
>
>
> [ ] Broken - do not release (explain why)
> [ ] Stable - go ahead and release
>
> Thanks,
> The WSO2 DSS Team
>
> ___
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Migrate to data publisher agent on carbon-analytics-common

2015-09-14 Thread Sumedha Rubasinghe
Anjana,
IMO this is serious problem for all products that have been released and
trying to use new DAS.

I think this can be easily fixed by adhering a new package name for new DAS
based data publishers.



On Mon, Sep 14, 2015 at 10:53 AM, Ayyoob Hamza  wrote:

> Hi All,
> We are trying to integrate DAS Features to CDMF and we found that DAS uses
> the latest data publisher agent[1]. Wherein APIM and ES has used the one on
> carbon-commons[2]. This is raised a conflict on feature installation.
> Furthermore we have found that APIM is also dependent on a osgi service[3]
> which available on carbon-deployment, and this also requires the
> carbon-common publisher agent. So I believe we have to migrate from the
> carbon-common data publisher to the new one on all 3 components since the
> old one will not have any support anymore. WDYT ?.
>
> eg:
> Cannot complete the install because of a conflicting dependency.
>  Software being installed: WSO2 Carbon - Data Bridge - Data Publisher
> Aggregate Feature 4.4.7
> (org.wso2.carbon.databridge.datapublisher.feature.group 4.4.7) - Data
> Publisher under carbon commons
>
>  Software being installed: WSO2 Carbon - Data Bridge - Data Publisher
> Aggregate Feature 5.0.1
> (org.wso2.carbon.databridge.datapublisher.feature.group 5.0.1) - Data
> Publisher under carbon analytics commons
>
> Currently in order to work on the pack, did a small work around by
> including the thrift data publisher as a bundle within the feature. So that
> we can test the DAS features. But this is just for testing purposes.
>
> [1]
> https://github.com/wso2/carbon-analytics-common/tree/master/components/data-bridge
> [2]
> https://github.com/wso2/carbon-commons/tree/4.4.x/components/data-bridge
> [3]
> https://github.com/wso2/carbon-deployment/tree/v4.5.0/components/service-mgt/bam-data-agents/org.wso2.carbon.bam.service.data.publisher/src/main/java/org/wso2/carbon/bam/service/data/publisher
>
> Thanks,
> *Ayyoob Hamza*
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
>



-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Current development repos of IoTServer

2015-09-13 Thread Sumedha Rubasinghe
Guys,
Are these still valid or have we updated the repo list?

On Thu, Sep 10, 2015 at 11:25 AM, Charitha Goonetilleke 
wrote:

> Hi All,
>
> As we are working on IoTserver implementations with ES integration and DAS
> integration, we made some changes to few of existing WSO2 repos. So
> currently we are using forks from those repos and sending PRs to relevant
> teams time to time to review and merge our PRs with WSO2 repos.
>
> This is the list of repos, which need to build in order to build current
> version of IoTserver. Please note that product might not be fully stable
> since it is a work in progress.
>
>- carbon-apimgt[1] branch:snap-1.10.x
>- carbon-device-mgt[2] branch:master
>- device-cloud[3] branch:master
>- product-device-cloud[4] branch:master
>- product-cdm[5] branch:master
>
> [1] https://github.com/charithag/carbon-apimg.git
> [2] https://github.com/charithag/carbon-device-mgt.git
> [3] https://github.com/wso2-dev/device-cloud.git
> [4] https://github.com/wso2-dev/product-device-cloud.git
> [5] https://github.com/charithag/product-cdm.git
>
> --
> *Charitha Goonetilleke*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 77 751 3669 <%2B94777513669>
> Twitter:@CharithaWs , fb: charithag
> , linkedin: charithag
> 
>



-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Data Service Error

2015-09-10 Thread Sumedha Rubasinghe
Thanks Chanika. Do we have a separate DSS instance on cloud or as we using
AS for hosting DSS on cloud?
We are planning to deploy this on WSO2 Cloud.

On Thu, Sep 10, 2015 at 4:19 PM, Chanika Geeganage  wrote:

> Hi Lasantha,
>
> JOSN Mapping [1] was introduced from DSS 3.2.0 onwards and therefore that
> feature is not available in AS 5.2.1 or previous versions. You can install
> DSS 3.2.2 features (latest) on AS 5.2.1
>
> [1] https://docs.wso2.com/display/DSS320/JSON+Mapping
>
>
> On Thu, Sep 10, 2015 at 3:32 PM, Lasantha Dharmakeerthi <
> lasant...@wso2.com> wrote:
>
>> I created data service using wso2 data service server and it's working
>> properly. Then I deployed it in WSO2 application server. In Application
>> server it's not working. Showing as a faulty service. How can I figure out
>> this error?
>>
>> Return type of query is json.
>>
>> I have attached screen shots of errors.
>>
>> --
>> Dharmakeerthi Lasantha
>> Software Engineer Trainee, WSO2
>> Mobile 0774928852
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Best Regards..
>
> Chanika Geeganage
> Software Engineer
> Mobile : +94773522586
> WSO2, Inc.; http://wso2.com
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Exporting an API

2015-09-08 Thread Sumedha Rubasinghe
Authorization:Basic *YWRtaW4*=

Is this a new token you have generated for yourself?



On Tue, Sep 8, 2015 at 1:46 PM, Lasantha Dharmakeerthi 
wrote:

> Hi Devs,
>
> I followed the API Manager documentation to Migrate APIs to a different
> environment. Downloaded the WSO2 API import/export tool v0.9.1 and tried to
> export API. But I got 0 byte zip file. So what will be the reason for that?
>
> used command
>
> curl -H "Authorization:Basic YWRtaW4=" -X GET 
> "http://10.100.4.139:9767/api-import-export/export-api?name=WeatherAPI=1.0.0=admin;
>  -k > myExportedAPI.zip
>
>
> --
> Dharmakeerthi Lasantha
> Software Engineer Trainee, WSO2
> Mobile 0774928852
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DAS] Aggregated feature for DAS capabilities

2015-09-07 Thread Sumedha Rubasinghe
DAS combines many things. So getting everything into a single feature could
be complicated.
Shall we try to redefine what we need @ the CDMF level and then try to get
them from DAS side.

This effort is needed by many other teams like API Manager, App Manager. So
please get all those teams to agree on the feature list.

For example some of the features we may require could include:
- Event Listener (Receiver)
- Data Storage
- CEP Engine
- Summarisation



On Mon, Sep 7, 2015 at 12:13 PM, Ayyoob Hamza  wrote:

> Hi all,
> We are planing to have DAS capabilities within the IoT-Server and EMM. And
> our main idea is to be able to use DAS as an internal entity within the
> IoT-Server/EMM or an external entity(ie. IoT server without analytics) by
> switching through profiles. So wanted to know whether there is an
> aggregated feature that does the task of providing DAS capabilities. if
> there isn't any aggregated feature would it be feasible to create one ?.
>
>
> Thanks,
> *Ayyoob Hamza*
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ES] Integrating ES features into CDMF

2015-09-01 Thread Sumedha Rubasinghe
And as per the discussion with Sameera and Manu, this is the recommended
approach for any product that wants to embed ES functionality.
On Sep 1, 2015 4:49 PM, "Shabir Mohamed"  wrote:

> Hi,
>
> *As per the offline conversation:*
>
> Given that our intention is make use of the Enterprise-Store for Products
> using CDMF, I have added a new (wrapper) feature into the CDMF pack and
> have defined it to be importing the ES features via the
> ** tags. Note that this enforces the installation of
> the ES-feature at the product level and does NOT pack any of the features
> into CDMF.
>
> The purpose is to explicitely make it evident for someone using the CDMF
> pack that it is ported with ES-features for Device-Type listing.
>
> Regards
>
> -
> *Shabir Mohamed*
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> Email: sha...@wso2.com 
> Mobile: +94 77 3516019 | +94 71 6583393
>
> On Tue, Sep 1, 2015 at 10:26 AM, Shabir Mohamed  wrote:
>
>> Hi ES Team,
>>
>> I am trying to integrate ES features into the CDMF pack.
>>
>> I am going about doing this by creating a new feature inside the CDMF
>> pack and importing the * s *found in the
>> "Product-ES" profile-gen into the new CDMF feature as *
>> s. *
>>
>> Is this procedure right and will it give me a CDMF feature that wraps
>> ES-Features. If so, what are the minimum set of ES-specific
>> *s *found in Product-ES that I need to import.
>>
>> Thanks
>> -
>> *Shabir Mohamed*
>> *Software Engineer*
>> WSO2 Inc.; http://wso2.com
>> Email: sha...@wso2.com 
>> Mobile: +94 77 3516019 | +94 71 6583393
>>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Install ES features into IoTServer

2015-08-25 Thread Sumedha Rubasinghe
Ayyoob,
It should be being ES capabilities into CDMF layer. Not into IoT Server.

Are you sure it's AM 1.4.0 features? That's very old. At some point it
needs to be updated to latest. Since there is a  EMM release going on, I
think the only other option is to work on a fork for IoT Server and then
merge back when release is over.



On Wed, Aug 26, 2015 at 10:57 AM, Ayyoob Hamza ayy...@wso2.com wrote:

 Hi,
 As the discussion on moving the web app layer to CDMF. We tried to install
 the features but ES requires carbon common version 4.4.4. However CDMF is
 on carbon common version 4.4.0.  which is needed for api.mgt 1.4.0, So is
 it okay if we fork and continue the development with the latest versions,
 so that it wont be a bottleneck for EMM release. ?

 Thanks
 *Ayyoob Hamza*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: ayy...@wso2.com cell: +94 77 1681010 %2B94%2077%207779495




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Missing requirement: org.wso2.carbon.device.mgt.core 0.9.2.SNAPSHOT

2015-05-30 Thread Sumedha Rubasinghe
I am getting following while while building CDMF.
Anything missing?


Cannot complete the install because one or more required items could not be
found.
 Software being installed: WSO2 Carbon - Policy Management Server Feature
0.9.2.SNAPSHOT (org.wso2.carbon.policy.mgt.server.feature.group
0.9.2.SNAPSHOT)
 Missing requirement: org.wso2.carbon.device.mgt.core 0.9.2.SNAPSHOT
(org.wso2.carbon.device.mgt.core 0.9.2.SNAPSHOT) requires 'package
org.wso2.carbon.device.mgt.user.common 0.0.0' but it could not be found
 Cannot satisfy dependency:
  From: org.wso2.carbon.policy.information.point 0.9.2.SNAPSHOT
(org.wso2.carbon.policy.information.point 0.9.2.SNAPSHOT)
  To: package org.wso2.carbon.policy.mgt.common 0.0.0


-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] OAuth issues

2015-05-17 Thread Sumedha Rubasinghe
Is your client credentials constructed like following?

Base64encode (consumer Key:consumer secret)?


On Mon, May 18, 2015 at 9:49 AM, Harshan Liyanage hars...@wso2.com wrote:

 Hi Sumedha,

 We tried it also. But it didn't work and giving the same issue.

 Thanks,

 Lakshitha Harshan
 Software Engineer
 Mobile: *+94724423048*
 Email: hars...@wso2.com
 Blog : http://harshanliyanage.blogspot.com/
 *WSO2, Inc. :** wso2.com http://wso2.com/*
 lean.enterprise.middleware.

 On Mon, May 18, 2015 at 9:47 AM, Sumedha Rubasinghe sume...@wso2.com
 wrote:

 Try sending without scope=openid.

 On Sat, May 16, 2015 at 6:22 AM, Prabath Abeysekera praba...@wso2.com
 wrote:

 IS Team,

 Please review the issues reported below and see if you could help us
 resolving them. Appreciate if we can get some feedback on this some time
 soon.

 Cheers,
 Prabath

 On Fri, May 15, 2015 at 8:57 PM, Harshan Liyanage hars...@wso2.com
 wrote:

 Hi Guys,

 *Issue 1*

 When calling the token endpoints to generate oauth tokens using curl,
 i'm getting a unsupported_client_authentication_method exception. Please
 find the request  response below.

 Request
 curl -v -X POST -H Authorization: Basic
 WkNZM1FDTmpLOXVqdEtYb016U2psdFBkVkZnYTpSUXZJMG8xejhOd2RZUzlJMnkzNXB3cHRNcDRh
 -k -d grant_type=passwordusername=adminpassword=adminscope=openid -H
 Content-Type:application/x-www-form-urlencoded
 https://localhost:9443/oauth2/token

 Response
 {error:unsupported_client_authentication_method,error_description:Unsupported
 Client Authentication Method!}

 OAuth Debug logs
 [2015-05-15 20:32:30,103] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 Received a request : /oauth2/token
 [2015-05-15 20:32:30,103] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 --logging request headers.--
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 user-agent : curl/7.37.1
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -  host
 : localhost:9763
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 accept : */*
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 authorization : Basic
 WkNZM1FDTmpLOXVqdEtYb016U2psdFBkVkZnYTpSUXZJMG8xejhOd2RZUzlJMnkzNXB3cHRNcDRh
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 content-type : application/x-www-form-urlencoded
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 content-length : 62
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 --logging request parameters.--
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 grant_type - password
 [2015-05-15 20:32:30,106] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 client_id - null
 [2015-05-15 20:32:30,106] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -  code
 - null
 [2015-05-15 20:32:30,106] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 redirect_uri - null
 [2015-05-15 20:32:30,107] DEBUG
 {org.wso2.carbon.identity.oauth2.OAuth2Service} -  Access Token request
 received for Client ID ZCY3QCNjK9ujtKXoMzSjltPdVFga, User ID admin, Scope :
 [Ljava.lang.String;@1ff58e2a and Grant Type : password
 [2015-05-15 20:32:30,107] DEBUG
 {org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer} -  Confidential
 client cannot be authenticated for client id : ZCY3QCNjK9ujtKXoMzSjltPdVFga
 [2015-05-15 20:32:30,108] DEBUG
 {org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer} -
 OAuth-Error-Code=unsupported_client_authentication_method
 client-id=ZCY3QCNjK9ujtKXoMzSjltPdVFga grant-type=password scope=openid


 *Issue 2*

 There is an exception in the MDM console when try to renew the
 access-token using API Store. Exception occurred while trying to
 invoke service method renewAccessToken is displayed in API Store.

 [2015-05-15 20:49:33,884] ERROR
 {org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject} -  Exception
 occurred while trying to invoke service method renewAccessToken
 org.apache.axis2.AxisFault: Exception occurred while trying to invoke
 service method renewAccessToken
 at
 org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
 at
 org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
 at
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:445)
 at
 org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
 at
 org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
 at
 org.wso2

Re: [Dev] OAuth issues

2015-05-17 Thread Sumedha Rubasinghe
Try this:

curl --user ZCY3QCNjK9ujtKXoMzSjltPdVFga:RQvI0o1z8NwdYS9I2y35pwptMp4a -k -d
grant_type=passwordusername=adminpassword=adminscope=openid -H
Content-Type: application/x-www-form-urlencoded
https://localhost:9443/oauth2/token



On Mon, May 18, 2015 at 10:12 AM, Harshan Liyanage hars...@wso2.com wrote:

 Yes.

 Lakshitha Harshan
 Software Engineer
 Mobile: *+94724423048*
 Email: hars...@wso2.com
 Blog : http://harshanliyanage.blogspot.com/
 *WSO2, Inc. :** wso2.com http://wso2.com/*
 lean.enterprise.middleware.

 On Mon, May 18, 2015 at 10:11 AM, Sumedha Rubasinghe sume...@wso2.com
 wrote:

 Is your client credentials constructed like following?

 Base64encode (consumer Key:consumer secret)?


 On Mon, May 18, 2015 at 9:49 AM, Harshan Liyanage hars...@wso2.com
 wrote:

 Hi Sumedha,

 We tried it also. But it didn't work and giving the same issue.

 Thanks,

 Lakshitha Harshan
 Software Engineer
 Mobile: *+94724423048*
 Email: hars...@wso2.com
 Blog : http://harshanliyanage.blogspot.com/
 *WSO2, Inc. :** wso2.com http://wso2.com/*
 lean.enterprise.middleware.

 On Mon, May 18, 2015 at 9:47 AM, Sumedha Rubasinghe sume...@wso2.com
 wrote:

 Try sending without scope=openid.

 On Sat, May 16, 2015 at 6:22 AM, Prabath Abeysekera praba...@wso2.com
 wrote:

 IS Team,

 Please review the issues reported below and see if you could help us
 resolving them. Appreciate if we can get some feedback on this some time
 soon.

 Cheers,
 Prabath

 On Fri, May 15, 2015 at 8:57 PM, Harshan Liyanage hars...@wso2.com
 wrote:

 Hi Guys,

 *Issue 1*

 When calling the token endpoints to generate oauth tokens using curl,
 i'm getting a unsupported_client_authentication_method exception. 
 Please
 find the request  response below.

 Request
 curl -v -X POST -H Authorization: Basic
 WkNZM1FDTmpLOXVqdEtYb016U2psdFBkVkZnYTpSUXZJMG8xejhOd2RZUzlJMnkzNXB3cHRNcDRh
 -k -d grant_type=passwordusername=adminpassword=adminscope=openid -H
 Content-Type:application/x-www-form-urlencoded
 https://localhost:9443/oauth2/token

 Response
 {error:unsupported_client_authentication_method,error_description:Unsupported
 Client Authentication Method!}

 OAuth Debug logs
 [2015-05-15 20:32:30,103] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 Received a request : /oauth2/token
 [2015-05-15 20:32:30,103] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 --logging request headers.--
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 user-agent : curl/7.37.1
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -  
 host
 : localhost:9763
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 accept : */*
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 authorization : Basic
 WkNZM1FDTmpLOXVqdEtYb016U2psdFBkVkZnYTpSUXZJMG8xejhOd2RZUzlJMnkzNXB3cHRNcDRh
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 content-type : application/x-www-form-urlencoded
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 content-length : 62
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 --logging request parameters.--
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 grant_type - password
 [2015-05-15 20:32:30,106] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 client_id - null
 [2015-05-15 20:32:30,106] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -  
 code
 - null
 [2015-05-15 20:32:30,106] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 redirect_uri - null
 [2015-05-15 20:32:30,107] DEBUG
 {org.wso2.carbon.identity.oauth2.OAuth2Service} -  Access Token request
 received for Client ID ZCY3QCNjK9ujtKXoMzSjltPdVFga, User ID admin, 
 Scope :
 [Ljava.lang.String;@1ff58e2a and Grant Type : password
 [2015-05-15 20:32:30,107] DEBUG
 {org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer} -  Confidential
 client cannot be authenticated for client id : 
 ZCY3QCNjK9ujtKXoMzSjltPdVFga
 [2015-05-15 20:32:30,108] DEBUG
 {org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer} -
 OAuth-Error-Code=unsupported_client_authentication_method
 client-id=ZCY3QCNjK9ujtKXoMzSjltPdVFga grant-type=password scope=openid


 *Issue 2*

 There is an exception in the MDM console when try to renew the
 access-token using API Store. Exception occurred while trying to
 invoke service method renewAccessToken is displayed in API Store.

 [2015-05-15 20:49:33,884] ERROR
 {org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject} -  Exception
 occurred while trying to invoke service method

Re: [Dev] OAuth issues

2015-05-17 Thread Sumedha Rubasinghe
Try sending without scope=openid.

On Sat, May 16, 2015 at 6:22 AM, Prabath Abeysekera praba...@wso2.com
wrote:

 IS Team,

 Please review the issues reported below and see if you could help us
 resolving them. Appreciate if we can get some feedback on this some time
 soon.

 Cheers,
 Prabath

 On Fri, May 15, 2015 at 8:57 PM, Harshan Liyanage hars...@wso2.com
 wrote:

 Hi Guys,

 *Issue 1*

 When calling the token endpoints to generate oauth tokens using curl, i'm
 getting a unsupported_client_authentication_method exception. Please find
 the request  response below.

 Request
 curl -v -X POST -H Authorization: Basic
 WkNZM1FDTmpLOXVqdEtYb016U2psdFBkVkZnYTpSUXZJMG8xejhOd2RZUzlJMnkzNXB3cHRNcDRh
 -k -d grant_type=passwordusername=adminpassword=adminscope=openid -H
 Content-Type:application/x-www-form-urlencoded
 https://localhost:9443/oauth2/token

 Response
 {error:unsupported_client_authentication_method,error_description:Unsupported
 Client Authentication Method!}

 OAuth Debug logs
 [2015-05-15 20:32:30,103] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 Received a request : /oauth2/token
 [2015-05-15 20:32:30,103] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 --logging request headers.--
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 user-agent : curl/7.37.1
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -  host
 : localhost:9763
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 accept : */*
 [2015-05-15 20:32:30,104] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 authorization : Basic
 WkNZM1FDTmpLOXVqdEtYb016U2psdFBkVkZnYTpSUXZJMG8xejhOd2RZUzlJMnkzNXB3cHRNcDRh
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 content-type : application/x-www-form-urlencoded
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 content-length : 62
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 --logging request parameters.--
 [2015-05-15 20:32:30,105] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 grant_type - password
 [2015-05-15 20:32:30,106] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 client_id - null
 [2015-05-15 20:32:30,106] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -  code
 - null
 [2015-05-15 20:32:30,106] DEBUG
 {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -
 redirect_uri - null
 [2015-05-15 20:32:30,107] DEBUG
 {org.wso2.carbon.identity.oauth2.OAuth2Service} -  Access Token request
 received for Client ID ZCY3QCNjK9ujtKXoMzSjltPdVFga, User ID admin, Scope :
 [Ljava.lang.String;@1ff58e2a and Grant Type : password
 [2015-05-15 20:32:30,107] DEBUG
 {org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer} -  Confidential
 client cannot be authenticated for client id : ZCY3QCNjK9ujtKXoMzSjltPdVFga
 [2015-05-15 20:32:30,108] DEBUG
 {org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer} -
 OAuth-Error-Code=unsupported_client_authentication_method
 client-id=ZCY3QCNjK9ujtKXoMzSjltPdVFga grant-type=password scope=openid


 *Issue 2*

 There is an exception in the MDM console when try to renew the
 access-token using API Store. Exception occurred while trying to invoke
 service method renewAccessToken is displayed in API Store.

 [2015-05-15 20:49:33,884] ERROR
 {org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject} -  Exception
 occurred while trying to invoke service method renewAccessToken
 org.apache.axis2.AxisFault: Exception occurred while trying to invoke
 service method renewAccessToken
 at
 org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
 at
 org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
 at
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:445)
 at
 org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
 at
 org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
 at
 org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceStub.renewAccessToken(APIKeyMgtSubscriberServiceStub.java:1187)
 at
 org.wso2.carbon.apimgt.keymgt.client.SubscriberKeyMgtClient.regenerateApplicationAccessKey(SubscriberKeyMgtClient.java:83)
 at
 org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_refreshToken(APIStoreHostObject.java:3496)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
 

Re: [Dev] MQTT Inbound

2015-04-29 Thread Sumedha Rubasinghe
I cannot find source for
org.wso2.carbon.inbound.endpoint.protocol.mqtt.MQTTInjectHandler.

But you need to put a debug point in the bellow block. We seem to have
swallowed the exception here. :(

   catch (Exception e) {
log.error(Error while processing the MQTT Message);
 }

On Thu, Apr 30, 2015 at 9:05 AM, Elilmatha Sivanesan elilma...@wso2.com
wrote:

 I'm working on MQTT inbound, for that I followed the following steps


- build the product esb from source.
- build the carbon mediation (with MQTT inbound) and insert the jar to
esb zip patch folder
- changed the needed axis2.xml for MQTT transport in esb zip
- included the folllowing inbound sequence into synapse
configs/inbound-endpoints folder of esb

 ?xml version=1.0 encoding=UTF-8?

 inboundEndpoint xmlns=http://ws.apache.org/ns/synapse;

  name=test1

  sequence=df

  onError=ff

  protocol=mqtt

  suspend=false

parameters

   parameter name=sequentialtrue/parameter

   parameter name=interval10/parameter

 parameter
 name=mqtt.connection.factorymqttConFactory/parameter

 parameter name=mqtt.server.host.namelocalhost/parameter

   parameter name=mqtt.server.port1883/parameter

   parameter name=mqtt.topic.nameesb.test2/parameter

   parameter name=mqtt.subscription.qos0/parameter

 parameter name=mqtt.session.cleanfalse/parameter

   parameter name=mqtt.ssl.enablefalse/parameter

   parameter name=mqtt.subscription.usernameelil/parameter

 parameter name=mqtt.subscription.passworde123/parameter

   parameter name=mqtt.temporary.store.directorymy/parameter

   parameter name=mqtt.blocking.senderfalse/parameter


/parameters

 /inboundEndpoint



- installed mosquito message broker and published a message.
- start the esb server and got the follwing in the console

 [2015-04-30 08:38:59,705]  INFO - InboundEndpoint Initializing Inbound
 Endpoint: test1

 [2015-04-30 08:38:59,709]  INFO - MqttListener MQTT inbound endpoint:
 test1 initializing ...

 [2015-04-30 08:38:59,725]  INFO - MqttAsyncCallback Connecting to brocker
 with client ID elilmatha.1430363339712

 [2015-04-30 08:38:59,744]  INFO - MqttAsyncCallback Connected

 [2015-04-30 08:38:59,745]  INFO - MqttAsyncCallback Subscribing to topic
 esb.test2 qos 0

 [2015-04-30 08:38:59,746]  INFO - MqttAsyncCallback Subscribe Completed

 [2015-04-30 08:38:59,749]  INFO - ServerManager Server ready for
 processing...

 [2015-04-30 08:38:59,759] ERROR - MqttInjectHandler Error while processing
 the MQTT Message

 [2015-04-30 08:39:00,344]  INFO - PassThroughHttpSSLListener Starting
 Pass-through HTTPS Listener...

 [2015-04-30 08:39:00,357]  INFO - PassThroughListeningIOReactorManager
 Pass-through HTTPS Listener started on 0.0.0.0:8245

 [2015-04-30 08:39:00,357]  INFO - PassThroughHttpListener Starting
 Pass-through HTTP Listener...

 [2015-04-30 08:39:00,359]  INFO - PassThroughListeningIOReactorManager
 Pass-through HTTP Listener started on 0.0.0.0:8282

 [2015-04-30 08:39:00,364]  INFO - NioSelectorPool Using a shared selector
 for servlet write/read

 [2015-04-30 08:39:00,685]  INFO - NioSelectorPool Using a shared selector
 for servlet write/read

 [2015-04-30 08:39:00,747]  INFO - TaskServiceImpl Task service starting in
 STANDALONE mode...

 [2015-04-30 08:39:00,766]  INFO - NTaskTaskManager Initialized task
 manager. Tenant [-1234]

 [2015-04-30 08:39:00,773]  INFO - RegistryEventingServiceComponent
 Successfully Initialized Eventing on Registry

 [2015-04-30 08:39:00,810]  INFO - JMXServerManager JMX Service URL  :
 service:jmx:rmi://localhost:3/jndi/rmi://localhost:10001/jmxrmi

 [2015-04-30 08:39:00,811]  INFO - StartupFinalizerServiceComponent Server
   :  WSO2 Enterprise Service Bus-4.9.0

 [2015-04-30 08:39:00,812]  INFO - StartupFinalizerServiceComponent WSO2
 Carbon started in 19 sec

 [2015-04-30 08:39:01,027]  INFO - CarbonUIServiceComponent Mgt Console
 URL  : https://10.100.5.172:9445/carbon/

 [2015-04-30 08:39:21,813] ERROR - MqttInjectHandler Error while processing
 the MQTT Message

 What am I missing over here? Can any one suggest with the proper way to
 proceed on passing the message.
 --
 *S.Elilmatha*
 Associate  Software Engineer,

 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 Mobile 0779842221.


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




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] App-Manager 1.0 Release Testing Update

2015-04-07 Thread Sumedha Rubasinghe
Shakar,
All these are available on packs.

Problems
- we now have 8 L1s, 26 L2s
- QA was running low on resources, so only one engineer was available for
last 2+ weeks
- So QA wants to test more


On Tue, Apr 7, 2015 at 1:18 PM, Selvaratnam Uthaiyashankar shan...@wso2.com
 wrote:

 Hi Sumedha,

 Yes, thats all fine. I am asking when we will get the pack with all these
 features/ changes done. Meaning the proper alpha with features frozen. If
 we still don't know that date, it is also fine, but we can plan the QA
 based on that.

 On Tue, Apr 7, 2015 at 12:28 PM, Sumedha Rubasinghe sume...@wso2.com
 wrote:

 On Tue, Apr 7, 2015 at 11:13 AM, Selvaratnam Uthaiyashankar 
 shan...@wso2.com wrote:

 Hi Sumedha, Dinusha,

 When do we have the alpha release with feature frozen?


 Hi Shankar,
 We did alpha on 23rd Dec 2014. (http://builder1.us1.wso2.org/~appm/
 lists out all public packs we have hosted).

 Then Isabelle  Chris used this alpha pack to do a series of partner
 briefings.

 After these briefings we got feedback to improve following areas:
 1. App Publishing flow is too lengthy for a newbie
 2. App Policy Mgt should be separated out from App Publishing (thread:
 [APPM] [IS] Change of XACML based authorization)
 3. Make graphs more aesthetic
 4. Improve first timers experience better by adding a sample app deployer
 (thread: dev: App Manager sample deployer)

 We also discovered following:
 - We only support EMM 1.0. So need to add support for both EMM 1.0.0 
 MDM 2.0.0  (thread: [Architecture] [CDM] [AppM] Moving CDM (EMM) App
 Management feature to App Manager)

 - ES only supports permission check for login only. So we had to
 implement permission model on top of ES (thread : Life Cycles transition
 for Apps in APPM)

 Apart from this RuwanA finished his project on App Discovery (thread:
 [Architecture] [AppM][AppFactory][AS] AppM Discovery of WebApps from AS)


 So after the alpha on 23rd of December, above are the changes we
 introduced apart from fixing issues reported.




 On Tue, Apr 7, 2015 at 10:35 AM, Yasassri Ratnayake yasas...@wso2.com
 wrote:

 Hi All,

 This is to update the Latest progress on App Manager Release testing.
 Currently there are following blockers and critical issues. IMHO these need
 to be fixed before the release.

- Oracle DB script related issues.
- BAM toolbox issues/ Stats related issues
- Single Logout
- BPS integration issues. (Was Fixed with the latest pack (5th
April Pack), yet to verify the fix)
- Session Related issues. etc.

 Some of these issues are listed from [1] - [9]. In total(Open,
 Reopened, In Progress issues) there are 38 L1 and L2 isuues, 95 L3 issues
 and 15 L4  L5 issues.

 Along the way we faced several challenges when testing APP-M apart from
 the blocking issues we faced, following new features were added

- App Discovery
- New Stats pages
- Sample Deploying feature

 Some features also got changed

- EMM integration
- XACML policy UI etc.

 There were some configuration level changes in web-apps as well as in
 app-manager.xml/ user-mgt.xml which affected the Automation process. Lack
 of documentation was another issue we faced.

 Currently we are in the process of testing untested areas and bug fixed
 scenarios. Due to above mentioned issues IMHO I highly doubt whether we can
 do a proper round of testing before the planned release date.

 [1] - https://wso2.org/jira/browse/APPM-718
 [2] - https://wso2.org/jira/browse/APPM-715
 [3] - https://wso2.org/jira/browse/APPM-686
 [4] - https://wso2.org/jira/browse/APPM-651
 [5] - https://wso2.org/jira/browse/APPM-481
 [6] - https://wso2.org/jira/browse/APPM-324
 [7] - https://wso2.org/jira/browse/APPM-511
 [8] - https://wso2.org/jira/browse/APPM-544
 [9] - https://wso2.org/jira/browse/APPM-639

 With Regards,


 On Thu, Mar 19, 2015 at 2:18 PM, Dinusha Senanayaka dinu...@wso2.com
 wrote:

 Hi Yasassri,

 Please find the latest pack in [1]. We could find root cause for some
 of the intermittent issues that you have reported. But we included some
 debug logs to possible places, so that we can narrow down the issue if it
 appeared on latest pack too. Please enable jaggery debug logs before you
 start testing the pack.

 [1]. http://builder1.us1.wso2.org/~appm/19-03-2015/

 Regards,
 Dinusha.

 On Tue, Mar 17, 2015 at 6:39 PM, Yasassri Ratnayake yasas...@wso2.com
  wrote:

 Hi All,

 Meeting Notes

- AM team will try to fix all the issues related to instability
and share a new pack tomorrow.
- Testing on oracle will be done based on the time available
before the expected release date.
- Long running test has to be run by the QA team. (on a
standalone setup)
- All features and UI's are currently finalized and no major
changes will happen.

 With Regards,

 On Tue, Mar 17, 2015 at 6:14 PM, Yasassri Ratnayake 
 yasas...@wso2.com wrote:

 Hi Dinusha,

 Sorry for the ambiguity in the mail. Please see my comments in-line


 Hi All

Re: [Dev] App-Manager 1.0 Release Testing Update

2015-04-07 Thread Sumedha Rubasinghe
On Tue, Apr 7, 2015 at 11:13 AM, Selvaratnam Uthaiyashankar 
shan...@wso2.com wrote:

 Hi Sumedha, Dinusha,

 When do we have the alpha release with feature frozen?


Hi Shankar,
We did alpha on 23rd Dec 2014. (http://builder1.us1.wso2.org/~appm/ lists
out all public packs we have hosted).

Then Isabelle  Chris used this alpha pack to do a series of partner
briefings.

After these briefings we got feedback to improve following areas:
1. App Publishing flow is too lengthy for a newbie
2. App Policy Mgt should be separated out from App Publishing (thread:
[APPM] [IS] Change of XACML based authorization)
3. Make graphs more aesthetic
4. Improve first timers experience better by adding a sample app deployer
(thread: dev: App Manager sample deployer)

We also discovered following:
- We only support EMM 1.0. So need to add support for both EMM 1.0.0  MDM
2.0.0  (thread: [Architecture] [CDM] [AppM] Moving CDM (EMM) App
Management feature to App Manager)

- ES only supports permission check for login only. So we had to implement
permission model on top of ES (thread : Life Cycles transition for Apps in
APPM)

Apart from this RuwanA finished his project on App Discovery (thread:
[Architecture] [AppM][AppFactory][AS] AppM Discovery of WebApps from AS)


So after the alpha on 23rd of December, above are the changes we introduced
apart from fixing issues reported.




 On Tue, Apr 7, 2015 at 10:35 AM, Yasassri Ratnayake yasas...@wso2.com
 wrote:

 Hi All,

 This is to update the Latest progress on App Manager Release testing.
 Currently there are following blockers and critical issues. IMHO these need
 to be fixed before the release.

- Oracle DB script related issues.
- BAM toolbox issues/ Stats related issues
- Single Logout
- BPS integration issues. (Was Fixed with the latest pack (5th April
Pack), yet to verify the fix)
- Session Related issues. etc.

 Some of these issues are listed from [1] - [9]. In total(Open, Reopened,
 In Progress issues) there are 38 L1 and L2 isuues, 95 L3 issues and 15 L4 
 L5 issues.

 Along the way we faced several challenges when testing APP-M apart from
 the blocking issues we faced, following new features were added

- App Discovery
- New Stats pages
- Sample Deploying feature

 Some features also got changed

- EMM integration
- XACML policy UI etc.

 There were some configuration level changes in web-apps as well as in
 app-manager.xml/ user-mgt.xml which affected the Automation process. Lack
 of documentation was another issue we faced.

 Currently we are in the process of testing untested areas and bug fixed
 scenarios. Due to above mentioned issues IMHO I highly doubt whether we can
 do a proper round of testing before the planned release date.

 [1] - https://wso2.org/jira/browse/APPM-718
 [2] - https://wso2.org/jira/browse/APPM-715
 [3] - https://wso2.org/jira/browse/APPM-686
 [4] - https://wso2.org/jira/browse/APPM-651
 [5] - https://wso2.org/jira/browse/APPM-481
 [6] - https://wso2.org/jira/browse/APPM-324
 [7] - https://wso2.org/jira/browse/APPM-511
 [8] - https://wso2.org/jira/browse/APPM-544
 [9] - https://wso2.org/jira/browse/APPM-639

 With Regards,


 On Thu, Mar 19, 2015 at 2:18 PM, Dinusha Senanayaka dinu...@wso2.com
 wrote:

 Hi Yasassri,

 Please find the latest pack in [1]. We could find root cause for some of
 the intermittent issues that you have reported. But we included some debug
 logs to possible places, so that we can narrow down the issue if it
 appeared on latest pack too. Please enable jaggery debug logs before you
 start testing the pack.

 [1]. http://builder1.us1.wso2.org/~appm/19-03-2015/

 Regards,
 Dinusha.

 On Tue, Mar 17, 2015 at 6:39 PM, Yasassri Ratnayake yasas...@wso2.com
 wrote:

 Hi All,

 Meeting Notes

- AM team will try to fix all the issues related to instability and
share a new pack tomorrow.
- Testing on oracle will be done based on the time available before
the expected release date.
- Long running test has to be run by the QA team. (on a standalone
setup)
- All features and UI's are currently finalized and no major
changes will happen.

 With Regards,

 On Tue, Mar 17, 2015 at 6:14 PM, Yasassri Ratnayake yasas...@wso2.com
 wrote:

 Hi Dinusha,

 Sorry for the ambiguity in the mail. Please see my comments in-line


 Hi All,

 This is to update the current status of the App Manger release cycle.

 We had issues initially when testing due to following reasons

- There was no decided permission model embedded to AM.

 This is finalized and we are not going to change the model ! There
 is a mail thread for this even !


 This is an issue we had before March 6th pack, As mentioned the
 permission model is finalized ATM.


- UI got changed along the way

 There were some usability improvements done after reviewing with  UX
 team.


- Features were not finalized.

 What you mean by features are not finalized ?


 Along the way there were some new 

Re: [Dev] App Manager sample deployer

2015-04-05 Thread Sumedha Rubasinghe
Sachith,
Can you also send screenshots of following.
- Sample app deployer menu
- Deployed sample on publisher
- Deployed sample on store
- link to documentation
On Apr 5, 2015 10:21 AM, Sachith Herath sachi...@wso2.com wrote:

 Hi Dinusha,

 I sent you a pull request[A] with above changes.
   A. https://github.com/wso2/carbon-appmgt/pull/25

 But I didn't add the following changes,

1.  Since NetworkUtil class is defined in org.wso2.carbon.utils
package i didn't remove that method
2. That key store thing because it needs to be discussed.


 *Sachith Ushan*
 Software Engineering  intern
 WSO2 : http://wso2 http://goog_1352065705.com
 mobile :- +94 71 8853336
 sachi...@wso2.com

 On Fri, Apr 3, 2015 at 8:00 PM, Sachith Herath sachi...@wso2.com wrote:

 Hi Dinusha,

 OK.I will add those changes.

 Regards,

 *Sachith Ushan*
 Software Engineering  intern
 WSO2 : http://wso2 http://goog_1352065705.com
 mobile :- +94 71 8853336
 sachi...@wso2.com

 On Fri, Apr 3, 2015 at 1:17 PM, Dinusha Senanayaka dinu...@wso2.com
 wrote:

 Hi Sachith,

 Good work . I have merged your pull request [A] since pack need to be
 tested with this. Please do following changes to your next immediate pull
 request. Also schedule a code review for Monday.

 [A]. https://github.com/wso2/carbon-appmgt/pull/24

 1. Update licence headers in all files
 2. Add class level and method level comments and mentioned what each
 class/method is doing
 3. Exception hanldling in all classes
-Remove all e.printStackTrace()
-Introduce new exception class like AppMSampleDeployerException and
 log the original exception and throw this exception.
eg:  catch (IOException e) {
  e.printStackTrace();
 }

chnage it as,
catch (IOException e) {
  log.error(Error while building login html page, e);
  throw new AppMSampleDeployerException(Error while building
 login html page, e);
}

 4. ApplicationController.java -
- Read ip address from carbon server properties instead of
 NetworkUtils.getLocalHostname()
- Remove hardcoded 8280 port in accsesWebPages() method

 5. HttpHandler.java -
- Is this correct private final static String USER_AGENT =
 Mozilla/5.0;
- Also this won't run if the default keystores get changed. Need to
 discuss whether we need to handle this

   HttpsURLConnection.setDefaultHostnameVerifier(new
 HostnameVerifier() {
 public boolean verify(String hostname, SSLSession session) {
  if (hostname.equals(localhost))
  return true;
  return false;
  }
   });

 Regards,
 Dinusha.


 --
 Dinusha Dilrukshi
 Senior Software Engineer
 WSO2 Inc.: http://wso2.com/
 Mobile: +94725255071
 Blog: http://dinushasblog.blogspot.com/




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


Re: [Dev] Aspect Intermittently disappearing in tenant mode

2015-03-17 Thread Sumedha Rubasinghe
Chandana/Sagara,
Thanks for help extended so far. Appreciate if you guys can help further to
isolate the issue as this has been a blocker and killing significant time @
the last hour.

On Wed, Mar 18, 2015 at 9:05 AM, Ruwan Yatawara ruw...@wso2.com wrote:

 Hi Dinusha / All,

 Something to point out here is that in the scenario where everything
 functions as expected, the aspect map has all the tenant id related
 lifeycles as well. And everything gets resolved the moment you login to the
 carbon console as the tenant admin of the tenant for which this issue is
 coming.

 What i have been able to observe so far is that, when logging in to the
 carbon console as tenant admin, the only deviation to the flow.. and
 eventually what fixes the issue is calling of the following method.

 addDefaultLifecyclesIfNotAvailable() method in the
 governance.lcm.CommonUtil class.

 After calling this method the aspect map gets properly populated. We tried
 calling the method directly from jaggery, but the repeated calling of it
 relays errors, and didn't exactly fix the issue.


 Another very weird behavior we observed is that, the same class has a
 method called lifeCycleExists() this method checks if a particular
 lifecycle exists in a particular users registry. When calling this method,
 at the time of the error. It always returns true. Meaning the LC is
 available for that tenant.

 All things considered, i think we might have to do something related to
 the RegistryContext to get this issue resolved.


 Thanks and Regards,

 Ruwan Yatawara

 Senior Software Engineer,
 WSO2 Inc.

 email : ruw...@wso2.com
 mobile : +94 77 9110413
 blog : http://thoughts.ruwan-ace.com/
 www: :http://wso2.com


 On Tue, Mar 17, 2015 at 9:01 PM, Dinusha Senanayaka dinu...@wso2.com
 wrote:

 Hi ES team/ Registry team,

 This is a blocking issue for App Manager release. Appreciate some help on
 resolving this.

 Could able to notice following after debugging governance.api and
 registry.core code..

 ES publisher calls to the GovernanceArtifactImpl.getAllLifecycleActions()
 where it get calls to the getAspectActions() method. This get calls to the
 EmbeddedRegistry.getAspect(String name) which returns the aspects by taking
 the CurrentSession.getCallerTenantId(). Refer following return statement.

 return registryContext.getAspect(name,
 *CurrentSession.getCallerTenantId()*);

 But, once we expand the above 'registryContext' object, it contains the
 lifecycle aspects in super tenant space (see the attached screenshot taken
 while debugging). Hence with the callerTenantId  lifecycle aspects get
 return as null .

 If passing current tenantId to the getAspect is correct, then is there a
 way to register WebAppLifecycle aspects in tenant space as well ? Or could
 this be due to  'registryContext' object get initialed in wrong way ?

 Regards,
 Dinusha.

 On Thu, Mar 12, 2015 at 8:36 AM, Ruwan Yatawara ruw...@wso2.com wrote:

 Hi All,

 We are facing an issue [1],[2] in which the sometimes the Aspect (Life
 cycle for asset types) gets lost in the tenant mode. We have observed this
 happening intermittently, only in tenant mode though and a restart of the
 pack usually solves the problem. I heard from SameeraM that a similar issue
 was fixed in carbon 4.3, for the record we are still on carbon 4.2.
 Appreciate if somebody could point out a fix/approach to fix this.

 Error :

 ERROR - GovernanceArtifactImpl Error in associating lifecycle for the 
 artifact. id: a1954c0e-a67e-46b4-ae28-1b063d816a1f, path: 
 /appmgt/applicationdata/provider/admin-AT-test.com/AppT01/1.0/webapp.
 org.wso2.carbon.registry.core.exceptions.RegistryException: Couldn't find 
 aspectName 'WebAppLifeCycle'
 at 
 org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.associateAspect(EmbeddedRegistry.java:2428)
 at 
 org.wso2.carbon.registry.core.caching.CacheBackedRegistry.associateAspect(CacheBackedRegistry.java:416)
 at 
 org.wso2.carbon.registry.core.session.UserRegistry.associateAspectInternal(UserRegistry.java:1904)
 at 
 org.wso2.carbon.registry.core.session.UserRegistry.access$3800(UserRegistry.java:60)
 at 
 org.wso2.carbon.registry.core.session.UserRegistry$39.run(UserRegistry.java:1876)
 at 
 org.wso2.carbon.registry.core.session.UserRegistry$39.run(UserRegistry.java:1873)
 at java.security.AccessController.doPrivileged(Native Method)
 at 
 org.wso2.carbon.registry.core.session.UserRegistry.associateAspect(UserRegistry.java:1873)
 at 
 org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.attachLifecycle(GovernanceArtifactImpl.java:276)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
 

Re: [Dev] App-Manager 1.0 Release Testing Update

2015-03-17 Thread Sumedha Rubasinghe
Guys,
Can we have a quick meeting to sort out these?
It seems there is bit of ambiguity here.

On Tue, Mar 17, 2015 at 3:16 PM, Dinusha Senanayaka dinu...@wso2.com
wrote:

 HI Yasassri,

 Please see my comments in-line .

 On Tue, Mar 17, 2015 at 2:50 PM, Yasassri Ratnayake yasas...@wso2.com
 wrote:

 Hi All,

 This is to update the current status of the App Manger release cycle.

 We had issues initially when testing due to following reasons

- There was no decided permission model embedded to AM.

 This is finalized and we are not going to change the model ! There is a
 mail thread for this even !


- UI got changed along the way

 There were some usability improvements done after reviewing with  UX
 team.


- Features were not finalized.

 What you mean by features are not finalized ?


 We got the following critical fixes with the 06-03-2015 pack.

 = Finalized permission model
 = Fix for blockers under tenant scenarios.

 Got the following fixes with the 16-03-2015 pack.

 = Oracle Script fix
 = Fixed Mobile App scenarios for tenant

 *What has being done*

 1. Setting-up cluster setup. (Deployment is Automated)
 2. Jmeter scripts to mimic basic functionality of AM (Currently not
 working due to recent changes in AM)
 3. Covered webapp creation/ Mobile app creation flow.
 4. Smoke test with EMM integration.
 5. Tested clustered caching scenarios.
 6. Tested throttling.
 7. Smoke tests on windows.

 *Current Status*

 ATM the latest pack is unstable so we are not testing the pack in the
 clustered setup, hence we are doing our tests in a standalone setup. And
 still the workflow process is not finalized.

 AFAIK, there is a tenant specific issue relate to life-cycle loading. But,
 even with that we can continue super tenant scenarios in a cluster
 environment. Workflow process is not finalized ???

 Regards,
 Dinusha.


 *Issue Status*

 From 6th March, 68 issues reported and a total of 220 issues reported by
 the QA team up-to now and from that there are 102 open issues.

 *What needs to be covered*

 With  the new Changes we have to cover the following areas.

 1. Test with Oracle
 2. Run a long running test.
 3. Run Integration scenarios with BAM / EMM / IS (The cluster setup
 already has a IS cluster).
 4. Smoke tests on already tested features/areas after bug fixes and
 improvements.

 With Regards,
 --
 Yasassri Ratnayake
 Software Engineer - QA
 WSO2 Inc ; http://wso2.com
 lean.enterprise.middleware
 *Mobile : +94715933168 %2B94715933168*
 *Blog : http://yasassriratnayake.blogspot.com/
 http://yasassriratnayake.blogspot.com/*




 --
 Dinusha Dilrukshi
 Senior Software Engineer
 WSO2 Inc.: http://wso2.com/
 Mobile: +94725255071
 Blog: http://dinushasblog.blogspot.com/




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] License agreement of pinch.min

2015-02-09 Thread Sumedha Rubasinghe
We need to have license header in all files. So include MIT license as
mention in project page of [2].

Also raise an issue in [2] telling JS files are missing license headers.

On Mon, Feb 9, 2015 at 2:51 PM, Dulitha Wijewantha duli...@wso2.com wrote:

 Hi guys,
 Pinch.min.js library used in publisher [1] doesn't seem to have a license
 header. The original project seemed to be licensed under MIT [2]. The
 original file [3] doesn't seem to have a license header too. We need to use
 this library. What's the approach we should follow?

 [1] -
 https://github.com/wso2/carbon-store/blob/master/apps/publisher/modules/pinch.min.js
 [2] - https://github.com/Baggz/Pinch
 [3] - https://github.com/Baggz/Pinch/blob/master/dist/latest.min.js
 Cheers~

 --
 Dulitha Wijewantha (Chan)
 Software Engineer - Mobile Development
 WSO2 Inc
 Lean.Enterprise.Middleware
  * ~Email   duli...@wso2.com duli...@wso2mobile.com*
 *  ~Mobile +94712112165 %2B94712112165*
 *  ~Website   dulitha.me http://dulitha.me*
 *  ~Twitter @dulitharw https://twitter.com/dulitharw*
   *~Github @dulichan https://github.com/dulichan*
   *~SO @chan http://stackoverflow.com/users/813471/chan*




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Releasing es-appm branch

2015-02-09 Thread Sumedha Rubasinghe
+1.. Dinusha, let's also remove the unwanted modules as well.

On Mon, Feb 9, 2015 at 6:08 PM, Ruchira Wageesha ruch...@wso2.com wrote:

 +1

 /Ruchira

 On Mon, Feb 9, 2015 at 10:26 AM, Dinusha Senanayaka dinu...@wso2.com
 wrote:

 Hi,

 We are using customized branch of Enterprise Store that created for App
 Manager [1]. We need to build this repo before building App Manager
 distribution. I believe that we can release  RC1 of this repo now.

 @ES-team:
 - App Manager is using only components/features from this repo. So, I
 guess it's OK to delete distribution and other modules from this repo
 before release, since only App Manager is using it.
 - Following modules have 1.1.0 version of them. Hope no issue with the
 version number that going to be released ?

 Components:
 jaggery-scxml-executors-1.1.0
 org.wso2.carbon.social.core-1.1.0
 org.wso2.carbon.social.sql-1.1.0
 org.wso2.store.sso.common-1.1.0
 org.wso2.store.admin.styles-1.1.0

 Features:
 org.wso2.store.feature-1.1.0
 org.wso2.store.styles.feature-1.1.0
 sso-feature-1.1.0

 [1]. https://github.com/wso2/product-es/tree/es-1.0.1-apm-reg

 Regards,
 Dinusha.



 --
 Dinusha Dilrukshi
 Senior Software Engineer
 WSO2 Inc.: http://wso2.com/
 Mobile: +94725255071
 Blog: http://dinushasblog.blogspot.com/




 --

 *Ruchira Wageesha**Associate Technical Lead*
 *WSO2 Inc. - lean . enterprise . middleware |  wso2.com http://wso2.com*

 *email: ruch...@wso2.com ruch...@wso2.com,   blog:
 ruchirawageesha.blogspot.com http://ruchirawageesha.blogspot.com,
 mobile: +94 77 5493444 %2B94%2077%205493444*




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] app-manager repo is not following WSO2 repo naming standard

2015-01-11 Thread Sumedha Rubasinghe
Ack Sagara. Not sure how we missed it as this location was created at the
same time others were created. ATM we are using svn for 1.0.0 branch due to
some other dependencies.
On Jan 11, 2015 3:57 PM, Sagara Gunathunga sag...@wso2.com wrote:


 Can you please rename above repo as product-app-manager to be complaint
 with our naming standard

 Thanks !
 --
 Sagara Gunathunga

 Senior Technical Lead; WSO2, Inc.;  http://wso2.com
 V.P Apache Web Services;http://ws.apache.org/
 Linkedin; http://www.linkedin.com/in/ssagara
 Blog ;  http://ssagara.blogspot.com


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


Re: [Dev] API Protection through Certificates

2014-12-18 Thread Sumedha Rubasinghe
Its possible to do this by enabling mutual authentication between the
machine cron job is running and API gateway.
On Dec 19, 2014 2:59 AM, Dulitha Wijewantha duli...@wso2.com wrote:

 Hi guys,
 In our current APIM -we use oAuth as the main method of authorizing and
 authenticating APIs. Are we going to consider this with certificates too?
 For example - there is an API that a cron job is suppose to call. Unless
 the cron job has the particular certificate - the cron job cannot call the
 API. Is this currently possible?

 Cheers~

 --
 Dulitha Wijewantha (Chan)
 Software Engineer - Mobile Development
 WSO2 Inc
 Lean.Enterprise.Mobileware
  * ~Email   duli...@wso2.com duli...@wso2mobile.com*
 *  ~Mobile +94712112165 %2B94712112165*
 *  ~Website   dulitha.me http://dulitha.me*
 *  ~Twitter @dulitharw https://twitter.com/dulitharw*
   *~Github @dulichan https://github.com/dulichan*
   *~SO @chan http://stackoverflow.com/users/813471/chan*

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


Re: [Dev] App Manager latest build pack - 06-12-2014

2014-12-07 Thread Sumedha Rubasinghe
There are two JDBC related exceptions coming up for the very first time
when the server is accessed.

 Error 1 
https://localhost:9443/publisher/assets/webapp/

[2014-12-08 09:23:28,487] ERROR - SessionDataStore Error while storing
session data
org.h2.jdbc.JdbcSQLException: Invalid value 4 for parameter
parameterIndex [90008-140]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.getInvalidValueException(DbException.java:213)
at
org.h2.jdbc.JdbcPreparedStatement.setParameter(JdbcPreparedStatement.java:1251)



 Error 2 
Caused by: org.jaggeryjs.scriptengine.exceptions.ScriptException:
org.mozilla.javascript.WrappedException: Wrapped
org.h2.jdbc.JdbcSQLException: Table SOCIAL_CACHE not found; SQL statement:
SELECT ID FROM SOCIAL_CACHE WHERE TYPE='webapp' AND TENANT='carbon.super'
ORDER BY RATING DESC LIMIT 0,12 [42102-140]
(/store/extensions/assets/webapp/pages/assets.jag#70)
at
org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at
org.jaggeryjs.jaggery.core.manager.WebAppManager.executeScript(WebAppManager.java:279)



On Sat, Dec 6, 2014 at 2:03 PM, Dinusha Senanayaka dinu...@wso2.com wrote:

 Hi,

 Please find the $subject in [1].

 [1]. http://builder1.us1.wso2.org/~appm/06-12-2014/

 Regards,
 Dinusha.

 --
 Dinusha Dilrukshi
 Senior Software Engineer
 WSO2 Inc.: http://wso2.com/
 Mobile: +94725255071
 Blog: http://dinushasblog.blogspot.com/

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




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] iOS device enrolment

2014-12-04 Thread Sumedha Rubasinghe
Asok,
There is some existing code that does this. right?
On Dec 4, 2014 6:32 PM, Asok Perera as...@wso2.com wrote:

 Hi,

 We are in the process of designing iOS bundle plugin of CDM.
 As the first step, I need to write the device enrolment functionality at
 the CDM side.

 Can anyone give a brief on, how this case is handled for iOS specifically ?

 Regards

 *Asok Aravinda Perera*
 Software Engineer
 WSO2, Inc.;http://wso2.com/
 http://www.google.com/url?q=http%3A%2F%2Fwso2.com%2Fsa=Dsntz=1usg=AFQjCNGJuLRux6KkJwXKVUCYOtEsNCmIAQ
 lean.enterprise.middleware

 Mobile: +94722241032

 ___
 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] Invitation: Revisit APIManager and AppManager default statistics grap... @ Fri 28 Nov 2014 14:00 - 15:00 (Nuwan Dias)

2014-12-01 Thread Sumedha Rubasinghe
Minoli, Binali,
Can you guys schedule a review of current progress? No need to have
anything in complete stage. But would like to get a sense of direction 
time.

On Fri, Nov 28, 2014 at 4:02 PM, Dinusha Senanayaka dinu...@wso2.com
wrote:

 Notes on App Manager :

 - Separates graphs into separate pages
 - Allow to sort tables

 Graph1 : Overall Subscriptions
 
 Subscription pie chart: show max no of elements that can show in pie chat.
 then take remaining subscriptions as other.
 Legend width need to dynamic
 Each percentage should give detail drill down table, when click on it.

 Graph2: Apps Subscribed by User
 -
 Column1 (Web Apps) Column2 (user)
 Make app click-able. go to app details page.
 Apps list need to grow down

 Graph3: Usage by page
 --
 Should be renamed as Usage by App. Then once click on a particular bar
 relevant to app, it should redirect to Usage by page graph.

 Bar chart.
 y - axis (Total requests)
 x - axis (web app)

 x - axis name should be angled.
 y axis should be named inside bar.

 Graph4: Usage by User
 --
 Change to a scatter graph

 x - web app
 y - no of users
 Scatter on total requests.
 Once click on particular plot, it should give drill down view by user and
 number of access.

 Graph5: Response Time
 ---
 First graph shows whole web app average response time. (not per page
 response time)
 Once click on one app, redirect to a page response summarize view


 Store graphs
 ---
 Currently existing  graph for Apps Subscribed by User

 Regards,
 Dinusha.

 On Fri, Nov 28, 2014 at 3:30 PM, Nuwan Dias nuw...@wso2.com wrote:

 Notes on the API Manager TODOs for first iteration

 1. Make the Subscriptions Clickable and redirect to API overview Page.

 2. Highlight the Stats menu when it is clicked.

 3. On every page limit number of records to show.

 4. Drill down on Overall API Usage - drill down by date range. Change
 Labels as API / Hits

 5. Introduce New graph to compare APIs

 6. Response Times - Breakdown for Resource Wise Responses. Change 's' to
 'ms' (milliseconds). Limit graph to a limit and provide .

 7. Last Access Times - Show Time Zone. - Change to show most recent and
 least recently used APIs

 8. Usage by Resource Path - sort Hits - drill down to show access by
 time.

 9. Destination - Drill down Hits by time

 10. Usage by User - List by least and most hit. Drill down by Hits

 Thanks,
 NuwanD.

 On Thu, Nov 27, 2014 at 6:37 PM, Dinusha Senanayaka dinu...@wso2.com
 wrote:

 more details »
 https://www.google.com/calendar/event?action=VIEWeid=aWU1amYzYmtsbHEwb25uOTNpanF1ZWY4N28gbnV3YW5kQHdzbzIuY29ttok=MTYjZGludXNoYUB3c28yLmNvbWY3Yzk2OGE2NmQzMDI1MzMwZTkxNjM0NzdiNjc2ODM1MzliNjk1YWIctz=Asia/Colombohl=en_GB
 Revisit APIManager and AppManager default statistics graphs improvements
 *When*
 Fri 28 Nov 2014 14:00 – 15:00 Colombo
 *Where*
 LK 3rd Floor Meeting Room - Kernel (map
 https://maps.google.com.au/maps?q=LK+3rd+Floor+Meeting+Room+-+Kernelhl=en-GB
 )
 *Video call*
 https://plus.google.com/hangouts/_/wso2.com/dinusha
 https://plus.google.com/hangouts/_/wso2.com/dinusha?hceid=ZGludXNoYUB3c28yLmNvbQ.ie5jf3bkllq0onn93ijquef87o
 *Calendar*
 Nuwan Dias
 *Who*
 •
 Dinusha Senanayaka- organiser
 •
 Minoli Perera
 •
 Nuwan Dias
 •
 Sumedha Rubasinghe
 •
 Ruwan Yatawara
 •
 Binali Perera
 •
 dev@wso2.org

 Going?   *Yes
 https://www.google.com/calendar/event?action=RESPONDeid=aWU1amYzYmtsbHEwb25uOTNpanF1ZWY4N28gbnV3YW5kQHdzbzIuY29trst=1tok=MTYjZGludXNoYUB3c28yLmNvbWY3Yzk2OGE2NmQzMDI1MzMwZTkxNjM0NzdiNjc2ODM1MzliNjk1YWIctz=Asia/Colombohl=en_GB
 - Maybe
 https://www.google.com/calendar/event?action=RESPONDeid=aWU1amYzYmtsbHEwb25uOTNpanF1ZWY4N28gbnV3YW5kQHdzbzIuY29trst=3tok=MTYjZGludXNoYUB3c28yLmNvbWY3Yzk2OGE2NmQzMDI1MzMwZTkxNjM0NzdiNjc2ODM1MzliNjk1YWIctz=Asia/Colombohl=en_GB
 - No
 https://www.google.com/calendar/event?action=RESPONDeid=aWU1amYzYmtsbHEwb25uOTNpanF1ZWY4N28gbnV3YW5kQHdzbzIuY29trst=2tok=MTYjZGludXNoYUB3c28yLmNvbWY3Yzk2OGE2NmQzMDI1MzMwZTkxNjM0NzdiNjc2ODM1MzliNjk1YWIctz=Asia/Colombohl=en_GB*
 more options »
 https://www.google.com/calendar/event?action=VIEWeid=aWU1amYzYmtsbHEwb25uOTNpanF1ZWY4N28gbnV3YW5kQHdzbzIuY29ttok=MTYjZGludXNoYUB3c28yLmNvbWY3Yzk2OGE2NmQzMDI1MzMwZTkxNjM0NzdiNjc2ODM1MzliNjk1YWIctz=Asia/Colombohl=en_GB

 Invitation from Google Calendar https://www.google.com/calendar/

 You are receiving this email at the account nuw...@wso2.com because you
 are subscribed for invitations on calendar Nuwan Dias.

 To stop receiving these emails, please log in to
 https://www.google.com/calendar/ and change your notification settings
 for this calendar.




 --
 Nuwan Dias

 Associate Tech Lead - WSO2, Inc. http://wso2.com
 email : nuw...@wso2.com
 Phone : +94 777 775 729




 --
 Dinusha Dilrukshi
 Senior Software Engineer
 WSO2 Inc.: http://wso2.com

Re: [Dev] Invitation: Revisit APIManager and AppManager default statistics grap... @ Fri Nov 28, 2014 2pm - 3pm (Sumedha Rubasinghe)

2014-11-27 Thread Sumedha Rubasinghe
Guys,
Need to have pre-populated graphs to get the full picture. Please come with
loaded data.

On Thu, Nov 27, 2014 at 6:37 PM, Dinusha Senanayaka dinu...@wso2.com
wrote:

 more details »
 https://www.google.com/calendar/event?action=VIEWeid=aWU1amYzYmtsbHEwb25uOTNpanF1ZWY4N28gc3VtZWRoYUB3c28yLmNvbQtok=MTYjZGludXNoYUB3c28yLmNvbTFiNjczYTkyZjg4Y2FjYjdhMWVjMjQyMWUzYzE4N2M4Y2E0MTA1MzYctz=Asia/Colombohl=en
 Revisit APIManager and AppManager default statistics graphs improvements
 *When*
 Fri Nov 28, 2014 2pm – 3pm Colombo
 *Where*
 LK 3rd Floor Meeting Room - Kernel (map
 https://maps.google.lk/maps?q=LK+3rd+Floor+Meeting+Room+-+Kernelhl=en)
 *Video call*
 https://plus.google.com/hangouts/_/wso2.com/dinusha
 https://plus.google.com/hangouts/_/wso2.com/dinusha?hceid=ZGludXNoYUB3c28yLmNvbQ.ie5jf3bkllq0onn93ijquef87o
 *Calendar*
 Sumedha Rubasinghe
 *Who*
 •
 Dinusha Senanayaka - organizer
 •
 Ruwan Yatawara
 •
 dev@wso2.org
 •
 Minoli Perera
 •
 Binali Perera
 •
 Sumedha Rubasinghe
 •
 Nuwan Dias

 Going?   *Yes
 https://www.google.com/calendar/event?action=RESPONDeid=aWU1amYzYmtsbHEwb25uOTNpanF1ZWY4N28gc3VtZWRoYUB3c28yLmNvbQrst=1tok=MTYjZGludXNoYUB3c28yLmNvbTFiNjczYTkyZjg4Y2FjYjdhMWVjMjQyMWUzYzE4N2M4Y2E0MTA1MzYctz=Asia/Colombohl=en
 - Maybe
 https://www.google.com/calendar/event?action=RESPONDeid=aWU1amYzYmtsbHEwb25uOTNpanF1ZWY4N28gc3VtZWRoYUB3c28yLmNvbQrst=3tok=MTYjZGludXNoYUB3c28yLmNvbTFiNjczYTkyZjg4Y2FjYjdhMWVjMjQyMWUzYzE4N2M4Y2E0MTA1MzYctz=Asia/Colombohl=en
 - No
 https://www.google.com/calendar/event?action=RESPONDeid=aWU1amYzYmtsbHEwb25uOTNpanF1ZWY4N28gc3VtZWRoYUB3c28yLmNvbQrst=2tok=MTYjZGludXNoYUB3c28yLmNvbTFiNjczYTkyZjg4Y2FjYjdhMWVjMjQyMWUzYzE4N2M4Y2E0MTA1MzYctz=Asia/Colombohl=en*
 more options »
 https://www.google.com/calendar/event?action=VIEWeid=aWU1amYzYmtsbHEwb25uOTNpanF1ZWY4N28gc3VtZWRoYUB3c28yLmNvbQtok=MTYjZGludXNoYUB3c28yLmNvbTFiNjczYTkyZjg4Y2FjYjdhMWVjMjQyMWUzYzE4N2M4Y2E0MTA1MzYctz=Asia/Colombohl=en

 Invitation from Google Calendar https://www.google.com/calendar/

 You are receiving this email at the account sume...@wso2.com because you
 are subscribed for invitations on calendar Sumedha Rubasinghe.

 To stop receiving these emails, please log in to
 https://www.google.com/calendar/ and change your notification settings
 for this calendar.




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Allowing 'http' for revokeAPI from KM

2014-11-10 Thread Sumedha Rubasinghe
It will be like broadcasting your tokens to rest of the users.
If someone still wants to take the risk, we can tell them how to do it. But
not have as part of standard product configuration.


On Mon, Nov 10, 2014 at 3:34 PM, Vijayaratha Vijayasingam rat...@wso2.com
wrote:



 On 10 November 2014 15:33, Vijayaratha Vijayasingam rat...@wso2.com
 wrote:

 Hi all;

 We have default REST APIs  which are deployed in gateway, call 'https'
 oauth endpoints.
 When we regenerate application token, we call revoke API (REST API
 deployed at gateway) to clear cache entries.
 Currently, we restrict this API call only via 'https'.  But we should
 allow user to access this api  via 'http'  too? If internal network is
 secured, users prefer to use 'http' to call gateway APIs?

 Thanks.
 --
 -Ratha




 --
 -Ratha




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Wat is the way to handle DB deadlock issues

2014-11-10 Thread Sumedha Rubasinghe
How frequent is this? does this come with a load or even on single
execution?
SQL in concern here is following?

DELETE FROM UM_ROLE_PERMISSION WHERE UM_ROLE_NAME=? AND UM_PERMISSION_ID =
(SELECT UM_ID FROM UM_PERMISSION WHERE UM_RESOURCE_ID = ? AND UM_ACTION = ?
AND UM_TENANT_ID=?) AND UM_TENANT_ID=? AND UM_DOMAIN_ID=(SELECT
UM_DOMAIN_ID FROM UM_DOMAIN WHERE UM_TENANT_ID=? AND UM_DOMAIN_NAME=?)



On Mon, Nov 10, 2014 at 2:55 PM, Amila Maha Arachchi ami...@wso2.com
wrote:

 Hi all,

 I have seen deadlock issues occurring during database transactions within
 our code. [1] is such a situation.

 What is the best way to handle such cases?

 Should we retry from the code where we invoked the authorisation manager
 in this case (i.e. AF code) or should the authorisation manager do the
 retry or the DatabaseUtil class should handle this?

 [1] https://wso2.org/jira/browse/CLOUD-310

 TID: [0] [SCC] [2014-10-27 06:56:21,093] ERROR
 {org.wso2.carbon.user.core.util.DatabaseUtil} - Error! Deadlock found when
 trying to get lock; try restarting transaction
 {org.wso2.carbon.user.core.util.DatabaseUtil}

 com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException:
 Deadlock found when trying to get lock; try restarting transaction
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at com.mysql.jdbc.Util.getInstance(Util.java:386)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1066)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4190)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4122)
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
 at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2818)
 at
 com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2157)
 at
 com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2460)
 at
 com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2377)
 at
 com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2361)
 at
 org.wso2.carbon.user.core.util.DatabaseUtil.updateDatabase(DatabaseUtil.java:542)
 at
 org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager.addAuthorizationForRole(JDBCAuthorizationManager.java:718)
 at
 org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager.authorizeRole(JDBCAuthorizationManager.java:358)
 at
 org.wso2.carbon.appfactory.stratos.services.AppFactoryResourceManagementService.authorizeAppIdRole(AppFactoryResourceManagementService.java:351)
 at
 org.wso2.carbon.appfactory.stratos.services.AppFactoryResourceManagementService.getRegistry(AppFactoryResourceManagementService.java:246)
 at
 org.wso2.carbon.appfactory.stratos.services.AppFactoryResourceManagementService.addOrUpdateResource(AppFactoryResourceManagementService.java:159)
 at
 org.wso2.carbon.appfactory.stratos.services.AppFactoryResourceManagementService.addOrUpdateResources(AppFactoryResourceManagementService.java:142)



 --
 *Amila Maharachchi*
 Senior Technical Lead
 WSO2, Inc.; http://wso2.com

 Blog: http://maharachchi.blogspot.com
 Mobile: +94719371446




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Authorization Server Decoupling - Changes on Gateway

2014-09-25 Thread Sumedha Rubasinghe
No. The one exposed by API Gateway.

On Thu, Sep 25, 2014 at 1:59 AM, Amila De Silva ami...@wso2.com wrote:



 On Wed, Sep 24, 2014 at 10:48 PM, Sumedha Rubasinghe sume...@wso2.com
 wrote:



 On Wed, Sep 24, 2014 at 4:25 PM, Amila De Silva ami...@wso2.com wrote:

 Hi,

 Following are changes done up to now on the Gateway, as a part of
 decoupling AS from API Manager.

 1. Using OAuth2TokenValidationService to validate Access Tokens

 a. APIMgtTokenValidator is the default implementation provided for
 OAuth2TokenValidator, which only overrides the validateScope and
 validateAccessToken methods. All the sub steps related to token validation
 will have to be performed in validateAccessToken method.

 b. To make a clear distinction between the different steps involved in
 token validation, a second Handler  - KeyValidationHandler has been
 introduced. This is an interface having methods
 validateToken(),validateSubscription,validateScopes(),
 generateConsumerToken(). This will be the interface developers have to
 extend when plugging an external Authorization Server. APIMgtTokenValidator
 will execute all the methods defined in KeyValidationHandler inside its
 validateAccessToken method.

 2.  Modifying OAuth2TokenValidationResponseDTO to pass an Array of Name
 Value pairs

 Gateway relies on several parameters like Application Name, Application
 Tier, API Tier to throttle API Calls and publish statistics.
 APIKeyValidationInfoDTO which is being used now, has separate fields to
 represent these parameters.When switching to  OAuth2TokenValidationService,
 we’ll have to use  OAuth2TokenValidationResponseDTO and then these
 parameters will be passed as an array of custom name value pairs.


 This would break backward compatibility, If there are clients who are
 using our token endpoint  to get tokens validated.

 You mean the clients calling OAuth2TokenValidationService service (the one
 exposed by IS)?


 3. Adding Util methods to convert APIKeyValidationInfoDTO

 For their internal operations Gateway and KeyManager uses
 APIKeyValidationInfoDTO objects.

 It is these types of objects being kept in KeyManager and Gateway
 caches, it is the same type being passed across different methods when
 validating keys and JWTs and this used to be the type returned when calling
 validateKey method in APIKeyValidationService. But when switching to
 OAuth2TokenValidationService, since the response it returns is a
 OAuth2TokenValidationResponseDTO ,several util methods were added to
 convert APIKeyValidationInfoDTO to OAuth2TokenValidationResponseDTO and
 vice versa.

 Will provide some sequence diagrams illustrating the flow for a key
 validation call.
 --
 *Amila De Silva*

 WSO2 Inc.
 mobile :(+94) 775119302




 --
 /sumedha
 m: +94 773017743
 b :  bit.ly/sumedha




 --
 *Amila De Silva*

 WSO2 Inc.
 mobile :(+94) 775119302




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Authorization Server Decoupling - Changes on Gateway

2014-09-24 Thread Sumedha Rubasinghe
On Wed, Sep 24, 2014 at 4:25 PM, Amila De Silva ami...@wso2.com wrote:

 Hi,

 Following are changes done up to now on the Gateway, as a part of
 decoupling AS from API Manager.

 1. Using OAuth2TokenValidationService to validate Access Tokens

 a. APIMgtTokenValidator is the default implementation provided for
 OAuth2TokenValidator, which only overrides the validateScope and
 validateAccessToken methods. All the sub steps related to token validation
 will have to be performed in validateAccessToken method.

 b. To make a clear distinction between the different steps involved in
 token validation, a second Handler  - KeyValidationHandler has been
 introduced. This is an interface having methods
 validateToken(),validateSubscription,validateScopes(),
 generateConsumerToken(). This will be the interface developers have to
 extend when plugging an external Authorization Server. APIMgtTokenValidator
 will execute all the methods defined in KeyValidationHandler inside its
 validateAccessToken method.

 2.  Modifying OAuth2TokenValidationResponseDTO to pass an Array of Name
 Value pairs

 Gateway relies on several parameters like Application Name, Application
 Tier, API Tier to throttle API Calls and publish statistics.
 APIKeyValidationInfoDTO which is being used now, has separate fields to
 represent these parameters.When switching to  OAuth2TokenValidationService,
 we’ll have to use  OAuth2TokenValidationResponseDTO and then these
 parameters will be passed as an array of custom name value pairs.


This would break backward compatibility, If there are clients who are using
our token endpoint  to get tokens validated.

3. Adding Util methods to convert APIKeyValidationInfoDTO

 For their internal operations Gateway and KeyManager uses
 APIKeyValidationInfoDTO objects.

 It is these types of objects being kept in KeyManager and Gateway caches,
 it is the same type being passed across different methods when validating
 keys and JWTs and this used to be the type returned when calling
 validateKey method in APIKeyValidationService. But when switching to
 OAuth2TokenValidationService, since the response it returns is a
 OAuth2TokenValidationResponseDTO ,several util methods were added to
 convert APIKeyValidationInfoDTO to OAuth2TokenValidationResponseDTO and
 vice versa.

 Will provide some sequence diagrams illustrating the flow for a key
 validation call.
 --
 *Amila De Silva*

 WSO2 Inc.
 mobile :(+94) 775119302




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Creating puppet scripts for API-M distributed setup

2014-09-23 Thread Sumedha Rubasinghe
Pavithra,
Is this a continuation of what was done beginning of this year? We had
completed set of puppet scripts (which did not get used due to hardware not
being available)

Talk to Thilina.

On Tue, Sep 23, 2014 at 3:50 AM, Pavithra Madurangi pavit...@wso2.com
wrote:

 Hi Yasassri,

 Please find updated config files at the same location [1]. Appreciate if
 you can update the puppet scripts accordingly.

 [1]
 https://svn.wso2.org/repos/wso2/trunk/commons/qa/qa-artifacts/apimanager/1.8.0/am-cluster/

 Regards,
 Pavithra

 On Wed, Sep 17, 2014 at 1:29 PM, Yasassri Ratnayake yasas...@wso2.com
 wrote:

 Hi,

 Please find the Puppet Scripts from location-[1]. Scripts need some fine
 tuning with the configurations.

 In-order to run the scripts. Clone the repo and do the necessary
 parameter changes in the params class and execute the scripts.


 [1]  - https://github.com/ycrnet/Puppet-Scripts

 --
 Yasassri Ratnayake
 Software Engineer - QA
 WSO2 Inc ; http://wso2.com
 lean.enterprise.middleware
 *Mobile : +94715933168 %2B94715933168*
 *Blog : http://yasassriratnayake.blogspot.com/
 http://yasassriratnayake.blogspot.com/*

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




 --
 *Pavithra Madurangi*
 Associate Technical Lead - QA.
 WSO2 Inc.: http://wso2.com/
 Mobile: +94777207357 / +94773814110

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




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Registry GET call happens within a transaction

2014-08-19 Thread Sumedha Rubasinghe
There are transactional isolations (read committed, repeatable read,etc).. (
http://docs.oracle.com/cd/E19226-01/820-7695/beamv/index.html) . We use
read committed.

If you read without a transaction block, you will get to see all committed
data in the database. Which is the correct representation.

If you read within a transaction, you will also see uncommitted data
**within that transaction**.

But in our case, in most of the places where we read data, we should only
be seeing committed data. Thus no need to READ/SELECT with in a
transactional block.


On Tue, Aug 19, 2014 at 4:06 AM, Senaka Fernando sen...@wso2.com wrote:

 Hi Sumedha,

 Alright but this SELECT is across different tables, and I also happened to
 find this, [1]. So, unless you are in a transaction, if somebody updates
 while you read, you can end up having messed up data right?

 [1]
 http://stackoverflow.com/questions/1976686/is-there-a-difference-between-a-select-statement-inside-a-transaction-and-one-th

 Thanks,
 Senaka.


 On Mon, Aug 18, 2014 at 11:29 PM, Sumedha Rubasinghe sume...@wso2.com
 wrote:

 Senaka,
 I don't think doing a SELECT inside transaction here is required. We just
 read the committed data @ the time of reading. That's it.

 We never SELECT records for UPDATES (which is one occurrence where doing
 a SELECT inside transaction is useful). Another common usecase if to read
 uncommitted data.

 But we use neither of these scenarios. So I believe there is not need to
 read within transaction blocks.




  On Tue, Aug 19, 2014 at 3:49 AM, Senaka Fernando sen...@wso2.com
 wrote:

 Hi Subash,

 Ah! forgot to discuss this today when we chatted.

 Subash the get() itself is a call spanning across multiple tables and
 for the sake of a DB-neutral implementation we have kept the queries basic.
 So this means we handle some joins etc at application-level. This is why it
 has to be transactional.

 But, I was under the impression that the cache solves this issue
 altogether with the get() doing nothing @ Embedded Registry level. Isn't
 this the case or are you talking about first call slow-down?

 Thanks,
 Senaka.


 On Mon, Aug 18, 2014 at 6:36 AM, Subash Chaturanga sub...@wso2.com
 wrote:

 Hi Senaka et al,
 Is there any particular reason for doing $subject ? Because
 transactional db connection is always heavy and many applications doing the
 GET quite frequently. IMO we should not be doing a read in a transactional
 manner. Pls correct me if I am missing something.

 I am referring EmbeddedRegitry#get.

 --
 Thanks
 /subash

 *Subash Chaturanga*
 Senior Software Engineer  Lead WSO2 Governance Registry
 Platform TG; WSO2 Inc. http://wso2.com
 Contact:
 email: sub...@wso2.com
 blog:  http://subashsdm.blogspot.com/
 twitter: @subash89
 phone: +9477 2225922
 Lean . Enterprise . Middleware




 --


 *[image: http://wso2.com] http://wso2.com Senaka Fernando*
 Software Architect; WSO2 Inc.; http://wso2.com



 * Member; Apache Software Foundation; http://apache.org
 http://apache.orgE-mail: senaka AT wso2.com http://wso2.com**P: +1
 408 754 7388 %2B1%20408%20754%207388; ext: 51736*;


 *M: +44 782 741 1966 %2B44%20782%20741%201966 Linked-In:
 http://linkedin.com/in/senakafernando
 http://linkedin.com/in/senakafernando*
 Lean . Enterprise . Middleware




 --
 /sumedha
 m: +94 773017743
 b :  bit.ly/sumedha




 --


 *[image: http://wso2.com] http://wso2.com Senaka Fernando*
 Software Architect; WSO2 Inc.; http://wso2.com



 * Member; Apache Software Foundation; http://apache.org
 http://apache.orgE-mail: senaka AT wso2.com http://wso2.com**P: +1
 408 754 7388 %2B1%20408%20754%207388; ext: 51736*;


 *M: +44 782 741 1966 %2B44%20782%20741%201966 Linked-In:
 http://linkedin.com/in/senakafernando
 http://linkedin.com/in/senakafernando*Lean . Enterprise . Middleware




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Registry GET call happens within a transaction

2014-08-18 Thread Sumedha Rubasinghe
Senaka,
I don't think doing a SELECT inside transaction here is required. We just
read the committed data @ the time of reading. That's it.

We never SELECT records for UPDATES (which is one occurrence where doing a
SELECT inside transaction is useful). Another common usecase if to read
uncommitted data.

But we use neither of these scenarios. So I believe there is not need to
read within transaction blocks.




On Tue, Aug 19, 2014 at 3:49 AM, Senaka Fernando sen...@wso2.com wrote:

 Hi Subash,

 Ah! forgot to discuss this today when we chatted.

 Subash the get() itself is a call spanning across multiple tables and for
 the sake of a DB-neutral implementation we have kept the queries basic. So
 this means we handle some joins etc at application-level. This is why it
 has to be transactional.

 But, I was under the impression that the cache solves this issue
 altogether with the get() doing nothing @ Embedded Registry level. Isn't
 this the case or are you talking about first call slow-down?

 Thanks,
 Senaka.


 On Mon, Aug 18, 2014 at 6:36 AM, Subash Chaturanga sub...@wso2.com
 wrote:

 Hi Senaka et al,
 Is there any particular reason for doing $subject ? Because transactional
 db connection is always heavy and many applications doing the GET quite
 frequently. IMO we should not be doing a read in a transactional manner.
 Pls correct me if I am missing something.

 I am referring EmbeddedRegitry#get.

 --
 Thanks
 /subash

 *Subash Chaturanga*
 Senior Software Engineer  Lead WSO2 Governance Registry
 Platform TG; WSO2 Inc. http://wso2.com
 Contact:
 email: sub...@wso2.com
 blog:  http://subashsdm.blogspot.com/
 twitter: @subash89
 phone: +9477 2225922
 Lean . Enterprise . Middleware




 --


 *[image: http://wso2.com] http://wso2.com Senaka Fernando*
 Software Architect; WSO2 Inc.; http://wso2.com



 * Member; Apache Software Foundation; http://apache.org
 http://apache.orgE-mail: senaka AT wso2.com http://wso2.com**P: +1
 408 754 7388 %2B1%20408%20754%207388; ext: 51736*;


 *M: +44 782 741 1966 %2B44%20782%20741%201966 Linked-In:
 http://linkedin.com/in/senakafernando
 http://linkedin.com/in/senakafernando*
 Lean . Enterprise . Middleware




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [API-M 1.7.1] - The publisher URL/API Console does not work out of the box if you set a port offset

2014-07-24 Thread Sumedha Rubasinghe
On Thu, Jul 24, 2014 at 2:51 AM, Evanthika Amarasiri evanth...@wso2.com
wrote:

 Hi All,

 With API-M 1.7.1, we noticed that if we set a port offset, we need to
 change the site.json files of the publisher jaggery app. If you don't
 change these files, when you access the publisher URL, you are redirected
 back to https://{default_host}:{default_port}/publisher page. i.e.:-
 https://localhost:9443/publisher.


This must be some new change. Anyway this should not be the case @ all...


 So every time you set a port offset to your server, a user will have to
 change the site.json file manually to access publisher URL.

 My concern is, why are we introducing additional configuration changes
 like these? If we introduce changes, we need to make sure that they work
 out of the box, without a person having to change any files manually.

 Also, if you set a port offset, API console (Swagger) does not work out of
 the box. You need to change the port you give in
 *Access-Control-Allow-Origin* parameter.

 Regards,
 Evanthika Amarasiri
 Senior Technical Lead - Quality Assurance
 Mobile: +94773125935

 wso2.com Lean Enterprise Middleware




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [API-M 1.7.1] - The publisher URL/API Console does not work out of the box if you set a port offset

2014-07-24 Thread Sumedha Rubasinghe
But how did this got broken?
Is this due to an update from Jaggery? This is a fundamental flaw  we are
trying to do a patch release.

Madhuka - welcome back ;-) ...


On Thu, Jul 24, 2014 at 4:33 AM, madhuka udantha madhukaudan...@gmail.com
wrote:

 Hi,

 You can used 'loadConfig()' to load carbon config file and read 'offset'
 value.
 This can be helpful for the $subject

 var conf = carbon.server.loadConfig(config file)



 On Thu, Jul 24, 2014 at 3:21 PM, Evanthika Amarasiri evanth...@wso2.com
 wrote:

 Hi All,

 With API-M 1.7.1, we noticed that if we set a port offset, we need to
 change the site.json files of the publisher jaggery app. If you don't
 change these files, when you access the publisher URL, you are redirected
 back to https://{default_host}:{default_port}/publisher page. i.e.:-
 https://localhost:9443/publisher.

 So every time you set a port offset to your server, a user will have to
 change the site.json file manually to access publisher URL.

 My concern is, why are we introducing additional configuration changes
 like these? If we introduce changes, we need to make sure that they work
 out of the box, without a person having to change any files manually.

 Also, if you set a port offset, API console (Swagger) does not work out
 of the box. You need to change the port you give in
 *Access-Control-Allow-Origin* parameter.

 Regards,
 Evanthika Amarasiri
 Senior Technical Lead - Quality Assurance
 Mobile: +94773125935

 wso2.com Lean Enterprise Middleware

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




 --
 Cheers,
 Madhuka Udantha
 http://madhukaudantha.blogspot.com




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Invitation: Code Review - APPMGR Publish Application Executors @ Tue Jul 15, 2014 3:30am - 4am (Sumedha Rubasinghe)

2014-07-15 Thread Sumedha Rubasinghe
Did this happen? Notes?


On Sun, Jul 13, 2014 at 7:00 PM, Ruwan Yatawara ruw...@wso2.com wrote:

  more details »
 https://www.google.com/calendar/event?action=VIEWeid=am5oNjJqY3JlMmJ2cjk1Z2wxNmhnamdjMGcgc3VtZWRoYUB3c28yLmNvbQtok=MTUjcnV3YW55QHdzbzIuY29tY2Q4YjRjZjM3YjUwNzIwMmI4NzEyMzBiYzQ3OTljY2Q0ZDViZjQyMgctz=America/Chicagohl=en
 Code Review - APPMGR Publish Application Executors
 Code Review of the registry life cycle executors for publishing Web
 Applications in App Manager.
 *When*
 Tue Jul 15, 2014 3:30am – 4am Central Time
 *Video call*
 https://plus.google.com/hangouts/_/wso2.com/code-review
 https://plus.google.com/hangouts/_/wso2.com/code-review?hceid=cnV3YW55QHdzbzIuY29t.jnh62jcre2bvr95gl16hgjgc0g
 *Calendar*
 Sumedha Rubasinghe
 *Who*
 •
 Ruwan Yatawara - organizer
 •
 Thilini Shanika
 •
 Kasun Dissanayake
 •
 Dinusha Senanayaka
 •
 Roshan Wijesena
 •
 Rajeeva Uthayasangar
 •
 Jenananthan Yogendran
 •
 Sumedha Rubasinghe
 •
 Rushmin Fernando
 •
 Nuwan Dias
 •
 dev@wso2.org
 •
 Chamila Adhikarinayake

 Going?   *Yes
 https://www.google.com/calendar/event?action=RESPONDeid=am5oNjJqY3JlMmJ2cjk1Z2wxNmhnamdjMGcgc3VtZWRoYUB3c28yLmNvbQrst=1tok=MTUjcnV3YW55QHdzbzIuY29tY2Q4YjRjZjM3YjUwNzIwMmI4NzEyMzBiYzQ3OTljY2Q0ZDViZjQyMgctz=America/Chicagohl=en
 - Maybe
 https://www.google.com/calendar/event?action=RESPONDeid=am5oNjJqY3JlMmJ2cjk1Z2wxNmhnamdjMGcgc3VtZWRoYUB3c28yLmNvbQrst=3tok=MTUjcnV3YW55QHdzbzIuY29tY2Q4YjRjZjM3YjUwNzIwMmI4NzEyMzBiYzQ3OTljY2Q0ZDViZjQyMgctz=America/Chicagohl=en
 - No
 https://www.google.com/calendar/event?action=RESPONDeid=am5oNjJqY3JlMmJ2cjk1Z2wxNmhnamdjMGcgc3VtZWRoYUB3c28yLmNvbQrst=2tok=MTUjcnV3YW55QHdzbzIuY29tY2Q4YjRjZjM3YjUwNzIwMmI4NzEyMzBiYzQ3OTljY2Q0ZDViZjQyMgctz=America/Chicagohl=en*
 more options »
 https://www.google.com/calendar/event?action=VIEWeid=am5oNjJqY3JlMmJ2cjk1Z2wxNmhnamdjMGcgc3VtZWRoYUB3c28yLmNvbQtok=MTUjcnV3YW55QHdzbzIuY29tY2Q4YjRjZjM3YjUwNzIwMmI4NzEyMzBiYzQ3OTljY2Q0ZDViZjQyMgctz=America/Chicagohl=en

 Invitation from Google Calendar https://www.google.com/calendar/

 You are receiving this email at the account sume...@wso2.com because you
 are subscribed for invitations on calendar Sumedha Rubasinghe.

 To stop receiving these notifications, please log in to
 https://www.google.com/calendar/ and change your notification settings
 for this calendar.




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Integration tests for App-Manager

2014-07-06 Thread Sumedha Rubasinghe
On Jul 5, 2014 8:15 PM, Chamila Adhikarinayake chami...@wso2.com wrote:

 Hi,

 This is regarding the ratings for an application. Can you help me with
these things.
 1. You have mentioned about publishing app with tags (in 2). I could not
find any place in publisher side to rate an application (I might have
missed it. please can you tell how it is done).

Rating is done at the store.
 2. Can I rate an application by log in to the store (I tried by login to
the store and rate an application but it does not work). Is there any
setting that needs to be set while creating the app to enable the ratings?

 3 There seems to be a problem when creating a tag. I can only add tags by
editing the application (not during the creating time. the tags added at
that time are ignored). Is this the way appmanager handles this featuer or
is it a bug?

This seems to be a bug. Please talk to Rushmin on both tags and ratings
behaviour.

 Thanks,
 Chamila



 On Thu, Jul 3, 2014 at 9:42 AM, Dinusha Senanayaka dinu...@wso2.com
wrote:

 Hi Thilini/Chamila/Roshan/Jenananthan,

 0. One of you need to create the integration module for AppM.
 (Take a copy from the API Manager and delete the all unnecessary
classes and resources. Keep only the server startup test).

 Following are the 4 use cases that we could start writing integration
tests. Each of you can pick one of them. (Reply to this, who is going to do
which one).

 1. Create/Publish an application
 2. Tags/ratings (Publish application with tags and ratings and validate
those comes to the store correctly)
 3. Subscribe /unsubscribe
 4. Private APIs (Publish application with private visibility and
validate the both scenarios. i.e. try to subscribe to non visible app. And
try to subscribe from authorized user)


 Those test cases will be co-related. Publish application test case will
be need for all other tests. Subscribe test case can be used for 4th.

 We ll try to get those done and familiar with the test framework. There
should be test cases written in API Manager to test the same
functionalities. You could refer them.

 Regards,
 Dinusha.



 --
 Dinusha Dilrukshi
 Senior Software Engineer
 WSO2 Inc.: http://wso2.com/
 Mobile: +94725255071
 Blog: http://dinushasblog.blogspot.com/




 --
 Regards,
 Chamila Adhikarinayake
 Software Engineer
 WSO2, Inc.
 Mobile - +94712346437
 Email  - chami...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Many instances of APIManagerInterceptorValve is being registered at startup

2014-07-04 Thread Sumedha Rubasinghe
Are you referring to AM interceptors we written for other servers?
Then there should only be one interceptor reading many url patterns given
by different web/api applications.



On Fri, Jul 4, 2014 at 7:45 PM, Supun Malinga sup...@wso2.com wrote:

 HI,

 Found out $subject.
 Also what's the reason for it's being registered in code level ?.. We can
 register the valves via catalina-server.xml.

 thanks,
 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 321




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Optimize the configurations in api-manager.xml

2014-06-12 Thread Sumedha Rubasinghe
But normal practice is to have the best possible configuration as the
default one.


On Thu, Jun 12, 2014 at 7:51 PM, Ajith Vitharana aji...@wso2.com wrote:

 Hi All,

 Most of the time we deploy the AM as a distributed cluster and we can't
 use thrift for key validations. So our recommendation to use WSClient
 instead of thrift. Therefore it is better to keep the default configuration
 with WSClient and disable thrift, using that we can deduce the a
 configurations step. The advance is configuring the so many instances.

KeyValidatorClientType*WSClient*/KeyValidatorClientType
 ThriftClientPort10397/ThriftClientPort

 ThriftClientConnectionTimeOut1/ThriftClientConnectionTimeOut
 ThriftServerPort10397/ThriftServerPort
 !--ThriftServerHostlocalhost/ThriftServerHost--
 EnableThriftServer*false*/EnableThriftServer

 WDYT ?

 Thanks.
 Ajith


 --
 Ajith Vitharana.
 WSO2 Inc. - http://wso2.org
 Email  :  aji...@wso2.com
 Mobile : +94772217350




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Optimize the configurations in api-manager.xml

2014-06-12 Thread Sumedha Rubasinghe
We recommend it where network level restrictions are there for Thrift.
WSClient only requires HTTP level access, where as for Thrift it's a new
port. Thrift, if done correct can reach far more concurrency.



On Thu, Jun 12, 2014 at 8:06 PM, Ajith Vitharana aji...@wso2.com wrote:


 Hi Sumedha,

 On Thu, Jun 12, 2014 at 7:53 PM, Sumedha Rubasinghe sume...@wso2.com
 wrote:

 But normal practice is to have the best possible configuration as the
 default one.


 Why WSClient is not best for default, even we recommended it for
 production ?

 Thanks
 Ajith.




 On Thu, Jun 12, 2014 at 7:51 PM, Ajith Vitharana aji...@wso2.com wrote:

 Hi All,

 Most of the time we deploy the AM as a distributed cluster and we can't
 use thrift for key validations. So our recommendation to use WSClient
 instead of thrift. Therefore it is better to keep the default configuration
 with WSClient and disable thrift, using that we can deduce the a
 configurations step. The advance is configuring the so many instances.

KeyValidatorClientType*WSClient*/KeyValidatorClientType
 ThriftClientPort10397/ThriftClientPort

 ThriftClientConnectionTimeOut1/ThriftClientConnectionTimeOut
 ThriftServerPort10397/ThriftServerPort
 !--ThriftServerHostlocalhost/ThriftServerHost--
 EnableThriftServer*false*/EnableThriftServer

 WDYT ?

 Thanks.
 Ajith


 --
 Ajith Vitharana.
 WSO2 Inc. - http://wso2.org
 Email  :  aji...@wso2.com
 Mobile : +94772217350




 --
 /sumedha
 m: +94 773017743
 b :  bit.ly/sumedha




 --
 Ajith Vitharana.
 WSO2 Inc. - http://wso2.org
 Email  :  aji...@wso2.com
 Mobile : +94772217350




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Product name in IDN_BASE_TABLE table.

2014-06-10 Thread Sumedha Rubasinghe
This is not an issue. These tables are coming in from Identity space. This
base table has been added in identity database creator to check if tables
have been created.
We are anyway thinking of a better managing table scripts for commonly
shares components.



On Tue, Jun 10, 2014 at 3:30 PM, Ajith Vitharana aji...@wso2.com wrote:

 Hi AM team,

 The name of the server is display as WSO2 Identity Server. (Please see
 the attached image).
 This is due to hard cord the name in the db script INSERT INTO
 IDN_BASE_TABLE values ('WSO2 Identity Server')

 Is this correct ? or Do we need to change ?

 Thanks.
  Ajith

 --
 Ajith Vitharana.
 WSO2 Inc. - http://wso2.org
 Email  :  aji...@wso2.com
 Mobile : +94772217350




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issues with registering a custom Indexer

2014-06-09 Thread Sumedha Rubasinghe
Nuwan,
Is your regex correct?



On Mon, Jun 9, 2014 at 10:43 PM, Nuwan Dias nuw...@wso2.com wrote:

 I checked with/without profiles and verified the media type as well. Which
 class triggers this method call? Any hint to debug and see?


 On Monday, June 9, 2014, Ajith Vitharana aji...@wso2.com wrote:

 Hi Nuwan,

 1. First check adding the customer indexer including the profile as well.

 Eg: This is the one already in AM.

 indexer
 class=org.wso2.carbon.governance.registry.extensions.indexers.RXTIndexer
 mediaTypeRegEx=application/vnd.(.)+\+xml profiles
 =default,api-store,api-publisher/

 2. Please verify the media type of the resource is matching to the given
 type in indexing configuration.

 Thanks.
 Ajith




 On Mon, Jun 9, 2014 at 7:34 PM, Nuwan Dias nuw...@wso2.com wrote:

 Hi,

 I'm trying to register a custom indexer for the API Manager. I have
 indexer in an external jar file and put in to the components/lib directory.

 The Indexer implements
 the org.wso2.carbon.registry.indexing.indexer.Indexer interface and the
 'getIndexedDocument' method.

 I have registered my indexer in the registry.xml as indexer
 class=org.wso2.carbon.wsdl.indexer.WSDLIndexer
 mediaTypeRegEx=application/api+wsdl+xml/

  When I create a registry resource with the above provided media type,
 the indexer does not seem to execute. Anything wrong I could be doing or is
 there anything else to be done?

 I have some debug logs and sysouts within my indexer, these are not
 being printed at the moment. That's how I figured the indexer is not
 running. Is there any way to find out whether a resource was indexed?

 Thanks,
 NuwanD.

 --
 Nuwan Dias

 Associate Tech Lead - WSO2, Inc. http://wso2.com
 email : nuw...@wso2.com
 Phone : +94 777 775 729




 --
 Ajith Vitharana.
 WSO2 Inc. - http://wso2.org
 Email  :  aji...@wso2.com
 Mobile : +94772217350



 --
 Nuwan Dias

 Associate Tech Lead - WSO2, Inc. http://wso2.com
 email : nuw...@wso2.com
 Phone : +94 777 775 729


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




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [API-M] [1.7.0] Can't create API's with previously used APInames.

2014-06-08 Thread Sumedha Rubasinghe
If you add a scope, there would an entry going into
'IDN_OAUTH2_RESOURCE_SCOPE' table as well. This also needs to be deleted.

This is a known issue.


On Mon, Jun 9, 2014 at 8:45 AM, Nalin Chamara na...@wso2.com wrote:

 Hi Sanjiva,

 You have to create an API, subscribe to it, invoke the API, then delete
 it. After that, if you try to create another API with the previously used
 name, then the above mentioned problem will occur. Just creating and
 deleting the API won't do. The reason is, an entry to
 AM_APPLICATION_KEY_MAPPING table will only be added when generating a key
 to invoke the API after subscription.

 Sent from my Windows phone.
 --
 From: Sanjeewa Malalgoda sanje...@wso2.com
 Sent: ‎6/‎9/‎2014 7:43 AM
 To: Nalin Chandraratne na...@wso2.com
 Cc: WSO2 Developers' List dev@wso2.org; Amila Maha Arachchi
 ami...@wso2.com; Evanthika Amarasiri evanth...@wso2.com
 Subject: Re: [Dev] [API-M] [1.7.0] Can't create API's with previously
 used APInames.

 It seems API go deleted from registry and still there in database so we
 may need to debug and see what went wrong.
 But when i tried same from API Manager 1.7.0  UI things worked as
 expected. See following logs. Created deleted same API multiple times
 without an issue.


 [2014-06-09 07:40:25,735]  INFO - API Destroying API: admin--rrr:v1.0.0
 [2014-06-09 07:40:55,478]  INFO - API Initializing API: admin--rrr:v1.0.0
 [2014-06-09 07:41:06,694]  INFO - API Destroying API: admin--rrr:v1.0.0
 [2014-06-09 07:41:41,241]  INFO - API Initializing API: admin--vvv:v1.0.0
 [2014-06-09 07:41:41,294]  INFO - API Destroying API: admin--vvv:v1.0.0
 [2014-06-09 07:41:41,295]  INFO - API Initializing API: admin--vvv:v1.0.0
 [2014-06-09 07:41:48,671]  INFO - API Destroying API: admin--vvv:v1.0.0


 Thanks,
 sanjeewa.


 On Fri, Jun 6, 2014 at 7:16 PM, Nalin Chandraratne na...@wso2.com wrote:

 Hi,

 I encountered an issue when trying to create an API with a previously
 used but deleted API name. The error actually occurs when trying to
 generate the key after subscription.

 I wrote a java client using the provided API-M REST API to do the basic
 operations and when trying to generate the key, following error occurs.

 ERROR - ApiMgtDAO Error occurred while creating an Application
 Registration Entry for Application : DefaultApplication
 org.h2.jdbc.JdbcSQLException: Unique index or primary key violation:
 PRIMARY_KEY_AF ON PUBLIC.AM_APPLICATION_KEY_MAPPING(APPLICATION_ID,
 KEY_TYPE); SQL statement:
 INSERT INTO AM_APPLICATION_KEY_MAPPING (APPLICATION_ID,KEY_TYPE,STATE)
 VALUES(?,?,?) [23001-140]

 When trying to do the same thing manually using API-M publisher UI the
 console gives the following message.


 ​

 The API manager console prints,

 ERROR - UserAwareAPIProvider Failed to get API from :
 /apimgt/applicationdata/provider/test-AT-test.com/test/1/api
 org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException:
 Resource does not exist at path
 /_system/governance/apimgt/applicationdata/provider/test-AT-test.com/test/1/api


 It seems like although the API got deleted, the associated application
 key does not get removed from the AM_APPLICATION_KEY_MAPPING table.

 Thanks.




 Nalin Chamara
 Software Engineer
 071-56-147-56




 --

 *Sanjeewa Malalgoda*
 WSO2 Inc.
 Mobile : +94713068779

  http://sanjeewamalalgoda.blogspot.com/blog
 :http://sanjeewamalalgoda.blogspot.com/
 http://sanjeewamalalgoda.blogspot.com/



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




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AM-1.7]AM publisher doing redundant calls to GW.

2014-05-31 Thread Sumedha Rubasinghe
On Sat, May 31, 2014 at 1:41 PM, Nuwan Dias nuw...@wso2.com wrote:



 On Saturday, May 31, 2014, Ajith Vitharana aji...@wso2.com wrote:


 Hi Ruwan

 On Sat, May 31, 2014 at 7:43 AM, Ruwan Yatawara ruw...@wso2.com wrote:

 Hi Ajith,

 As per the latest release of APIM,  we added a new life cycle state
 called prototyped. In that stage (it can be either and endpoint or a In
 line script implementation) also the api gets deployed in the gateway (mock
 api).


 In a production setup , what is the purpose of deploying mock API in the
 GW ?


 No need of doing that if you don't want to. You can provide the sandbox
 URL only and deploy the API in the sandbox Gateway only. The API will be
 put into the Prod Gateway once you provide the prod URL and save. You need
 to configure the Gateways appropriately in the
 APIGatewayEnvironments section for this type of deployment to be
 possible.


In a future version plan is to provide an option of selecting deployment
environment for mock implementations.
Even now you can omit the option of deploying a mock version by hitting
'Save' button and continuing to next step.


 Thanks,
 NuwanD.



 Thanks.
 Ajith


  However, if u just press just the save button at each stage and
 straight away move on to the manage section, said gateway calls will not be
 made.

 Thanks and Regards,
 Ruwan

 - sent from my mobile
 On 31 May 2014 02:43, Ajith Vitharana aji...@wso2.com wrote:

  Hi All,

 I have observed that publisher invoking the GW while creating a new API
 (at the each API design steps ).
 Why do we need that call before publishing to the GW ? Because we know
 that the state of the API is CREATED.

 org.apache.commons.httpclient.ConnectTimeoutException: The host did not
 accept the connection within timeout of 3 ms
at
 org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:155)
at
 org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
at
 org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at
 org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at
 org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at
 org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at
 org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
 org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:622)
at
 org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
at
 org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at
 org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
at
 org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
at
 org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at
 org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
*at
 org.wso2.carbon.authenticator.stub.AuthenticationAdminStub.login(AuthenticationAdminStub.java:659)*
at
 org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminClient.login(AbstractAPIGatewayAdminClient.java:90)
at
 org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminClient.setup(AbstractAPIGatewayAdminClient.java:53)
at
 org.wso2.carbon.apimgt.impl.utils.RESTAPIAdminClient.init(RESTAPIAdminClient.java:40)
   * at
 org.wso2.carbon.apimgt.impl.APIGatewayManager.isAPIPublished(APIGatewayManager.java:247)*
at
 org.wso2.carbon.apimgt.impl.APIProviderImpl.isAPIPublished(APIProviderImpl.java:929)
at
 org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPI(APIProviderImpl.java:508)
at
 org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.updateAPI(UserAwareAPIProvider.java:58)
at
 org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.saveAPI(APIProviderHostObject.java:727)
at
 org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsFunction_updateAPIDesign(APIProviderHostObject.java:579)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.FunctionObject.




 --
 Ajith Vitharana.
 WSO2 Inc. - http://wso2.org
 Email  :  

Re: [Dev] [AM-1.7]Sample README outdated. .

2014-05-29 Thread Sumedha Rubasinghe
Created https://wso2.org/jira/browse/APIMANAGER-2512. Thanks.


On Fri, May 30, 2014 at 1:28 AM, Ajith Vitharana aji...@wso2.com wrote:

 Please note.

 Eg:

 Go to wso2am-1.0.0/bin folder  type 'ant'

 Run wso2am-1.0.0/samples/YoutubeFeeds/APIPopulator.sh  (or
 APIPopulator.bat if you are on Windows)

 Extract wso2am-xxx.zip (eg: wso2am-1.0.0.zip)

 Thanks.
 Ajith

 --
 Ajith Vitharana.
 WSO2 Inc. - http://wso2.org
 Email  :  aji...@wso2.com
 Mobile : +94772217350




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 API Manager 1.7.0 Released !!!

2014-05-23 Thread Sumedha Rubasinghe
WSO2 API Manager 1.7.0 Released!

WSO2 API Manager team is pleased to announce the release of version 1.7.0
of the Open Source API Manager.

WSO2 API Manager is a platform for creating, managing, consuming and
monitoring APIs. It employs proven SOA best practices to solve a wide range
of API management challenges such as API provisioning, API governance, API
security and API monitoring. It combines some of the most powerful and
mature components of the WSO2's state-of-the-art Carbon platform to deliver
a smooth and end-to-end API management experience while catering to both
API publisher and API consumer requirements.

WSO2 API Manager is comprised of several modules.

   - *API Provider:* Define new APIs and manage them
   - *API Store:* Browse published APIs and subscribe to them
   - *API Gateway:* The underlying API runtime based on WSO2 ESB
   - *API Key Manager:* Performs Key Generation and Key Validation
   functionalities

WSO2 API Manager is developed on top of the revolutionary WSO2 Carbon
platform http://wso2.org/projects/carbon (Middleware a' la carte), an
OSGi based framework that provides seamless modularity to your SOA via
componentization. This release also contains many new features and a range
of optional components (add-ons) that can be installed to customize the
behavior of the API Manager. Further, any existing features of the product
which are not required in your environment can be easily removed using the
underlying provisioning framework of Carbon. In brief, WSO2 API Manager can
be fully customized and tailored to meet your exact API management needs.

For more information on WSO2 API Manager please visit
http://wso2.com/products/api-manager. Also take a look at the online product
 
documentationhttp://docs.wso2.org/wiki/display/AM150/WSO2+API+Manager+Documentation
.
How to Run

   1. Extract the downloaded zip
   2. Go to the bin directory in the extracted folder
   3. Run the wso2server.sh or wso2server.bat as appropriate
   4. Launch a web browser and navigate to https://localhost:9443/publisher to
   access the API provider webapp
   5. Navigate to https://localhost:9443/store to access the API store
   6. Navigate to https://localhost:9443/admin-dashboard to access Admin
   dashboard
   7. Use admin, admin as the username and password to login as an admin


New Features in WSO2 API Manager 1.7.0

   -

   Fine grained API design capabilities
   -

   A wizard driven approach covering major important aspect of API
  design including inline response generation using JavaScript.


   -

   API resource level authorization using OAuth2 Scopes
   -

  Authorize who can access different resources within your API. Tokens
  to access resources will only be provided for allowed grant
types per user
  role.
  -

   Statistics Dashboard for developers
   -

  Now API developers can monitor how their API subscriptions 
  Applications are performing with a built-in dashboard.


   -

   Forums in API Store
   -

   Developers can now communicate with each other using forums within
  API Store itself. Public forums will allow open communication with anyone
  while visibility protected APIs can have their own private forum topics.


   -

   Visibility Control for API Documentation
   -

   With this release API Documentation can have visibility controls
  enforced. Documentation can have the same visibility controls an
API enjoys
  in previous releases. Documentation can also be turned off for anonymous
  users.


   -

   Multi tenant workflow support
   -

  Workflow extension support available in previous release has been
  extended to support multi tenancy.
  -

   Workflow integration for token generation
   -

  Now we allow extensions for token generation. Through a workflow,
  enterprises can have their own checks executed when a developer/end user
  requests for a new token
  -

   URL templating support for API definition
   -

  This feature allows using URL templating when defining API subcontext
  patterns. URL templating would allow more sophisticated patterns to be
  provided while defining APIs. Previous support for URL mappings is still
  continued.
  -

   Customizable Store themes for tenants
   -

  On a multi tenant deployment tenants now can have their own themes
  for their API Store.



   -

   Statistics dashboard for outgoing API calls
   -

  Now we collect  display statistics of backend calls resulted due to
  API calls happening through the gateway. This feature is useful for
  scenarios where there is a different billing model for backend API
  implementations.


   -

   Using Windows Authentication (NTLM) to obtain OAuth2 Token
   -

  If APIs are accessed in an environment where Windows Authentication
  (NTLM) is present, this feature will allow obtaining OAuth2 token using
  NTLM token.



   -

   Ability to 

Re: [Dev] API Manager: Resource-level authorization

2014-05-20 Thread Sumedha Rubasinghe
You can try a nightly build.


On Tue, May 20, 2014 at 5:45 PM, Dmitry Sotnikov dmi...@wso2.com wrote:

 Thanks a lot Nuwan!

 Dmitry


 On Tue, May 20, 2014 at 5:05 PM, Nuwan Dias nuw...@wso2.com wrote:

 Yes 1.7.

 The docs are still under construction and not publicly available.
 Basically at the time of creating the API, you will be able to define
 scopes for an API and associate user roles for the scopes. You can then
 assign a scope to a particular resource. Which would indirectly mean that
 you assign a role for a resource. At the time of requesting a token, you
 provide the list of scopes that you require. The token that you get, will
 only bear the scopes that you are permitted to access. Meaning that you
 will not be able to use that token for accessing resources that you are not
 permitted to.

 Thanks,
 NuwanD.


 On Tue, May 20, 2014 at 4:47 PM, Dmitry Sotnikov dmi...@wso2.com wrote:

 Upcoming meaning 1.7 that's coming soon?

 Is there documentation describing how to set up this resource-level
 access by roles with the scopes?

 Dmitry


 On Tue, May 20, 2014 at 4:37 PM, Nuwan Dias nuw...@wso2.com wrote:

 Hi Dimitry,

 No, right now we do not have this support. But in the upcoming release
 of the API Manager this would be possible with the introduction of scopes
 (OAuth2).

  Thanks,
 NuwanD.


 On Tue, May 20, 2014 at 4:01 PM, Dmitry Sotnikov dmi...@wso2.comwrote:

 Is there a way within API Manager to do resource-level permissions?

 For example, for a particular resource users from one role can only do
 GET, and from another also have POST?

 I found a way to assign the whole API to a role, but not individual
 resources. For resources, as far as I understand, I can only set max tier
 and level of authentication.

 Is there a way to achieve this selective verb access based on user
 role?

 --
 Dmitry Sotnikov
 VP of Cloud; WSO2, Inc.;  http://wso2.com/
 email: dmi...@wso2.com; cell: +1.949.303.9653; Skype: DSotnikov
 Lean . Enterprise . Middleware

  http://wso2.com/events/




 --
 Nuwan Dias

 Associate Tech Lead - WSO2, Inc. http://wso2.com
 email : nuw...@wso2.com
 Phone : +94 777 775 729




 --
 Dmitry Sotnikov
 VP of Cloud; WSO2, Inc.;  http://wso2.com/
 email: dmi...@wso2.com; cell: +1.949.303.9653; Skype: DSotnikov
 Lean . Enterprise . Middleware

  http://wso2.com/events/




 --
 Nuwan Dias

 Associate Tech Lead - WSO2, Inc. http://wso2.com
 email : nuw...@wso2.com
 Phone : +94 777 775 729




 --
 Dmitry Sotnikov
 VP of Cloud; WSO2, Inc.;  http://wso2.com/
 email: dmi...@wso2.com; cell: +1.949.303.9653; Skype: DSotnikov
 Lean . Enterprise . Middleware

  http://wso2.com/events/




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Chunk 11 - Nightly Build Packs (20/05/2014)

2014-05-20 Thread Sumedha Rubasinghe
We did a build around 11.30pm and it was fine. No one committed into this
after that.Getting a svn up.


On Wed, May 21, 2014 at 7:42 AM, Dulanja Liyanage dula...@wso2.com wrote:

 Please note that AM-1.7.0 was not built due to the build failure mentioned
 in the mail: Chunk-11 Build Failure sent to @dev today.


 On Wed, May 21, 2014 at 7:37 AM, Dulanja Liyanage dula...@wso2.comwrote:

 Hi All,

 Please find the $subject at: http://54.83.58.35/chunk11/20-05-2014/packs/

 Included products are:

 BRS-2.1.0
 ELB-2.1.1
 IS-5.0.0
 MB-2.2.0


 P2 Repo at: http://54.83.58.35/chunk11/20-05-2014/p2-repo

 Built from revision: 203518.

 Thanks
 Dulanja

 --
 Dulanja Liyanage
 WSO2 Inc.
 M: +94776764717




 --
 Dulanja Liyanage
 WSO2 Inc.
 M: +94776764717

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




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Renaming APIM workflow-admin appication as admin

2014-05-12 Thread Sumedha Rubasinghe
+1 for 'admin-dashboard'.



On Mon, May 12, 2014 at 3:39 PM, Nuwan Dias nuw...@wso2.com wrote:

 +1 for something like admin-dashboard. admin-console sounds more like the
 management console.

 Thanks,
 NuwanD.


 On Mon, May 12, 2014 at 3:26 PM, Ruwan Yatawara ruw...@wso2.com wrote:


 On Mon, May 12, 2014 at 3:10 PM, Lakmali Baminiwatta lakm...@wso2.comwrote:

 is


 Shall we make it admin-console / admin-dashboard ? Just admin does not
 have that a cool ring to it. :)

 Thanks and Regards,

 Ruwan Yatawara

 WSO2 Inc.

 email : ruw...@wso2.com
 mobile : +94 77 9110413
 blog : http://thoughts.ruwan-ace.com/
 www: :http://wso2.com




 --
 Nuwan Dias

 Associate Tech Lead - WSO2, Inc. http://wso2.com
 email : nuw...@wso2.com
 Phone : +94 777 775 729




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] OSGI Issue when trying to use Script Mediator in APIM

2014-05-11 Thread Sumedha Rubasinghe
On Sun, May 11, 2014 at 11:32 AM, Ruwan Yatawara ruw...@wso2.com wrote:

 Hi All,

 After much research, we rounded up the problem, this is caused by the API
 Manager host object using both synapse and jaggery. As I explained in my
 previous email, when we use two different bundles that use different
 versions of the same package, inside the same class space, package use
 conflicts are encountered.

 As a remedy to this problem, we need to upgrade the org.mozilla.javascript
 version used by jaggery to version 1.7.0. This will also involve a possible
 upgrade of bsf versions / changing the synapse ScriptMediator to
 accommodate for possible API changes.


This would mean in future, when org.mozilla.javascript version increments,
both of these usage points should be updated. right? If so, can we have a
comment next to Jaggery's org.mozilla.javacript version element mentioning
this please.

That would save lot of time in future.




 Thanks much, Kisanthan, Ruchira and Manu for all your help.

 Thanks and Regards,

 Ruwan Yatawara

 WSO2 Inc.

 email : ruw...@wso2.com
 mobile : +94 77 9110413
 blog : http://thoughts.ruwan-ace.com/
 www: :http://wso2.com



 On Fri, May 9, 2014 at 10:56 AM, madhuka udantha madhukaudan...@gmail.com
  wrote:

 Hi,

 This[1] can be helpful for such scenario,
 And you issue encounter is correct,
 *You can check some AS releases, where it also occurred and fixed as we
 added jaggery and mashup to AS.*

 [1]
 http://madhukaudantha.blogspot.com/2014/02/writing-hostobject-for-jaggery.html



 On Fri, May 9, 2014 at 8:53 AM, Ruchira Wageesha ruch...@wso2.comwrote:

 Please meet me in the office. Will be able to help you.

 /Ruchira


 On Fri, May 9, 2014 at 12:02 AM, Ruwan Yatawara ruw...@wso2.com wrote:

 Hi All,

 We ran in to $subject when trying to use the script mediator in API
 Manager.

 When trying to use script mediator in AM APIs the following error is
 thrown.

 *Caused by: java.lang.NoClassDefFoundError:
 com/sun/phobos/script/javascript/RhinoScriptEngineFactory*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.initScriptEngine(ScriptMediator.java:472)*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.initInlineScript(ScriptMediator.java:338)*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.init(ScriptMediator.java:148)*


 To the best of my understanding, following is whats happening here.

 The script mediator depends on the bsf-all_3.0.0.wso2v2, which needs
 org.mozilla.javascript; version=1.6.0 or above to function.

 Jaggery is built to support org.mozilla.javascript; version=1.7.0 and
 above, and the API Manager host object, depends on both jaggery and synapse
 to function. When all of this comes together, we believe synapse has a
 problem with wiring the correct bundles (package usage conflict), leading
 to above quoted error.

 To overcome this, there are two options, and both seem to have
 considerable consequences

 a) Update the BSF jar to use org.mozilla.javascript; version=1.7.0

 b) Update Synapse, restricting it to use org.mozilla.javascript;
 version=1.6.0, only and APIM host objects to use 1.7.0 specifically.


 Since Option A might require changes to ESB script mediator, as API
 changes may be in effect, we went ahead with option (b). This leads to
 errors in the API Manager Host objects and the bundle goes in to INSTALLED
 state. The following error is thrown, at startup and there are also errors
 when trying to invoke the API.

 *[2014-05-08 23:56:16,246] ERROR - ModuleManager Error while adding
 HostObject : APIStore 
 org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject*
 *java.lang.ClassNotFoundException:
 org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject*
 * at
 org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)*
 * at
 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)*


 Has anyone encountered such an issue before? How should we go about
 fixing this? Your thoughts/ideas/suggestions are welcome.


 Thanks and Regards,

 Ruwan Yatawara

 WSO2 Inc.

 email : ruw...@wso2.com
 mobile : +94 77 9110413
 blog : http://thoughts.ruwan-ace.com/
 www: :http://wso2.com




 --

 *Ruchira Wageesha**Associate Technical Lead*
 *WSO2 Inc. - lean . enterprise . middleware |  wso2.com
 http://wso2.com*

 *email: ruch...@wso2.com ruch...@wso2.com,   blog:
 ruchirawageesha.blogspot.com http://ruchirawageesha.blogspot.com,
 mobile: +94 77 5493444 %2B94%2077%205493444*

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




 --
 Cheers,
 Madhuka Udantha
 http://madhukaudantha.blogspot.com



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




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] rg.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled is thrown when attempting to create an API on APIMan 140 with postgres

2014-05-11 Thread Sumedha Rubasinghe
On Fri, May 9, 2014 at 10:36 PM, Isuru Perera isu...@wso2.com wrote:

 AFAIK, relaxAutoCommit=true is applicable to only to MySQL. I'm not sure
 it will work for PostgreSQL

 With relaxAutoCommit=true, we just suppress the exception in MySQL.

 Ideally we should disable the auto commit from the data source
 configuration.

 Try adding
 defaultAutoCommitfalse/defaultAutoCommit.

 I'm not sure about the impact this will have in components other than API
 Manager. If other components rely on Auto Commit, there will be issues.

 APIM Team, how should this be handled in with other databases, such as
 PostgreSQL


We are not depending on autocommit within our DAO logic. We have explicit
transaction commit blocks. (This also applies to Registry and UM).
Hence autocommit should always be set to false as Nuwan has given.




 Docs Team, Important configurations such as defaultAutoCommit are missing
 in Carbon docs [1]. We need to add all configs, other than the elements we
 have master-datasources.xml by default.

 [1]
 https://docs.wso2.org/display/Carbon420/Configuring+master-datasources.xml


 On Fri, May 9, 2014 at 5:37 AM, Uvindra Dias Jayasinha 
 uvin...@wso2.comwrote:

 This is because auto commit is turned on by default in your installation.

 You need to append relaxAutoCommit=true to the end of the DB url in the
 master-datasources.xml file. Here is what an example with MySQL would look
 like,

 datasource
 nameWSO2AM_DB/name
 descriptionThe datasource used for API Manager
 database/description
 jndiConfig
 namejdbc/WSO2AM_DB/name
 /jndiConfig
 definition type=RDBMS
 configuration
 urlj
 dbc:mysql://localhost:3306/WSO2AM_DB?autoReconnect=trueamp;
 *relaxAutoCommit=true*/url
 usernamewso2carbon/username
 passwordwso2carbon/password

 driverClassNamecom.mysql.jdbc.Driver/driverClassName
 maxActive50/maxActive
 maxWait6/maxWait
 testOnBorrowtrue/testOnBorrow
 validationQuerySELECT 1/validationQuery
 validationInterval3/validationInterval
 /configuration
 /definition
 /datasource

 Add the same entry to your DB URL



 On Fri, May 9, 2014 at 5:49 PM, Shavantha Weerasinghe shavan...@wso2.com
  wrote:

 Hi All

 The below exception is thrown when I attempt to create an API on APIM140
 connected to postgress database





 [2014-05-09 17:46:15,721] ERROR - ApiMgtDAO Error while adding the API:
 org.wso2.carbon.apimgt.api.model.APIIdentifier@6a10eaec to the database
 org.postgresql.util.PSQLException: Cannot commit when autoCommit is
 enabled.
 at
 org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:705)
 at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.wso2.carbon.ndatasource.rdbms.ConnectionRollbackOnReturnInterceptor.invoke(ConnectionRollbackOnReturnInterceptor.java:51)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:71)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.interceptor.ConnectionState.invoke(ConnectionState.java:153)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.TrapException.invoke(TrapException.java:41)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:80)
 at $Proxy13.commit(Unknown Source)
 at
 org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:3564)
 at
 org.wso2.carbon.apimgt.impl.APIProviderImpl.addAPI(APIProviderImpl.java:372)
 at
 org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.addAPI(UserAwareAPIProvider.java:45)
 at
 org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsFunction_addAPI(APIProviderHostObject.java:397)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:160)
 at
 

Re: [Dev] Testing of API-Manager (1.7.0) against BAM instance changes

2014-05-05 Thread Sumedha Rubasinghe
Setting up statistics is a one time thing for most the deployments.
Changing this dynamically is not a useful scenario to check.
The particular error comes if the message sent from AM (stat source) to BAM
(storage) does not match. If Toolbox is deployed correctly, these stream
definitions should match.



On Mon, May 5, 2014 at 11:55 AM, Asanthi Kulasinghe asan...@wso2.comwrote:

 Hi,

 Is switching from one BAM instance to another without restarting
 API-Manager, a valid scenario ?

 The following error is generated when invoking an API after changing the
 BAM instance. (Reported under [1])
 The scenario which lead to this error was switching from a BAM 2.4.0
 instance to a BAM 2.4.1 instance in a API Manager 1.7.0. clustered set up.

 [2014-05-04 19:50:11,490] ERROR
 {org.wso2.carbon.databridge.core.internal.queue.QueueWorker} - Wrongly
 formatted event sent for carbon.super
 org.wso2.carbon.databridge.core.exception.EventConversionException: Error
 when converting org.wso2.apimgt.statistics.request:1.0.0 of event bundle
 with events 1
 at
 org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:126)
 at
 org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.toEventList(ThriftEventConverter.java:88)
 at
 org.wso2.carbon.databridge.core.internal.queue.QueueWorker.run(QueueWorker.java:72)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
 at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:744)
 Caused by:
 org.wso2.carbon.databridge.core.exception.EventConversionException: No
 StreamDefinition for streamId org.wso2.apimgt.statistics.request:1.0.0
 present in cache
 at
 org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:112)
 ... 7 more

 [1] https://wso2.org/jira/browse/APIMANAGER-2275

 Regards
 Asanthi


 --
 *Asanthi Kulasinghe*
 WSO2 Inc; http://www.wso2.com/.
 Mobile: +94777355522



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




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] coping wrong dbscript with APIM features

2014-05-03 Thread Sumedha Rubasinghe
Please apply following changes to h2.sql script inside the feature.
This has been fixed in latest feature (4.2.2) that will get shipped with AM
1.7.0.

@@ -1,5 +1,5 @@
 CREATE TABLE AM_WORKFLOWS(
-WF_ID INTEGER AUTO_INCREMENT,
+WF_ID INTEGER,
 WF_REFERENCE VARCHAR(255) NOT NULL,
 WF_TYPE VARCHAR(255) NOT NULL,
 WF_STATUS VARCHAR(255) NOT NULL,
@@ -16,14 +16,14 @@
 CREATE SEQUENCE AM_WORKFLOWS_SEQUENCE START WITH 1 INCREMENT BY 1
 /

-CREATE OR REPLACE AM_WORKFLOWS_TRIGGER
+CREATE OR REPLACE TRIGGER AM_WORKFLOWS_TRIGGER
BEFORE INSERT
 ON AM_WORKFLOWS
 REFERENCING NEW AS NEW
 FOR EACH ROW
 BEGIN
 SELECT AM_WORKFLOWS_SEQUENCE.nextval INTO :NEW.WF_ID
FROM dual;
-END
+END;
 /

 ALTER TABLE AM_APPLICATION ADD APPLICATION_STATUS VARCHAR2(50) DEFAULT
'APPROVED'


On Sun, May 4, 2014 at 10:10 AM, Gayan Gunawardana ga...@wso2.com wrote:

 Hi,

 Default database scripts which are coming from APIM features does not have
 APPLICATION_STATUS attribute inside AM_APPLICATION table which causes to
 throw

  Failed to add Application
 org.h2.jdbc.JdbcSQLException: Column APPLICATION_STATUS not found; SQL
 statement:
 INSERT INTO AM_APPLICATION (NAME, SUBSCRIBER_ID, APPLICATION_TIER,
 CALLBACK_URL, DESCRIPTION, APPLICATION_STATUS) VALUES (?,?,?,?,?,?)
 [42122-140]
 at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)


 --
 Gayan Gunawardana
  Software Engineer; WSO2 Inc.; http://wso2.com/
 Email: ga...@wso2.com
 Mobile: +94 (71) 8020933

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




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] PostgreSQL configuration failure in API-Manager 1.7.0.

2014-04-23 Thread Sumedha Rubasinghe
Folks,
Focus on H2, MySQL  Oracle first and get the full functionality verified.
Then focus on MSSQL, DB2  PostgreSQL.



On Wed, Apr 23, 2014 at 11:14 AM, Asanthi Kulasinghe asan...@wso2.comwrote:

 Hi,

 FYI.

 [1]  has been reported for PostgreSQL configuration failure in API-Manager
 1.7.0.

 [1]  https://wso2.org/jira/browse/APIMANAGER-2203?filter=-2


 Regards
 *Asanthi Kulasinghe*
 Software Engineer - QA
 WSO2 Inc; http://www.wso2.com/.
 Mobile: +94777355522



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




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Implementing Single Logout in APP Manager

2014-04-21 Thread Sumedha Rubasinghe
Ruwan, use a sequence diagram to explain what has already been implemented.
This is too lengthy to read.. ;-)



On Mon, Apr 21, 2014 at 11:08 PM, Ruwan Yatawara ruw...@wso2.com wrote:

 Hi All,

 Following is a brief explanation as to how we went about implementing
 single logout in App Manager. Please feel free to share your thoughts.

 According to the current implementation in App Manager, When a user tries
 to access a Gateway URL, the request will be intercepted by a Synapse API
 Handler. This handler will check if a certain Cache key is present in the
 request Header. If it is the first time the URL is being invoked, there
 won't be a Cache Key present in the request, hence the user is redirected
 to the logIn page of the Identity Provider (which is, WSO2 Identity Server,
 in this case). Once the user is authenticated, the IDP will send a SAML
 response back to the gateway, which will in turn be cached in the App
 Manager for future reference. Once all of this is done, the gateway will
 draft a JWT token with claims recovered from the IDP Saml Response, and the
 same, along with the cache key pertaining to the stored SAML response, will
 get sent back to the Webapp as a Cookie.

 In the single logout scenario, once a request is made to the LogOut URL,
 the handler will identify the request as a logout call and a redirect will
 be made to the IDP with a Single LogOut request. Note that, App Manager
 does not maintain a Session for the user, all of this is delegated to the
 IDP to take care of. The only reference of the user withheld on App
 Manager, is the cached SAML Response stored against cache key sent back the
 browser. Once the IDP encounters a Single Logout Request, it will clear the
 session maintained for the user, against the session index. Once this is
 done, the APP Manager will also wipe from its cache, the original SAML
 response held against the cache key rendering the User, unauthenticated.
 Eventually, the user will be redirected to the IDP LogIn page.

 Note that even though the IDP would send out individual logout requests to
 each service provider, App Manager would not need to handle said requests
 as it has already cleared its cache, of the SAML response, and
 all subsequent gateway calls would result in getting redirected to the IDP
 for authentication as APP Manager does not have in it a notion of user
 session (it is delegated to the IDP).

 We have implemented above and it works, but this approach does not let us
 address *selective* logout scenario like the following.

 Imagine there are 4 apps, A, B, C, D. One may configure single logout for
 A and B, service providers and leave C and D, as they are. When logout is
 invoked on A, B would also be logged out as they are both SIngle Logout
 enabled. However, C and D will stay logged in as they are not Single logout
 enabled. However, if one had a requirement to group A  B under a group and
 C  D under another, so that when logout is invoked on one App of a group,
 all the applications in said group would be logged out, and applications
 external to the group wont get affected, irrespective of whether they are
 single logout enabled. This selective group wise logout enabling, is this
 possible? or is this not a valid requirement?

  Thanks and Regards,

 Ruwan Yatawara

 Software Engineer,
 WSO2 Inc.
 lean . enterprise . middleware

 email : ruw...@wso2.com
 mobile : +94 77 9110413
 blog : http://thoughts.ruwan-ace.com/
 www: :http://wso2.com




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Identifier is too long for Sequences and Triggers of some Identity tables

2014-04-11 Thread Sumedha Rubasinghe
Let's use SEQ and TRG at the end.
On Apr 11, 2014 11:50 AM, Lakmali Baminiwatta lakm...@wso2.com wrote:

 Hi all,

 Oracle is complaining with identifier is too long for below Sequences
 and Triggers.

 IDN_APPMGT_CLAIM_MAPPING_SEQUENCE
 IDN_APPMGT_CLAIM_MAPPING_TRIGGER

 IDN_APPMGT_ROLE_MAPPING_SEQUENCE
 IDN_APPMGT_ROLE_MAPPING_TRIGGER

 We need to change those to smaller names ( 30 chars).

 Thanks,
 Lakmali
 --
 Lakmali Baminiwatta
  Software Engineer
 WSO2, Inc.: http://wso2.com
 lean.enterprise.middleware
 mobile:  +94 71 2335936
 blog : lakmali.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] [AM][Mediation Extensions] Why need In/Out details included in the sequence names

2014-03-28 Thread Sumedha Rubasinghe
Two things : content organization in registry  how extension is loaded by
the gateway.

In registry we have in/out grouping for proper organization of content.

Syntax in the name is used by the MediationExtension Handler[1]. In reality
these sequences can be deployed anywhere within Synapse config. The
particular registry location is being used by the API Publisher UI
component.



[1]
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/apimgt/org.wso2.carbon.apimgt.gateway/1.2.1/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/ext/APIManagerExtensionHandler.java


On Fri, Mar 28, 2014 at 11:53 AM, Subash Chaturanga sub...@wso2.com wrote:

 Hi AM folks,
 This is FMI, correct me if I am missing anything. Since we are suppose to
 store these global/non-global sequences in registry under in and out
 collections separately why we need that info included again in the sequence
 names ?

 --
 Thanks
 /subash

 *Subash Chaturanga*
 Senior Software Engineer :Integration TG; WSO2 Inc. http://wso2.com

 email: sub...@wso2.com
 blog:  http://subashsdm.blogspot.com/
 twitter: @subash89
 phone: +9477 2225922
 Lean . Enterprise . Middleware




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


  1   2   3   4   5   6   7   8   >