Re: [Dev] Cassandra User Store Manager - Code review

2014-10-14 Thread Shani Ranasinghe
[adding dev@]

Just to add some context, the user store supports limited functionality.
They are

In super tenant mode
  - add/edit/delete user
  - add/edit/delete role
  - attach user to role
  - attach role to user
  - view users
  - view roles


On Wed, Oct 15, 2014 at 12:22 PM, Shani Ranasinghe  wrote:

>
> Hi,
>
> Attached herewith is the CassandraUserStoreManager.java which I have
> implemented for Carbon 4.2.0.
>
> Would appreciate if I could get someone from the IS team and a cassandra
> expert to review the code.
>
>
> --
> Thanks and Regards
> *,Shani Ranasinghe*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 77 2273555
> linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab
>



-- 
Thanks and Regards
*,Shani Ranasinghe*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 77 2273555
linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Session Doesn't timeout when SSO is Enabled

2014-10-14 Thread Manoj Gunawardena
Hi,

not clear the issue. First you set the time out in web.xml (AS). But after
enabled SSO, it's not worked. After set session time out in identity.xml
(IS)
still not work as expected?


Thanks

On Wed, Oct 15, 2014 at 11:52 AM, Yasassri Ratnayake 
wrote:

> Hi,
>
> The issue is the Session validation is broken in IS 4.6 and a patch has
> being applied for this. Its fixed in the Latest IS pack. The session
> duration will be determined by the value set in the web.xml file.
>
> With Regards,
>
> On Wed, Oct 15, 2014 at 11:01 AM, Manoj Gunawardena 
> wrote:
>
>> Hi Yasasiri,
>>
>>  The session out time can be set in /repository/conf/identity.xml
>> under SSOService element.
>>  Is there a way to synchronize these two settings? If user changes AS
>> session time out same session time out time can be use for IS. Without
>> change two configuration files.
>>
>>
>> Thanks
>>
>>
>> On Wed, Oct 15, 2014 at 9:56 AM, Yasassri Ratnayake 
>> wrote:
>>
>>> Hi All,
>>>
>>> I was testing AS 5.2.0 with an IS 4.6.0, when I reduce the session time
>>> out value
>>>
>>> 
>>> 15
>>>
>>> at */repository/conf/tomcat/carbon/WEB-INF *the sessions
>>> is timed out as expected. But when I enable SSO the session doesn't get
>>> timed-out.
>>>
>>> Are there any other config changes that has to be made in-order to
>>> handle the session duration when SSO is enabled?
>>>
>>> With Regards,
>>> --
>>> Yasassri Ratnayake
>>> Software Engineer - QA
>>> WSO2 Inc ; http://wso2.com
>>> lean.enterprise.middleware
>>> *Mobile : +94715933168 <%2B94715933168>*
>>> *Blog : http://yasassriratnayake.blogspot.com/
>>> *
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Manoj Gunawardena
>> Tech Lead
>> WSO2, Inc.: http://wso2.com
>> lean.enterprise.middleware
>> Mobile : +94 77 2291643
>>
>
>
>
> --
> Yasassri Ratnayake
> Software Engineer - QA
> WSO2 Inc ; http://wso2.com
> lean.enterprise.middleware
> *Mobile : +94715933168 <%2B94715933168>*
> *Blog : http://yasassriratnayake.blogspot.com/
> *
>



-- 
Manoj Gunawardena
Tech Lead
WSO2, Inc.: http://wso2.com
lean.enterprise.middleware
Mobile : +94 77 2291643
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Exception handling in CEP Siddhi Extensions

2014-10-14 Thread Rajeevan Vimalanathan
Thanks Sachini.

On Tue, Oct 14, 2014 at 5:10 PM, Sachini Jayasekara 
wrote:

> Hi Vimalanathan,
>
> You can throw a QueryCreationException if the erroneous conditions are
> checked at the time of query creation. Make sure you throw the exception
> with context information.
> Some other exceptions you can use can be found at [1].
>
> [1]
> https://github.com/wso2-dev/siddhi/tree/master/modules/siddhi-core/src/main/java/org/wso2/siddhi/core/exception
>
> Thanks
>
> On Tue, Oct 14, 2014 at 1:22 PM, Vimalanathan Rajeevan  > wrote:
>
>> We are writing Siddhi extensions for a training project "Adding Sketching
>> algorithms for CEP operators" [1]. There we are implementing a Siddhi
>> window for Top-K selection algorithm implementation. There was a
>> requirement to handle the Exception thrown by stream-lib (Java library used
>> for Top-K algorithm) as well as to throw Exceptions manually when certain
>> conditions occur in window class.  What is the standard way of handling
>> exceptions in Siddhi windows? I guess, Exceptions should be caught and a
>> general Exception should be thrown. If so, What is the general Exception
>> type should be thrown?
>>
>> [1] - https://redmine.wso2.com/issues/2884
>> --
>> Best Regards,
>> V.Rajeevan
>> Software Engineer,
>> WSO2 Inc. :http://wso2.com
>>
>> Mobile : +94 773090875
>> Email : rajeev...@wso2.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
>
>
> *Thanks & Regards,Sachini JayasekaraSoftware Engineer; **WSO2 Inc. *
>
> *lean . enterprise . middleware |  http://wso2.com  *
>



-- 
Best Regards,
V.Rajeevan
Software Engineer,
WSO2 Inc. :http://wso2.com

Mobile : +94 773090875
Email : rajeev...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Session Doesn't timeout when SSO is Enabled

2014-10-14 Thread Yasassri Ratnayake
Hi,

The issue is the Session validation is broken in IS 4.6 and a patch has
being applied for this. Its fixed in the Latest IS pack. The session
duration will be determined by the value set in the web.xml file.

With Regards,

On Wed, Oct 15, 2014 at 11:01 AM, Manoj Gunawardena  wrote:

> Hi Yasasiri,
>
>  The session out time can be set in /repository/conf/identity.xml
> under SSOService element.
>  Is there a way to synchronize these two settings? If user changes AS
> session time out same session time out time can be use for IS. Without
> change two configuration files.
>
>
> Thanks
>
>
> On Wed, Oct 15, 2014 at 9:56 AM, Yasassri Ratnayake 
> wrote:
>
>> Hi All,
>>
>> I was testing AS 5.2.0 with an IS 4.6.0, when I reduce the session time
>> out value
>>
>> 
>> 15
>>
>> at */repository/conf/tomcat/carbon/WEB-INF *the sessions is
>> timed out as expected. But when I enable SSO the session doesn't get
>> timed-out.
>>
>> Are there any other config changes that has to be made in-order to handle
>> the session duration when SSO is enabled?
>>
>> With Regards,
>> --
>> Yasassri Ratnayake
>> Software Engineer - QA
>> WSO2 Inc ; http://wso2.com
>> lean.enterprise.middleware
>> *Mobile : +94715933168 <%2B94715933168>*
>> *Blog : http://yasassriratnayake.blogspot.com/
>> *
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Manoj Gunawardena
> Tech Lead
> WSO2, Inc.: http://wso2.com
> lean.enterprise.middleware
> Mobile : +94 77 2291643
>



-- 
Yasassri Ratnayake
Software Engineer - QA
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware
*Mobile : +94715933168*
*Blog : http://yasassriratnayake.blogspot.com/
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error establishing data source connection, Communications link failure

2014-10-14 Thread Supun Muthutantrige
Hi Manoj,

The error occurred when I attempt to link to a mysql database using the
CEP. The following error message was shown when the connection was tested.

Error--

Error establishing data source connection: Communications link failure The
last packet sent successfully to the server was 0 milliseconds ago. The
driver has not received any packets from the server.

-

After I allowed the permission as Yasassri mentioned the problem resolved.

Thank you,
Regards.

*Supun Rasitha Muthutantrige*





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


Re: [Dev] Could not find artifact org.wso2.carbon:org.wso2.carbon.identity.sso.agent:jar:1.3.0 in wso2-nexus

2014-10-14 Thread Niranda Perera
Hi,

Did you apply patches (if there are any)? I've had the symbol not found
errors when I haven't applied the patches.

Rgds

On Wed, Oct 15, 2014 at 11:22 AM, Kalpa Welivitigoda 
wrote:

> Hi,
>
> I am trying to build org.wso2.carbon.webapp.mgt [1] and I get the
> following error.
>
> [ERROR] Failed to execute goal on project org.wso2.carbon.webapp.mgt:
> Could not resolve dependencies for project
> org.wso2.carbon:org.wso2.carbon.webapp.mgt:bundle:4.3.0-SNAPSHOT: Could not
> find artifact org.wso2.carbon:org.wso2.carbon.identity.sso.agent:jar:1.3.0
> in wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/)
> -> [Help 1]
> [ERROR]
>
>
> I tried with org.wso2.carbon:org.wso2.carbon.identity.sso.agent
> 1.3.0-SNAPSHOT which is there in wso2-nexus. Got the following errors,
>
>
> [INFO] --- maven-compiler-plugin:2.3.1:compile (default-compile) @
> org.wso2.carbon.webapp.mgt ---
> [INFO] Compiling 44 source files to
> /home/kalpa/mw/carbon-deployment/components/webapp-mgt/org.wso2.carbon.webapp.mgt/target/classes
> [INFO] -
> [ERROR] COMPILATION ERROR :
> [INFO] -
> [ERROR]
> /home/kalpa/mw/carbon-deployment/components/webapp-mgt/org.wso2.carbon.webapp.mgt/src/main/java/org/wso2/carbon/webapp/mgt/sso/SAMLSSOValve.java:[63,44]
> cannot find symbol
> symbol  : method getConfigs()
> location: class org.wso2.carbon.identity.sso.agent.saml.SAML2SSOManager
>
> [ERROR]
> /home/kalpa/mw/carbon-deployment/components/webapp-mgt/org.wso2.carbon.webapp.mgt/src/main/java/org/wso2/carbon/webapp/mgt/sso/SAMLSSOValve.java:[78,33]
> cannot find symbol
> symbol  : constructor
> SAML2SSOManager(org.wso2.carbon.identity.sso.agent.util.SSOAgentConfigs)
> location: class org.wso2.carbon.identity.sso.agent.saml.SAML2SSOManager
>
> [ERROR]
> /home/kalpa/mw/carbon-deployment/components/webapp-mgt/org.wso2.carbon.webapp.mgt/src/main/java/org/wso2/carbon/webapp/mgt/sso/SAMLSSOValve.java:[147,46]
> getAccessToken(javax.servlet.http.HttpServletRequest) in
> org.wso2.carbon.identity.sso.agent.oauth2.SAML2GrantAccessTokenRequestor
> cannot be applied to
> (org.apache.catalina.connector.Request,org.wso2.carbon.identity.sso.agent.util.SSOAgentConfigs)
>
>
>
> Appreciate any help to get this solved.
>
> [1]
> https://github.com/wso2-dev/carbon-deployment/tree/master/components/webapp-mgt/org.wso2.carbon.webapp.mgt
>
>
> --
> Best Regards,
>
> Kalpa Welivitigoda
> Software Engineer, WSO2 Inc. http://wso2.com
> Email: kal...@wso2.com
> Mobile: +94776509215
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


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


Re: [Dev] [SS] Is there a way to get the value of via RSSAdmin?

2014-10-14 Thread Harsha Kumara
Hi Amalka,

So this would ideally be the database provider configured in the
rss-config. Previously there wasn't any service to get the provider. But
it's added in the latest code available in the repo.

Alternatively did you check getRSSInstance admin service to query the data
relates to a instance to achieve this task?

Thanks,
Harsha

On Wed, Oct 15, 2014 at 11:03 AM, Amalka Subasinghe  wrote:

> Hi,
>
> Appreciate your help on $subject.
>
>  
> Testing
> 
> 
> Testing
> SYSTEM
> *MYSQL*
> LOCAL
> 
> 
> jdbc:mysql://
> mysql.appfactory.private.wso2.com:3306
> root
> root
>
> com.mysql.jdbc.Driver
> 
> 
> 
> 
>  
>
> Thanks
> Amalka
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Harsha Kumara
Software Engineer, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Could not find artifact org.wso2.carbon:org.wso2.carbon.identity.sso.agent:jar:1.3.0 in wso2-nexus

2014-10-14 Thread Kalpa Welivitigoda
Hi,

I am trying to build org.wso2.carbon.webapp.mgt [1] and I get the following
error.

[ERROR] Failed to execute goal on project org.wso2.carbon.webapp.mgt: Could
not resolve dependencies for project
org.wso2.carbon:org.wso2.carbon.webapp.mgt:bundle:4.3.0-SNAPSHOT: Could not
find artifact org.wso2.carbon:org.wso2.carbon.identity.sso.agent:jar:1.3.0
in wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/) ->
[Help 1]
[ERROR]


I tried with org.wso2.carbon:org.wso2.carbon.identity.sso.agent
1.3.0-SNAPSHOT which is there in wso2-nexus. Got the following errors,


[INFO] --- maven-compiler-plugin:2.3.1:compile (default-compile) @
org.wso2.carbon.webapp.mgt ---
[INFO] Compiling 44 source files to
/home/kalpa/mw/carbon-deployment/components/webapp-mgt/org.wso2.carbon.webapp.mgt/target/classes
[INFO] -
[ERROR] COMPILATION ERROR :
[INFO] -
[ERROR]
/home/kalpa/mw/carbon-deployment/components/webapp-mgt/org.wso2.carbon.webapp.mgt/src/main/java/org/wso2/carbon/webapp/mgt/sso/SAMLSSOValve.java:[63,44]
cannot find symbol
symbol  : method getConfigs()
location: class org.wso2.carbon.identity.sso.agent.saml.SAML2SSOManager

[ERROR]
/home/kalpa/mw/carbon-deployment/components/webapp-mgt/org.wso2.carbon.webapp.mgt/src/main/java/org/wso2/carbon/webapp/mgt/sso/SAMLSSOValve.java:[78,33]
cannot find symbol
symbol  : constructor
SAML2SSOManager(org.wso2.carbon.identity.sso.agent.util.SSOAgentConfigs)
location: class org.wso2.carbon.identity.sso.agent.saml.SAML2SSOManager

[ERROR]
/home/kalpa/mw/carbon-deployment/components/webapp-mgt/org.wso2.carbon.webapp.mgt/src/main/java/org/wso2/carbon/webapp/mgt/sso/SAMLSSOValve.java:[147,46]
getAccessToken(javax.servlet.http.HttpServletRequest) in
org.wso2.carbon.identity.sso.agent.oauth2.SAML2GrantAccessTokenRequestor
cannot be applied to
(org.apache.catalina.connector.Request,org.wso2.carbon.identity.sso.agent.util.SSOAgentConfigs)



Appreciate any help to get this solved.

[1]
https://github.com/wso2-dev/carbon-deployment/tree/master/components/webapp-mgt/org.wso2.carbon.webapp.mgt


-- 
Best Regards,

Kalpa Welivitigoda
Software Engineer, WSO2 Inc. http://wso2.com
Email: kal...@wso2.com
Mobile: +94776509215
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error establishing data source connection, Communications link failure

2014-10-14 Thread Manoj Gunawardena
Hi Supun,

What was the problem?  This issue can happen due to various reasons.

Thanks



On Wed, Oct 15, 2014 at 10:35 AM, Supun Muthutantrige 
wrote:

> Hi Yasassri, It worked :)
>
> Thank you all for helping me out with this.
>
> Regards
>
> *Supun Rasitha Muthutantrige*
> *supunr*
> *Intern *
> *WSO2 Inc: http://wso2.com *
> *lean.enterprise.middleware*
>
> *Mobile: 0758374608*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Manoj Gunawardena
Tech Lead
WSO2, Inc.: http://wso2.com
lean.enterprise.middleware
Mobile : +94 77 2291643
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [SS] Is there a way to get the value of via RSSAdmin?

2014-10-14 Thread Amalka Subasinghe
Hi,

Appreciate your help on $subject.

 
Testing


Testing
SYSTEM
*MYSQL*
LOCAL


jdbc:mysql://
mysql.appfactory.private.wso2.com:3306
root
root

com.mysql.jdbc.Driver




 

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


Re: [Dev] Session Doesn't timeout when SSO is Enabled

2014-10-14 Thread Manoj Gunawardena
Hi Yasasiri,

 The session out time can be set in /repository/conf/identity.xml
under SSOService element.
 Is there a way to synchronize these two settings? If user changes AS
session time out same session time out time can be use for IS. Without
change two configuration files.


Thanks


On Wed, Oct 15, 2014 at 9:56 AM, Yasassri Ratnayake 
wrote:

> Hi All,
>
> I was testing AS 5.2.0 with an IS 4.6.0, when I reduce the session time
> out value
>
> 
> 15
>
> at */repository/conf/tomcat/carbon/WEB-INF *the sessions is
> timed out as expected. But when I enable SSO the session doesn't get
> timed-out.
>
> Are there any other config changes that has to be made in-order to handle
> the session duration when SSO is enabled?
>
> With Regards,
> --
> Yasassri Ratnayake
> Software Engineer - QA
> WSO2 Inc ; http://wso2.com
> lean.enterprise.middleware
> *Mobile : +94715933168 <%2B94715933168>*
> *Blog : http://yasassriratnayake.blogspot.com/
> *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Manoj Gunawardena
Tech Lead
WSO2, Inc.: http://wso2.com
lean.enterprise.middleware
Mobile : +94 77 2291643
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error establishing data source connection, Communications link failure

2014-10-14 Thread Supun Muthutantrige
Hi Yasassri, It worked :)

Thank you all for helping me out with this.

Regards

*Supun Rasitha Muthutantrige*
*supunr*
*Intern *
*WSO2 Inc: http://wso2.com *
*lean.enterprise.middleware*

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


Re: [Dev] Error establishing data source connection, Communications link failure

2014-10-14 Thread Yasassri Ratnayake
Hi,

Try commenting out the bind address in my.cnf and granting all access to
the user you are trying to connect with as follows,

GRANT ALL PRIVILEGES ON *.* TO @'%' IDENTIFIED BY ''
WITH GRANT OPTION;

Make sure you restart mysql

With Regards,

On Wed, Oct 15, 2014 at 10:01 AM, Supun Muthutantrige 
wrote:

> Hi Rajeevan,
>
> Yes, I tried by adding *mysql-connector-Java-5.1.33. tar.gz*, and then
> with only having *mysql-connector-Java-5.1.33-bin.jar* in that folder.
> But neither worked.
>
> Regards
> *Supun Rasitha Muthutantrige*
> *supunr*
>
>
> *Intern WSO2 Inc: http://wso2.com
> lean.enterprise.middleware*
>
> *Mobile: 0758374608*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Yasassri Ratnayake
Software Engineer - QA
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware
*Mobile : +94715933168*
*Blog : http://yasassriratnayake.blogspot.com/
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error establishing data source connection, Communications link failure

2014-10-14 Thread Supun Muthutantrige
Hi Rajeevan,

Yes, I tried by adding *mysql-connector-Java-5.1.33. tar.gz*, and then with
only having *mysql-connector-Java-5.1.33-bin.jar* in that folder. But
neither worked.

Regards
*Supun Rasitha Muthutantrige*
*supunr*


*Intern WSO2 Inc: http://wso2.com
lean.enterprise.middleware*

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


[Dev] Session Doesn't timeout when SSO is Enabled

2014-10-14 Thread Yasassri Ratnayake
Hi All,

I was testing AS 5.2.0 with an IS 4.6.0, when I reduce the session time out
value


15

at */repository/conf/tomcat/carbon/WEB-INF *the sessions is
timed out as expected. But when I enable SSO the session doesn't get
timed-out.

Are there any other config changes that has to be made in-order to handle
the session duration when SSO is enabled?

With Regards,
-- 
Yasassri Ratnayake
Software Engineer - QA
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware
*Mobile : +94715933168*
*Blog : http://yasassriratnayake.blogspot.com/
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error establishing data source connection, Communications link failure

2014-10-14 Thread Vimalanathan Rajeevan
Hi Supun,

Did you add mysql JDBC driver to /repository/components/lib/
folder?

Thanks,
Rajeevan

On Wed, Oct 15, 2014 at 9:47 AM, Supun Muthutantrige 
wrote:

> Hi all,
>
> While attempting to relate to an RDBMS data source [Driver*:*
> *com.mysql.jdbc.Driver*, URL: *jdbc:mysql://localhost:3306/testdb*] in
> CEP, the following error occurs
>
> Error---
>
> Error establishing data source connection: Communications link failure The
> last packet sent successfully to the server was 0 milliseconds ago. The
> driver has not received any packets from the server.
>
> Error stack--
>
>
> [2014-10-15 09:21:52,227] ERROR - {DataSourceRepository}  Error
> establishing data source connection: Communications link failure
>
> The last packet sent successfully to the server was 0 milliseconds ago.
> The driver has not received any packets from the server.
> org.wso2.carbon.ndatasource.common.DataSourceException: Error establishing
> data source connection: Communications link failure
>
> The last packet sent successfully to the server was 0 milliseconds ago.
> The driver has not received any packets from the server.
> at
> org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader.testDataSourceConnection(RDBMSDataSourceReader.java:71)
> at
> org.wso2.carbon.ndatasource.core.DataSourceRepository.testDataSourceConnection(DataSourceRepository.java:510)
> at
> org.wso2.carbon.ndatasource.core.services.NDataSourceAdminService.testDataSourceConnection(NDataSourceAdminService.java:89)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
> End Error stack--
>
> I have changed the *bind-address* in *my.cnf *file, according to my
> machine ip as well.
>
> Appreciate any support to solve this error.
>
> Regards
>
> *Supun Rasitha Muthutantrige**supunr*
>
>
>
>
> *Intern WSO2 Inc: http://wso2.com 
> lean.enterprise.middleware*
> *Mobile: 0758374608*
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Best Regards,
V.Rajeevan
Software Engineer,
WSO2 Inc. :http://wso2.com

Mobile : +94 773090875
Email : rajeev...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ES] Workflow extensions support - Approval task pages or app ?

2014-10-14 Thread Nuwan Dias
There can be workflows for both the Publisher and the Store. Therefore
having a single place to administer both sounds appropriate and easy to
manage.

At least in the context of API Manager, having a page on the Publisher to
administer operations occurring on the Store doesn't seem right.

IMO having an app for administrative purposes seems logical/clean and more
secure (you can take it off completely from public facing interfaces and
deploy internally if required). Even in the case of ES, you can use it for
workflow administration, theming, doing import/export asset kind of stuff,
etc.

Thanks,
NuwanD.

On Wed, Oct 15, 2014 at 9:28 AM, Tanya Madurapperuma  wrote:

> Hi,
>
> *Overview*
> We are currently working on initial design to support workflow extensions
> in Enterprise Store as in APIM. Both global workflow extensions (Ex : Self
> signup ) and asset level extensions (Ex : Application creation for an API
> store ) will be supported.
>
> *Concern*
> Once the workflow support is enabled, there should be a place where
> different types of tasks will be  listed for an admin user approval. In
> APIM, a seperate admin-dashboard app is used for this
> purpose.(admin-dashboard app in APIM serves some other tasks such as theme
> uploading etc as well. )
>
> Does it require to use a seperate app for this in ES as well? Isn't it
> relevant to add these as pages in ES Publisher with appropriate
> permissions.Because basically publisher app acts as a store-admin which is
> used to perform store releated admin tasks such as publishing assets to
> store, viewing statistics etc.
>
> WDYT?
>
> Thanks,
> Tanya
> --
> Tanya Madurapperuma
>
> Software Engineer,
> WSO2 Inc. : wso2.com
> Mobile : +94718184439
> Blog : http://tanyamadurapperuma.blogspot.com
>



-- 
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


[Dev] Error establishing data source connection, Communications link failure

2014-10-14 Thread Supun Muthutantrige
Hi all,

While attempting to relate to an RDBMS data source [Driver*:*
*com.mysql.jdbc.Driver*, URL: *jdbc:mysql://localhost:3306/testdb*] in CEP,
the following error occurs

Error---

Error establishing data source connection: Communications link failure The
last packet sent successfully to the server was 0 milliseconds ago. The
driver has not received any packets from the server.

Error stack--


[2014-10-15 09:21:52,227] ERROR - {DataSourceRepository}  Error
establishing data source connection: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The
driver has not received any packets from the server.
org.wso2.carbon.ndatasource.common.DataSourceException: Error establishing
data source connection: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The
driver has not received any packets from the server.
at
org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader.testDataSourceConnection(RDBMSDataSourceReader.java:71)
at
org.wso2.carbon.ndatasource.core.DataSourceRepository.testDataSourceConnection(DataSourceRepository.java:510)
at
org.wso2.carbon.ndatasource.core.services.NDataSourceAdminService.testDataSourceConnection(NDataSourceAdminService.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

End Error stack--

I have changed the *bind-address* in *my.cnf *file, according to my machine
ip as well.

Appreciate any support to solve this error.

Regards

*Supun Rasitha Muthutantrige**supunr*




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


Re: [Dev] Self Signed JWT based Authenticator

2014-10-14 Thread Gayan Gunawardana
+1 for new orbit bundle.



On Tue, Oct 14, 2014 at 10:20 PM, Danushka Fernando 
wrote:

> Hi Prabath and Pushpalanka
> Thanks for the information. Will try these.
>
> Thanks & Regards
> Danushka Fernando
> Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
> On Tue, Oct 14, 2014 at 8:38 PM, Pushpalanka Jayawardhana 
> wrote:
>
>> Hi Danushka,
>>
>> We have used 'nimbus' library in org.wso2.carbon.identity.oauth/4.2.4
>> component which is to be released.
>>
>> 1. 2.26.1 version has been used
>> 2. since the library is to be used by more than one bundle I guess the
>> practice is to make it an orbit bundle.
>> 3. You may find the usage at [1], specifically in the class
>> 'org.wso2.carbon.identity.oauth/4.2.4/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultIDTokenBuilder.java'.
>>
>> [1] -
>> https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/identity/org.wso2.carbon.identity.oauth/4.2.4/pom.xml
>>
>> Hope this will help.
>> Adding Gayan as he worked on this.
>>
>> Thanks,
>> Pushpalanka.
>> --
>> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
>> Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
>> Mobile: +94779716248
>> Blog: pushpalankajaya.blogspot.com/ | LinkedIn:
>> lk.linkedin.com/in/pushpalanka/ | Twitter: @pushpalanka
>>
>>
>> On Tue, Oct 14, 2014 at 8:22 PM, Danushka Fernando 
>> wrote:
>>
>>> Hi
>>> I am currently working on the $subject. Here client will create a JWT
>>> and will sign and send to the server with HTTP authorization bearer header
>>> and IT will trigger this authenticator and will validate the JWT token and
>>> will log the user specified in the JWT to the system.
>>>
>>> So while working on this I ran in to following questions.
>>> 1. Do I need to use nimbus library for this? If so what is the version I
>>> need to use?
>>> 2. Since there is no orbit bundle for nimbus do I need to bundle the
>>> library in to my component? In my case its to both client side and
>>> authenticator side?
>>> 3. Is there a place that I can look in to that we have already used
>>> nimbus libraries?
>>>
>>> Thanks & Regards
>>> Danushka Fernando
>>> Software Engineer
>>> WSO2 inc. http://wso2.com/
>>> Mobile : +94716332729
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>


-- 
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


[Dev] [ES] Workflow extensions support - Approval task pages or app ?

2014-10-14 Thread Tanya Madurapperuma
Hi,

*Overview*
We are currently working on initial design to support workflow extensions
in Enterprise Store as in APIM. Both global workflow extensions (Ex : Self
signup ) and asset level extensions (Ex : Application creation for an API
store ) will be supported.

*Concern*
Once the workflow support is enabled, there should be a place where
different types of tasks will be  listed for an admin user approval. In
APIM, a seperate admin-dashboard app is used for this
purpose.(admin-dashboard app in APIM serves some other tasks such as theme
uploading etc as well. )

Does it require to use a seperate app for this in ES as well? Isn't it
relevant to add these as pages in ES Publisher with appropriate
permissions.Because basically publisher app acts as a store-admin which is
used to perform store releated admin tasks such as publishing assets to
store, viewing statistics etc.

WDYT?

Thanks,
Tanya
-- 
Tanya Madurapperuma

Software Engineer,
WSO2 Inc. : wso2.com
Mobile : +94718184439
Blog : http://tanyamadurapperuma.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Why does the "Token validity" text input shift when generating a keys?

2014-10-14 Thread Shariq Muhammed
Hi,

Is there any particular reason for this? :)

Initially, when a new app is created and doesn't have any keys to display,
the token  validity box is under "Allowed Domain" (before.png), once keys
are generated it shifts to  the left, next to the "Re-Generate" (after.png)
button. Isn't it appropriate to have it next to the "Generate" button when
 there are no  tokens as well?!

-- 
Thanks,
Shariq
Senior Software Engineer
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][CEP] Connection refused from CEP port 7711

2014-10-14 Thread Chamila De Alwis
Update:

Removed everything, restarted working machine, and started another CEP
server. And now everything is working fine. The data are published to the
CEP. That was weird.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Wed, Oct 15, 2014 at 12:36 AM, Chamila De Alwis 
wrote:

> Hi Akila,
>
> AFAIK the Python code is generated from the .thrift file. I went through
> the wrapper code and it seems what it does is to just use a given IP
> address and port and open a socket connection to it.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Tue, Oct 14, 2014 at 11:31 PM, Akila Ravihansa Perera <
> raviha...@wso2.com> wrote:
>
>> Hi Chamila,
>>
>> Perhaps the problem is with the logic related to hostname that you use
>> to create the socket in Python client. Have you tried enabling DEBUG
>> mode in Python?
>>
>>
>>
>> On Tue, Oct 14, 2014 at 9:57 PM, Chamila De Alwis 
>> wrote:
>> > Hi Manula,
>> >
>> > On Tue, Oct 14, 2014 at 7:48 PM, Manula Chathurika Thantriwatte
>> >  wrote:
>> >>
>> >> when you run the both servers in the same virtualbox.
>> >
>> >
>> > I didn't run both BAM and CEP together, just separate, in a another
>> machine
>> > actually. The same CEP and BAM with same configuration was run on both
>> > machines.
>> >
>> >
>> > Regards,
>> > Chamila de Alwis
>> > Software Engineer | WSO2 | +94772207163
>> > Blog: code.chamiladealwis.com
>> >
>> >
>> >
>> > ___
>> > Dev mailing list
>> > Dev@wso2.org
>> > http://wso2.org/cgi-bin/mailman/listinfo/dev
>> >
>>
>>
>>
>> --
>> Akila Ravihansa Perera
>> Software Engineer, WSO2
>>
>> Blog: http://ravihansa3000.blogspot.com
>>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][CEP] Connection refused from CEP port 7711

2014-10-14 Thread Chamila De Alwis
Hi Akila,

AFAIK the Python code is generated from the .thrift file. I went through
the wrapper code and it seems what it does is to just use a given IP
address and port and open a socket connection to it.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Tue, Oct 14, 2014 at 11:31 PM, Akila Ravihansa Perera  wrote:

> Hi Chamila,
>
> Perhaps the problem is with the logic related to hostname that you use
> to create the socket in Python client. Have you tried enabling DEBUG
> mode in Python?
>
>
>
> On Tue, Oct 14, 2014 at 9:57 PM, Chamila De Alwis 
> wrote:
> > Hi Manula,
> >
> > On Tue, Oct 14, 2014 at 7:48 PM, Manula Chathurika Thantriwatte
> >  wrote:
> >>
> >> when you run the both servers in the same virtualbox.
> >
> >
> > I didn't run both BAM and CEP together, just separate, in a another
> machine
> > actually. The same CEP and BAM with same configuration was run on both
> > machines.
> >
> >
> > Regards,
> > Chamila de Alwis
> > Software Engineer | WSO2 | +94772207163
> > Blog: code.chamiladealwis.com
> >
> >
> >
> > ___
> > Dev mailing list
> > Dev@wso2.org
> > http://wso2.org/cgi-bin/mailman/listinfo/dev
> >
>
>
>
> --
> Akila Ravihansa Perera
> Software Engineer, WSO2
>
> Blog: http://ravihansa3000.blogspot.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][CEP] Connection refused from CEP port 7711

2014-10-14 Thread Akila Ravihansa Perera
Hi Chamila,

Perhaps the problem is with the logic related to hostname that you use
to create the socket in Python client. Have you tried enabling DEBUG
mode in Python?



On Tue, Oct 14, 2014 at 9:57 PM, Chamila De Alwis  wrote:
> Hi Manula,
>
> On Tue, Oct 14, 2014 at 7:48 PM, Manula Chathurika Thantriwatte
>  wrote:
>>
>> when you run the both servers in the same virtualbox.
>
>
> I didn't run both BAM and CEP together, just separate, in a another machine
> actually. The same CEP and BAM with same configuration was run on both
> machines.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
Akila Ravihansa Perera
Software Engineer, WSO2

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


[Dev] Hazelcast error while shutting down server

2014-10-14 Thread Aruna Karunarathna
Hi Azeez,

We are currently doing testing in carbon 4.3.0 with the latest hazelcast
3.2.6 upgrade. And when shutting down a server using (ctrl +c ) following
error occurred.
This was reported earlier also here [1] in carbon 4.2.0.

Exception in thread "Cluster [wso2.as.domain] coordinator elector thread"
com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance
is not active!
at
com.hazelcast.spi.impl.BasicOperationService.shutdown(BasicOperationService.java:749)
at com.hazelcast.spi.impl.NodeEngineImpl.shutdown(NodeEngineImpl.java:347)
at com.hazelcast.instance.Node.shutdown(Node.java:420)
at com.hazelcast.instance.Node$NodeShutdownHookThread.run(Node.java:507)
at -- End remote and begin local stack-trace --.(Unknown Source)
at
com.hazelcast.spi.impl.BasicInvocation$InvocationFuture.resolveResponse(BasicInvocation.java:869)
at
com.hazelcast.spi.impl.BasicInvocation$InvocationFuture.resolveResponseOrThrowException(BasicInvocation.java:802)
at
com.hazelcast.spi.impl.BasicInvocation$InvocationFuture.get(BasicInvocation.java:698)
at
com.hazelcast.spi.impl.BasicInvocation$InvocationFuture.get(BasicInvocation.java:676)
at
com.hazelcast.spi.impl.BasicInvocation$InvocationFuture.getSafely(BasicInvocation.java:689)
at
com.hazelcast.concurrent.lock.LockProxySupport.lock(LockProxySupport.java:80)
at
com.hazelcast.concurrent.lock.LockProxySupport.lock(LockProxySupport.java:74)
at com.hazelcast.concurrent.lock.LockProxy.lock(LockProxy.java:70)
at
org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent$2.run(HazelcastClusteringAgent.java:228)

Any idea on how to overcome this error?. I looked at the
HazelcastClusteringAgent code and AFAIU coordinatorElectorThread is waiting
for acquire the lock and the
hazelcast instance is not valid at this point since the shutdown is
triggered.

I tried using the *hazelcast.shutdownhook.enabled=false*  property and it
ended up with the following error.

Exception in thread "Cluster [wso2.as.domain] coordinator elector thread"
com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance
is not active!
at
com.hazelcast.spi.impl.BasicOperationService.shutdown(BasicOperationService.java:749)
at com.hazelcast.spi.impl.NodeEngineImpl.shutdown(NodeEngineImpl.java:347)
at com.hazelcast.instance.Node.shutdown(Node.java:420)
at
com.hazelcast.instance.LifecycleServiceImpl.shutdown(LifecycleServiceImpl.java:79)
at
com.hazelcast.instance.HazelcastInstanceFactory.shutdownAll(HazelcastInstanceFactory.java:213)
at com.hazelcast.core.Hazelcast.shutdownAll(Hazelcast.java:41)
at
org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent.stop(HazelcastClusteringAgent.java:347)
at
org.apache.axis2.engine.AxisConfiguration.cleanup(AxisConfiguration.java:1462)
at
org.apache.axis2.context.ConfigurationContext.terminate(ConfigurationContext.java:788)
at org.apache.axis2.transport.http.AxisServlet.destroy(AxisServlet.java:528)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistration.destroy(ServletRegistration.java:38)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.unregister(ProxyServlet.java:153)
at
org.eclipse.equinox.http.servlet.internal.HttpServiceImpl.unregister(HttpServiceImpl.java:88)
at
org.wso2.carbon.core.init.CarbonServerManager.stop(CarbonServerManager.java:932)
at
org.wso2.carbon.core.internal.CarbonCoreServiceComponent.deactivate(CarbonCoreServiceComponent.java:102)
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.deactivate(ServiceComponent.java:387)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.deactivate(ServiceComponentProp.java:161)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.dispose(ServiceComponentProp.java:389)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.dispose(ServiceComponentProp.java:102)
at
org.eclipse.equinox.internal.ds.InstanceProcess.disposeInstances(InstanceProcess.java:344)
at
org.eclipse.equinox.internal.ds.InstanceProcess.disposeInstances(InstanceProcess.java:306)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:368)
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.

Re: [Dev] Self Signed JWT based Authenticator

2014-10-14 Thread Danushka Fernando
Hi Prabath and Pushpalanka
Thanks for the information. Will try these.

Thanks & Regards
Danushka Fernando
Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729

On Tue, Oct 14, 2014 at 8:38 PM, Pushpalanka Jayawardhana 
wrote:

> Hi Danushka,
>
> We have used 'nimbus' library in org.wso2.carbon.identity.oauth/4.2.4
> component which is to be released.
>
> 1. 2.26.1 version has been used
> 2. since the library is to be used by more than one bundle I guess the
> practice is to make it an orbit bundle.
> 3. You may find the usage at [1], specifically in the class
> 'org.wso2.carbon.identity.oauth/4.2.4/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultIDTokenBuilder.java'.
>
> [1] -
> https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/identity/org.wso2.carbon.identity.oauth/4.2.4/pom.xml
>
> Hope this will help.
> Adding Gayan as he worked on this.
>
> Thanks,
> Pushpalanka.
> --
> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
> Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
> Mobile: +94779716248
> Blog: pushpalankajaya.blogspot.com/ | LinkedIn:
> lk.linkedin.com/in/pushpalanka/ | Twitter: @pushpalanka
>
>
> On Tue, Oct 14, 2014 at 8:22 PM, Danushka Fernando 
> wrote:
>
>> Hi
>> I am currently working on the $subject. Here client will create a JWT and
>> will sign and send to the server with HTTP authorization bearer header and
>> IT will trigger this authenticator and will validate the JWT token and will
>> log the user specified in the JWT to the system.
>>
>> So while working on this I ran in to following questions.
>> 1. Do I need to use nimbus library for this? If so what is the version I
>> need to use?
>> 2. Since there is no orbit bundle for nimbus do I need to bundle the
>> library in to my component? In my case its to both client side and
>> authenticator side?
>> 3. Is there a place that I can look in to that we have already used
>> nimbus libraries?
>>
>> Thanks & Regards
>> Danushka Fernando
>> Software Engineer
>> WSO2 inc. http://wso2.com/
>> Mobile : +94716332729
>>
>> ___
>> 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] [DEV][CEP] Connection refused from CEP port 7711

2014-10-14 Thread Chamila De Alwis
Hi Manula,

On Tue, Oct 14, 2014 at 7:48 PM, Manula Chathurika Thantriwatte <
manu...@wso2.com> wrote:

> when you run the both servers in the same virtualbox.


I didn't run both BAM and CEP together, just separate, in a another machine
actually. The same CEP and BAM with same configuration was run on both
machines.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Issue in writing a Custom function as Siddhi Extension

2014-10-14 Thread Lahiru Cooray
Hi,

When writing a custom function as a Siddhi Extension I faced an issue in
validating the parameter count passed.

Eg:
from InputStream1
select *custom:cos(para1)*
insert into OutputSream1

I tried to validate the custom function '*cos*' where user should be able
to pass only one parameter.I used the below code in my function:

 @Override

public void init(Attribute.Type[] types, SiddhiContext siddhiContext) {

if (types.length  !=1 ) {

 //validation message

}

………

}
Here even when the user doesn't pass any parameter, it returns the
types.length as '1' and the data type as LONG.

Can somebody please help me to figure out the reason for this??

Thanks...
-- 
*Lahiru Cooray*
Software Engineer
WSO2, Inc.;http://wso2.com/
lean.enterprise.middleware

Mobile: +94 715 654154
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] org.wso2.carbon.identity.tests.saml.SSOConfigServiceTestCase

2014-10-14 Thread Amal Gunatilake
cc: dev@

Thank you  & Best regards,

*Amal Gunatilake*
 Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

On Tue, Oct 14, 2014 at 9:16 PM, Amal Gunatilake  wrote:

> Hi Isura,
>
> When I manually do the scenario as mentioned in the documentation [1], I
> get the following error on wso2as server console :
>
> [2014-10-14 21:10:13,047]  INFO
> {org.wso2.sample.is.sso.agent.SSOAgentSampleFilter} -  SAML2 HTTP Binding
> not found in request. Defaulting to HTTP-POST
>
> Following was shown in the UI :
>
> java.lang.NullPointerException
>   java.lang.String.replace(String.java:2207)
>   
> org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.sendResponse(SAMLSSOProviderServlet.java:433)
>   
> org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.handleAuthenticationReponseFromFramework(SAMLSSOProviderServlet.java:514)
>   
> org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.handleRequest(SAMLSSOProviderServlet.java:163)
>   
> org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.doGet(SAMLSSOProviderServlet.java:91)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>   
> org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
>   
> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>   
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>   
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>   
> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>   
> org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
>
>
> I think this happens due to an error that remains in the server
> functionality.
>
> [1] https://docs.wso2.com/display/IS500/Configuring+SAML2+SSO
>
> Thank you  & Best regards,
>
> *Amal Gunatilake*
>  Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Self Signed JWT based Authenticator

2014-10-14 Thread Pushpalanka Jayawardhana
Hi Danushka,

We have used 'nimbus' library in org.wso2.carbon.identity.oauth/4.2.4
component which is to be released.

1. 2.26.1 version has been used
2. since the library is to be used by more than one bundle I guess the
practice is to make it an orbit bundle.
3. You may find the usage at [1], specifically in the class
'org.wso2.carbon.identity.oauth/4.2.4/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultIDTokenBuilder.java'.

[1] -
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/identity/org.wso2.carbon.identity.oauth/4.2.4/pom.xml

Hope this will help.
Adding Gayan as he worked on this.

Thanks,
Pushpalanka.
-- 
Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
Mobile: +94779716248
Blog: pushpalankajaya.blogspot.com/ | LinkedIn:
lk.linkedin.com/in/pushpalanka/ | Twitter: @pushpalanka


On Tue, Oct 14, 2014 at 8:22 PM, Danushka Fernando 
wrote:

> Hi
> I am currently working on the $subject. Here client will create a JWT and
> will sign and send to the server with HTTP authorization bearer header and
> IT will trigger this authenticator and will validate the JWT token and will
> log the user specified in the JWT to the system.
>
> So while working on this I ran in to following questions.
> 1. Do I need to use nimbus library for this? If so what is the version I
> need to use?
> 2. Since there is no orbit bundle for nimbus do I need to bundle the
> library in to my component? In my case its to both client side and
> authenticator side?
> 3. Is there a place that I can look in to that we have already used nimbus
> libraries?
>
> Thanks & Regards
> Danushka Fernando
> Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
> ___
> 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] Self Signed JWT based Authenticator

2014-10-14 Thread Prabath Siriwardena
On Tue, Oct 14, 2014 at 8:22 PM, Danushka Fernando 
wrote:

> Hi
> I am currently working on the $subject. Here client will create a JWT and
> will sign and send to the server with HTTP authorization bearer header and
> IT will trigger this authenticator and will validate the JWT token and will
> log the user specified in the JWT to the system.
>
> So while working on this I ran in to following questions.
> 1. Do I need to use nimbus library for this? If so what is the version I
> need to use?
>

+1 for using Nimbus. The latest stable version.


> 2. Since there is no orbit bundle for nimbus do I need to bundle the
> library in to my component? In my case its to both client side and
> authenticator side?
>

+1


> 3. Is there a place that I can look in to that we have already used nimbus
> libraries?
>

Nimbus has very good documentation.

Thanks & regards,
-Prabath



>
> Thanks & Regards
> Danushka Fernando
> Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>



-- 
Thanks & Regards,
Prabath

Twitter : @prabath
LinkedIn : http://www.linkedin.com/in/prabathsiriwardena

Mobile : +94 71 809 6732

http://blog.facilelogin.com
http://blog.api-security.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Self Signed JWT based Authenticator

2014-10-14 Thread Danushka Fernando
Hi
I am currently working on the $subject. Here client will create a JWT and
will sign and send to the server with HTTP authorization bearer header and
IT will trigger this authenticator and will validate the JWT token and will
log the user specified in the JWT to the system.

So while working on this I ran in to following questions.
1. Do I need to use nimbus library for this? If so what is the version I
need to use?
2. Since there is no orbit bundle for nimbus do I need to bundle the
library in to my component? In my case its to both client side and
authenticator side?
3. Is there a place that I can look in to that we have already used nimbus
libraries?

Thanks & Regards
Danushka Fernando
Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][CEP] Connection refused from CEP port 7711

2014-10-14 Thread Manula Chathurika Thantriwatte
Hi Chamila,

I think your problem get solved when you run the both servers in the same
virtualbox.

On Tue, Oct 14, 2014 at 7:45 PM, Chamila De Alwis  wrote:

> Hi Manula,
>
> At the time CEP was run, BAM was not running. But both servers were run on
> the same machine.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Tue, Oct 14, 2014 at 7:44 PM, Manula Chathurika Thantriwatte <
> manu...@wso2.com> wrote:
>
>> Hi Chamila,
>>
>> Is BAM run on the same virtualbox private network ?
>>
>> On Tue, Oct 14, 2014 at 7:05 PM, Chamila De Alwis 
>> wrote:
>>
>>> Update:
>>>
>>> This seems to be somehow caused by a network interface issue. The
>>> machine I run CEP on has a virtualbox private network configured. I started
>>> another CEP sever on a separate machine without the virtualbox network
>>> configuration and the same code is able to connect and publish to the
>>> latter server.
>>>
>>> The exact cause for this is unclear.
>>>
>>>
>>> Regards,
>>> Chamila de Alwis
>>> Software Engineer | WSO2 | +94772207163
>>> Blog: code.chamiladealwis.com
>>>
>>>
>>>
>>> On Tue, Oct 14, 2014 at 5:42 PM, Chamila De Alwis 
>>> wrote:
>>>
 Hi,

 I'm trying to get a Python data publisher to publish data to WSO2CEP
 through the Thrift protocol. I can successfully publish data to BAM on its
 port 7711 using username and password. However the same code doesn't
 connect to the port 7711 on the CEP and gives the following error.


 thrift.transport.TTransport.TTransportException: Could not connect to
 10.100.5.140:7711: [Errno 111] Connection refused


 The Python client I'm using is at [1]. The port 7711 is open, and I can
 telnet to it.

 Is there any difference when it comes to publishing to BAM vs CEP?


 [1] - https://github.com/dineshbandara/thrift-python-client


 Regards,
 Chamila de Alwis
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Regards,
>> Manula Chathurika Thantriwatte
>> Software Engineer
>> WSO2 Inc. : http://wso2.com
>> lean . enterprise . middleware
>>
>> email : manu...@wso2.com / man...@apache.org
>> phone : +94 772492511
>> blog : http://manulachathurika.blogspot.com/
>>
>>
>>
>>
>


-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manu...@wso2.com / man...@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][CEP] Connection refused from CEP port 7711

2014-10-14 Thread Chamila De Alwis
Hi Manula,

At the time CEP was run, BAM was not running. But both servers were run on
the same machine.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Tue, Oct 14, 2014 at 7:44 PM, Manula Chathurika Thantriwatte <
manu...@wso2.com> wrote:

> Hi Chamila,
>
> Is BAM run on the same virtualbox private network ?
>
> On Tue, Oct 14, 2014 at 7:05 PM, Chamila De Alwis 
> wrote:
>
>> Update:
>>
>> This seems to be somehow caused by a network interface issue. The machine
>> I run CEP on has a virtualbox private network configured. I started another
>> CEP sever on a separate machine without the virtualbox network
>> configuration and the same code is able to connect and publish to the
>> latter server.
>>
>> The exact cause for this is unclear.
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>> On Tue, Oct 14, 2014 at 5:42 PM, Chamila De Alwis 
>> wrote:
>>
>>> Hi,
>>>
>>> I'm trying to get a Python data publisher to publish data to WSO2CEP
>>> through the Thrift protocol. I can successfully publish data to BAM on its
>>> port 7711 using username and password. However the same code doesn't
>>> connect to the port 7711 on the CEP and gives the following error.
>>>
>>>
>>> thrift.transport.TTransport.TTransportException: Could not connect to
>>> 10.100.5.140:7711: [Errno 111] Connection refused
>>>
>>>
>>> The Python client I'm using is at [1]. The port 7711 is open, and I can
>>> telnet to it.
>>>
>>> Is there any difference when it comes to publishing to BAM vs CEP?
>>>
>>>
>>> [1] - https://github.com/dineshbandara/thrift-python-client
>>>
>>>
>>> Regards,
>>> Chamila de Alwis
>>> Software Engineer | WSO2 | +94772207163
>>> Blog: code.chamiladealwis.com
>>>
>>>
>>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Regards,
> Manula Chathurika Thantriwatte
> Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> email : manu...@wso2.com / man...@apache.org
> phone : +94 772492511
> blog : http://manulachathurika.blogspot.com/
>
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][CEP] Connection refused from CEP port 7711

2014-10-14 Thread Manula Chathurika Thantriwatte
Hi Chamila,

Is BAM run on the same virtualbox private network ?

On Tue, Oct 14, 2014 at 7:05 PM, Chamila De Alwis  wrote:

> Update:
>
> This seems to be somehow caused by a network interface issue. The machine
> I run CEP on has a virtualbox private network configured. I started another
> CEP sever on a separate machine without the virtualbox network
> configuration and the same code is able to connect and publish to the
> latter server.
>
> The exact cause for this is unclear.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Tue, Oct 14, 2014 at 5:42 PM, Chamila De Alwis 
> wrote:
>
>> Hi,
>>
>> I'm trying to get a Python data publisher to publish data to WSO2CEP
>> through the Thrift protocol. I can successfully publish data to BAM on its
>> port 7711 using username and password. However the same code doesn't
>> connect to the port 7711 on the CEP and gives the following error.
>>
>>
>> thrift.transport.TTransport.TTransportException: Could not connect to
>> 10.100.5.140:7711: [Errno 111] Connection refused
>>
>>
>> The Python client I'm using is at [1]. The port 7711 is open, and I can
>> telnet to it.
>>
>> Is there any difference when it comes to publishing to BAM vs CEP?
>>
>>
>> [1] - https://github.com/dineshbandara/thrift-python-client
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manu...@wso2.com / man...@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][CEP] Connection refused from CEP port 7711

2014-10-14 Thread Chamila De Alwis
Update:

This seems to be somehow caused by a network interface issue. The machine I
run CEP on has a virtualbox private network configured. I started another
CEP sever on a separate machine without the virtualbox network
configuration and the same code is able to connect and publish to the
latter server.

The exact cause for this is unclear.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Tue, Oct 14, 2014 at 5:42 PM, Chamila De Alwis  wrote:

> Hi,
>
> I'm trying to get a Python data publisher to publish data to WSO2CEP
> through the Thrift protocol. I can successfully publish data to BAM on its
> port 7711 using username and password. However the same code doesn't
> connect to the port 7711 on the CEP and gives the following error.
>
>
> thrift.transport.TTransport.TTransportException: Could not connect to
> 10.100.5.140:7711: [Errno 111] Connection refused
>
>
> The Python client I'm using is at [1]. The port 7711 is open, and I can
> telnet to it.
>
> Is there any difference when it comes to publishing to BAM vs CEP?
>
>
> [1] - https://github.com/dineshbandara/thrift-python-client
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error while accessing ProvisioningAdminService

2014-10-14 Thread Waruna Perera
Hi Aruna,

Yes. What i did was to set session  management in soapui test case.

Thanks

On Tue, Oct 14, 2014 at 5:34 PM, Aruna Karunarathna  wrote:

> Hi Waruna,
>
> Did you manage to resolve the issue with session cookie?
>
> Regards,
> Aruna
>
> On Tue, Oct 14, 2014 at 4:52 PM, Waruna Perera  wrote:
>
>> Hi All,
>>
>> After offline discussion with Sameera  I found out that error was due to
>> not sending the session cookie with the 2nd request.
>>
>> On Mon, Oct 13, 2014 at 3:22 PM, Waruna Perera  wrote:
>>
>>> Hi,
>>>
>>> I am trying to install feature via ProvisioningAdminService using soapui
>>> requests. I Followed following steps.
>>>
>>> 1) Add feature repo via RepositoryAdminService - SUCCESSFUL
>>> 2) reviewProvisioningAction
>>> 3) performProvisioning Action
>>>
>>> In the step 3 it gives following error. What can be the error here?
>>>
>>> ERROR - ProvisioningAdminService Error occurred while performing
>>> provisioning action
>>> org.apache.axis2.AxisFault: Error occurred while performing provisioning
>>> action
>>> at
>>> org.wso2.carbon.feature.mgt.services.prov.ProvisioningAdminService.handleException(ProvisioningAdminService.java:386)
>>> at
>>> org.wso2.carbon.feature.mgt.services.prov.ProvisioningAdminService.performProvisioningAction(ProvisioningAdminService.java:281)
>>> 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.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
>>> at
>>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
>>> at
>>> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>>> at
>>> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>>> at
>>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
>>> at
>>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
>>> at
>>> org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>> at
>>> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>>> at
>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>>> at
>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>> at
>>> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>> at
>>> org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>> at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>>> at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>>> at
>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
>>> at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>>> at
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
>>> at
>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
>>> at
>>> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
>>> at
>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
>>> at
>>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
>>> at
>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
>>> at
>>> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
>>> at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>>> at
>>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
>>> at
>>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractP

[Dev] [DEV][CEP] Connection refused from CEP port 7711

2014-10-14 Thread Chamila De Alwis
Hi,

I'm trying to get a Python data publisher to publish data to WSO2CEP
through the Thrift protocol. I can successfully publish data to BAM on its
port 7711 using username and password. However the same code doesn't
connect to the port 7711 on the CEP and gives the following error.


thrift.transport.TTransport.TTransportException: Could not connect to
10.100.5.140:7711: [Errno 111] Connection refused


The Python client I'm using is at [1]. The port 7711 is open, and I can
telnet to it.

Is there any difference when it comes to publishing to BAM vs CEP?


[1] - https://github.com/dineshbandara/thrift-python-client


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error while accessing ProvisioningAdminService

2014-10-14 Thread Aruna Karunarathna
Hi Waruna,

Did you manage to resolve the issue with session cookie?

Regards,
Aruna

On Tue, Oct 14, 2014 at 4:52 PM, Waruna Perera  wrote:

> Hi All,
>
> After offline discussion with Sameera  I found out that error was due to
> not sending the session cookie with the 2nd request.
>
> On Mon, Oct 13, 2014 at 3:22 PM, Waruna Perera  wrote:
>
>> Hi,
>>
>> I am trying to install feature via ProvisioningAdminService using soapui
>> requests. I Followed following steps.
>>
>> 1) Add feature repo via RepositoryAdminService - SUCCESSFUL
>> 2) reviewProvisioningAction
>> 3) performProvisioning Action
>>
>> In the step 3 it gives following error. What can be the error here?
>>
>> ERROR - ProvisioningAdminService Error occurred while performing
>> provisioning action
>> org.apache.axis2.AxisFault: Error occurred while performing provisioning
>> action
>> at
>> org.wso2.carbon.feature.mgt.services.prov.ProvisioningAdminService.handleException(ProvisioningAdminService.java:386)
>> at
>> org.wso2.carbon.feature.mgt.services.prov.ProvisioningAdminService.performProvisioningAction(ProvisioningAdminService.java:281)
>> 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.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
>> at
>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
>> at
>> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>> at
>> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>> at
>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
>> at
>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
>> at
>> org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>> at
>> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>> at
>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>> at
>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>> at
>> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> at
>> org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>> at
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
>> at
>> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
>> at
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>> at
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
>> at
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
>> at
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(Thr

Re: [Dev] Tomcat Session Replication Using Caching

2014-10-14 Thread Pubudu Dissanayake
Thanks for the insight. New implementation is based on the approach of
single Hazelcast cluster shared across all webapps and context param
(similar to  tag) based approach to enable/disable session
replication.

On Tue, Oct 14, 2014 at 11:10 AM, Kishanthan Thangarajah <
kishant...@wso2.com> wrote:

> Hi Pubudu,
>
> Just to be clear, this feature should work on per webapp basis. i.e not
> all webapps' sessions should be replicated, but the selected ones by the
> user. Earlier we used a webapp context property (distributable) to enable
> this at webapp level.
>

I agree with you, In the current implementation it uses similar approach
and it won't replicate every single web app session. Therefore it only
looks in to the context property of the web.xml file and replicate the
session accordingly. ​


>
> Also here are the test cases that comes to mind.
>
> Say that we have a two node cluster (node-1, node-2)
> 1. Start both nodes -> change session values at node-1, then check whether
> those changes are reflected at node-2 (also check this both ways).
> 2. Start node-1 -> change session values at node-1 -> start node-2 and
> check whether session got replicated to node-2.
> 3. Same as #2 above, but after the third step, stop node-1 and change the
> session values at node-2 then start node-1 again and check the session
> state. This should have the latest changes at node-1 even-though that node
> was offline for while.
>
> ​I've looked in this approach as well and feature works as expected.
Tested failover scenarios as well.
​


> The above tests should make sure that session object was available all the
> time in the cluster, even-though the nodes were not available all the time.
>
> The next step is to test this with ELB setup.
> Say that we have a 1-Mgt+2-Worker setup fronted by an ELB. Since our ELB
> is session aware, it will send the requests to the same node based on the
> seesionID. And when that node goes offline, it will route the requests to
> the other node. But if we have enabled replication, this routing should
> work seamlessly where the same session object - which was replicated - will
> be used by the second node.
>
> ​ Majority of the time I've tested this feature using a cluster
environment ( Elb and two AS nodes ). Fail over use cases are also tested.
​


> So lets first do these tests and see.
> ​ ​
>
> Thanks,
> Kishanthan.
>
>
-- 
*Pubudu Dissanayake*
 Software Engineer

WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
Mob: + 94 775 503 304

Blog: http://geekdetected.wordpress.com/
Linkedin: *http://lk.linkedin.com/in/pubududissanayake*

Flickr : https://www.flickr.com/photos/pubudufx/
Twitter: https://twitter.com/GeekInAction
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Exception handling in CEP Siddhi Extensions

2014-10-14 Thread Sachini Jayasekara
Hi Vimalanathan,

You can throw a QueryCreationException if the erroneous conditions are
checked at the time of query creation. Make sure you throw the exception
with context information.
Some other exceptions you can use can be found at [1].

[1]
https://github.com/wso2-dev/siddhi/tree/master/modules/siddhi-core/src/main/java/org/wso2/siddhi/core/exception

Thanks

On Tue, Oct 14, 2014 at 1:22 PM, Vimalanathan Rajeevan 
wrote:

> We are writing Siddhi extensions for a training project "Adding Sketching
> algorithms for CEP operators" [1]. There we are implementing a Siddhi
> window for Top-K selection algorithm implementation. There was a
> requirement to handle the Exception thrown by stream-lib (Java library used
> for Top-K algorithm) as well as to throw Exceptions manually when certain
> conditions occur in window class.  What is the standard way of handling
> exceptions in Siddhi windows? I guess, Exceptions should be caught and a
> general Exception should be thrown. If so, What is the general Exception
> type should be thrown?
>
> [1] - https://redmine.wso2.com/issues/2884
> --
> Best Regards,
> V.Rajeevan
> Software Engineer,
> WSO2 Inc. :http://wso2.com
>
> Mobile : +94 773090875
> Email : rajeev...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 



*Thanks & Regards,Sachini JayasekaraSoftware Engineer; **WSO2 Inc. *

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


Re: [Dev] error in setup BAM server in API cluster setup

2014-10-14 Thread Dinesh J Weerakkody
Hi Akila,

Have you solved your problem?

On Mon, Oct 13, 2014 at 11:21 PM, Inosh Goonewardena  wrote:

> Hi,
>
> On Mon, Oct 13, 2014 at 6:15 PM, Akila Nimantha [IT/EKO/LOITS] <
> aki...@lolctech.com> wrote:
>
>>  Dear Gihan,
>>
>>
>>
>> Yes I used figures displayed in my BAM log.
>>
>> Can you please tell me is there a specific server that I should put these
>> configurations. Because I am trying to add BAM in a clustered setup. My
>> followed document says just  and so on. So what should I change
>> or both. For now I did same configuration in both four
>> components(Gateway,keymanager,publisher and store).
>>
>>
>>
> You need to configure usage tracking only in APIM-Gateway nodes. Please
> make sure APIM-Gateway nodes have the access to above BAM thrift server
> ports(telnet from gateway nodes to make sure).
>
>
>
>>  Regards,
>>
>> Akila
>>
>>
>>
>> *From:* Gihan Anuruddha [mailto:gi...@wso2.com]
>> *Sent:* 13 October 2014 5:50 PM
>>
>> *To:* Akila Nimantha [IT/EKO/LOITS]
>> *Cc:* dev@wso2.org
>> *Subject:* Re: [Dev] error in setup BAM server in API cluster setup
>>
>>
>>
>> Hi Akila,
>>
>>
>>
>> During the BAM server startup, it will show a message like below. Please
>> use that IP address to connect to BAM.
>>
>>
>>
>> [2014-10-13 14:51:17,448]  INFO {org.wso2.carbon.databridge.receiver.
>> thrift.internal.ThriftDataReceiver} -  Thrift Server started at 0.0.0.0
>>
>> [2014-10-13 14:51:17,453]  INFO {org.wso2.carbon.databridge.receiver.
>> thrift.internal.ThriftDataReceiver} -  Thrift SSL port : 7711
>>
>> [2014-10-13 14:51:17,456]  INFO {org.wso2.carbon.databridge.receiver.
>> thrift.internal.ThriftDataReceiver} -  Thrift port : 7611
>>
>>
>>
>>
>>
>> Regards,
>>
>> Gihan
>>
>>
>>
>> On Mon, Oct 13, 2014 at 5:46 PM, Akila Nimantha [IT/EKO/LOITS] <
>> aki...@lolctech.com> wrote:
>>
>>  Hi harsha,
>>
>>
>>
>> Yes ip is correct .i put port as 7617 because I used 6 as BAM offset.
>> please check below for apiusagetracking element details,
>>
>>
>>
>> 
>>
>> true
>>
>>
>> org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher
>>
>> 7617
>>
>> tcp://172.20.2.150:7617/
>>
>> admin
>>
>> admin
>>
>> jdbc/WSO2AM_STATS_DB
>>
>> 
>>
>>
>>
>> Regards,
>>
>> Akila
>>
>>
>>
>>
>>
>> *From:* Harsha Kumara [mailto:hars...@wso2.com]
>> *Sent:* 13 October 2014 4:46 PM
>> *To:* Akila Nimantha [IT/EKO/LOITS]
>> *Cc:* dev@wso2.org
>> *Subject:* Re: [Dev] error in setup BAM server in API cluster setup
>>
>>
>>
>> Hi Akila,
>>
>>
>>
>> Seems like it's a connection issue. Have you specified correct IPs and
>> ports in the configurations.
>>
>>
>>
>> Thanks,
>>
>> Harsha
>>
>>
>>
>> On Mon, Oct 13, 2014 at 4:08 PM, Akila Nimantha [IT/EKO/LOITS] <
>> aki...@lolctech.com> wrote:
>>
>>  Hi all,
>>
>>
>>
>> I am trying add BAM server(
>> https://docs.wso2.com/display/AM170/Publishing+API+Runtime+Statistics)
>> in API manager Cluster setup(
>> https://docs.wso2.com/display/CLUSTER420/Clustering+API+Manager).
>>
>> I just trying with default H2 database configurations and I get following
>> error.
>>
>> org.wso2.carbon.databridge.agent.thrift.exception.AgentException: Cannot
>> borrow client for TCP,172.20.2.150:7617,TCP,172.20.2.150:7717
>>
>>at
>> org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:58)
>>
>>at
>> org.wso2.carbon.databridge.agent.thrift.DataPublisher.start(DataPublisher.java:273)
>>
>>at
>> org.wso2.carbon.databridge.agent.thrift.DataPublisher.(DataPublisher.java:161)
>>
>>at
>> org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher$ReceiverConnectionWorker.run(AsyncDataPublisher.java:787)
>>
>>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)
>>
>> Caused by: org.apache.thrift.transport.TTransportException: Could not
>> connect to 172.20.2.150 on port 7717
>>
>>at
>> org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:212)
>>
>>at
>> org.apache.thrift.transport.TSSLTransportFactory.getClientSocket(TSSLTransportFactory.java:166)
>>
>>at
>> org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:90)
>>
>>at
>> org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:48)
>>
>>at
>> org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212)
>>
>>at
>> org.wso2.carbon.databridge.agent.thrift.internal.publisher.authen

Re: [Dev] Error while accessing ProvisioningAdminService

2014-10-14 Thread Waruna Perera
Hi All,

After offline discussion with Sameera  I found out that error was due to
not sending the session cookie with the 2nd request.

On Mon, Oct 13, 2014 at 3:22 PM, Waruna Perera  wrote:

> Hi,
>
> I am trying to install feature via ProvisioningAdminService using soapui
> requests. I Followed following steps.
>
> 1) Add feature repo via RepositoryAdminService - SUCCESSFUL
> 2) reviewProvisioningAction
> 3) performProvisioning Action
>
> In the step 3 it gives following error. What can be the error here?
>
> ERROR - ProvisioningAdminService Error occurred while performing
> provisioning action
> org.apache.axis2.AxisFault: Error occurred while performing provisioning
> action
> at
> org.wso2.carbon.feature.mgt.services.prov.ProvisioningAdminService.handleException(ProvisioningAdminService.java:386)
> at
> org.wso2.carbon.feature.mgt.services.prov.ProvisioningAdminService.performProvisioningAction(ProvisioningAdminService.java:281)
> 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.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
> at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
> at
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
> at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
> at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
> at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
> at
> org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> at
> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> at
> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at
> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
> at
> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
> at
> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
> 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)
> --
>
> Thanks,
>
> Waruna Perera
> Senior Software Engineer - Test Automation
> Mobile: +94 77 3867037
> WSO2, Inc.; http://wso2.com/
> lean . enterprise . middlewear.
>



-- 
Waru

Re: [Dev] [Jaggery] How to extract unicode value from request object

2014-10-14 Thread Lakshman Udayakantha
Hi

Sorry for the inconvenience occured. It's the correct way to extract
unicode value from request object. when I send unicode value from client
side I added the cotent type as application/x-www-form-urlencoded;
charset=utf-8. now it is working fine.

thanks

On Tue, Oct 14, 2014 at 2:56 PM, Lakshman Udayakantha 
wrote:

> Hi All,
>
> I used
> log.info("This is an INFO level
> log"+request.getParameter("name","UTF-8"));
>
> but it does not return correct value. it returns a value like this
>
> This is an INFO level logඋදයක෠න්à
>
> can someone point out that how to get the unicode values from request
> object correctly?
>
> --
> Lakshman Udayakantha
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
> Mobile: *0711241005*
>
>


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


Re: [Dev] [test-integration]Server process remains after build completion

2014-10-14 Thread Dimuthu De Lanerolle
I have build and run the test class from the same location and detected no
such error, and as expected server shutdown at the end of the test. Are you
running any custom test class which modifies any server configs and
restarts the existing server instance. If so pls verify whether the server
starts with any exceptions or not.

Regards

On Tue, Oct 14, 2014 at 2:14 PM, Darshana Akalanka Pagoda Arachchi <
darsha...@wso2.com> wrote:

> I had faced the same on occasions where server started with errors or
> exception or produced exceptions when the tests are executed. If these
> exceptions effects the server deployment this could happen ( eg:-  data
> source errors).
>
> On Tue, Oct 14, 2014 at 1:19 PM, Ayesha Dissanayaka 
> wrote:
>
>> Hi all,
>>
>> I am currently working on writing integration test for WSO2ES.
>>
>> I notice that after the build completion [01], the "wso2es" server
>> process remains without shutting down.
>> ( i.e:  ps -ef | grep "wso2es" list processes)
>>
>> Then I have to kill the process before next build.
>>
>> What would be the reason for this behavior?
>>
>> [01]
>> https://github.com/wso2-dev/product-es/tree/master/modules/integration/tests-ui-integration/tests-ui
>>
>> Thanks!
>> - Ayesha
>> --
>> *Ayesha Dissanayaka*
>> Software Engineer,
>> WSO2, Inc : http://wso2.com
>> 
>> 20, Palmgrove Avenue, Colombo 3
>> E-Mail: aye...@wso2.com 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Darshana Akalanka Pagoda Arachchi,*
> *Software Engineer*
> *078-4721791*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Dimuthu De Lanerolle
Software Engineer
WSO2 Inc.
lean . enterprise . middlewear.
http://wso2.com/
Tel. : +94 11 2145345  Fax : +94 11 2145300  email : dimut...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Jaggery] How to extract unicode value from request object

2014-10-14 Thread Lakshman Udayakantha
Hi All,

I used
log.info("This is an INFO level
log"+request.getParameter("name","UTF-8"));

but it does not return correct value. it returns a value like this

This is an INFO level logඋදයකාන්à

can someone point out that how to get the unicode values from request
object correctly?

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


[Dev] [APIM] Please commit the patch.

2014-10-14 Thread Abimaran Kugathasan
Hi Nuwan,


Please commi the attached patch for JIRA[1]

[1] : https://wso2.org/jira/browse/APIMANAGER-2733

-- 
Thanks
Abimaran Kugathasan

Software Engineer | WSO2 Inc
Data & APIs Technologies Team
Mobile : +94 77 1708229


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


Re: [Dev] CEP Window in Siddhi Query

2014-10-14 Thread Praneesha Chandrasiri
I have updated the pages accordingly in CEP docs and resolved the JIRA in
[1].

Thanks everyone!

[1] https://wso2.org/jira/browse/DOCUMENTATION-1186

On Mon, Oct 13, 2014 at 6:07 PM, Praneesha Chandrasiri 
wrote:

> Hi Lasantha,
>
> Thanks. Will do the needful.
>
> On Mon, Oct 13, 2014 at 5:03 PM, Asok Perera  wrote:
>
>> Hi Tishan/Lasantha,
>>
>> Thank you..!
>> Yes, I followed the queries in the CEP documentation..,
>> I will try the correct query. Thanks again
>>
>> BR
>>
>> *Asok Aravinda Perera*
>> Software Engineer
>> WSO2, Inc.;http://wso2.com/
>> 
>> lean.enterprise.middleware
>>
>> Mobile: +94722241032
>>
>> On Mon, Oct 13, 2014 at 4:44 PM, Lasantha Fernando 
>> wrote:
>>
>>> I think this was probably because there are some old queries in CEP
>>> documentation under "Writing a custom window".
>>>
>>> I've created a doc jira[1] to track this.
>>>
>>> @Praneesha, can you look into this and fix the docs mentioned in the
>>> ticket, please?
>>>
>>> Thanks,
>>> Lasantha
>>>
>>> [1] https://wso2.org/jira/browse/DOCUMENTATION-1186
>>>
>>> On 13 October 2014 16:20, Tishan Dahanayakage  wrote:
>>>
 Hi Asok,
 Siddhi query you are using is wrong. Correct query is

 from topkeventstream#window.custom:topKfrequency("3","1",symbol)
 select symbol
 insert into topkresultstream;

 Please refer [1] to learn about Siddhi query language.
 When you want to send data out of the window execute
 nextProcessor.process(event). It will send particular set of events to the
 next execution element of the query(ex: Selector)

 [1] https://docs.wso2.com/display/CEP310/Siddhi+Language+Specification

 On Mon, Oct 13, 2014 at 3:59 PM, Asok Perera  wrote:

> Hi,
>
> I wrote a window extension for Siddhi (implementing Stremlib library)
> which suppose to be keeping most frequent K events in the window. 
> According
> to the logs, the window in functional.
> Now I need to get the events which are *inside* the window into an
> output stream.
> Im using below siddhi query,
>
> from topkeventstream#window.custom:topKfrequency("3","1",symbol)
> insert into topkresultstream symbol
>
> , this gives me following error
> line 2:29 extraneous input 'symbol' expecting EOF
>
> Does someone has any idea on this ?
>
> BR
>
> *Asok Aravinda Perera*
> Software Engineer
> WSO2, Inc.;http://wso2.com/
> 
> lean.enterprise.middleware
>
> Mobile: +94722241032
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Tishan Dahanayakage
 Software Engineer
 WSO2, Inc.
 Mobile:+94 716481328

 Disclaimer: This communication may contain privileged or other
 confidential information and is intended exclusively for the addressee/s.
 If you are not the intended recipient/s, or believe that you may have
 received this communication in error, please reply to the sender indicating
 that fact and delete the copy you received and in addition, you should not
 print, copy, re-transmit, disseminate, or otherwise use the information
 contained in this communication. Internet communications cannot be
 guaranteed to be timely, secure, error or virus-free. The sender does not
 accept liability for any errors or omissions.

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


>>>
>>>
>>> --
>>> *Lasantha Fernando*
>>> Software Engineer - Data Technologies Team
>>> WSO2 Inc. http://wso2.com
>>>
>>> email: lasan...@wso2.com
>>> mobile: (+94) 71 5247551
>>>
>>
>>
>
>
> --
> Thanks & Best Regards,
> *Praneesha Chandrasiri*
> *Technical Writer*
> *WSO2 Inc. *
> *Mobile: +(94) 718156888 <%2B%2894%29%20718156888>*
> *E-mail: pranee...@wso2.com *
>
>


-- 
Thanks & Best Regards,
*Praneesha Chandrasiri*
*Technical Writer*
*WSO2 Inc. *
*Mobile: +(94) 718156888*
*E-mail: pranee...@wso2.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [test-integration]Server process remains after build completion

2014-10-14 Thread Darshana Akalanka Pagoda Arachchi
I had faced the same on occasions where server started with errors or
exception or produced exceptions when the tests are executed. If these
exceptions effects the server deployment this could happen ( eg:-  data
source errors).

On Tue, Oct 14, 2014 at 1:19 PM, Ayesha Dissanayaka  wrote:

> Hi all,
>
> I am currently working on writing integration test for WSO2ES.
>
> I notice that after the build completion [01], the "wso2es" server process
> remains without shutting down.
> ( i.e:  ps -ef | grep "wso2es" list processes)
>
> Then I have to kill the process before next build.
>
> What would be the reason for this behavior?
>
> [01]
> https://github.com/wso2-dev/product-es/tree/master/modules/integration/tests-ui-integration/tests-ui
>
> Thanks!
> - Ayesha
> --
> *Ayesha Dissanayaka*
> Software Engineer,
> WSO2, Inc : http://wso2.com
> 
> 20, Palmgrove Avenue, Colombo 3
> E-Mail: aye...@wso2.com 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Darshana Akalanka Pagoda Arachchi,*
*Software Engineer*
*078-4721791*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] ESB Properties - Automation Test Case Plan

2014-10-14 Thread Dimuthu De Lanerolle
Hi,

I am in the process of writing automation tests to cover all ESB properties
(https://docs.wso2.com/display/ESB481/Properties+Reference). Link below [1]
indicates the test cases identified as that needs to be automated. This
gdoc indicates the properties mentioned in the ESB 4.8.1 documentation
only. Also I found it a bit difficult to filter  test cases written for the
purposes of testing 'properties' only inside esb integration modules other
than test cases mentioned in 'Test Class Name' column. BTW are there any
additional properties we need to automate other than what are mentioned in
the ESB documentation ?

[1]
https://docs.google.com/a/wso2.com/spreadsheets/d/1Ql-c8tIRQE3VCHGuQbFBUqq1UisiZwpI9qmAA-gNKWY/edit#gid=0

Regards

-- 
Dimuthu De Lanerolle
Software Engineer
WSO2 Inc.
lean . enterprise . middlewear.
http://wso2.com/
Tel. : +94 11 2145345  Fax : +94 11 2145300  email : dimut...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 AppFactory 2.1.0 Milestone 6 Released!

2014-10-14 Thread Danushka Fernando
WSO2 AppFactory 2.1.0 Milestone 6 Released!

WSO2 AppFactory team is pleased to announce the release of version 2.1.0 M6
of the WSO2 App Factory.

WSO2 App Factory is a multi-tenant, elastic and self-service enterprise
platform that enables multiple project teams to collaboratively create, run
and manage enterprise applications. Combining complete application
lifecycle management and Platform-as-a-Service (PaaS) capabilities, WSO2
App Factory makes it possible to develop, test, deploy to production and
retire applications with a single click. It also provides an easy way to
discover and consume apps and APIs through a user-friendly storefront.

The distribution is available to download at [1] .

Bug fixes in this release can be found at [2].

Puppet manifests for App Factory can be found at [3].


We encourage you to report issues, documentation faults and feature
requests regarding WSO2 AppFactory through the public WSO2 AppFactory JIRA
.

[1]
https://svn.wso2.org/repos/wso2/scratch/appfactorycc_tags/2.1.0-M6/packs/wso2appfactory-2.1.0.zip


[2]
https://wso2.org/jira/browse/APPFAC-2522?jql=project%20%3D%20APPFAC%20AND%20fixVersion%20%3D%20%222.1.0-M6%22%20AND%20status%20%3D%20Resolved%20ORDER%20BY%20priority%20DESC

[3]

https://svn.wso2.org/repos/wso2/scratch/appfactorycc_tags/2.1.0-M6/appfactory_2.0.0/products/appfactory/2.1.0/modules/puppet-manifests/


Thanks & Regards
Danushka Fernando
Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Exception handling in CEP Siddhi Extensions

2014-10-14 Thread Vimalanathan Rajeevan
We are writing Siddhi extensions for a training project "Adding Sketching
algorithms for CEP operators" [1]. There we are implementing a Siddhi
window for Top-K selection algorithm implementation. There was a
requirement to handle the Exception thrown by stream-lib (Java library used
for Top-K algorithm) as well as to throw Exceptions manually when certain
conditions occur in window class.  What is the standard way of handling
exceptions in Siddhi windows? I guess, Exceptions should be caught and a
general Exception should be thrown. If so, What is the general Exception
type should be thrown?

[1] - https://redmine.wso2.com/issues/2884
-- 
Best Regards,
V.Rajeevan
Software Engineer,
WSO2 Inc. :http://wso2.com

Mobile : +94 773090875
Email : rajeev...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [test-integration]Server process remains after build completion

2014-10-14 Thread Ayesha Dissanayaka
Hi all,

I am currently working on writing integration test for WSO2ES.

I notice that after the build completion [01], the "wso2es" server process
remains without shutting down.
( i.e:  ps -ef | grep "wso2es" list processes)

Then I have to kill the process before next build.

What would be the reason for this behavior?

[01]
https://github.com/wso2-dev/product-es/tree/master/modules/integration/tests-ui-integration/tests-ui

Thanks!
- Ayesha
-- 
*Ayesha Dissanayaka*
Software Engineer,
WSO2, Inc : http://wso2.com

20, Palmgrove Avenue, Colombo 3
E-Mail: aye...@wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [WSO2MB] Cannot start User Manager Core bundle error on server startup

2014-10-14 Thread Hasitha Amal De Silva
Hi Harsha / PrabhathA,

I have created pull requests for the above 2 patches. Please review and
commit.

https://github.com/wso2-dev/carbon-storage-management/pull/52

https://github.com/wso2/orbit/pull/30

Appreciate if the updated cql-driver and cassandra jars could be added to
the nexus repo soon, so we can work with them at MB code base.

Thanks,

On Tue, Oct 14, 2014 at 10:28 AM, Harsha Kumara  wrote:

> Hi Prabath,
> Sure I'll check this.
> Thanks,
> Harsha
>
> On Tue, Oct 14, 2014 at 8:32 AM, Prabath Abeysekera 
> wrote:
>
>> Hi Harsha,
>>
>> On Tue, Oct 14, 2014 at 12:05 AM, Hasitha Amal De Silva <
>> hasit...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> The dependency fixes of andes compoenent is submitted through
>>> https://github.com/wso2-dev/andes/pull/95 . I have tested with these
>>> fixes locally and it works as expected.
>>>
>>> @PrabhathA :
>>>
>>> The following patches should be committed respectively to orbit and
>>> storage-management repos.
>>>
>>> I also noted that cassandra-driver-1.2.13.wso2v4 uses version
>>> 1.2.13.wso2v3 as a dependency. This i think causes two cassandra driver
>>> versions to exist at the final MB pack. Should we fix this ?
>>>
>>
>> Would you be able to look into this?
>>
>> Cheers,
>> Prabath
>>
>>
>>>
>>> @MB Team :
>>>
>>> We also need to remove any and all links of cassandra server feature
>>> from MB for refactoring purposes. I will work on this as time permits.
>>>
>>>
>>> Thanks
>>>
>>>
>>> On Mon, Oct 13, 2014 at 11:29 AM, Hasitha Amal De Silva <
>>> hasit...@wso2.com> wrote:
>>>
 Hi all,

 In terms of the andes component, we need to upgrade the guava
 dependencies to 14 from version 13 and verify. I'm working on this.


 On Mon, Oct 13, 2014 at 11:19 AM, Prabath Abeysekera >>> > wrote:

> Hi Ramith/MB team,
>
> This is all fixed. Let me know if you guys happen to run into any
> other problem further to this.
>
> Cheers,
> Prabath
>
> On Tue, Oct 7, 2014 at 11:41 AM, Prabath Abeysekera  > wrote:
>
>> To give you guys an update on what's been done so far, I've managed
>> to make both Cassandra as well as CQL Driver use the same guava version
>> (14.0.1) exposed by the platform and fix all the issues reported in the
>> thread.
>>
>> However, now I've come across another problem where Andes is unable
>> to get the datasources that are being used for all its internal
>> functionalities, bound to its data access layer due to a problem in the
>> dependency initialisation order. To be more concrete on the issue,
>> Cassandra server initialisation doesn't seem to happen before the data
>> sources are registered. This in turn results in Andes not picking up the
>> appropriate data sources to be able to access Cassandra forcing MB to 
>> fail
>> at the server start-up. I already am working on a resolution, will update
>> the thread as soon as this is fixed.
>>
>> Cheers,
>> Prabath
>>
>> On Sat, Oct 4, 2014 at 1:09 PM, Ramith Jayasinghe 
>> wrote:
>>
>>> Hi Prabath,
>>> This has become a blocker for the MB v 3.0.0 M1.
>>> (Since Dhanuka might be travelling) Shall we have a look on how to
>>> fix this on Monday?
>>>
>>> regards
>>> Ramith.
>>>
>>>
>>> On Fri, Oct 3, 2014 at 10:52 PM, Dhanuka Ranasinghe <
>>> dhan...@wso2.com> wrote:
>>>
 Hi Sameera,

 The reason for embed third party libraries is osgi cyclic
 dependency issue. This has been discussed long time back with 
 Kishanthan
 and you.

 Cheers,
 Dhanuka

 *Dhanuka Ranasinghe*

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

 phone : +94 715381915

 On Fri, Oct 3, 2014 at 10:11 PM, Sameera Jayasoma >>> > wrote:

> Hi Dhanuka,
>
> I noticed few issues in pom.xml of this orbit bundle.
>
> 1) Import package section is empty. Please the put correct import
> package list.
> 2) Optional=true is missing from some of the dependencies.
> 3) Following third-party libraries have been embedded inside this
> orbit bundle
>
> netty
> metrics-core
> guava
> jackson-core-as
> |jackson-mapper-asl
> slf4j-api
> slf4j-log4j12
> *apache-cassandra*
> libthrift;
>
> 4) Size of this bundle is around 8.5 MB and all the above embedded
> dependencies has contributed to this size.
>
> I know there exists orbit bundles with such issues, but we've
> started this effort recently to verify all the new orbit bundles 
> before
> publishing them to nexus repository.
>
> I am rejecting this pull request. Pleas