[Dev] AS redirect output and error streams

2016-12-05 Thread Grigoris Triantafillidis
Hello,

Could someone inform me where is the standard output stream and error stream 
redirection setting after start of WSO2 application server?
Java is 1.8.

Thanks

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


Re: [Dev] [AS 5.3.0]How to delete a Tenant?

2016-10-17 Thread wenxzhen
Before deleting a Tenant, the Tenant will be disabled or inactivated. If a 
Tenant is already in INACTIVE, deleting a TENANT will be still in problem?


Thanks, Wenxing


-- Original --
From:  "Danushka Fernando";;
Send time: Tuesday, Oct 18, 2016 11:35 AM
To: "wenxzhen"; 
Cc: "Thusitha Thilina Dayaratne"; "dev"; 
Subject:  Re: [Dev] [AS 5.3.0]How to delete a Tenant?



Thing is when you delete a tenant, there are lot of things to delete. Starting 
from DB entries for tenant and userstore, registry data, artifacts, etc. 
Because if you are truly deleting a tenant then it should be possible to create 
a tenant with same domain name and also not to contain something that previous 
tenant created inside new tenant.

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





 
On Tue, Oct 18, 2016 at 7:05 AM, wenxzhen  wrote:
The problem is that we will have many "old" tenants and it's not convenient 
when we are doing verification during the development.


What's the stopper to delete a Tenant? Can we do the delete with SQL statement 
"DELETE on CASCADE"?


Thanks, Wenxing


-- Original --
From:  "Thusitha Thilina Dayaratne";;
Send time: Tuesday, Oct 18, 2016 9:59 AM
To: "wenxzhen"; 
Cc: "dev"; 
Subject:  Re: [Dev] [AS 5.3.0]How to delete a Tenant?



Hi Wenxing,

There is no out of the box way to delete a tenant. But you can deactivate the 
unwanted tenants.


Thanks
Thusitha 


On Tue, Oct 18, 2016 at 6:56 AM, wenxzhen  wrote:
Dear all,

I searched the archive mail list, but can't find the answer. Please help to 
advice whether it's possible to delete a Tenant? and How?


Thank you very much,
Regards, Wenxing

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





-- 
Thusitha Dayaratne
Software Engineer
WSO2 Inc. - lean . enterprise . middleware |  wso2.com



Mobile  +94712756809


Blog  alokayasoya.blogspot.com
Abouthttp://about.me/thusithathilina















 




___
 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] [AS 5.3.0]How to delete a Tenant?

2016-10-17 Thread Danushka Fernando
Thing is when you delete a tenant, there are lot of things to delete.
Starting from DB entries for tenant and userstore, registry data,
artifacts, etc. Because if you are truly deleting a tenant then it should
be possible to create a tenant with same domain name and also not to
contain something that previous tenant created inside new tenant.

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

On Tue, Oct 18, 2016 at 7:05 AM, wenxzhen  wrote:

> The problem is that we will have many "old" tenants and it's not
> convenient when we are doing verification during the development.
>
> What's the stopper to delete a Tenant? Can we do the delete with SQL
> statement "DELETE on CASCADE"?
>
> Thanks, Wenxing
>
> -- Original --
> *From: * "Thusitha Thilina Dayaratne";;
> *Send time:* Tuesday, Oct 18, 2016 9:59 AM
> *To:* "wenxzhen";
> *Cc:* "dev";
> *Subject: * Re: [Dev] [AS 5.3.0]How to delete a Tenant?
>
> Hi Wenxing,
>
> There is no out of the box way to delete a tenant. But you can deactivate
> the unwanted tenants.
>
> Thanks
> Thusitha
>
> On Tue, Oct 18, 2016 at 6:56 AM, wenxzhen  wrote:
>
>> Dear all,
>>
>> I searched the archive mail list, but can't find the answer. Please help
>> to advice whether it's possible to delete a Tenant? and How?
>>
>> Thank you very much,
>> Regards, Wenxing
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thusitha Dayaratne
> Software Engineer
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> Mobile  +94712756809
> Blog  alokayasoya.blogspot.com
> Abouthttp://about.me/thusithathilina
> <http://wso2.com/signature>
>
>
> ___
> 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] [AS 5.3.0]How to delete a Tenant?

2016-10-17 Thread wenxzhen
The problem is that we will have many "old" tenants and it's not convenient 
when we are doing verification during the development.


What's the stopper to delete a Tenant? Can we do the delete with SQL statement 
"DELETE on CASCADE"?


Thanks, Wenxing


-- Original --
From:  "Thusitha Thilina Dayaratne";;
Send time: Tuesday, Oct 18, 2016 9:59 AM
To: "wenxzhen"; 
Cc: "dev"; 
Subject:  Re: [Dev] [AS 5.3.0]How to delete a Tenant?



Hi Wenxing,

There is no out of the box way to delete a tenant. But you can deactivate the 
unwanted tenants.


Thanks
Thusitha 


On Tue, Oct 18, 2016 at 6:56 AM, wenxzhen  wrote:
Dear all,

I searched the archive mail list, but can't find the answer. Please help to 
advice whether it's possible to delete a Tenant? and How?


Thank you very much,
Regards, Wenxing

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





-- 
Thusitha Dayaratne
Software Engineer
WSO2 Inc. - lean . enterprise . middleware |  wso2.com



Mobile  +94712756809


Blog  alokayasoya.blogspot.com
Abouthttp://about.me/thusithathilina___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS 5.3.0]How to delete a Tenant?

2016-10-17 Thread Thusitha Thilina Dayaratne
Hi Wenxing,

There is no out of the box way to delete a tenant. But you can deactivate
the unwanted tenants.

Thanks
Thusitha

On Tue, Oct 18, 2016 at 6:56 AM, wenxzhen  wrote:

> Dear all,
>
> I searched the archive mail list, but can't find the answer. Please help
> to advice whether it's possible to delete a Tenant? and How?
>
> Thank you very much,
> Regards, Wenxing
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thusitha Dayaratne
Software Engineer
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

Mobile  +94712756809
Blog  alokayasoya.blogspot.com
Abouthttp://about.me/thusithathilina

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


[Dev] [AS 5.3.0]How to delete a Tenant?

2016-10-17 Thread wenxzhen
Dear all,

I searched the archive mail list, but can't find the answer. Please help to 
advice whether it's possible to delete a Tenant? and How?


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


Re: [Dev] [AS-6.0.0] [SAML-SSO] Sending authenticated user attributes to webapp

2016-08-30 Thread Nuwan Dias
On Tue, Aug 30, 2016 at 12:04 PM, Sagara Gunathunga  wrote:

>
>
> On Tue, Aug 30, 2016 at 11:37 AM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> AS 6.0.0 is not an OSGi runtime. It's pure tomcat plus WSO2 features
>> as tomcat extensions. We could reuse the code here from App Manager.
>>
>> @Johann/Sagara, shall we send the user attributes as JWT token to backend
>> webapp?
>>
>
> This use case is bit different from AppM where AS is the backend server
> not a proxy, we don't need to generate further tokens instead we should
> able to consume what ever the token (SAML or JWT) received by the web app.
> At this point let's not try to complicate this task, first try to get this
> done for pure SAML invocations where web app (AS) send SAML request and
> receive SAML responses, then consume SAML response within the application.
>

SAML is just one form of authentication to the webapp right? Don't we have
the usual Basic Auth based auth? If we do, how does the webapp get the
required claims when going through Basic Auth?

If we use a JWT based approach, we can use that as the one standard form of
passing user attributes to the webapp irrespective of the authentication
mechanism.

>
> If time permits, let's try to do the same for JWT token consumption, since
> related code is already there in AppM this will be a straightforward task.
>
> Thanks !
>
>>
>> On Tue, Aug 30, 2016 at 11:27 AM, Dinusha Senanayaka 
>> wrote:
>>
>>> In App Manager, we process the SAML response and add SAML response
>>> assertions as JWT token and send to backend as a header. Shouldn't we try
>>> to install AppM features and get the gateway features into AS without
>>> redoing the same ?
>>>
>>> Regards,
>>> Dinusha.
>>>
>>> On Mon, Aug 29, 2016 at 8:50 PM, Kishanthan Thangarajah <
>>> kishant...@wso2.com> wrote:
>>>
 We need to send the user attributes that are returned from SAML
 response with the successful authentication, to the webapp using some way.
 We discussed whether we could send this as a session attribute or using a
 request parameter.

 @Kalpa, let's create a jira for this and add this to change to upcoming
 milestone release.

 Thanks,

 --
 *Kishanthan Thangarajah*
 Technical Lead,
 Platform Technologies Team,
 WSO2, Inc.
 lean.enterprise.middleware

 Mobile - +94773426635
 Blog - *http://kishanthan.wordpress.com
 *
 Twitter - *http://twitter.com/kishanthan
 *

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


>>>
>>>
>>> --
>>> Dinusha Dilrukshi
>>> Associate Technical Lead
>>> WSO2 Inc.: http://wso2.com/
>>> Mobile: +94725255071
>>> Blog: http://dinushasblog.blogspot.com/
>>>
>>
>>
>>
>> --
>> *Kishanthan Thangarajah*
>> Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> *
>> Twitter - *http://twitter.com/kishanthan *
>>
>
>
>
> --
> Sagara Gunathunga
>
> Associate Director / Architect; WSO2, Inc.;  http://wso2.com
> V.P Apache Web Services;http://ws.apache.org/
> Linkedin; http://www.linkedin.com/in/ssagara
> Blog ;  http://ssagara.blogspot.com
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Nuwan Dias

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


Re: [Dev] [AS-6.0.0] [SAML-SSO] Sending authenticated user attributes to webapp

2016-08-29 Thread Sagara Gunathunga
On Tue, Aug 30, 2016 at 11:37 AM, Kishanthan Thangarajah <
kishant...@wso2.com> wrote:

> AS 6.0.0 is not an OSGi runtime. It's pure tomcat plus WSO2 features
> as tomcat extensions. We could reuse the code here from App Manager.
>
> @Johann/Sagara, shall we send the user attributes as JWT token to backend
> webapp?
>

This use case is bit different from AppM where AS is the backend server not
a proxy, we don't need to generate further tokens instead we should able to
consume what ever the token (SAML or JWT) received by the web app.  At this
point let's not try to complicate this task, first try to get this done for
pure SAML invocations where web app (AS) send SAML request and receive SAML
responses, then consume SAML response within the application.

If time permits, let's try to do the same for JWT token consumption, since
related code is already there in AppM this will be a straightforward task.

Thanks !

>
> On Tue, Aug 30, 2016 at 11:27 AM, Dinusha Senanayaka 
> wrote:
>
>> In App Manager, we process the SAML response and add SAML response
>> assertions as JWT token and send to backend as a header. Shouldn't we try
>> to install AppM features and get the gateway features into AS without
>> redoing the same ?
>>
>> Regards,
>> Dinusha.
>>
>> On Mon, Aug 29, 2016 at 8:50 PM, Kishanthan Thangarajah <
>> kishant...@wso2.com> wrote:
>>
>>> We need to send the user attributes that are returned from SAML response
>>> with the successful authentication, to the webapp using some way. We
>>> discussed whether we could send this as a session attribute or using a
>>> request parameter.
>>>
>>> @Kalpa, let's create a jira for this and add this to change to upcoming
>>> milestone release.
>>>
>>> Thanks,
>>>
>>> --
>>> *Kishanthan Thangarajah*
>>> Technical Lead,
>>> Platform Technologies Team,
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>>
>>> Mobile - +94773426635
>>> Blog - *http://kishanthan.wordpress.com
>>> *
>>> Twitter - *http://twitter.com/kishanthan
>>> *
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Dinusha Dilrukshi
>> Associate Technical Lead
>> WSO2 Inc.: http://wso2.com/
>> Mobile: +94725255071
>> Blog: http://dinushasblog.blogspot.com/
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com *
> Twitter - *http://twitter.com/kishanthan *
>



-- 
Sagara Gunathunga

Associate Director / Architect; WSO2, Inc.;  http://wso2.com
V.P Apache Web Services;http://ws.apache.org/
Linkedin; http://www.linkedin.com/in/ssagara
Blog ;  http://ssagara.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS-6.0.0] [SAML-SSO] Sending authenticated user attributes to webapp

2016-08-29 Thread Dinusha Senanayaka
Also we have sample tomcat valve[1] and filter[2] written, that shows app
can be used JWT token to identify the user and add to session. You should
be able to use them as well in samples.

[1]
https://github.com/wso2/product-app-manager/tree/master/modules/samples/JWTSecurity/Valve/Tomcat_8
[2]
https://github.com/wso2/product-app-manager/tree/master/modules/samples/JWTSecurity/Filter


On Tue, Aug 30, 2016 at 11:51 AM, Dinusha Senanayaka 
wrote:

>
>
> On Tue, Aug 30, 2016 at 11:37 AM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> AS 6.0.0 is not an OSGi runtime. It's pure tomcat plus WSO2 features
>> as tomcat extensions. We could reuse the code here from App Manager.
>>
>
> Ah Ok. You can get the AppM code from here [1].
> [1] https://github.com/wso2/carbon-appmgt/tree/master/
> components/org.wso2.carbon.appmgt.gateway/src/main/java/
> org/wso2/carbon/appmgt/gateway/token
>
> Regards,
> Dinusha.
>
>>
>> @Johann/Sagara, shall we send the user attributes as JWT token to backend
>> webapp?
>>
>> On Tue, Aug 30, 2016 at 11:27 AM, Dinusha Senanayaka 
>> wrote:
>>
>>> In App Manager, we process the SAML response and add SAML response
>>> assertions as JWT token and send to backend as a header. Shouldn't we try
>>> to install AppM features and get the gateway features into AS without
>>> redoing the same ?
>>>
>>> Regards,
>>> Dinusha.
>>>
>>> On Mon, Aug 29, 2016 at 8:50 PM, Kishanthan Thangarajah <
>>> kishant...@wso2.com> wrote:
>>>
 We need to send the user attributes that are returned from SAML
 response with the successful authentication, to the webapp using some way.
 We discussed whether we could send this as a session attribute or using a
 request parameter.

 @Kalpa, let's create a jira for this and add this to change to upcoming
 milestone release.

 Thanks,

 --
 *Kishanthan Thangarajah*
 Technical Lead,
 Platform Technologies Team,
 WSO2, Inc.
 lean.enterprise.middleware

 Mobile - +94773426635
 Blog - *http://kishanthan.wordpress.com
 *
 Twitter - *http://twitter.com/kishanthan
 *

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


>>>
>>>
>>> --
>>> Dinusha Dilrukshi
>>> Associate Technical Lead
>>> WSO2 Inc.: http://wso2.com/
>>> Mobile: +94725255071
>>> Blog: http://dinushasblog.blogspot.com/
>>>
>>
>>
>>
>> --
>> *Kishanthan Thangarajah*
>> Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> *
>> Twitter - *http://twitter.com/kishanthan *
>>
>
>
>
> --
> Dinusha Dilrukshi
> Associate Technical Lead
> WSO2 Inc.: http://wso2.com/
> Mobile: +94725255071
> Blog: http://dinushasblog.blogspot.com/
>



-- 
Dinusha Dilrukshi
Associate Technical Lead
WSO2 Inc.: http://wso2.com/
Mobile: +94725255071
Blog: http://dinushasblog.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS-6.0.0] [SAML-SSO] Sending authenticated user attributes to webapp

2016-08-29 Thread Dinusha Senanayaka
On Tue, Aug 30, 2016 at 11:37 AM, Kishanthan Thangarajah <
kishant...@wso2.com> wrote:

> AS 6.0.0 is not an OSGi runtime. It's pure tomcat plus WSO2 features
> as tomcat extensions. We could reuse the code here from App Manager.
>

Ah Ok. You can get the AppM code from here [1].
[1]
https://github.com/wso2/carbon-appmgt/tree/master/components/org.wso2.carbon.appmgt.gateway/src/main/java/org/wso2/carbon/appmgt/gateway/token

Regards,
Dinusha.

>
> @Johann/Sagara, shall we send the user attributes as JWT token to backend
> webapp?
>
> On Tue, Aug 30, 2016 at 11:27 AM, Dinusha Senanayaka 
> wrote:
>
>> In App Manager, we process the SAML response and add SAML response
>> assertions as JWT token and send to backend as a header. Shouldn't we try
>> to install AppM features and get the gateway features into AS without
>> redoing the same ?
>>
>> Regards,
>> Dinusha.
>>
>> On Mon, Aug 29, 2016 at 8:50 PM, Kishanthan Thangarajah <
>> kishant...@wso2.com> wrote:
>>
>>> We need to send the user attributes that are returned from SAML response
>>> with the successful authentication, to the webapp using some way. We
>>> discussed whether we could send this as a session attribute or using a
>>> request parameter.
>>>
>>> @Kalpa, let's create a jira for this and add this to change to upcoming
>>> milestone release.
>>>
>>> Thanks,
>>>
>>> --
>>> *Kishanthan Thangarajah*
>>> Technical Lead,
>>> Platform Technologies Team,
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>>
>>> Mobile - +94773426635
>>> Blog - *http://kishanthan.wordpress.com
>>> *
>>> Twitter - *http://twitter.com/kishanthan
>>> *
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Dinusha Dilrukshi
>> Associate Technical Lead
>> WSO2 Inc.: http://wso2.com/
>> Mobile: +94725255071
>> Blog: http://dinushasblog.blogspot.com/
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com *
> Twitter - *http://twitter.com/kishanthan *
>



-- 
Dinusha Dilrukshi
Associate Technical Lead
WSO2 Inc.: http://wso2.com/
Mobile: +94725255071
Blog: http://dinushasblog.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS-6.0.0] [SAML-SSO] Sending authenticated user attributes to webapp

2016-08-29 Thread Kishanthan Thangarajah
AS 6.0.0 is not an OSGi runtime. It's pure tomcat plus WSO2 features
as tomcat extensions. We could reuse the code here from App Manager.

@Johann/Sagara, shall we send the user attributes as JWT token to backend
webapp?

On Tue, Aug 30, 2016 at 11:27 AM, Dinusha Senanayaka 
wrote:

> In App Manager, we process the SAML response and add SAML response
> assertions as JWT token and send to backend as a header. Shouldn't we try
> to install AppM features and get the gateway features into AS without
> redoing the same ?
>
> Regards,
> Dinusha.
>
> On Mon, Aug 29, 2016 at 8:50 PM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> We need to send the user attributes that are returned from SAML response
>> with the successful authentication, to the webapp using some way. We
>> discussed whether we could send this as a session attribute or using a
>> request parameter.
>>
>> @Kalpa, let's create a jira for this and add this to change to upcoming
>> milestone release.
>>
>> Thanks,
>>
>> --
>> *Kishanthan Thangarajah*
>> Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> *
>> Twitter - *http://twitter.com/kishanthan *
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Dinusha Dilrukshi
> Associate Technical Lead
> WSO2 Inc.: http://wso2.com/
> Mobile: +94725255071
> Blog: http://dinushasblog.blogspot.com/
>



-- 
*Kishanthan Thangarajah*
Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com *
Twitter - *http://twitter.com/kishanthan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS-6.0.0] [SAML-SSO] Sending authenticated user attributes to webapp

2016-08-29 Thread Kalpa Welivitigoda
On Tue, Aug 30, 2016 at 11:27 AM, Dinusha Senanayaka 
wrote:

> In App Manager, we process the SAML response and add SAML response
> assertions as JWT token and send to backend as a header. Shouldn't we try
> to install AppM features and get the gateway features into AS without
> redoing the same ?
>
> Regards,
> Dinusha.
>
> On Mon, Aug 29, 2016 at 8:50 PM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> We need to send the user attributes that are returned from SAML response
>> with the successful authentication, to the webapp using some way. We
>> discussed whether we could send this as a session attribute or using a
>> request parameter.
>>
>> @Kalpa, let's create a jira for this and add this to change to upcoming
>> milestone release.
>>
>>
Created https://wso2.org/jira/browse/WSAS-2259 to track.


> Thanks,
>>
>> --
>> *Kishanthan Thangarajah*
>> Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> *
>> Twitter - *http://twitter.com/kishanthan *
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Dinusha Dilrukshi
> Associate Technical Lead
> WSO2 Inc.: http://wso2.com/
> Mobile: +94725255071
> Blog: http://dinushasblog.blogspot.com/
>



-- 
Best Regards,

Kalpa Welivitigoda
Senior Software Engineer, WSO2 Inc. http://wso2.com
Email: kal...@wso2.com
Mobile: +94776509215

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


Re: [Dev] [AS-6.0.0] [SAML-SSO] Sending authenticated user attributes to webapp

2016-08-29 Thread Dinusha Senanayaka
In App Manager, we process the SAML response and add SAML response
assertions as JWT token and send to backend as a header. Shouldn't we try
to install AppM features and get the gateway features into AS without
redoing the same ?

Regards,
Dinusha.

On Mon, Aug 29, 2016 at 8:50 PM, Kishanthan Thangarajah  wrote:

> We need to send the user attributes that are returned from SAML response
> with the successful authentication, to the webapp using some way. We
> discussed whether we could send this as a session attribute or using a
> request parameter.
>
> @Kalpa, let's create a jira for this and add this to change to upcoming
> milestone release.
>
> Thanks,
>
> --
> *Kishanthan Thangarajah*
> Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com *
> Twitter - *http://twitter.com/kishanthan *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Dinusha Dilrukshi
Associate Technical Lead
WSO2 Inc.: http://wso2.com/
Mobile: +94725255071
Blog: http://dinushasblog.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS-6.0.0] [SAML-SSO] Sending authenticated user attributes to webapp

2016-08-29 Thread Kishanthan Thangarajah
On Mon, Aug 29, 2016 at 8:57 PM, Sagara Gunathunga  wrote:

>
>
> On Mon, Aug 29, 2016 at 8:50 PM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> We need to send the user attributes that are returned from SAML response
>> with the successful authentication, to the webapp using some way. We
>> discussed whether we could send this as a session attribute or using a
>> request parameter.
>>
>> @Kalpa, let's create a jira for this and add this to change to upcoming
>> milestone release.
>>
>
> +1
>
> There are 2 tasks here,
>
> 1. Per each web app admin/developer should able to configure required
> claims for  SAML request.
> 2. Java API to extract values for above claims from SAML response, either
> through session or parameters.
>
> Also this need to be consistent with approach used in OpenID Connect value
> project.
>

Yes, we are including this for the OpenID Connect based SSO project. But
for SAML, we do not have a way currently, so we can use a common approach
for both. We need to first come up with the proper API here.


>
> Thanks !
>
>>
>> Thanks,
>>
>> --
>> *Kishanthan Thangarajah*
>> Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> *
>> Twitter - *http://twitter.com/kishanthan *
>>
>
>
>
> --
> Sagara Gunathunga
>
> Associate Director / Architect; WSO2, Inc.;  http://wso2.com
> V.P Apache Web Services;http://ws.apache.org/
> Linkedin; http://www.linkedin.com/in/ssagara
> Blog ;  http://ssagara.blogspot.com
>
>


-- 
*Kishanthan Thangarajah*
Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com *
Twitter - *http://twitter.com/kishanthan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS-6.0.0] [SAML-SSO] Sending authenticated user attributes to webapp

2016-08-29 Thread Sagara Gunathunga
On Mon, Aug 29, 2016 at 8:50 PM, Kishanthan Thangarajah  wrote:

> We need to send the user attributes that are returned from SAML response
> with the successful authentication, to the webapp using some way. We
> discussed whether we could send this as a session attribute or using a
> request parameter.
>
> @Kalpa, let's create a jira for this and add this to change to upcoming
> milestone release.
>

+1

There are 2 tasks here,

1. Per each web app admin/developer should able to configure required
claims for  SAML request.
2. Java API to extract values for above claims from SAML response, either
through session or parameters.

Also this need to be consistent with approach used in OpenID Connect value
project.

Thanks !

>
> Thanks,
>
> --
> *Kishanthan Thangarajah*
> Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com *
> Twitter - *http://twitter.com/kishanthan *
>



-- 
Sagara Gunathunga

Associate Director / Architect; WSO2, Inc.;  http://wso2.com
V.P Apache Web Services;http://ws.apache.org/
Linkedin; http://www.linkedin.com/in/ssagara
Blog ;  http://ssagara.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [AS-6.0.0] [SAML-SSO] Sending authenticated user attributes to webapp

2016-08-29 Thread Kishanthan Thangarajah
We need to send the user attributes that are returned from SAML response
with the successful authentication, to the webapp using some way. We
discussed whether we could send this as a session attribute or using a
request parameter.

@Kalpa, let's create a jira for this and add this to change to upcoming
milestone release.

Thanks,

-- 
*Kishanthan Thangarajah*
Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com *
Twitter - *http://twitter.com/kishanthan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] AS 6.0.0 SSO Quick Start Guide

2016-07-18 Thread Kishanthan Thangarajah
Hi ChanakaS,

Let's work on $subject. Basically, what we need is to provide minimum
number of steps needed to get an SSO sample working with AS and IS.

Requirements.

   1. A script to automate the IS side configuration (setting up the SP and
   stuffs)
   2. A webapp sample at AS side with all the configuration setup and
   script to automatically build and/or directly deploy.

We can perform the above with the single script. Users do not have to do
any config changes, but they would just execute the script/goal which would
perform above tasks and its related sub tasks. With this, we can come up
with the structure for all the quick start sample guides to follow from AS
side.

Thanks,

-- 
*Kishanthan Thangarajah*
Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com *
Twitter - *http://twitter.com/kishanthan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Help to build product-as

2016-04-24 Thread Megala Uthayakumar
Hi,

Thank you. I was able to build both master and v3.5.0. Earlier it was my
fault, I forgot to export the MAVEN_OPTS after setting it.

Thanks

On Thu, Apr 21, 2016 at 8:48 PM, Rasika Perera  wrote:

> Hi Megala,
>
> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
>> (default-compile) on project appserver-utils: Fatal error compiling:
>> invalid target release: 1.8 -> [Help 1]
>
> You need to compile with JDK1.8 for AS v6.0.0 master branch. Please refer
> [1].
>
> [INFO] WSO2 AppServer Distribution having apache ldap server feature
>> installed FAILURE [  3.839 s]
>> Exception in thread "main"
>> Exception: java.lang.OutOfMemoryError thrown from the
>> UncaughtExceptionHandler in thread "main"
>
> Try export MAVEN_OPTS='-Xmx512m -XX:MaxPermSize=128m'[2].
>
> [1] https://github.com/wso2/product-as/blob/master/pom.xml#L500
> [2] https://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError
>
> On Thu, Apr 21, 2016 at 7:45 PM, Megala Uthayakumar 
> wrote:
>
>> Hi,
>>
>> I am still getting the same errors. As per [1], I set MAVEN_OPTS="-Xms768m
>> -Xmx3072m -XX:MaxPermSize=1200m" . Still I am getting the same errors.
>>
>> [1] https://docs.wso2.com/display/AS530/Get+Involved
>>
>> Thanks
>>
>> On Thu, Apr 21, 2016 at 7:29 PM, Mushthaq Rumy  wrote:
>>
>>> Hi,
>>>
>>> Have you set the  MAVEN_OPTS="-Xmx128m -XX:MaxPermSize=128m"? If not set
>>> it and try to build it.
>>>
>>> Thanks & Regards,
>>>
>>> On Thu, Apr 21, 2016 at 7:18 PM, Megala Uthayakumar 
>>> wrote:
>>>

 Hi All,

 I am trying to build the product-as from the source. When tried to
 build v5.3.0, I got the following error and build failed.

 *[INFO] WSO2 AppServer Distribution having apache ldap server feature
 installed FAILURE [  3.839 s]*

 *Exception in thread "main" *
 *Exception: java.lang.OutOfMemoryError thrown from the
 UncaughtExceptionHandler in thread "main"*

 After that I tried to build from the master branch, but got following
 error,
 *[INFO] WSO2 Application Server - Module - Utils ... FAILURE [
  1.542 s]*

 *[ERROR] Failed to execute goal
 org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
 (default-compile) on project appserver-utils: Fatal error compiling:
 invalid target release: 1.8 -> [Help 1]*

 I am using oracle JDK 1.7.0_80 and my maven version is 3.3.9

 Could someone point out what is the cause for these errors?

 Thank you.

 Regards,
 Megala

 --
 Megala Uthayakumar

 Software Engineer
 Mobile : 0779967122

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


>>>
>>>
>>> --
>>> Mushthaq Rumy
>>> *Software Engineer*
>>> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
>>> Email : musht...@wso2.com
>>> WSO2, Inc.; http://wso2.com/
>>> lean . enterprise . middleware.
>>>
>>
>>
>>
>> --
>> Megala Uthayakumar
>>
>> Software Engineer
>> Mobile : 0779967122
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> With Regards,
>
> *Rasika Perera*
> Software Engineer
> M: +94 71 680 9060 E: rasi...@wso2.com
> LinkedIn: http://lk.linkedin.com/in/rasika90
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>



-- 
Megala Uthayakumar

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


Re: [Dev] [AS] Help to build product-as

2016-04-21 Thread Rasika Perera
Hi Megala,

[ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
> (default-compile) on project appserver-utils: Fatal error compiling:
> invalid target release: 1.8 -> [Help 1]

You need to compile with JDK1.8 for AS v6.0.0 master branch. Please refer
[1].

[INFO] WSO2 AppServer Distribution having apache ldap server feature
> installed FAILURE [  3.839 s]
> Exception in thread "main"
> Exception: java.lang.OutOfMemoryError thrown from the
> UncaughtExceptionHandler in thread "main"

Try export MAVEN_OPTS='-Xmx512m -XX:MaxPermSize=128m'[2].

[1] https://github.com/wso2/product-as/blob/master/pom.xml#L500
[2] https://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError

On Thu, Apr 21, 2016 at 7:45 PM, Megala Uthayakumar  wrote:

> Hi,
>
> I am still getting the same errors. As per [1], I set MAVEN_OPTS="-Xms768m
> -Xmx3072m -XX:MaxPermSize=1200m" . Still I am getting the same errors.
>
> [1] https://docs.wso2.com/display/AS530/Get+Involved
>
> Thanks
>
> On Thu, Apr 21, 2016 at 7:29 PM, Mushthaq Rumy  wrote:
>
>> Hi,
>>
>> Have you set the  MAVEN_OPTS="-Xmx128m -XX:MaxPermSize=128m"? If not set
>> it and try to build it.
>>
>> Thanks & Regards,
>>
>> On Thu, Apr 21, 2016 at 7:18 PM, Megala Uthayakumar 
>> wrote:
>>
>>>
>>> Hi All,
>>>
>>> I am trying to build the product-as from the source. When tried to build
>>> v5.3.0, I got the following error and build failed.
>>>
>>> *[INFO] WSO2 AppServer Distribution having apache ldap server feature
>>> installed FAILURE [  3.839 s]*
>>>
>>> *Exception in thread "main" *
>>> *Exception: java.lang.OutOfMemoryError thrown from the
>>> UncaughtExceptionHandler in thread "main"*
>>>
>>> After that I tried to build from the master branch, but got following
>>> error,
>>> *[INFO] WSO2 Application Server - Module - Utils ... FAILURE [
>>>  1.542 s]*
>>>
>>> *[ERROR] Failed to execute goal
>>> org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
>>> (default-compile) on project appserver-utils: Fatal error compiling:
>>> invalid target release: 1.8 -> [Help 1]*
>>>
>>> I am using oracle JDK 1.7.0_80 and my maven version is 3.3.9
>>>
>>> Could someone point out what is the cause for these errors?
>>>
>>> Thank you.
>>>
>>> Regards,
>>> Megala
>>>
>>> --
>>> Megala Uthayakumar
>>>
>>> Software Engineer
>>> Mobile : 0779967122
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Mushthaq Rumy
>> *Software Engineer*
>> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
>> Email : musht...@wso2.com
>> WSO2, Inc.; http://wso2.com/
>> lean . enterprise . middleware.
>>
>
>
>
> --
> Megala Uthayakumar
>
> Software Engineer
> Mobile : 0779967122
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
With Regards,

*Rasika Perera*
Software Engineer
M: +94 71 680 9060 E: rasi...@wso2.com
LinkedIn: http://lk.linkedin.com/in/rasika90

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


Re: [Dev] [AS] Help to build product-as

2016-04-21 Thread Megala Uthayakumar
Hi,

I am still getting the same errors. As per [1], I set MAVEN_OPTS="-Xms768m
-Xmx3072m -XX:MaxPermSize=1200m" . Still I am getting the same errors.

[1] https://docs.wso2.com/display/AS530/Get+Involved

Thanks

On Thu, Apr 21, 2016 at 7:29 PM, Mushthaq Rumy  wrote:

> Hi,
>
> Have you set the  MAVEN_OPTS="-Xmx128m -XX:MaxPermSize=128m"? If not set
> it and try to build it.
>
> Thanks & Regards,
>
> On Thu, Apr 21, 2016 at 7:18 PM, Megala Uthayakumar 
> wrote:
>
>>
>> Hi All,
>>
>> I am trying to build the product-as from the source. When tried to build
>> v5.3.0, I got the following error and build failed.
>>
>> *[INFO] WSO2 AppServer Distribution having apache ldap server feature
>> installed FAILURE [  3.839 s]*
>>
>> *Exception in thread "main" *
>> *Exception: java.lang.OutOfMemoryError thrown from the
>> UncaughtExceptionHandler in thread "main"*
>>
>> After that I tried to build from the master branch, but got following
>> error,
>> *[INFO] WSO2 Application Server - Module - Utils ... FAILURE [
>>  1.542 s]*
>>
>> *[ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
>> (default-compile) on project appserver-utils: Fatal error compiling:
>> invalid target release: 1.8 -> [Help 1]*
>>
>> I am using oracle JDK 1.7.0_80 and my maven version is 3.3.9
>>
>> Could someone point out what is the cause for these errors?
>>
>> Thank you.
>>
>> Regards,
>> Megala
>>
>> --
>> Megala Uthayakumar
>>
>> Software Engineer
>> Mobile : 0779967122
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Mushthaq Rumy
> *Software Engineer*
> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
> Email : musht...@wso2.com
> WSO2, Inc.; http://wso2.com/
> lean . enterprise . middleware.
>



-- 
Megala Uthayakumar

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


Re: [Dev] [AS] Help to build product-as

2016-04-21 Thread Mushthaq Rumy
Hi,

Have you set the  MAVEN_OPTS="-Xmx128m -XX:MaxPermSize=128m"? If not set it
and try to build it.

Thanks & Regards,

On Thu, Apr 21, 2016 at 7:18 PM, Megala Uthayakumar  wrote:

>
> Hi All,
>
> I am trying to build the product-as from the source. When tried to build
> v5.3.0, I got the following error and build failed.
>
> *[INFO] WSO2 AppServer Distribution having apache ldap server feature
> installed FAILURE [  3.839 s]*
>
> *Exception in thread "main" *
> *Exception: java.lang.OutOfMemoryError thrown from the
> UncaughtExceptionHandler in thread "main"*
>
> After that I tried to build from the master branch, but got following
> error,
> *[INFO] WSO2 Application Server - Module - Utils ... FAILURE [
>  1.542 s]*
>
> *[ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
> (default-compile) on project appserver-utils: Fatal error compiling:
> invalid target release: 1.8 -> [Help 1]*
>
> I am using oracle JDK 1.7.0_80 and my maven version is 3.3.9
>
> Could someone point out what is the cause for these errors?
>
> Thank you.
>
> Regards,
> Megala
>
> --
> Megala Uthayakumar
>
> Software Engineer
> Mobile : 0779967122
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Mushthaq Rumy
*Software Engineer*
Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
Email : musht...@wso2.com
WSO2, Inc.; http://wso2.com/
lean . enterprise . middleware.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [AS] Help to build product-as

2016-04-21 Thread Megala Uthayakumar
Hi All,

I am trying to build the product-as from the source. When tried to build
v5.3.0, I got the following error and build failed.

*[INFO] WSO2 AppServer Distribution having apache ldap server feature
installed FAILURE [  3.839 s]*

*Exception in thread "main" *
*Exception: java.lang.OutOfMemoryError thrown from the
UncaughtExceptionHandler in thread "main"*

After that I tried to build from the master branch, but got following error,
*[INFO] WSO2 Application Server - Module - Utils ... FAILURE [
 1.542 s]*

*[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
(default-compile) on project appserver-utils: Fatal error compiling:
invalid target release: 1.8 -> [Help 1]*

I am using oracle JDK 1.7.0_80 and my maven version is 3.3.9

Could someone point out what is the cause for these errors?

Thank you.

Regards,
Megala

-- 
Megala Uthayakumar

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


Re: [Dev] [AS 6.0.0] Webapp Loader Modue - Parent First Configuration

2016-03-13 Thread Miraj Abeysekara
Hi Kishanthan,

I will remove that parent first configuration in the wso2as-web.xml.

According to the Java docs of ClassLoader[1] the child classes are only
need to register as parallel capable. Since the tomcat
WebappClassLoaderBase is registering it as parallel capable, we only need
to call the registerAsParallelCapable() in a static block of our custom
classloader (because of the condition 1 given in the Java docs.[1])

Also in the wso2as-web.xml we can add a Boolean to configure whether a web
app requires parallel capable classloader.

[1]
https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html#registerAsParallelCapable--

Thanks.

On Sun, Mar 13, 2016 at 11:51 AM, Kishanthan Thangarajah <
kishant...@wso2.com> wrote:

> Did we also look into how we can use ParallelWebappClassLoader with our
> class loaded enhancements?
>
>
> https://tomcat.apache.org/tomcat-8.0-doc/config/loader.html#Standard_Implementation
>
> On Sun, Mar 13, 2016 at 11:42 AM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> If tomcat is already providing a way to configure the parent first
>> behaviour we should use that instead of our own. But most of the times, we
>> do not need to change this class loading behaviour to parent first as we
>> mostly use the default (child first) behaviour. This config was added
>> during OSGi based tomcat class loading time (AS 5.3.0) to make use of the
>> parent class loading behaviour, but this is no longer a valid use case with
>> plain tomcat. So let's go ahead with tomcat based config.
>>
>> On Fri, Mar 11, 2016 at 11:02 AM, Miraj Abeysekara 
>> wrote:
>>
>>> Hi all,
>>>
>>> Currently in the wso2as-web.xml contains a parent first configuration
>>> parameter per web app class loading. Also tomcat it self provide
>>> configurable parent first class loading behavior in side the context.xml.
>>>
>>> One benefit of using the tomcat configuration for controlling parent
>>> first behavior is, we can reuse their methods. But if we separate the
>>> parent first parameter from wso2as-web.xml we need to add context.xml file
>>> per web app just for changing the class loading behavior. Also for each
>>> context.xml, the Loader element must be added with specifying app-sever web
>>> app loader class if the web app requires wso2 web app loader module.
>>> Therefore it is bit complex to configure a web app if it requires to change
>>> parent first behavior.
>>>
>>> Which approach should we use for the configuration?
>>>
>>> Thanks
>>> --
>>> Miraj Abeysekara
>>> Intern (Software Engineering)
>>> Mobile: +94775690822
>>> Twitter: https://twitter.com/MiRAGECreator
>>> GooglePlus: https://plus.google.com/u/0/+MirageAbeysekara
>>>
>>
>>
>>
>> --
>> *Kishanthan Thangarajah*
>> Associate Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> *
>> Twitter - *http://twitter.com/kishanthan *
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Associate Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com *
> Twitter - *http://twitter.com/kishanthan *
>



-- 
Miraj Abeysekara
Intern (Software Engineering)
Mobile: +94775690822
Twitter: https://twitter.com/MiRAGECreator
GooglePlus: https://plus.google.com/u/0/+MirageAbeysekara
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS 6.0.0] Webapp Loader Modue - Parent First Configuration

2016-03-12 Thread Kishanthan Thangarajah
Did we also look into how we can use ParallelWebappClassLoader with our
class loaded enhancements?

https://tomcat.apache.org/tomcat-8.0-doc/config/loader.html#Standard_Implementation

On Sun, Mar 13, 2016 at 11:42 AM, Kishanthan Thangarajah <
kishant...@wso2.com> wrote:

> If tomcat is already providing a way to configure the parent first
> behaviour we should use that instead of our own. But most of the times, we
> do not need to change this class loading behaviour to parent first as we
> mostly use the default (child first) behaviour. This config was added
> during OSGi based tomcat class loading time (AS 5.3.0) to make use of the
> parent class loading behaviour, but this is no longer a valid use case with
> plain tomcat. So let's go ahead with tomcat based config.
>
> On Fri, Mar 11, 2016 at 11:02 AM, Miraj Abeysekara  wrote:
>
>> Hi all,
>>
>> Currently in the wso2as-web.xml contains a parent first configuration
>> parameter per web app class loading. Also tomcat it self provide
>> configurable parent first class loading behavior in side the context.xml.
>>
>> One benefit of using the tomcat configuration for controlling parent
>> first behavior is, we can reuse their methods. But if we separate the
>> parent first parameter from wso2as-web.xml we need to add context.xml file
>> per web app just for changing the class loading behavior. Also for each
>> context.xml, the Loader element must be added with specifying app-sever web
>> app loader class if the web app requires wso2 web app loader module.
>> Therefore it is bit complex to configure a web app if it requires to change
>> parent first behavior.
>>
>> Which approach should we use for the configuration?
>>
>> Thanks
>> --
>> Miraj Abeysekara
>> Intern (Software Engineering)
>> Mobile: +94775690822
>> Twitter: https://twitter.com/MiRAGECreator
>> GooglePlus: https://plus.google.com/u/0/+MirageAbeysekara
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Associate Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com *
> Twitter - *http://twitter.com/kishanthan *
>



-- 
*Kishanthan Thangarajah*
Associate Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com *
Twitter - *http://twitter.com/kishanthan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS 6.0.0] Webapp Loader Modue - Parent First Configuration

2016-03-12 Thread Kishanthan Thangarajah
If tomcat is already providing a way to configure the parent first
behaviour we should use that instead of our own. But most of the times, we
do not need to change this class loading behaviour to parent first as we
mostly use the default (child first) behaviour. This config was added
during OSGi based tomcat class loading time (AS 5.3.0) to make use of the
parent class loading behaviour, but this is no longer a valid use case with
plain tomcat. So let's go ahead with tomcat based config.

On Fri, Mar 11, 2016 at 11:02 AM, Miraj Abeysekara  wrote:

> Hi all,
>
> Currently in the wso2as-web.xml contains a parent first configuration
> parameter per web app class loading. Also tomcat it self provide
> configurable parent first class loading behavior in side the context.xml.
>
> One benefit of using the tomcat configuration for controlling parent first
> behavior is, we can reuse their methods. But if we separate the parent
> first parameter from wso2as-web.xml we need to add context.xml file per web
> app just for changing the class loading behavior. Also for each
> context.xml, the Loader element must be added with specifying app-sever web
> app loader class if the web app requires wso2 web app loader module.
> Therefore it is bit complex to configure a web app if it requires to change
> parent first behavior.
>
> Which approach should we use for the configuration?
>
> Thanks
> --
> Miraj Abeysekara
> Intern (Software Engineering)
> Mobile: +94775690822
> Twitter: https://twitter.com/MiRAGECreator
> GooglePlus: https://plus.google.com/u/0/+MirageAbeysekara
>



-- 
*Kishanthan Thangarajah*
Associate Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com *
Twitter - *http://twitter.com/kishanthan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [AS 6.0.0] Webapp Loader Modue - Parent First Configuration

2016-03-10 Thread Miraj Abeysekara
Hi all,

Currently in the wso2as-web.xml contains a parent first configuration
parameter per web app class loading. Also tomcat it self provide
configurable parent first class loading behavior in side the context.xml.

One benefit of using the tomcat configuration for controlling parent first
behavior is, we can reuse their methods. But if we separate the parent
first parameter from wso2as-web.xml we need to add context.xml file per web
app just for changing the class loading behavior. Also for each
context.xml, the Loader element must be added with specifying app-sever web
app loader class if the web app requires wso2 web app loader module.
Therefore it is bit complex to configure a web app if it requires to change
parent first behavior.

Which approach should we use for the configuration?

Thanks
-- 
Miraj Abeysekara
Intern (Software Engineering)
Mobile: +94775690822
Twitter: https://twitter.com/MiRAGECreator
GooglePlus: https://plus.google.com/u/0/+MirageAbeysekara
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS 6.0.0] HTTP Monitoring dashboard - Required DS Enhancements

2016-03-09 Thread Nipuna Chandradasa
Hi Lochana,

1st requirement, drill down navigation, is implemented and will be reviewed
EOD. How it works is there is a exposed functionality by dashboard server
which can be access by any gadget and callback function can be pass as a
parameter to that function. After a event which navigate to a page with
drill down data that callback functionality will be called and drill down
data will be passed as a parameter to the callback. Using these data who
ever developing the gadget can manipulate the gadget with the data in the
drill down scenario.

Will inform after the code and functionality review.

Thank you.

On Wed, Mar 9, 2016 at 10:26 AM, Lochana Ranaweera 
wrote:

> Hi all,
>
> The HTTP Monitoring Dashboard for WSO2 platform is currently being
> implemented targeting AS 6.0.0 as the first phase. During last review it
> was agreed that the following improvements will be provided from DS side.
> Please note that the dashboard is to be deployed as a collection of user
> preferred set of gadgets in the DS.
>
>1. To analyze statistics per web application, a drill-down navigation
>mechanism is needed from within a data table gadget. This will result in a
>variable number of pages depending on the number of web applications
>publishing data in the AS. As of now, rendering a page is not possible
>inside a gadget. This functionality will be provided so that a URL can be
>passed as an argument to render such information in another page.
>2. Removing the title and the properties icon from the gadgets
>permanently.
>3. Making the dashboard designer grid fine grain to help render gadget
>sizes better.
>
> Please note that improvements [2] and [3] are assigned less priority than
> [1], given the time constraint.
>
> Feedback on this matter is highly appreciated.
>
> Thanks and regards,
>
> --
> Lochana Ranaweera
> Intern Software Engineer
> WSO2 Inc: http://wso2.com
> Blog: https://lochanaranaweera.wordpress.com/
> Mobile: +94716487055 
>
>


-- 
Nipuna Marcus
*Software Engineer*
WSO2 Inc.
http://wso2.com/ - "lean . enterprise . middleware"
Mobile : +94 (0) 713 667906
nipu...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [AS 6.0.0] HTTP Monitoring dashboard - Required DS Enhancements

2016-03-08 Thread Lochana Ranaweera
Hi all,

The HTTP Monitoring Dashboard for WSO2 platform is currently being
implemented targeting AS 6.0.0 as the first phase. During last review it
was agreed that the following improvements will be provided from DS side.
Please note that the dashboard is to be deployed as a collection of user
preferred set of gadgets in the DS.

   1. To analyze statistics per web application, a drill-down navigation
   mechanism is needed from within a data table gadget. This will result in a
   variable number of pages depending on the number of web applications
   publishing data in the AS. As of now, rendering a page is not possible
   inside a gadget. This functionality will be provided so that a URL can be
   passed as an argument to render such information in another page.
   2. Removing the title and the properties icon from the gadgets
   permanently.
   3. Making the dashboard designer grid fine grain to help render gadget
   sizes better.

Please note that improvements [2] and [3] are assigned less priority than
[1], given the time constraint.

Feedback on this matter is highly appreciated.

Thanks and regards,

-- 
Lochana Ranaweera
Intern Software Engineer
WSO2 Inc: http://wso2.com
Blog: https://lochanaranaweera.wordpress.com/
Mobile: +94716487055 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][AS] Ideas and ways to integrate with Hot Swap Agent

2016-01-25 Thread Clovis Wichoski
Hi,

In mean time devs from HotSwapAgent replied my question on github, they
give another idea to create a plugin for WSO2 on Hot Swap Agent, I will try
that way too.

Here is the post: https://github.com/HotswapProjects/HotswapAgent/issues/107

Thanks

Clóvis



2016-01-25 9:16 GMT-02:00 Clovis Wichoski :

> Hi,
>
> Its very fine that have a fix, I will try and give you some feedback if
> that works.
>
> Thanks
>
> Clóvis
>
> 2016-01-25 4:52 GMT-02:00 Thusitha Thilina Dayaratne :
>
>> Hi,
>>
>> AFAIU we can easily fix this by adding a null check to webappCC in the
>> CarbonWebappClassLoader.getResource method as follows
>>
>> public Enumeration getResources(String name) throws IOException {
>> Enumeration[] tmp = new Enumeration[2];
>> if (parent != null && webappCC != null) { // add a null check to webappCC
>>
>> .
>>
>> WDYT?
>>
>>
>> Thanks
>>
>> Thusitha
>>
>>
>> On Mon, Jan 25, 2016 at 12:04 PM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Clovis,
>>>
>>> I've checked on the error that you have mentioned.
>>> According to the hotswapagent logic 
>>> *org.hotswap.agent.plugin.tomcat.TomcatPlugin.init()
>>> *method get called during WebappLoader.start lifecycle event. But at
>>> the time STARTING event get fired we haven't set
>>> the  WebappClassloadingContext to the WebappClassloader. Therefore when it
>>> tries to do some checks in order to load the resources it throws the NPE.
>>>
>>> *org.wso2.carbon.webapp.mgt.loader.CarbonWebappLoader*
>>>
>>> @Override
>>> protected void startInternal() throws LifecycleException {
>>>
>>> ...
>>>
>>> super.startInternal();  > In this point STARTING even get fired and so 
>>> *TomcatPlugin.init * method get called and it try to get the resource. That 
>>> called getResources method and since we haven't still set the 
>>> webappClassloadingContext it throws a NPE.
>>>
>>>
>>> //Adding the WebappClassloadingContext to the WebappClassloader
>>>
>>> ((CarbonWebappClassLoader)
>>> getClassLoader()).setWebappCC(webappClassloadingContext); // This is
>>> the point where we are setting the webappClassloadingContext
>>>
>>> Thanks
>>> Thusitha
>>>
>>> On Fri, Jan 22, 2016 at 4:54 PM, Clovis Wichoski 
>>> wrote:
>>>
 Hi Kishanthan,

 The redeploy all of a small system its ok, but for a big one, its a
 problem, just a change in one class you must redeploy, loose sessions,
 restart the system from scratch, to reach the point of test again, with the
 ideas used by HotSwapAgent they act on reloading only that one class
 changed, this way speeds the development time, these ideas are well
 defended by JRebel tool, that HotSwapAgent tends to be a choice as an open
 source solution. Please note that this feature is only needed for
 development phase, in production, the scheduled task its ok.

 I mean time I tested with AS 5.3.0, JRebel and HotSwapAgent, JRebel
 trial worked as expected, but HotSwapAgent not (see exception bellow [1]),
 I will check these problems with HotSwapAgent devs, and try to discover why
 dont works with WSO2 AS as with HotSwapAgent active none of webapps load,
 all get that exception, as we see a NPE in class CarbonWebappClassLoader
 maybe its the way they initialize the dependent class loaders.

 [1] Exception when HotSwapAgent is active:
 [2016-01-22 09:14:18,467] ERROR
 {org.apache.catalina.core.ContainerBase} -  ContainerBase.addChild: start:
 org.apache.catalina.LifecycleException: Failed to start component
 [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/example]]
 at
 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
 at
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
 at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
 at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
 at
 org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:344)
 at
 org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:252)
 at
 org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:314)
 at
 org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment(TomcatGenericWebappsDeployer.java:212)
 at
 org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:179)
 at
 org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy(TomcatGenericWebappsDeployer.java:144)
 at
 org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp(AbstractWebappDeployer.java:224)
 at
 org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy(AbstractWebappDeployer.java:114)
 at
 org.wso2.carbon.webapp.deployer.WebappDepl

Re: [Dev] [DEV][AS] Ideas and ways to integrate with Hot Swap Agent

2016-01-25 Thread Clovis Wichoski
Hi,

Its very fine that have a fix, I will try and give you some feedback if
that works.

Thanks

Clóvis

2016-01-25 4:52 GMT-02:00 Thusitha Thilina Dayaratne :

> Hi,
>
> AFAIU we can easily fix this by adding a null check to webappCC in the
> CarbonWebappClassLoader.getResource method as follows
>
> public Enumeration getResources(String name) throws IOException {
> Enumeration[] tmp = new Enumeration[2];
> if (parent != null && webappCC != null) { // add a null check to webappCC
>
> .
>
> WDYT?
>
>
> Thanks
>
> Thusitha
>
>
> On Mon, Jan 25, 2016 at 12:04 PM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Clovis,
>>
>> I've checked on the error that you have mentioned.
>> According to the hotswapagent logic 
>> *org.hotswap.agent.plugin.tomcat.TomcatPlugin.init()
>> *method get called during WebappLoader.start lifecycle event. But at the
>> time STARTING event get fired we haven't set the  WebappClassloadingContext
>> to the WebappClassloader. Therefore when it tries to do some checks in
>> order to load the resources it throws the NPE.
>>
>> *org.wso2.carbon.webapp.mgt.loader.CarbonWebappLoader*
>>
>> @Override
>> protected void startInternal() throws LifecycleException {
>>
>> ...
>>
>> super.startInternal();  > In this point STARTING even get fired and so 
>> *TomcatPlugin.init * method get called and it try to get the resource. That 
>> called getResources method and since we haven't still set the 
>> webappClassloadingContext it throws a NPE.
>>
>>
>> //Adding the WebappClassloadingContext to the WebappClassloader
>>
>> ((CarbonWebappClassLoader)
>> getClassLoader()).setWebappCC(webappClassloadingContext); // This is the
>> point where we are setting the webappClassloadingContext
>>
>> Thanks
>> Thusitha
>>
>> On Fri, Jan 22, 2016 at 4:54 PM, Clovis Wichoski 
>> wrote:
>>
>>> Hi Kishanthan,
>>>
>>> The redeploy all of a small system its ok, but for a big one, its a
>>> problem, just a change in one class you must redeploy, loose sessions,
>>> restart the system from scratch, to reach the point of test again, with the
>>> ideas used by HotSwapAgent they act on reloading only that one class
>>> changed, this way speeds the development time, these ideas are well
>>> defended by JRebel tool, that HotSwapAgent tends to be a choice as an open
>>> source solution. Please note that this feature is only needed for
>>> development phase, in production, the scheduled task its ok.
>>>
>>> I mean time I tested with AS 5.3.0, JRebel and HotSwapAgent, JRebel
>>> trial worked as expected, but HotSwapAgent not (see exception bellow [1]),
>>> I will check these problems with HotSwapAgent devs, and try to discover why
>>> dont works with WSO2 AS as with HotSwapAgent active none of webapps load,
>>> all get that exception, as we see a NPE in class CarbonWebappClassLoader
>>> maybe its the way they initialize the dependent class loaders.
>>>
>>> [1] Exception when HotSwapAgent is active:
>>> [2016-01-22 09:14:18,467] ERROR {org.apache.catalina.core.ContainerBase}
>>> -  ContainerBase.addChild: start:
>>> org.apache.catalina.LifecycleException: Failed to start component
>>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/example]]
>>> at
>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>>> at
>>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>>> at
>>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>>> at
>>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
>>> at
>>> org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:344)
>>> at
>>> org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:252)
>>> at
>>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:314)
>>> at
>>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment(TomcatGenericWebappsDeployer.java:212)
>>> at
>>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:179)
>>> at
>>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy(TomcatGenericWebappsDeployer.java:144)
>>> at
>>> org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp(AbstractWebappDeployer.java:224)
>>> at
>>> org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy(AbstractWebappDeployer.java:114)
>>> at
>>> org.wso2.carbon.webapp.deployer.WebappDeployer.deploy(WebappDeployer.java:42)
>>> at
>>> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
>>> at
>>> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
>>> at
>>> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
>>> at
>>> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.

Re: [Dev] [DEV][AS] Ideas and ways to integrate with Hot Swap Agent

2016-01-24 Thread Thusitha Thilina Dayaratne
Hi,

AFAIU we can easily fix this by adding a null check to webappCC in the
CarbonWebappClassLoader.getResource method as follows

public Enumeration getResources(String name) throws IOException {
Enumeration[] tmp = new Enumeration[2];
if (parent != null && webappCC != null) { // add a null check to webappCC

.

WDYT?


Thanks

Thusitha


On Mon, Jan 25, 2016 at 12:04 PM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Clovis,
>
> I've checked on the error that you have mentioned.
> According to the hotswapagent logic 
> *org.hotswap.agent.plugin.tomcat.TomcatPlugin.init()
> *method get called during WebappLoader.start lifecycle event. But at the
> time STARTING event get fired we haven't set the  WebappClassloadingContext
> to the WebappClassloader. Therefore when it tries to do some checks in
> order to load the resources it throws the NPE.
>
> *org.wso2.carbon.webapp.mgt.loader.CarbonWebappLoader*
>
> @Override
> protected void startInternal() throws LifecycleException {
>
> ...
>
> super.startInternal();  > In this point STARTING even get fired and so 
> *TomcatPlugin.init * method get called and it try to get the resource. That 
> called getResources method and since we haven't still set the 
> webappClassloadingContext it throws a NPE.
>
>
> //Adding the WebappClassloadingContext to the WebappClassloader
>
> ((CarbonWebappClassLoader)
> getClassLoader()).setWebappCC(webappClassloadingContext); // This is the
> point where we are setting the webappClassloadingContext
>
> Thanks
> Thusitha
>
> On Fri, Jan 22, 2016 at 4:54 PM, Clovis Wichoski 
> wrote:
>
>> Hi Kishanthan,
>>
>> The redeploy all of a small system its ok, but for a big one, its a
>> problem, just a change in one class you must redeploy, loose sessions,
>> restart the system from scratch, to reach the point of test again, with the
>> ideas used by HotSwapAgent they act on reloading only that one class
>> changed, this way speeds the development time, these ideas are well
>> defended by JRebel tool, that HotSwapAgent tends to be a choice as an open
>> source solution. Please note that this feature is only needed for
>> development phase, in production, the scheduled task its ok.
>>
>> I mean time I tested with AS 5.3.0, JRebel and HotSwapAgent, JRebel trial
>> worked as expected, but HotSwapAgent not (see exception bellow [1]), I will
>> check these problems with HotSwapAgent devs, and try to discover why dont
>> works with WSO2 AS as with HotSwapAgent active none of webapps load, all
>> get that exception, as we see a NPE in class CarbonWebappClassLoader maybe
>> its the way they initialize the dependent class loaders.
>>
>> [1] Exception when HotSwapAgent is active:
>> [2016-01-22 09:14:18,467] ERROR {org.apache.catalina.core.ContainerBase}
>> -  ContainerBase.addChild: start:
>> org.apache.catalina.LifecycleException: Failed to start component
>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/example]]
>> at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>> at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>> at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>> at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
>> at
>> org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:344)
>> at
>> org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:252)
>> at
>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:314)
>> at
>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment(TomcatGenericWebappsDeployer.java:212)
>> at
>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:179)
>> at
>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy(TomcatGenericWebappsDeployer.java:144)
>> at
>> org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp(AbstractWebappDeployer.java:224)
>> at
>> org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy(AbstractWebappDeployer.java:114)
>> at
>> org.wso2.carbon.webapp.deployer.WebappDeployer.deploy(WebappDeployer.java:42)
>> at
>> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
>> at
>> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
>> at
>> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
>> at
>> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
>> at
>> org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
>> at
>> org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:135)
>> at
>> org.wso2.carbon.core.CarbonAxisConfigurator.deployServices(Carbo

Re: [Dev] [DEV][AS] Ideas and ways to integrate with Hot Swap Agent

2016-01-24 Thread Thusitha Thilina Dayaratne
Hi Clovis,

I've checked on the error that you have mentioned.
According to the hotswapagent logic
*org.hotswap.agent.plugin.tomcat.TomcatPlugin.init()
*method get called during WebappLoader.start lifecycle event. But at the
time STARTING event get fired we haven't set the  WebappClassloadingContext
to the WebappClassloader. Therefore when it tries to do some checks in
order to load the resources it throws the NPE.

*org.wso2.carbon.webapp.mgt.loader.CarbonWebappLoader*

@Override
protected void startInternal() throws LifecycleException {

...

super.startInternal();  > In this point STARTING even get fired
and so *TomcatPlugin.init * method get called and it try to get the
resource. That called getResources method and since we haven't still
set the webappClassloadingContext it throws a NPE.


//Adding the WebappClassloadingContext to the WebappClassloader

((CarbonWebappClassLoader)
getClassLoader()).setWebappCC(webappClassloadingContext); // This is the
point where we are setting the webappClassloadingContext

Thanks
Thusitha

On Fri, Jan 22, 2016 at 4:54 PM, Clovis Wichoski 
wrote:

> Hi Kishanthan,
>
> The redeploy all of a small system its ok, but for a big one, its a
> problem, just a change in one class you must redeploy, loose sessions,
> restart the system from scratch, to reach the point of test again, with the
> ideas used by HotSwapAgent they act on reloading only that one class
> changed, this way speeds the development time, these ideas are well
> defended by JRebel tool, that HotSwapAgent tends to be a choice as an open
> source solution. Please note that this feature is only needed for
> development phase, in production, the scheduled task its ok.
>
> I mean time I tested with AS 5.3.0, JRebel and HotSwapAgent, JRebel trial
> worked as expected, but HotSwapAgent not (see exception bellow [1]), I will
> check these problems with HotSwapAgent devs, and try to discover why dont
> works with WSO2 AS as with HotSwapAgent active none of webapps load, all
> get that exception, as we see a NPE in class CarbonWebappClassLoader maybe
> its the way they initialize the dependent class loaders.
>
> [1] Exception when HotSwapAgent is active:
> [2016-01-22 09:14:18,467] ERROR {org.apache.catalina.core.ContainerBase}
> -  ContainerBase.addChild: start:
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/example]]
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
> at
> org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:344)
> at
> org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:252)
> at
> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:314)
> at
> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment(TomcatGenericWebappsDeployer.java:212)
> at
> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:179)
> at
> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy(TomcatGenericWebappsDeployer.java:144)
> at
> org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp(AbstractWebappDeployer.java:224)
> at
> org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy(AbstractWebappDeployer.java:114)
> at
> org.wso2.carbon.webapp.deployer.WebappDeployer.deploy(WebappDeployer.java:42)
> at
> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
> at
> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
> at
> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
> at
> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
> at
> org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
> at
> org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:135)
> at
> org.wso2.carbon.core.CarbonAxisConfigurator.deployServices(CarbonAxisConfigurator.java:567)
> at
> org.wso2.carbon.core.internal.DeploymentServerStartupObserver.completingServerStartup(DeploymentServerStartupObserver.java:51)
> at
> org.wso2.carbon.core.internal.CarbonCoreServiceComponent.notifyBefore(CarbonCoreServiceComponent.java:235)
> at
> org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.completeInitialization(StartupFinalizerServiceComponent.java:185)
> at
> org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.serviceChanged(StartupFinalizerServiceComponent.java:288)
> at
> org.eclips

Re: [Dev] [DEV][AS] Ideas and ways to integrate with Hot Swap Agent

2016-01-22 Thread Clovis Wichoski
Hi Kishanthan,

The redeploy all of a small system its ok, but for a big one, its a
problem, just a change in one class you must redeploy, loose sessions,
restart the system from scratch, to reach the point of test again, with the
ideas used by HotSwapAgent they act on reloading only that one class
changed, this way speeds the development time, these ideas are well
defended by JRebel tool, that HotSwapAgent tends to be a choice as an open
source solution. Please note that this feature is only needed for
development phase, in production, the scheduled task its ok.

I mean time I tested with AS 5.3.0, JRebel and HotSwapAgent, JRebel trial
worked as expected, but HotSwapAgent not (see exception bellow [1]), I will
check these problems with HotSwapAgent devs, and try to discover why dont
works with WSO2 AS as with HotSwapAgent active none of webapps load, all
get that exception, as we see a NPE in class CarbonWebappClassLoader maybe
its the way they initialize the dependent class loaders.

[1] Exception when HotSwapAgent is active:
[2016-01-22 09:14:18,467] ERROR {org.apache.catalina.core.ContainerBase} -
ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/example]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at
org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:344)
at
org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:252)
at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:314)
at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment(TomcatGenericWebappsDeployer.java:212)
at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:179)
at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy(TomcatGenericWebappsDeployer.java:144)
at
org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp(AbstractWebappDeployer.java:224)
at
org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy(AbstractWebappDeployer.java:114)
at
org.wso2.carbon.webapp.deployer.WebappDeployer.deploy(WebappDeployer.java:42)
at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at
org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:135)
at
org.wso2.carbon.core.CarbonAxisConfigurator.deployServices(CarbonAxisConfigurator.java:567)
at
org.wso2.carbon.core.internal.DeploymentServerStartupObserver.completingServerStartup(DeploymentServerStartupObserver.java:51)
at
org.wso2.carbon.core.internal.CarbonCoreServiceComponent.notifyBefore(CarbonCoreServiceComponent.java:235)
at
org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.completeInitialization(StartupFinalizerServiceComponent.java:185)
at
org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.serviceChanged(StartupFinalizerServiceComponent.java:288)
at
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
at
org.wso2.carbon.throttling.agent.internal.ThrottlingAgentServiceComponent.registerThrottlingAgent(ThrottlingAgentServiceComponent.java:123)
at
org.wso2.car

Re: [Dev] [DEV][AS] Ideas and ways to integrate with Hot Swap Agent

2016-01-21 Thread Kishanthan Thangarajah
Hi Clovis,

On Wed, Jan 20, 2016 at 6:06 PM, Clovis Wichoski 
wrote:

> Hi,
>
> I'm researching for some ways to improve speed of development and redeploy
> on WSO2 Application Server, for example I have a scenario here where a
> simple change on a class, to test, get about 5 minutes. (as the test must
> pass by web interfaces in Jaggery, until reach the REST Api implemented in
> JAX-RS with Jersey and some JPA using EclipseLink.
>
> The Jaggery part is very easy, just rsync files, and all works fine.
>
> For the java part, in this research I found the HotSwapAgent -
> http://www.hotswapagent.org/
>
> My first try was to follow HotSwapAgent quick start as is, and check if it
> works with WSO2 AS 5.2.1 out of the box, but dont worked, HotSwapAgent dont
> detect changes when I copy one updated .class file to WEB-INF/classes.
>
> Then my question is about, if anyone tried this before with WSO2, and if
> is a good way to invest time to implement a WSO2 plugin that work better
> with HotSwapAgent and what is the steps I must follow to implement this
> plugin or integrate this type of speed with redeploy with WSO2 AS? Maybe
> some problems with OSGi?
>

This is a good thing to have with webap deployment. But we do have a
concept of hot update of webapps which is the default behaviour. If you
update the webapp, it will be redeployed by the Application Server where it
keeps track of the changes using the scheduled task which runs on every 15
seconds interval. Since this redeploys the entire webapp, all the classes
loaded will be removed and will be loaded again. Do find any issues with
this behaviour?

Thanks,
Kishanthan.


> ps: Note that the idea, is just change one class, rsync the binary .class
> file over respective WEB-INF/classes and got the results.
>
> Best regards
>
> Clóvis Wichoski
> CEO, Neoinix
> Mobile: +554588233181
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Kishanthan Thangarajah*
Associate Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com *
Twitter - *http://twitter.com/kishanthan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [DEV][AS] Ideas and ways to integrate with Hot Swap Agent

2016-01-20 Thread Clovis Wichoski
Hi,

I'm researching for some ways to improve speed of development and redeploy
on WSO2 Application Server, for example I have a scenario here where a
simple change on a class, to test, get about 5 minutes. (as the test must
pass by web interfaces in Jaggery, until reach the REST Api implemented in
JAX-RS with Jersey and some JPA using EclipseLink.

The Jaggery part is very easy, just rsync files, and all works fine.

For the java part, in this research I found the HotSwapAgent -
http://www.hotswapagent.org/

My first try was to follow HotSwapAgent quick start as is, and check if it
works with WSO2 AS 5.2.1 out of the box, but dont worked, HotSwapAgent dont
detect changes when I copy one updated .class file to WEB-INF/classes.

Then my question is about, if anyone tried this before with WSO2, and if is
a good way to invest time to implement a WSO2 plugin that work better with
HotSwapAgent and what is the steps I must follow to implement this plugin
or integrate this type of speed with redeploy with WSO2 AS? Maybe some
problems with OSGi?

ps: Note that the idea, is just change one class, rsync the binary .class
file over respective WEB-INF/classes and got the results.

Best regards

Clóvis Wichoski
CEO, Neoinix
Mobile: +554588233181
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] [Tests] Port offset change in test cases where offset values are hardcoded

2015-09-15 Thread Manuri Amaya Perera
Hi,

Thank you for the suggestions.

The property was added as follows.

eg:


localhost


9864
9544


101




On Thu, Sep 3, 2015 at 12:34 PM, Nuwan Wimalasekara  wrote:

> HI Supun,
>
>
> On Thu, Sep 3, 2015 at 12:29 PM, Supun Malinga  wrote:
>
>>
>>
>> On Thu, Sep 3, 2015 at 12:24 PM, Nuwan Wimalasekara 
>> wrote:
>>
>>> Hi Manuri,
>>> There are some test classes which start a new server with a port offset
>>> and those port configuration are kept in automation.xml and referred by a
>>> name.
>>>
>>
>> This is true Nuwan. But the concern is that in the test cases where we
>> use a offset. We have the offset hardcoded. Instead we need to read it from
>> the config file (automation.xml).
>> So what we thought is to put it as a property in the config of the
>> instances.
>> eg:
>> > nonBlockingTransportEnabled="false">
>> 
>> localhost
>> 
>> 
>> 9764
>> 9444
>> 
>> **
>> **
>> **
>> 
>>
> +1. This is better approach.  Then we can read the offset from the config
> property and set
>
> Thanks,
> Nuwanw
>
>>
>> thanks,
>>
>>
>>>
>>
>>> Ex: if the portOffset is 1, then the config is as bellow. Then the test
>>> class refer the post and hot config by referring the name
>>> "appServerInstance0002" and generate the server URLs.
>>>
>>> >> nonBlockingTransportEnabled="false">
>>> 
>>> localhost
>>> 
>>> 
>>> 9764
>>> 9444
>>> 
>>> 
>>>
>>> Now you have to increase the port offset in this classes to be 100 +
>>> portOffset and according to new port offset you have to change the
>>> configuration as well.
>>>
>>> >> nonBlockingTransportEnabled="false">
>>> 
>>> localhost
>>> 
>>> 
>>> 9864
>>> 9544
>>> 
>>> 
>>>
>>> Thanks,
>>> Nuwanw
>>>
>>> On Thu, Sep 3, 2015 at 12:07 PM, Manuri Amaya Perera 
>>> wrote:
>>>
 Adding Dev

 On Thu, Sep 3, 2015 at 11:50 AM, Manuri Amaya Perera 
 wrote:

> Hi,
>
> At the moment, in automation.xml in test modules, the -DportOffset
> parameter has been set to 100 and the port values in relevant instances
> also have been changed accordingly.
>
> But in the test cases where internally a server is set up, the port
> offset values are being hard coded. These values also need to be moved
> forward by 100. A configuration can be added to automation.xml which can 
> be
> read and used to do this.
>
> I'd like to discuss the best way to address this problem.
>
> Thank you.
>
> --
>
> *Manuri Amaya Perera*
>
> *Software Engineer*
>
> *WSO2 Inc.*
>
> *Blog: http://manuriamayaperera.blogspot.com
> *
>



 --

 *Manuri Amaya Perera*

 *Software Engineer*

 *WSO2 Inc.*

 *Blog: http://manuriamayaperera.blogspot.com
 *

>>>
>>>
>>>
>>> --
>>> Nuwan Wimalasekara
>>> Senior Software Engineer - Test Automation
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> phone: +94 71 668 4620
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Supun Malinga,
>>
>> Senior Software Engineer,
>> WSO2 Inc.
>> http://wso2.com
>> email: sup...@wso2.com 
>> mobile: +94 (0)71 56 91 321
>>
>
>
>
> --
> Nuwan Wimalasekara
> Senior Software Engineer - Test Automation
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> phone: +94 71 668 4620
>
>
>
>


-- 

*Manuri Amaya Perera*

*Software Engineer*

*WSO2 Inc.*

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


Re: [Dev] [AS] Data Service Error

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

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

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


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


Re: [Dev] [AS] Data Service Error

2015-09-10 Thread Chanika Geeganage
Hi Lasantha,

JOSN Mapping [1] was introduced from DSS 3.2.0 onwards and therefore that
feature is not available in AS 5.2.1 or previous versions. You can install
DSS 3.2.2 features (latest) on AS 5.2.1

[1] https://docs.wso2.com/display/DSS320/JSON+Mapping


On Thu, Sep 10, 2015 at 3:32 PM, Lasantha Dharmakeerthi 
wrote:

> I created data service using wso2 data service server and it's working
> properly. Then I deployed it in WSO2 application server. In Application
> server it's not working. Showing as a faulty service. How can I figure out
> this error?
>
> Return type of query is json.
>
> I have attached screen shots of errors.
>
> --
> Dharmakeerthi Lasantha
> Software Engineer Trainee, WSO2
> Mobile 0774928852
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Best Regards..

Chanika Geeganage
Software Engineer
Mobile : +94773522586
WSO2, Inc.; http://wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] [Tests] Port offset change in test cases where offset values are hardcoded

2015-09-03 Thread Nuwan Wimalasekara
HI Supun,


On Thu, Sep 3, 2015 at 12:29 PM, Supun Malinga  wrote:

>
>
> On Thu, Sep 3, 2015 at 12:24 PM, Nuwan Wimalasekara 
> wrote:
>
>> Hi Manuri,
>> There are some test classes which start a new server with a port offset
>> and those port configuration are kept in automation.xml and referred by a
>> name.
>>
>
> This is true Nuwan. But the concern is that in the test cases where we use
> a offset. We have the offset hardcoded. Instead we need to read it from the
> config file (automation.xml).
> So what we thought is to put it as a property in the config of the
> instances.
> eg:
>  nonBlockingTransportEnabled="false">
> 
> localhost
> 
> 
> 9764
> 9444
> 
> **
> **
> **
> 
>
+1. This is better approach.  Then we can read the offset from the config
property and set

Thanks,
Nuwanw

>
> thanks,
>
>
>>
>
>> Ex: if the portOffset is 1, then the config is as bellow. Then the test
>> class refer the post and hot config by referring the name
>> "appServerInstance0002" and generate the server URLs.
>>
>> > nonBlockingTransportEnabled="false">
>> 
>> localhost
>> 
>> 
>> 9764
>> 9444
>> 
>> 
>>
>> Now you have to increase the port offset in this classes to be 100 +
>> portOffset and according to new port offset you have to change the
>> configuration as well.
>>
>> > nonBlockingTransportEnabled="false">
>> 
>> localhost
>> 
>> 
>> 9864
>> 9544
>> 
>> 
>>
>> Thanks,
>> Nuwanw
>>
>> On Thu, Sep 3, 2015 at 12:07 PM, Manuri Amaya Perera 
>> wrote:
>>
>>> Adding Dev
>>>
>>> On Thu, Sep 3, 2015 at 11:50 AM, Manuri Amaya Perera 
>>> wrote:
>>>
 Hi,

 At the moment, in automation.xml in test modules, the -DportOffset
 parameter has been set to 100 and the port values in relevant instances
 also have been changed accordingly.

 But in the test cases where internally a server is set up, the port
 offset values are being hard coded. These values also need to be moved
 forward by 100. A configuration can be added to automation.xml which can be
 read and used to do this.

 I'd like to discuss the best way to address this problem.

 Thank you.

 --

 *Manuri Amaya Perera*

 *Software Engineer*

 *WSO2 Inc.*

 *Blog: http://manuriamayaperera.blogspot.com
 *

>>>
>>>
>>>
>>> --
>>>
>>> *Manuri Amaya Perera*
>>>
>>> *Software Engineer*
>>>
>>> *WSO2 Inc.*
>>>
>>> *Blog: http://manuriamayaperera.blogspot.com
>>> *
>>>
>>
>>
>>
>> --
>> Nuwan Wimalasekara
>> Senior Software Engineer - Test Automation
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> phone: +94 71 668 4620
>>
>>
>>
>>
>
>
> --
> Supun Malinga,
>
> Senior Software Engineer,
> WSO2 Inc.
> http://wso2.com
> email: sup...@wso2.com 
> mobile: +94 (0)71 56 91 321
>



-- 
Nuwan Wimalasekara
Senior Software Engineer - Test Automation
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

phone: +94 71 668 4620
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] [Tests] Port offset change in test cases where offset values are hardcoded

2015-09-03 Thread Manuri Amaya Perera
Hi Nuwan,

In this case shifting the values in automation.xml would suffice but where
offsets are hard coded we have to look for some other solution right?

On Thu, Sep 3, 2015 at 12:24 PM, Nuwan Wimalasekara  wrote:

> Hi Manuri,
> There are some test classes which start a new server with a port offset
> and those port configuration are kept in automation.xml and referred by a
> name.
>
> Ex: if the portOffset is 1, then the config is as bellow. Then the test
> class refer the post and hot config by referring the name
> "appServerInstance0002" and generate the server URLs.
>
>  nonBlockingTransportEnabled="false">
> 
> localhost
> 
> 
> 9764
> 9444
> 
> 
>
> Now you have to increase the port offset in this classes to be 100 +
> portOffset and according to new port offset you have to change the
> configuration as well.
>
>  nonBlockingTransportEnabled="false">
> 
> localhost
> 
> 
> 9864
> 9544
> 
> 
>
> Thanks,
> Nuwanw
>
> On Thu, Sep 3, 2015 at 12:07 PM, Manuri Amaya Perera 
> wrote:
>
>> Adding Dev
>>
>> On Thu, Sep 3, 2015 at 11:50 AM, Manuri Amaya Perera 
>> wrote:
>>
>>> Hi,
>>>
>>> At the moment, in automation.xml in test modules, the -DportOffset
>>> parameter has been set to 100 and the port values in relevant instances
>>> also have been changed accordingly.
>>>
>>> But in the test cases where internally a server is set up, the port
>>> offset values are being hard coded. These values also need to be moved
>>> forward by 100. A configuration can be added to automation.xml which can be
>>> read and used to do this.
>>>
>>> I'd like to discuss the best way to address this problem.
>>>
>>> Thank you.
>>>
>>> --
>>>
>>> *Manuri Amaya Perera*
>>>
>>> *Software Engineer*
>>>
>>> *WSO2 Inc.*
>>>
>>> *Blog: http://manuriamayaperera.blogspot.com
>>> *
>>>
>>
>>
>>
>> --
>>
>> *Manuri Amaya Perera*
>>
>> *Software Engineer*
>>
>> *WSO2 Inc.*
>>
>> *Blog: http://manuriamayaperera.blogspot.com
>> *
>>
>
>
>
> --
> Nuwan Wimalasekara
> Senior Software Engineer - Test Automation
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> phone: +94 71 668 4620
>
>
>
>


-- 

*Manuri Amaya Perera*

*Software Engineer*

*WSO2 Inc.*

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


Re: [Dev] [AS] [Tests] Port offset change in test cases where offset values are hardcoded

2015-09-03 Thread Supun Malinga
On Thu, Sep 3, 2015 at 12:24 PM, Nuwan Wimalasekara  wrote:

> Hi Manuri,
> There are some test classes which start a new server with a port offset
> and those port configuration are kept in automation.xml and referred by a
> name.
>

This is true Nuwan. But the concern is that in the test cases where we use
a offset. We have the offset hardcoded. Instead we need to read it from the
config file (automation.xml).
So what we thought is to put it as a property in the config of the
instances.
eg:


localhost


9764
9444

**
**
**


thanks,


>

> Ex: if the portOffset is 1, then the config is as bellow. Then the test
> class refer the post and hot config by referring the name
> "appServerInstance0002" and generate the server URLs.
>
>  nonBlockingTransportEnabled="false">
> 
> localhost
> 
> 
> 9764
> 9444
> 
> 
>
> Now you have to increase the port offset in this classes to be 100 +
> portOffset and according to new port offset you have to change the
> configuration as well.
>
>  nonBlockingTransportEnabled="false">
> 
> localhost
> 
> 
> 9864
> 9544
> 
> 
>
> Thanks,
> Nuwanw
>
> On Thu, Sep 3, 2015 at 12:07 PM, Manuri Amaya Perera 
> wrote:
>
>> Adding Dev
>>
>> On Thu, Sep 3, 2015 at 11:50 AM, Manuri Amaya Perera 
>> wrote:
>>
>>> Hi,
>>>
>>> At the moment, in automation.xml in test modules, the -DportOffset
>>> parameter has been set to 100 and the port values in relevant instances
>>> also have been changed accordingly.
>>>
>>> But in the test cases where internally a server is set up, the port
>>> offset values are being hard coded. These values also need to be moved
>>> forward by 100. A configuration can be added to automation.xml which can be
>>> read and used to do this.
>>>
>>> I'd like to discuss the best way to address this problem.
>>>
>>> Thank you.
>>>
>>> --
>>>
>>> *Manuri Amaya Perera*
>>>
>>> *Software Engineer*
>>>
>>> *WSO2 Inc.*
>>>
>>> *Blog: http://manuriamayaperera.blogspot.com
>>> *
>>>
>>
>>
>>
>> --
>>
>> *Manuri Amaya Perera*
>>
>> *Software Engineer*
>>
>> *WSO2 Inc.*
>>
>> *Blog: http://manuriamayaperera.blogspot.com
>> *
>>
>
>
>
> --
> Nuwan Wimalasekara
> Senior Software Engineer - Test Automation
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> phone: +94 71 668 4620
>
>
>
>


-- 
Supun Malinga,

Senior Software Engineer,
WSO2 Inc.
http://wso2.com
email: sup...@wso2.com 
mobile: +94 (0)71 56 91 321
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] [Tests] Port offset change in test cases where offset values are hardcoded

2015-09-02 Thread Nuwan Wimalasekara
Hi Manuri,
There are some test classes which start a new server with a port offset and
those port configuration are kept in automation.xml and referred by a name.

Ex: if the portOffset is 1, then the config is as bellow. Then the test
class refer the post and hot config by referring the name
"appServerInstance0002" and generate the server URLs.



localhost


9764
9444



Now you have to increase the port offset in this classes to be 100 +
portOffset and according to new port offset you have to change the
configuration as well.



localhost


9864
9544



Thanks,
Nuwanw

On Thu, Sep 3, 2015 at 12:07 PM, Manuri Amaya Perera 
wrote:

> Adding Dev
>
> On Thu, Sep 3, 2015 at 11:50 AM, Manuri Amaya Perera 
> wrote:
>
>> Hi,
>>
>> At the moment, in automation.xml in test modules, the -DportOffset
>> parameter has been set to 100 and the port values in relevant instances
>> also have been changed accordingly.
>>
>> But in the test cases where internally a server is set up, the port
>> offset values are being hard coded. These values also need to be moved
>> forward by 100. A configuration can be added to automation.xml which can be
>> read and used to do this.
>>
>> I'd like to discuss the best way to address this problem.
>>
>> Thank you.
>>
>> --
>>
>> *Manuri Amaya Perera*
>>
>> *Software Engineer*
>>
>> *WSO2 Inc.*
>>
>> *Blog: http://manuriamayaperera.blogspot.com
>> *
>>
>
>
>
> --
>
> *Manuri Amaya Perera*
>
> *Software Engineer*
>
> *WSO2 Inc.*
>
> *Blog: http://manuriamayaperera.blogspot.com
> *
>



-- 
Nuwan Wimalasekara
Senior Software Engineer - Test Automation
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

phone: +94 71 668 4620
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] [Tests] Port offset change in test cases where offset values are hardcoded

2015-09-02 Thread KasunG Gajasinghe
Hi,

We can introduce a parameter, say, defaultPortOffset, in to the
automation.xml. This should be set to 100 in the case of AS. Then, the test
cases that need to spin up servers should set the port offset value as
"defaultPortOffset + X" where the X could range from 1-100.

On Thu, Sep 3, 2015 at 12:07 PM, Manuri Amaya Perera 
wrote:

> Adding Dev
>
> On Thu, Sep 3, 2015 at 11:50 AM, Manuri Amaya Perera 
> wrote:
>
>> Hi,
>>
>> At the moment, in automation.xml in test modules, the -DportOffset
>> parameter has been set to 100 and the port values in relevant instances
>> also have been changed accordingly.
>>
>> But in the test cases where internally a server is set up, the port
>> offset values are being hard coded. These values also need to be moved
>> forward by 100. A configuration can be added to automation.xml which can be
>> read and used to do this.
>>
>> I'd like to discuss the best way to address this problem.
>>
>> Thank you.
>>
>> --
>>
>> *Manuri Amaya Perera*
>>
>> *Software Engineer*
>>
>> *WSO2 Inc.*
>>
>> *Blog: http://manuriamayaperera.blogspot.com
>> *
>>
>
>
>
> --
>
> *Manuri Amaya Perera*
>
> *Software Engineer*
>
> *WSO2 Inc.*
>
> *Blog: http://manuriamayaperera.blogspot.com
> *
>



-- 

*Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] [Tests] Port offset change in test cases where offset values are hardcoded

2015-09-02 Thread Manuri Amaya Perera
Adding Dev

On Thu, Sep 3, 2015 at 11:50 AM, Manuri Amaya Perera 
wrote:

> Hi,
>
> At the moment, in automation.xml in test modules, the -DportOffset
> parameter has been set to 100 and the port values in relevant instances
> also have been changed accordingly.
>
> But in the test cases where internally a server is set up, the port offset
> values are being hard coded. These values also need to be moved forward by
> 100. A configuration can be added to automation.xml which can be read and
> used to do this.
>
> I'd like to discuss the best way to address this problem.
>
> Thank you.
>
> --
>
> *Manuri Amaya Perera*
>
> *Software Engineer*
>
> *WSO2 Inc.*
>
> *Blog: http://manuriamayaperera.blogspot.com
> *
>



-- 

*Manuri Amaya Perera*

*Software Engineer*

*WSO2 Inc.*

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


Re: [Dev] [AS] [Session Replication] Using Hazelcast Session Replication

2015-09-01 Thread Aruna Karunarathna
On Tue, Sep 1, 2015 at 12:34 PM, Samiyuru Senarathne 
wrote:

> Hi,
>
> I am in the process of implementing session replication for the WSO2
> Application Server. For that, Hazelcast session replication [1] is
> suggested. I would like to know your ideas regarding this.
>

AFAIR there is some work done for the $subject, It's better if you can go
through them first.

[1]. [Architecture] [Progress] HTTP Session Persistence for WSO2
Application Server


> [1] -
> https://hazelcast.com/use-cases/web-session-clustering/generic-web-session-replication/
>
> Thanks,
>
> --
> Samiyuru Senarathne
> *Software Engineer*
> Mobile : +94 (0) 71 134 6087
> samiyuru@wso2.comto have a chat regarding a fast track project :)to have a
> chat regarding a fast track project :)to have a chat regarding a fast track
> project :) 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Aruna Sujith Karunarathna *| Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 9040362 | Work: +94 112145345
Email: ar...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] [Session Replication] Using Hazelcast Session Replication

2015-09-01 Thread Ruwan Abeykoon
Hi Samiyuru,
Can we evaluate the use of Kryo [1] or similar serialization library
instead of default java serilalizer while doing $subject? They kryo will
reduce CPU usage/byte size significantly than default java serializers and
better in deep cloning. Please see [2][3].

I hope you are planning to write our own serialization filter/valve rather
than using pre-existing one you mentioned on [4]. It would be better we
write the session replication filter/valve such that it would be easy to
replace the hazelcast with something else in future.


[1] https://github.com/EsotericSoftware/kryo
[2] http://blog.hazelcast.com/kryo-serializer/
[3] http://blog.hazelcast.com/comparing-serialization-methods/
[4] https://hazelcast.com/use-cases/web-session-clustering/generic-web-
session-replication/

Cheers,
Ruwan

On Tue, Sep 1, 2015 at 12:34 PM, Samiyuru Senarathne 
wrote:

> Hi,
>
> I am in the process of implementing session replication for the WSO2
> Application Server. For that, Hazelcast session replication [1] is
> suggested. I would like to know your ideas regarding this.
>
> [1] -
> https://hazelcast.com/use-cases/web-session-clustering/generic-web-session-replication/
>
> Thanks,
>
> --
> Samiyuru Senarathne
> *Software Engineer*
> Mobile : +94 (0) 71 134 6087
> samiyuru@wso2.comto have a chat regarding a fast track project :)to have a
> chat regarding a fast track project :)to have a chat regarding a fast track
> project :) 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Ruwan Abeykoon*
*Architect,*
*WSO2, Inc. http://wso2.com  *
*lean.enterprise.middleware.*

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


[Dev] [AS] [Session Replication] Using Hazelcast Session Replication

2015-09-01 Thread Samiyuru Senarathne
Hi,

I am in the process of implementing session replication for the WSO2
Application Server. For that, Hazelcast session replication [1] is
suggested. I would like to know your ideas regarding this.

[1] -
https://hazelcast.com/use-cases/web-session-clustering/generic-web-session-replication/

Thanks,

-- 
Samiyuru Senarathne
*Software Engineer*
Mobile : +94 (0) 71 134 6087
samiyuru@wso2.comto have a chat regarding a fast track project :)to have a
chat regarding a fast track project :)to have a chat regarding a fast track
project :) 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Running multiple instances in a single host

2015-07-20 Thread Sabra Ossen
Hi,

Thank you all for your help.

Regards.

On Tue, Jul 21, 2015 at 11:03 AM, Chathura Priyankara 
wrote:

> Hi Sabra,
>
> You can change  value in carbon.xml or else the port offset can be
> passed to the server during startup
> using following command ./wso2server.sh -DportOffset=3. Using the either
> way you can start multiple AS instances in a single host.
>
> Thanks,
> Chathura.
>
> On Tue, Jul 21, 2015 at 10:46 AM, Danushka Fernando 
> wrote:
>
>> You can set port offset in carbon.xml. Refer [1].
>>
>> [1] https://docs.wso2.com/pages/viewpage.action?pageId=43977215
>>
>> Thanks & Regards
>> Danushka Fernando
>> Senior Software Engineer
>> WSO2 inc. http://wso2.com/
>> Mobile : +94716332729
>>
>> On Tue, Jul 21, 2015 at 10:43 AM, Sabra Ossen  wrote:
>>
>>> Hi,
>>>
>>> Can someone give me some input on $subject. The AS version is 5.3.0
>>> alpha. Thank you in advance.
>>>
>>> Regards.
>>> --
>>> Sabra Ossen 
>>> Undergraduate | Department of Computer Science and Engineering
>>> University of Moratuwa
>>> Sri Lanka
>>>
>>> ___
>>> 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
>>
>>
>
>
> --
> Chathura Priyankara
> Software Engineer | WSO2 Inc.
> Mobile : +94718795340
> Blog : www.codeoncloud.blogspot.com
>



-- 
Sabra Ossen 
Undergraduate | Department of Computer Science and Engineering
University of Moratuwa
Sri Lanka
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Running multiple instances in a single host

2015-07-20 Thread Chathura Priyankara
Hi Sabra,

You can change  value in carbon.xml or else the port offset can be
passed to the server during startup
using following command ./wso2server.sh -DportOffset=3. Using the either
way you can start multiple AS instances in a single host.

Thanks,
Chathura.

On Tue, Jul 21, 2015 at 10:46 AM, Danushka Fernando 
wrote:

> You can set port offset in carbon.xml. Refer [1].
>
> [1] https://docs.wso2.com/pages/viewpage.action?pageId=43977215
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
> On Tue, Jul 21, 2015 at 10:43 AM, Sabra Ossen  wrote:
>
>> Hi,
>>
>> Can someone give me some input on $subject. The AS version is 5.3.0
>> alpha. Thank you in advance.
>>
>> Regards.
>> --
>> Sabra Ossen 
>> Undergraduate | Department of Computer Science and Engineering
>> University of Moratuwa
>> Sri Lanka
>>
>> ___
>> 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
>
>


-- 
Chathura Priyankara
Software Engineer | WSO2 Inc.
Mobile : +94718795340
Blog : www.codeoncloud.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Running multiple instances in a single host

2015-07-20 Thread Irham Iqbal
Hi,

Also you can set the port offset as a system-property when starting the
server as below.

./wso2server.sh -DportOffset=

Thanks,
Iqbal

On Tue, Jul 21, 2015 at 10:46 AM, Danushka Fernando 
wrote:

> You can set port offset in carbon.xml. Refer [1].
>
> [1] https://docs.wso2.com/pages/viewpage.action?pageId=43977215
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
> On Tue, Jul 21, 2015 at 10:43 AM, Sabra Ossen  wrote:
>
>> Hi,
>>
>> Can someone give me some input on $subject. The AS version is 5.3.0
>> alpha. Thank you in advance.
>>
>> Regards.
>> --
>> Sabra Ossen 
>> Undergraduate | Department of Computer Science and Engineering
>> University of Moratuwa
>> Sri Lanka
>>
>> ___
>> 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
>
>


-- 
Irham Iqbal
Software Engineer - Test Automation
 WSO2, Inc.: http://wso2.com
lean. enterprise. middleware
phone: +94 777888452
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Running multiple instances in a single host

2015-07-20 Thread Danushka Fernando
You can set port offset in carbon.xml. Refer [1].

[1] https://docs.wso2.com/pages/viewpage.action?pageId=43977215

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

On Tue, Jul 21, 2015 at 10:43 AM, Sabra Ossen  wrote:

> Hi,
>
> Can someone give me some input on $subject. The AS version is 5.3.0 alpha.
> Thank you in advance.
>
> Regards.
> --
> Sabra Ossen 
> Undergraduate | Department of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka
>
> ___
> 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


[Dev] [AS] Running multiple instances in a single host

2015-07-20 Thread Sabra Ossen
Hi,

Can someone give me some input on $subject. The AS version is 5.3.0 alpha.
Thank you in advance.

Regards.
-- 
Sabra Ossen 
Undergraduate | Department of Computer Science and Engineering
University of Moratuwa
Sri Lanka
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] AS platform test automation for clustering

2015-07-19 Thread KasunG Gajasinghe
It should be 404, but since the management console is registered as the
ROOT webapp, the requests to non-existing webapps gets redirected to that.
Hence, you are seeing a 302 redirect rather than a 404.

If you need to get rid of this behavior, you need to set the WebContextRoot
under carbon.xml to change the context of the mgt console webapp.

On Sun, Jul 19, 2015 at 3:46 PM, Suhan Dharmasuriya  wrote:

> Hi,
>
> We are running a cluster test automation for an AS cluster to test the Dep
> Sync functionality.
> In AS cluster we have a manger node and two worker nodes fronted by an
> Nginx load balancer.
>
> When testing the web app undeployment, we are following the below steps.
>
> 1. Undeploy the webapp from the manager node; webapp removed from svn repo
> and cluster
> message is sent.
> 2. Worker node receive the cluster message and undeploy the web app with
> an svn update.
> 3. At this point, we are sending an HTTP request to the webapp in a worker
> node to see whether
> the undeployment has taken place as expected in worker nodes.
> 4. We are expecting an HTTP 404 (Not Found) response from the worker node.
>
> This test was passing initially and now got failed the reason being that
> worker node response
> sending the HTTP 302 (Moved Temporarily) response instead of HTTP 404.
>
> What should be the correct behaviour?
> After undeploying the webapp and further HTTP requests are received to the
> removed webapp,
> what should be the node response; HTTP 302 or HTTP 404?
>
> Thanks,
> Suhan
>
> --
> Suhan Dharmasuriya
> Software Engineer - Test Automation
>
> *WSO2, Inc. *
>
> lean . enterprise . middleware
> Tel: +94 112 145345
> Mob: +94 779 869138
> Blog: http://suhan-opensource.blogspot.com/
>



-- 

*Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] AS platform test automation for clustering

2015-07-19 Thread Suhan Dharmasuriya
Hi,

We are running a cluster test automation for an AS cluster to test the Dep
Sync functionality.
In AS cluster we have a manger node and two worker nodes fronted by an
Nginx load balancer.

When testing the web app undeployment, we are following the below steps.

1. Undeploy the webapp from the manager node; webapp removed from svn repo
and cluster
message is sent.
2. Worker node receive the cluster message and undeploy the web app with an
svn update.
3. At this point, we are sending an HTTP request to the webapp in a worker
node to see whether
the undeployment has taken place as expected in worker nodes.
4. We are expecting an HTTP 404 (Not Found) response from the worker node.

This test was passing initially and now got failed the reason being that
worker node response
sending the HTTP 302 (Moved Temporarily) response instead of HTTP 404.

What should be the correct behaviour?
After undeploying the webapp and further HTTP requests are received to the
removed webapp,
what should be the node response; HTTP 302 or HTTP 404?

Thanks,
Suhan

-- 
Suhan Dharmasuriya
Software Engineer - Test Automation

*WSO2, Inc. *

lean . enterprise . middleware
Tel: +94 112 145345
Mob: +94 779 869138
Blog: http://suhan-opensource.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] ClassNotFoundException in Jax-rs service for tyrus standalone client Client Manager

2015-07-15 Thread Sabra Ossen
Hi All,

Creating an orbit bundle for tyrus-standalone-client was the solution to
the problem and the pom in [1] helped.

In order to exclude the websokcet classes in the tyrus bundle the code had
to be changed. Within the maven-bundle-plugin where the websokcet classes
are exported in [1] the websokcet package needed to be removed.
(Export-Package lets the plugin know which of the available packages to
copy into the bundle and export, thus removing websocket package eliminates
the problem).


  
   
 org.glassfish.* ;version="1.7"
   
  


Thanks for the help everybody.

[1]
https://github.com/wso2/orbit/blob/master/tyrus-standalone-client/1.7-wso2v1/pom.xml

Regards.

On Fri, Jul 10, 2015 at 7:36 AM, Sabra Ossen  wrote:

> Hi All,
>
> I tried excluding using the way Thusitha mentioned but it didn't work, so
> going ahead with creating an orbit bundle.
>
> Thanks for the help everybody.
>
> Regards.
>
>
> On Monday, July 6, 2015, Danushka Fernando  wrote:
>
>> When creating an orbit bundles that's not the way to do it. You can
>> simply restrict what to export.
>>
>> Thanks & Regards
>> Danushka Fernando
>> Senior Software Engineer
>> WSO2 inc. http://wso2.com/
>> Mobile : +94716332729
>>
>>
>> On Jul 6, 2015 10:29 PM, "Thusitha Thilina Dayaratne" 
>> wrote:
>>
>>> Hi Sabra,
>>>
>>> As Dhanushka mentioned you can create a orbit bundle, or I think you can
>>> exclude websocket from the tyrus as follows
>>>
>>> 
>>>   org.glassfish.tyrus.bundles
>>>   tyrus-standalone-client
>>>   1.11
>>>   
>>> 
>>>   javax.websocket
>>>   javax.websocket-api
>>> 
>>>   
>>> 
>>>
>>> Thanks
>>>
>>> On Mon, Jul 6, 2015 at 10:15 PM, Danushka Fernando 
>>> wrote:
>>>
 You can create orbit bundles with 3rd party libraries and
 include/exclude packages.

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


 On Jul 6, 2015 8:54 PM, "Sabra Ossen"  wrote:

> Hi Danushka,
>
> I didn't bundle the dependencies in WEB-INF/lib. I have excluded the
> dependencies by
> ...
>
>
>
>
>
> *
> ${basedir}/src/main/webapp/WEB-INF/web.xml
> WEB-INF/lib/*.jar
> ${project.artifactId}*...
> in the pom.
>
> I only included the tyrus standalone client jar [1] to
> AS_HOME/repository/components/lib.
>
> I had already included a webapp-classloading.xml with the following
> content.
>
>
>
>
>
>
>
> * xmlns="http://wso2.org/projects/as/classloading
> ">
> false
> Carbon,CXF*
>
> Thanks for the reference on class loading in AS, given your suggestion
> I checked the contents of tyrus standalone client and it contains a
> javax.websocket.Endpoint class as shown by the attached screen shot. As
> this Endpoint class is bundled with the 3rd party jar exclusion could be
> done via the maven shade plugin. I will update the thread with the results
> asap. If you do have any other suggestions do let me know.
>
> @Thusitha, I tried your suggestion but it resulted in no change due to
> the websocket classes being present in the tyrus jar.
>
> [1]
> http://mvnrepository.com/artifact/org.glassfish.tyrus.bundles/tyrus-standalone-client/1.11
>
> Thanks and Regards.
>
> On Mon, Jul 6, 2015 at 2:15 PM, Danushka Fernando 
> wrote:
>
>> Hi Sabra
>> This is a class loading issue. Seems there are two jars providing
>> same class in the jvm. So did you bundled the dependencies in to the
>> application (check WEB-INF/lib/ dir of the webapp)? What are jars you
>> copied in to the $CARBON_HOME/repository/components/lib and 
>> $CARBON_HOME/repository/components/dropins
>> directories?
>>
>> Probably what Thusitha mentioned would work for you. But you could
>> ended up with series of exceptions if you continue without understanding.
>> :). So I recommend you to go through [1].
>>
>> [1] https://docs.wso2.com/display/AS510/Webapp+ClassLoading
>>
>>
>> Thanks & Regards
>> Danushka Fernando
>> Senior Software Engineer
>> WSO2 inc. http://wso2.com/
>> Mobile : +94716332729
>>
>> On Mon, Jul 6, 2015 at 1:54 PM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Sabra
>>>
>>> I think you should mark following dependency as provided since AS
>>> provided required jars for the websocket
>>>

 *   *
 *javax.websocket*
 *javax.websocket-api**
 1.1*
>>>
>>>
>>> *provided*

 **
>>>
>>>
>>> On Mon, Jul 6, 2015 at 1:49 PM, Sabra Ossen 
>>> wrote:
>>>
 Hi Sajith,

 I moved it to AS_HOME/repository/components/lib , but no

Re: [Dev] [AS] ClassNotFoundException in Jax-rs service for tyrus standalone client Client Manager

2015-07-09 Thread Sabra Ossen
Hi All,

I tried excluding using the way Thusitha mentioned but it didn't work, so
going ahead with creating an orbit bundle.

Thanks for the help everybody.

Regards.

On Monday, July 6, 2015, Danushka Fernando  wrote:

> When creating an orbit bundles that's not the way to do it. You can simply
> restrict what to export.
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
>
> On Jul 6, 2015 10:29 PM, "Thusitha Thilina Dayaratne"  > wrote:
>
>> Hi Sabra,
>>
>> As Dhanushka mentioned you can create a orbit bundle, or I think you can
>> exclude websocket from the tyrus as follows
>>
>> 
>>   org.glassfish.tyrus.bundles
>>   tyrus-standalone-client
>>   1.11
>>   
>> 
>>   javax.websocket
>>   javax.websocket-api
>> 
>>   
>> 
>>
>> Thanks
>>
>> On Mon, Jul 6, 2015 at 10:15 PM, Danushka Fernando > > wrote:
>>
>>> You can create orbit bundles with 3rd party libraries and
>>> include/exclude packages.
>>>
>>> Thanks & Regards
>>> Danushka Fernando
>>> Senior Software Engineer
>>> WSO2 inc. http://wso2.com/
>>> Mobile : +94716332729
>>>
>>>
>>> On Jul 6, 2015 8:54 PM, "Sabra Ossen" >> > wrote:
>>>
 Hi Danushka,

 I didn't bundle the dependencies in WEB-INF/lib. I have excluded the
 dependencies by
 ...





 *
 ${basedir}/src/main/webapp/WEB-INF/web.xml
 WEB-INF/lib/*.jar
 ${project.artifactId}*...
 in the pom.

 I only included the tyrus standalone client jar [1] to
 AS_HOME/repository/components/lib.

 I had already included a webapp-classloading.xml with the following
 content.







 *>>> xmlns="http://wso2.org/projects/as/classloading
 ">
 false
 Carbon,CXF*

 Thanks for the reference on class loading in AS, given your suggestion
 I checked the contents of tyrus standalone client and it contains a
 javax.websocket.Endpoint class as shown by the attached screen shot. As
 this Endpoint class is bundled with the 3rd party jar exclusion could be
 done via the maven shade plugin. I will update the thread with the results
 asap. If you do have any other suggestions do let me know.

 @Thusitha, I tried your suggestion but it resulted in no change due to
 the websocket classes being present in the tyrus jar.

 [1]
 http://mvnrepository.com/artifact/org.glassfish.tyrus.bundles/tyrus-standalone-client/1.11

 Thanks and Regards.

 On Mon, Jul 6, 2015 at 2:15 PM, Danushka Fernando >>> > wrote:

> Hi Sabra
> This is a class loading issue. Seems there are two jars providing same
> class in the jvm. So did you bundled the dependencies in to the 
> application
> (check WEB-INF/lib/ dir of the webapp)? What are jars you copied in to the
> $CARBON_HOME/repository/components/lib and 
> $CARBON_HOME/repository/components/dropins
> directories?
>
> Probably what Thusitha mentioned would work for you. But you could
> ended up with series of exceptions if you continue without understanding.
> :). So I recommend you to go through [1].
>
> [1] https://docs.wso2.com/display/AS510/Webapp+ClassLoading
>
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
> On Mon, Jul 6, 2015 at 1:54 PM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com
> > wrote:
>
>> Hi Sabra
>>
>> I think you should mark following dependency as provided since AS
>> provided required jars for the websocket
>>
>>>
>>> *   *
>>> *javax.websocket*
>>> *javax.websocket-api**
>>> 1.1*
>>
>>
>> *provided*
>>>
>>> **
>>
>>
>> On Mon, Jul 6, 2015 at 1:49 PM, Sabra Ossen > > wrote:
>>
>>> Hi Sajith,
>>>
>>> I moved it to AS_HOME/repository/components/lib , but now I get the
>>> following exception.
>>>
>>> java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: loader
>>> constraint violation: loader (instance of
>>> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
>>> initiated loading for a different type with name 
>>> "javax/websocket/Endpoint"
>>>
>>> at
>>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
>>> at
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
>>> at
>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>>> at
>>> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
>>> at
>>> org.apache.cxf.transport.serv

Re: [Dev] [AS] ClassNotFoundException in Jax-rs service for tyrus standalone client Client Manager

2015-07-06 Thread Danushka Fernando
When creating an orbit bundles that's not the way to do it. You can simply
restrict what to export.

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


On Jul 6, 2015 10:29 PM, "Thusitha Thilina Dayaratne" 
wrote:

> Hi Sabra,
>
> As Dhanushka mentioned you can create a orbit bundle, or I think you can
> exclude websocket from the tyrus as follows
>
> 
>   org.glassfish.tyrus.bundles
>   tyrus-standalone-client
>   1.11
>   
> 
>   javax.websocket
>   javax.websocket-api
> 
>   
> 
>
> Thanks
>
> On Mon, Jul 6, 2015 at 10:15 PM, Danushka Fernando 
> wrote:
>
>> You can create orbit bundles with 3rd party libraries and include/exclude
>> packages.
>>
>> Thanks & Regards
>> Danushka Fernando
>> Senior Software Engineer
>> WSO2 inc. http://wso2.com/
>> Mobile : +94716332729
>>
>>
>> On Jul 6, 2015 8:54 PM, "Sabra Ossen"  wrote:
>>
>>> Hi Danushka,
>>>
>>> I didn't bundle the dependencies in WEB-INF/lib. I have excluded the
>>> dependencies by
>>> ...
>>>
>>>
>>>
>>>
>>>
>>> *
>>> ${basedir}/src/main/webapp/WEB-INF/web.xml
>>> WEB-INF/lib/*.jar
>>> ${project.artifactId}*...
>>> in the pom.
>>>
>>> I only included the tyrus standalone client jar [1] to
>>> AS_HOME/repository/components/lib.
>>>
>>> I had already included a webapp-classloading.xml with the following
>>> content.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *>> xmlns="http://wso2.org/projects/as/classloading
>>> ">
>>> false
>>> Carbon,CXF*
>>>
>>> Thanks for the reference on class loading in AS, given your suggestion I
>>> checked the contents of tyrus standalone client and it contains a
>>> javax.websocket.Endpoint class as shown by the attached screen shot. As
>>> this Endpoint class is bundled with the 3rd party jar exclusion could be
>>> done via the maven shade plugin. I will update the thread with the results
>>> asap. If you do have any other suggestions do let me know.
>>>
>>> @Thusitha, I tried your suggestion but it resulted in no change due to
>>> the websocket classes being present in the tyrus jar.
>>>
>>> [1]
>>> http://mvnrepository.com/artifact/org.glassfish.tyrus.bundles/tyrus-standalone-client/1.11
>>>
>>> Thanks and Regards.
>>>
>>> On Mon, Jul 6, 2015 at 2:15 PM, Danushka Fernando 
>>> wrote:
>>>
 Hi Sabra
 This is a class loading issue. Seems there are two jars providing same
 class in the jvm. So did you bundled the dependencies in to the application
 (check WEB-INF/lib/ dir of the webapp)? What are jars you copied in to the
 $CARBON_HOME/repository/components/lib and 
 $CARBON_HOME/repository/components/dropins
 directories?

 Probably what Thusitha mentioned would work for you. But you could
 ended up with series of exceptions if you continue without understanding.
 :). So I recommend you to go through [1].

 [1] https://docs.wso2.com/display/AS510/Webapp+ClassLoading


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

 On Mon, Jul 6, 2015 at 1:54 PM, Thusitha Thilina Dayaratne <
 thusit...@wso2.com> wrote:

> Hi Sabra
>
> I think you should mark following dependency as provided since AS
> provided required jars for the websocket
>
>>
>> *   *
>> *javax.websocket*
>> *javax.websocket-api**
>> 1.1*
>
>
> *provided*
>>
>> **
>
>
> On Mon, Jul 6, 2015 at 1:49 PM, Sabra Ossen 
> wrote:
>
>> Hi Sajith,
>>
>> I moved it to AS_HOME/repository/components/lib , but now I get the
>> following exception.
>>
>> java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: loader
>> constraint violation: loader (instance of
>> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
>> initiated loading for a different type with name 
>> "javax/websocket/Endpoint"
>>
>> at
>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
>> at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
>> at
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>> at
>> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
>> at
>> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
>> at
>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
>> at
>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
>> at
>> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
>> at
>

Re: [Dev] [AS] ClassNotFoundException in Jax-rs service for tyrus standalone client Client Manager

2015-07-06 Thread Thusitha Thilina Dayaratne
Hi Sabra,

As Dhanushka mentioned you can create a orbit bundle, or I think you can
exclude websocket from the tyrus as follows


  org.glassfish.tyrus.bundles
  tyrus-standalone-client
  1.11
  

  javax.websocket
  javax.websocket-api

  


Thanks

On Mon, Jul 6, 2015 at 10:15 PM, Danushka Fernando 
wrote:

> You can create orbit bundles with 3rd party libraries and include/exclude
> packages.
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
>
> On Jul 6, 2015 8:54 PM, "Sabra Ossen"  wrote:
>
>> Hi Danushka,
>>
>> I didn't bundle the dependencies in WEB-INF/lib. I have excluded the
>> dependencies by
>> ...
>>
>>
>>
>>
>>
>> *
>> ${basedir}/src/main/webapp/WEB-INF/web.xml
>> WEB-INF/lib/*.jar
>> ${project.artifactId}*...
>> in the pom.
>>
>> I only included the tyrus standalone client jar [1] to
>> AS_HOME/repository/components/lib.
>>
>> I had already included a webapp-classloading.xml with the following
>> content.
>>
>>
>>
>>
>>
>>
>>
>> *> xmlns="http://wso2.org/projects/as/classloading
>> ">
>> false
>> Carbon,CXF*
>>
>> Thanks for the reference on class loading in AS, given your suggestion I
>> checked the contents of tyrus standalone client and it contains a
>> javax.websocket.Endpoint class as shown by the attached screen shot. As
>> this Endpoint class is bundled with the 3rd party jar exclusion could be
>> done via the maven shade plugin. I will update the thread with the results
>> asap. If you do have any other suggestions do let me know.
>>
>> @Thusitha, I tried your suggestion but it resulted in no change due to
>> the websocket classes being present in the tyrus jar.
>>
>> [1]
>> http://mvnrepository.com/artifact/org.glassfish.tyrus.bundles/tyrus-standalone-client/1.11
>>
>> Thanks and Regards.
>>
>> On Mon, Jul 6, 2015 at 2:15 PM, Danushka Fernando 
>> wrote:
>>
>>> Hi Sabra
>>> This is a class loading issue. Seems there are two jars providing same
>>> class in the jvm. So did you bundled the dependencies in to the application
>>> (check WEB-INF/lib/ dir of the webapp)? What are jars you copied in to the
>>> $CARBON_HOME/repository/components/lib and 
>>> $CARBON_HOME/repository/components/dropins
>>> directories?
>>>
>>> Probably what Thusitha mentioned would work for you. But you could ended
>>> up with series of exceptions if you continue without understanding. :). So
>>> I recommend you to go through [1].
>>>
>>> [1] https://docs.wso2.com/display/AS510/Webapp+ClassLoading
>>>
>>>
>>> Thanks & Regards
>>> Danushka Fernando
>>> Senior Software Engineer
>>> WSO2 inc. http://wso2.com/
>>> Mobile : +94716332729
>>>
>>> On Mon, Jul 6, 2015 at 1:54 PM, Thusitha Thilina Dayaratne <
>>> thusit...@wso2.com> wrote:
>>>
 Hi Sabra

 I think you should mark following dependency as provided since AS
 provided required jars for the websocket

>
> *   *
> *javax.websocket*
> *javax.websocket-api**
> 1.1*


 *provided*
>
> **


 On Mon, Jul 6, 2015 at 1:49 PM, Sabra Ossen  wrote:

> Hi Sajith,
>
> I moved it to AS_HOME/repository/components/lib , but now I get the
> following exception.
>
> java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: loader
> constraint violation: loader (instance of
> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
> initiated loading for a different type with name 
> "javax/websocket/Endpoint"
>
> at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
> at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
> at
> org.apache.catalina.core.ApplicationFilterChai

Re: [Dev] [AS] ClassNotFoundException in Jax-rs service for tyrus standalone client Client Manager

2015-07-06 Thread Danushka Fernando
You can create orbit bundles with 3rd party libraries and include/exclude
packages.

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


On Jul 6, 2015 8:54 PM, "Sabra Ossen"  wrote:

> Hi Danushka,
>
> I didn't bundle the dependencies in WEB-INF/lib. I have excluded the
> dependencies by
> ...
>
>
>
>
>
> *
> ${basedir}/src/main/webapp/WEB-INF/web.xml
> WEB-INF/lib/*.jar
> ${project.artifactId}*...
> in the pom.
>
> I only included the tyrus standalone client jar [1] to
> AS_HOME/repository/components/lib.
>
> I had already included a webapp-classloading.xml with the following
> content.
>
>
>
>
>
>
>
> * xmlns="http://wso2.org/projects/as/classloading
> ">
> false
> Carbon,CXF*
>
> Thanks for the reference on class loading in AS, given your suggestion I
> checked the contents of tyrus standalone client and it contains a
> javax.websocket.Endpoint class as shown by the attached screen shot. As
> this Endpoint class is bundled with the 3rd party jar exclusion could be
> done via the maven shade plugin. I will update the thread with the results
> asap. If you do have any other suggestions do let me know.
>
> @Thusitha, I tried your suggestion but it resulted in no change due to the
> websocket classes being present in the tyrus jar.
>
> [1]
> http://mvnrepository.com/artifact/org.glassfish.tyrus.bundles/tyrus-standalone-client/1.11
>
> Thanks and Regards.
>
> On Mon, Jul 6, 2015 at 2:15 PM, Danushka Fernando 
> wrote:
>
>> Hi Sabra
>> This is a class loading issue. Seems there are two jars providing same
>> class in the jvm. So did you bundled the dependencies in to the application
>> (check WEB-INF/lib/ dir of the webapp)? What are jars you copied in to the
>> $CARBON_HOME/repository/components/lib and 
>> $CARBON_HOME/repository/components/dropins
>> directories?
>>
>> Probably what Thusitha mentioned would work for you. But you could ended
>> up with series of exceptions if you continue without understanding. :). So
>> I recommend you to go through [1].
>>
>> [1] https://docs.wso2.com/display/AS510/Webapp+ClassLoading
>>
>>
>> Thanks & Regards
>> Danushka Fernando
>> Senior Software Engineer
>> WSO2 inc. http://wso2.com/
>> Mobile : +94716332729
>>
>> On Mon, Jul 6, 2015 at 1:54 PM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Sabra
>>>
>>> I think you should mark following dependency as provided since AS
>>> provided required jars for the websocket
>>>

 *   *
 *javax.websocket*
 *javax.websocket-api**
 1.1*
>>>
>>>
>>> *provided*

 **
>>>
>>>
>>> On Mon, Jul 6, 2015 at 1:49 PM, Sabra Ossen  wrote:
>>>
 Hi Sajith,

 I moved it to AS_HOME/repository/components/lib , but now I get the
 following exception.

 java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: loader
 constraint violation: loader (instance of
 org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
 initiated loading for a different type with name "javax/websocket/Endpoint"

 at
 org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
 at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
 at
 org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
 at
 org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
 at
 org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
 at
 org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
 at
 org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
 at
 org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
 at
 org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
 at
 org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
 at
 org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at
 org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at
>>>

Re: [Dev] AS : Failed to upload Spring Web app (Spring Boot 1.1.10.RELEASE)

2015-07-06 Thread Sagara Gunathunga
On Mon, Jul 6, 2015 at 2:10 PM, KasunG Gajasinghe  wrote:

>
> Previously, we have excluded the spring packages in Carbon from exposing
> to webapps. Ideally, we should exclude all these third-party dependencies
> that shouldn't be exposed. Then, webapp developers has the flexibility to
> add dependencies not limiting to wso2 provided dependency versions without
> facing classloading issues.
>

Why don't we write a simple web application (page) to list all the packages
visible under given runtime, then it's much easy to identify proper exclude
list.

Thanks !

>
> So, +1 to exclude solr packages.
>
> On Mon, Jul 6, 2015 at 2:00 PM, Niranjan Karunanandham 
> wrote:
>
>> Hi all,
>>
>> I created a simple Spring web using Spring Boot 1.1.10.RELEASE (for
>> integration tests in AS) and when I tried to upload the web app to AS 5.3.0
>> SNAPSHOT, I get the error mentioned in JIRA [1]. I am able to upload this
>> same web app in AS 5.2.1. On looking into this, I found out this happens
>> when there is solr 5.0.0 [2]. As per the offline discussion I had with
>> Kasung, I was able to solve this by excluding org.apache.solr.* in the
>> webapp-classingloading-environments.xml
>> /repository/conf/tomcat) for the *Carbon* Environment
>> which is set as the default webapp-classloading environment. Shall we add
>> this (exclude org.apache.solr.* for Carbon in
>> webapp-classingloading-environments.xml) to the product-as pack by default?
>>
>>
>> [1] - https://wso2.org/jira/browse/WSAS-2000
>> [2] - https://jira.spring.io/browse/DATASOLR-228
>>
>> Regards,
>> Nira
>>
>> --
>>
>> *Niranjan Karunanandham*
>> Senior Software Engineer - WSO2 Inc.
>> WSO2 Inc.: http://www.wso2.com
>>
>
>
>
> --
>
> *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
> email: kasung AT spamfree wso2.com
> linked-in: http://lk.linkedin.com/in/gajasinghe
> blog: http://kasunbg.org
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Sagara Gunathunga

Architect; WSO2, Inc.;  http://wso2.com
V.P Apache Web Services;http://ws.apache.org/
Linkedin; http://www.linkedin.com/in/ssagara
Blog ;  http://ssagara.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] ClassNotFoundException in Jax-rs service for tyrus standalone client Client Manager

2015-07-06 Thread Danushka Fernando
Hi Sabra
This is a class loading issue. Seems there are two jars providing same
class in the jvm. So did you bundled the dependencies in to the application
(check WEB-INF/lib/ dir of the webapp)? What are jars you copied in to the
$CARBON_HOME/repository/components/lib and
$CARBON_HOME/repository/components/dropins
directories?

Probably what Thusitha mentioned would work for you. But you could ended up
with series of exceptions if you continue without understanding. :). So I
recommend you to go through [1].

[1] https://docs.wso2.com/display/AS510/Webapp+ClassLoading


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

On Mon, Jul 6, 2015 at 1:54 PM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Sabra
>
> I think you should mark following dependency as provided since AS provided
> required jars for the websocket
>
>>
>> *   *
>> *javax.websocket*
>> *javax.websocket-api**
>> 1.1*
>
>
> *provided*
>>
>> **
>
>
> On Mon, Jul 6, 2015 at 1:49 PM, Sabra Ossen  wrote:
>
>> Hi Sajith,
>>
>> I moved it to AS_HOME/repository/components/lib , but now I get the
>> following exception.
>>
>> java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: loader
>> constraint violation: loader (instance of
>> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
>> initiated loading for a different type with name "javax/websocket/Endpoint"
>>
>> at
>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
>> at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
>> at
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>> at
>> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
>> at
>> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
>> at
>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
>> at
>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
>> at
>> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
>> at
>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
>> at
>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
>> at
>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>> at
>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>> at
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>> at
>> org.wso2.carbon.statistics.webapp.RequestIntercepterValve.invoke(RequestIntercepterValve.java:47)
>> at
>> org.wso2.carbon.bam.webapp.stat.publisher.WebAppStatisticPublisherValve.invoke(WebAppStatisticPublisherValve.java:104)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
>> at
>> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
>> at
>> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
>> at
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
>> 

Re: [Dev] AS : Failed to upload Spring Web app (Spring Boot 1.1.10.RELEASE)

2015-07-06 Thread KasunG Gajasinghe
Previously, we have excluded the spring packages in Carbon from exposing to
webapps. Ideally, we should exclude all these third-party dependencies that
shouldn't be exposed. Then, webapp developers has the flexibility to add
dependencies not limiting to wso2 provided dependency versions without
facing classloading issues.

So, +1 to exclude solr packages.

On Mon, Jul 6, 2015 at 2:00 PM, Niranjan Karunanandham 
wrote:

> Hi all,
>
> I created a simple Spring web using Spring Boot 1.1.10.RELEASE (for
> integration tests in AS) and when I tried to upload the web app to AS 5.3.0
> SNAPSHOT, I get the error mentioned in JIRA [1]. I am able to upload this
> same web app in AS 5.2.1. On looking into this, I found out this happens
> when there is solr 5.0.0 [2]. As per the offline discussion I had with
> Kasung, I was able to solve this by excluding org.apache.solr.* in the
> webapp-classingloading-environments.xml
> /repository/conf/tomcat) for the *Carbon* Environment which
> is set as the default webapp-classloading environment. Shall we add this
> (exclude org.apache.solr.* for Carbon in
> webapp-classingloading-environments.xml) to the product-as pack by default?
>
>
> [1] - https://wso2.org/jira/browse/WSAS-2000
> [2] - https://jira.spring.io/browse/DATASOLR-228
>
> Regards,
> Nira
>
> --
>
> *Niranjan Karunanandham*
> Senior Software Engineer - WSO2 Inc.
> WSO2 Inc.: http://www.wso2.com
>



-- 

*Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] AS : Failed to upload Spring Web app (Spring Boot 1.1.10.RELEASE)

2015-07-06 Thread Niranjan Karunanandham
Hi all,

I created a simple Spring web using Spring Boot 1.1.10.RELEASE (for
integration tests in AS) and when I tried to upload the web app to AS 5.3.0
SNAPSHOT, I get the error mentioned in JIRA [1]. I am able to upload this
same web app in AS 5.2.1. On looking into this, I found out this happens
when there is solr 5.0.0 [2]. As per the offline discussion I had with
Kasung, I was able to solve this by excluding org.apache.solr.* in the
webapp-classingloading-environments.xml
/repository/conf/tomcat) for the *Carbon* Environment which
is set as the default webapp-classloading environment. Shall we add this
(exclude org.apache.solr.* for Carbon in
webapp-classingloading-environments.xml) to the product-as pack by default?


[1] - https://wso2.org/jira/browse/WSAS-2000
[2] - https://jira.spring.io/browse/DATASOLR-228

Regards,
Nira

-- 

*Niranjan Karunanandham*
Senior Software Engineer - WSO2 Inc.
WSO2 Inc.: http://www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] ClassNotFoundException in Jax-rs service for tyrus standalone client Client Manager

2015-07-06 Thread Thusitha Thilina Dayaratne
Hi Sabra

I think you should mark following dependency as provided since AS provided
required jars for the websocket

>
> *   *
> *javax.websocket*
> *javax.websocket-api**
> 1.1*


*provided*
>
> **


On Mon, Jul 6, 2015 at 1:49 PM, Sabra Ossen  wrote:

> Hi Sajith,
>
> I moved it to AS_HOME/repository/components/lib , but now I get the
> following exception.
>
> java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: loader
> constraint violation: loader (instance of
> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
> initiated loading for a different type with name "javax/websocket/Endpoint"
>
> at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
> at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
> at
> org.wso2.carbon.statistics.webapp.RequestIntercepterValve.invoke(RequestIntercepterValve.java:47)
> at
> org.wso2.carbon.bam.webapp.stat.publisher.WebAppStatisticPublisherValve.invoke(WebAppStatisticPublisherValve.java:104)
> at
> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
> at
> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
> at
> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
> at
> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.cxf.interceptor.Fault: loader constraint violation:
> loader (instance of
> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previ

Re: [Dev] [AS] ClassNotFoundException in Jax-rs service for tyrus standalone client Client Manager

2015-07-06 Thread Sabra Ossen
Hi Sajith,

I moved it to AS_HOME/repository/components/lib , but now I get the
following exception.

java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: loader
constraint violation: loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
initiated loading for a different type with name "javax/websocket/Endpoint"
at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at
org.wso2.carbon.statistics.webapp.RequestIntercepterValve.invoke(RequestIntercepterValve.java:47)
at
org.wso2.carbon.bam.webapp.stat.publisher.WebAppStatisticPublisherValve.invoke(WebAppStatisticPublisherValve.java:104)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
at
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.cxf.interceptor.Fault: loader constraint violation:
loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously
initiated loading for a different type with name "javax/websocket/Endpoint"
at
org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.

Re: [Dev] [AS] ClassNotFoundException in Jax-rs service for tyrus standalone client Client Manager

2015-07-06 Thread Sajith Kariyawasam
On Mon, Jul 6, 2015 at 12:37 PM, Sabra Ossen  wrote:

> Hi All,
>
> I am trying to send messages to a web socket server through a jax-rs
> service using tyrus [1]. I have separately deployed the web socket server
> in the AS 5.3.0 alpha.
>
> The code for the jax-rs service is as follows.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *@Path("/hello")public class HelloService {private static
> CountDownLatch messageLatch;@GET@Path("/{message}")public void
> connectToWSServer(@PathParam("message") final String message) throws
> URISyntaxException, IOException, DeploymentException, InterruptedException
> {String endPoint = "ws://127.0.0.1:9763/WebSocketServer/echo
> ";messageLatch = new
> CountDownLatch(1);final ClientEndpointConfig cec =
> ClientEndpointConfig.Builder.create().build();ClientManager client
> = ClientManager.createClient();client.connectToServer(new
> Endpoint() {@Overridepublic void onOpen(Session
> session, EndpointConfig config) {try {
> session.addMessageHandler(new MessageHandler.Whole()
> {@Overridepublic void
> onMessage(String message) {
> System.out.println("Received message:
> "+message);
> messageLatch.countDown();}
> });
> session.getBasicRemote().sendText(message);} catch
> (IOException e) {e.printStackTrace();
> }}}, cec, new URI(endPoint));
> messageLatch.await(100, TimeUnit.SECONDS);}}*
>
> The pom is as follows.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> * xmlns="http://maven.apache.org/POM/4.0.0
> "
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
> "
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> 
> http://maven.apache.org/xsd/maven-4.0.0.xsd
> ">
> 4.0.0org.test.jaxrs
> FirstJaxRsService
> 1.0-SNAPSHOTwar
> javax.ws.rs
> 
> jsr311-api
> 1.1.1
> org.apache.cxf
> cxf-rt-transports-http
> 3.1.1
> org.apache.cxf
> cxf-rt-frontend-jaxrs
> 3.1.1
> commons-httpclient
> commons-httpclient
> 3.1
> javax.websocket
> javax.websocket-api
> 1.1
> org.glassfish.tyrus.bundles
> tyrus-standalone-client
> 1.11
> 
> maven-compiler-plugin
> 3.1
> 1.51.5
> 
> maven-war-plugin
> 2.2
> ${basedir}/src/main/webapp/WEB-INF/web.xml
> WEB-INF/lib/*.jar
> ${project.artifactId}
> 
> *
>
> I have included the tyrus-standalone-client-1.11.jar [2] in
> AS_HOME/repository/components/dropins, but I get the following exception.
>
>

Since its a non osgi bundle, this needs to be copied to
AS_HOME/repository/components/lib directory


> [2015-07-06 12:05:15,756] ERROR
> {org.apache.catalina.core.StandardWrapperValve} -  Servlet.service() for
> servlet [JAXServlet] in context with path [/FirstJaxRsService] threw
> exception
> java.lang.RuntimeException: org.apache.cxf.interceptor.Fault:
> org/glassfish/tyrus/client/ClientManager
> at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
> at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.apache.tomcat.websocket.server.WsFilte

Re: [Dev] [AS] ClassNotFoundException in Jax-rs service for tyrus standalone client Client Manager

2015-07-06 Thread Sagara Gunathunga
I think you need to include all Tyrus dependencies inside the web
application but it's look like you are excluding all the dependencies from
.WAR file.

Thanks !

On Mon, Jul 6, 2015 at 12:37 PM, Sabra Ossen  wrote:

> Hi All,
>
> I am trying to send messages to a web socket server through a jax-rs
> service using tyrus [1]. I have separately deployed the web socket server
> in the AS 5.3.0 alpha.
>
> The code for the jax-rs service is as follows.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *@Path("/hello")public class HelloService {private static
> CountDownLatch messageLatch;@GET@Path("/{message}")public void
> connectToWSServer(@PathParam("message") final String message) throws
> URISyntaxException, IOException, DeploymentException, InterruptedException
> {String endPoint = "ws://127.0.0.1:9763/WebSocketServer/echo
> ";messageLatch = new
> CountDownLatch(1);final ClientEndpointConfig cec =
> ClientEndpointConfig.Builder.create().build();ClientManager client
> = ClientManager.createClient();client.connectToServer(new
> Endpoint() {@Overridepublic void onOpen(Session
> session, EndpointConfig config) {try {
> session.addMessageHandler(new MessageHandler.Whole()
> {@Overridepublic void
> onMessage(String message) {
> System.out.println("Received message:
> "+message);
> messageLatch.countDown();}
> });
> session.getBasicRemote().sendText(message);} catch
> (IOException e) {e.printStackTrace();
> }}}, cec, new URI(endPoint));
> messageLatch.await(100, TimeUnit.SECONDS);}}*
>
> The pom is as follows.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> * xmlns="http://maven.apache.org/POM/4.0.0
> "
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
> "
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> 
> http://maven.apache.org/xsd/maven-4.0.0.xsd
> ">
> 4.0.0org.test.jaxrs
> FirstJaxRsService
> 1.0-SNAPSHOTwar
> javax.ws.rs
> 
> jsr311-api
> 1.1.1
> org.apache.cxf
> cxf-rt-transports-http
> 3.1.1
> org.apache.cxf
> cxf-rt-frontend-jaxrs
> 3.1.1
> commons-httpclient
> commons-httpclient
> 3.1
> javax.websocket
> javax.websocket-api
> 1.1
> org.glassfish.tyrus.bundles
> tyrus-standalone-client
> 1.11
> 
> maven-compiler-plugin
> 3.1
> 1.51.5
> 
> maven-war-plugin
> 2.2
> ${basedir}/src/main/webapp/WEB-INF/web.xml
> WEB-INF/lib/*.jar
> ${project.artifactId}
> 
> *
>
> I have included the tyrus-standalone-client-1.11.jar [2] in
> AS_HOME/repository/components/dropins, but I get the following exception.
>
> [2015-07-06 12:05:15,756] ERROR
> {org.apache.catalina.core.StandardWrapperValve} -  Servlet.service() for
> servlet [JAXServlet] in context with path [/FirstJaxRsService] threw
> exception
> java.lang.RuntimeException: org.apache.cxf.interceptor.Fault:
> org/glassfish/tyrus/client/ClientManager
> at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
> at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:

[Dev] [AS] ClassNotFoundException in Jax-rs service for tyrus standalone client Client Manager

2015-07-06 Thread Sabra Ossen
Hi All,

I am trying to send messages to a web socket server through a jax-rs
service using tyrus [1]. I have separately deployed the web socket server
in the AS 5.3.0 alpha.

The code for the jax-rs service is as follows.









































*@Path("/hello")public class HelloService {private static
CountDownLatch messageLatch;@GET@Path("/{message}")public void
connectToWSServer(@PathParam("message") final String message) throws
URISyntaxException, IOException, DeploymentException, InterruptedException
{String endPoint = "ws://127.0.0.1:9763/WebSocketServer/echo
";messageLatch = new
CountDownLatch(1);final ClientEndpointConfig cec =
ClientEndpointConfig.Builder.create().build();ClientManager client
= ClientManager.createClient();client.connectToServer(new
Endpoint() {@Overridepublic void onOpen(Session
session, EndpointConfig config) {try {
session.addMessageHandler(new MessageHandler.Whole()
{@Overridepublic void
onMessage(String message) {
System.out.println("Received message:
"+message);
messageLatch.countDown();}
});
session.getBasicRemote().sendText(message);} catch
(IOException e) {e.printStackTrace();
}}}, cec, new URI(endPoint));
messageLatch.await(100, TimeUnit.SECONDS);}}*

The pom is as follows.


































































*http://maven.apache.org/POM/4.0.0
"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0

http://maven.apache.org/xsd/maven-4.0.0.xsd
">
4.0.0org.test.jaxrs
FirstJaxRsService
1.0-SNAPSHOTwar
javax.ws.rs

jsr311-api
1.1.1
org.apache.cxf
cxf-rt-transports-http
3.1.1
org.apache.cxf
cxf-rt-frontend-jaxrs
3.1.1
commons-httpclient
commons-httpclient
3.1
javax.websocket
javax.websocket-api
1.1
org.glassfish.tyrus.bundles
tyrus-standalone-client
1.11

maven-compiler-plugin
3.1
1.51.5

maven-war-plugin
2.2
${basedir}/src/main/webapp/WEB-INF/web.xml
WEB-INF/lib/*.jar
${project.artifactId}

*

I have included the tyrus-standalone-client-1.11.jar [2] in
AS_HOME/repository/components/dropins, but I get the following exception.

[2015-07-06 12:05:15,756] ERROR
{org.apache.catalina.core.StandardWrapperValve} -  Servlet.service() for
servlet [JAXServlet] in context with path [/FirstJaxRsService] threw
exception
java.lang.RuntimeException: org.apache.cxf.interceptor.Fault:
org/glassfish/tyrus/client/ClientManager
at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorB

Re: [Dev] [AS] Exception when running a JMX application in AS multi-tenant environment

2015-07-02 Thread Supun Malinga
Hi,

Shouldn't we include this by default.. ?

thanks,

On Fri, Jul 3, 2015 at 10:02 AM, Chathura Priyankara 
wrote:

> Hi,
>
> I was able to solve this issue by adding rmi context in carbon.xml
> as mentioned in [1].
>
> [1]
> http://wso2.com/library/articles/2013/02/jmx-monitoring-wso2-bam/#multitenancy
>
> Thanks,
> Chathura.
>
> On Thu, Jul 2, 2015 at 11:13 PM, Chathura Priyankara 
> wrote:
>
>> Hi All,
>>
>> When I'm trying to use JMX webapp in AS multi tenant environment I'm
>> getting following exception.
>>
>> org.springframework.web.util.NestedServletException: Request processing
>> failed; nested exception is java.lang.IllegalArgumentException:
>> rmiURLContext: name is not an RMI URL: 1
>>
>> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:927)
>>
>> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:811)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>>
>> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>> root cause
>>
>> java.lang.IllegalArgumentException: rmiURLContext: name is not an RMI
>> URL: 1
>>
>> com.sun.jndi.url.rmi.rmiURLContext.getRootURLContext(rmiURLContext.java:64)
>>
>> com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:200)
>>
>> org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContext.getInitialContext(CarbonContextDataHolder.java:886)
>>
>> org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContext.lookup(CarbonContextDataHolder.java:951)
>> javax.naming.InitialContext.lookup(InitialContext.java:411)
>>
>> javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1929)
>>
>> javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1896)
>> javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:286)
>> javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:249)
>> org.wso2.carbon.jms.HelloController.printWelcome(HelloController.java:23)
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> java.lang.reflect.Method.invoke(Method.java:606)
>>
>> org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
>>
>> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:439)
>>
>> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:427)
>>
>> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
>>
>> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
>>
>> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
>>
>> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:811)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>>
>> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>
>> However this works fine in super tenant mode.
>> The JMX service URL that I'm using is as follows
>> service:jmx:rmi://localhost:1199/jndi/rmi://localhost:1199/jmxrmi.
>>
>> I found similar exceptions are reported in few places but I could not
>> solve this in AS.
>> Any suggestion to overcome this issue is highly appreciated.
>>
>> Thanks,
>> Chathura.
>>
>>
>>
>> --
>> Chathura Priyankara
>> Software Engineer | WSO2 Inc.
>> Mobile : +94718795340
>> Blog : www.codeoncloud.blogspot.com
>>
>
>
>
> --
> Chathura Priyankara
> Software Engineer | WSO2 Inc.
> Mobile : +94718795340
> Blog : www.codeoncloud.blogspot.com
>



-- 
Supun Malinga,

Senior Software Engineer,
WSO2 Inc.
http://wso2.com
email: sup...@wso2.com 
mobile: +94 (0)71 56 91 321
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Exception when running a JMX application in AS multi-tenant environment

2015-07-02 Thread Chathura Priyankara
Hi,

I was able to solve this issue by adding rmi context in carbon.xml
as mentioned in [1].

[1]
http://wso2.com/library/articles/2013/02/jmx-monitoring-wso2-bam/#multitenancy

Thanks,
Chathura.

On Thu, Jul 2, 2015 at 11:13 PM, Chathura Priyankara 
wrote:

> Hi All,
>
> When I'm trying to use JMX webapp in AS multi tenant environment I'm
> getting following exception.
>
> org.springframework.web.util.NestedServletException: Request processing
> failed; nested exception is java.lang.IllegalArgumentException:
> rmiURLContext: name is not an RMI URL: 1
>
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:927)
>
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:811)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> root cause
>
> java.lang.IllegalArgumentException: rmiURLContext: name is not an RMI URL:
> 1
> com.sun.jndi.url.rmi.rmiURLContext.getRootURLContext(rmiURLContext.java:64)
>
> com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:200)
>
> org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContext.getInitialContext(CarbonContextDataHolder.java:886)
>
> org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContext.lookup(CarbonContextDataHolder.java:951)
> javax.naming.InitialContext.lookup(InitialContext.java:411)
>
> javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1929)
>
> javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1896)
> javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:286)
> javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:249)
> org.wso2.carbon.jms.HelloController.printWelcome(HelloController.java:23)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> java.lang.reflect.Method.invoke(Method.java:606)
>
> org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
>
> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:439)
>
> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:427)
>
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
>
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
>
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
>
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:811)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>
> However this works fine in super tenant mode.
> The JMX service URL that I'm using is as follows
> service:jmx:rmi://localhost:1199/jndi/rmi://localhost:1199/jmxrmi.
>
> I found similar exceptions are reported in few places but I could not
> solve this in AS.
> Any suggestion to overcome this issue is highly appreciated.
>
> Thanks,
> Chathura.
>
>
>
> --
> Chathura Priyankara
> Software Engineer | WSO2 Inc.
> Mobile : +94718795340
> Blog : www.codeoncloud.blogspot.com
>



-- 
Chathura Priyankara
Software Engineer | WSO2 Inc.
Mobile : +94718795340
Blog : www.codeoncloud.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [AS] Exception when running a JMX application in AS multi-tenant environment

2015-07-02 Thread Chathura Priyankara
Hi All,

When I'm trying to use JMX webapp in AS multi tenant environment I'm
getting following exception.

org.springframework.web.util.NestedServletException: Request processing
failed; nested exception is java.lang.IllegalArgumentException:
rmiURLContext: name is not an RMI URL: 1
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:927)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:811)
javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
root cause

java.lang.IllegalArgumentException: rmiURLContext: name is not an RMI URL: 1
com.sun.jndi.url.rmi.rmiURLContext.getRootURLContext(rmiURLContext.java:64)
com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:200)
org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContext.getInitialContext(CarbonContextDataHolder.java:886)
org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContext.lookup(CarbonContextDataHolder.java:951)
javax.naming.InitialContext.lookup(InitialContext.java:411)
javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1929)
javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1896)
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:286)
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:249)
org.wso2.carbon.jms.HelloController.printWelcome(HelloController.java:23)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:439)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:427)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:811)
javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)

However this works fine in super tenant mode.
The JMX service URL that I'm using is as follows
service:jmx:rmi://localhost:1199/jndi/rmi://localhost:1199/jmxrmi.

I found similar exceptions are reported in few places but I could not solve
this in AS.
Any suggestion to overcome this issue is highly appreciated.

Thanks,
Chathura.



-- 
Chathura Priyankara
Software Engineer | WSO2 Inc.
Mobile : +94718795340
Blog : www.codeoncloud.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS]

2015-06-27 Thread Sabra Ossen
Hi Chathura,

Thanks for the sample code, it works fine for me too.

@Thusitha, I didn't create a maven project. I simply created the NetBeans
web app project by following the blog and then deployed the generated war
file in AS.

Regards.

On Fri, Jun 26, 2015 at 11:09 PM, Chathura Priyankara 
wrote:

> Hi Sabra,
>
> Herewith I attached the sample code that I have used. This is working fine
> for me.
> Hope it is helpful for you.
>
> Regards,
> Chathura.
>
> On Fri, Jun 26, 2015 at 10:06 PM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Sabra,
>>
>> Since you are using JSR 356 based implementation it is not working on the
>> AS 5.2.1. Because AS 5.2.1 only supports tomcat based websocket
>> implementation. But sample should be worked on AS 5.3.0-Alpha. Are you
>> building this using a maven project? If so share the pom.
>>
>> Thanks
>>
>> On Fri, Jun 26, 2015 at 8:32 PM, Sabra Ossen  wrote:
>>
>>> Hi,
>>>
>>> @Chathura, I am using oracle JDK 7 in Ubuntu 14.04.
>>>
>>> @Manoj, Thank you for the samples. But this particular example does not
>>> work in the AS 5.3.0 as well as 5.2.1. The built in samples work well in
>>> both versions of the AS.
>>>
>>> Regards.
>>>
>>> On Fri, Jun 26, 2015 at 4:57 PM, Chathura Priyankara >> > wrote:
>>>
 Hi Sabra,

 I was able to run the same sample successfully in AS 5.3.0 running on
 Ubuntu machine. I'm using JDK 7.
 Could you please mention the JDK version and OS that you are using ?

 Regards,
 Chathura.

 On Fri, Jun 26, 2015 at 3:55 PM, Sabra Ossen 
 wrote:

> Hi,
>
> @Thusitha , there are no extra jars in the web app and also is there
> is method to check out the actual web socket that gets deployed in the AS.
>
> @Kasun, the name of the web app is the same "TestWebApp" and I checked
> the behavior in chrome which displays the following error in the console
>
>
> *Failed to load resource: the server responded with a status of 405
> (Method Not Allowed)WebSocket connection to
> 'ws://10.224.29.52:9763/TestWebApp/echo
> ' failed: Error during WebSocket
> handshake: Unexpected response code: 404*
>
> Regards.
>
> On Thu, Jun 25, 2015 at 6:55 PM, KasunG Gajasinghe 
> wrote:
>
>> Hi,
>>
>> What's the war name of your webapp? AS do not process the path
>> parameter in context.xml currently. Rather, it uses the war name as the
>> context.
>>
>> Also, you might want to run the same in Chome and verify the
>> behavior. In some of the Firefox versions, you need to use MozWebSocket
>> object instead of WebSocket object. See [1].
>>
>> [1]
>> https://github.com/wso2/product-as/blob/master/modules/samples/example/src/main/resources/websocket/chat.xhtml#L55
>>
>> On Thu, Jun 25, 2015 at 5:38 PM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Sabra,
>>>
>>> AFAIK you don't have to do any extra configurations to make
>>> websocket works with AS. This kind of issues may pop out when webapp
>>> contains websoket jars inside the webapp itself (WEB-INF/lib).
>>> IF not most probably there is some mismatch in the actual websocket
>>> that get deployed and what you are trying to connect.
>>>
>>> Thanks
>>>
>>> On Thu, Jun 25, 2015 at 5:08 PM, Sabra Ossen 
>>> wrote:
>>>
 Hi Thusitha,

 The context path is as follows (present in context.xml),  *>>> antiJARLocking="true" path="/TestWebApp"/>*

 and the error code is 404 stating that the html file "echo" was not
 found.

 Thanks.

 On Thu, Jun 25, 2015 at 4:43 PM, Thusitha Thilina Dayaratne <
 thusit...@wso2.com> wrote:

> Hi Sabra,
>
> Did you check the Context path is correct? Also can you check what
> is the error code that you get?
> Thanks
>
> On Thu, Jun 25, 2015 at 4:28 PM, Sabra Ossen 
> wrote:
>
>> Hi,
>>
>> I am following the blog mentioned in [1] and I can successfully
>> run the Web App in the local tomcat server, when I run the following 
>> code
>> in the WSO2 AS 5.3.0 alpha the browser returns the following error 
>> in the
>> browser console.
>>
>> *Firefox can't establish a connection to the server at
>> ws://10.225.125.91:9763/TestWebApp/echo
>> .*
>>
>> Server code;
>>
>> import java.io.IOException;
>>  import javax.websocket.OnClose;import 
>> javax.websocket.OnMessage;import javax.websocket.OnOpen;import 
>> javax.websocket.Session;import javax.websocket.server.ServerEndpoint;
>>
>> @ServerEndpoint("/echo") public class Echo

Re: [Dev] [AS]

2015-06-26 Thread Thusitha Thilina Dayaratne
Hi Sabra,

Since you are using JSR 356 based implementation it is not working on the
AS 5.2.1. Because AS 5.2.1 only supports tomcat based websocket
implementation. But sample should be worked on AS 5.3.0-Alpha. Are you
building this using a maven project? If so share the pom.

Thanks

On Fri, Jun 26, 2015 at 8:32 PM, Sabra Ossen  wrote:

> Hi,
>
> @Chathura, I am using oracle JDK 7 in Ubuntu 14.04.
>
> @Manoj, Thank you for the samples. But this particular example does not
> work in the AS 5.3.0 as well as 5.2.1. The built in samples work well in
> both versions of the AS.
>
> Regards.
>
> On Fri, Jun 26, 2015 at 4:57 PM, Chathura Priyankara 
> wrote:
>
>> Hi Sabra,
>>
>> I was able to run the same sample successfully in AS 5.3.0 running on
>> Ubuntu machine. I'm using JDK 7.
>> Could you please mention the JDK version and OS that you are using ?
>>
>> Regards,
>> Chathura.
>>
>> On Fri, Jun 26, 2015 at 3:55 PM, Sabra Ossen  wrote:
>>
>>> Hi,
>>>
>>> @Thusitha , there are no extra jars in the web app and also is there is
>>> method to check out the actual web socket that gets deployed in the AS.
>>>
>>> @Kasun, the name of the web app is the same "TestWebApp" and I checked
>>> the behavior in chrome which displays the following error in the console
>>>
>>>
>>> *Failed to load resource: the server responded with a status of 405
>>> (Method Not Allowed)WebSocket connection to
>>> 'ws://10.224.29.52:9763/TestWebApp/echo
>>> ' failed: Error during WebSocket
>>> handshake: Unexpected response code: 404*
>>>
>>> Regards.
>>>
>>> On Thu, Jun 25, 2015 at 6:55 PM, KasunG Gajasinghe 
>>> wrote:
>>>
 Hi,

 What's the war name of your webapp? AS do not process the path
 parameter in context.xml currently. Rather, it uses the war name as the
 context.

 Also, you might want to run the same in Chome and verify the behavior.
 In some of the Firefox versions, you need to use MozWebSocket object
 instead of WebSocket object. See [1].

 [1]
 https://github.com/wso2/product-as/blob/master/modules/samples/example/src/main/resources/websocket/chat.xhtml#L55

 On Thu, Jun 25, 2015 at 5:38 PM, Thusitha Thilina Dayaratne <
 thusit...@wso2.com> wrote:

> Hi Sabra,
>
> AFAIK you don't have to do any extra configurations to make websocket
> works with AS. This kind of issues may pop out when webapp contains
> websoket jars inside the webapp itself (WEB-INF/lib).
> IF not most probably there is some mismatch in the actual websocket
> that get deployed and what you are trying to connect.
>
> Thanks
>
> On Thu, Jun 25, 2015 at 5:08 PM, Sabra Ossen 
> wrote:
>
>> Hi Thusitha,
>>
>> The context path is as follows (present in context.xml),  *> antiJARLocking="true" path="/TestWebApp"/>*
>>
>> and the error code is 404 stating that the html file "echo" was not
>> found.
>>
>> Thanks.
>>
>> On Thu, Jun 25, 2015 at 4:43 PM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Sabra,
>>>
>>> Did you check the Context path is correct? Also can you check what
>>> is the error code that you get?
>>> Thanks
>>>
>>> On Thu, Jun 25, 2015 at 4:28 PM, Sabra Ossen 
>>> wrote:
>>>
 Hi,

 I am following the blog mentioned in [1] and I can successfully run
 the Web App in the local tomcat server, when I run the following code 
 in
 the WSO2 AS 5.3.0 alpha the browser returns the following error in the
 browser console.

 *Firefox can't establish a connection to the server at
 ws://10.225.125.91:9763/TestWebApp/echo
 .*

 Server code;

 import java.io.IOException;
  import javax.websocket.OnClose;import 
 javax.websocket.OnMessage;import javax.websocket.OnOpen;import 
 javax.websocket.Session;import javax.websocket.server.ServerEndpoint;

 @ServerEndpoint("/echo") public class EchoServer {

 @OnOpen
 public void onOpen(Session session){
 System.out.println(session.getId() + " has opened a 
 connection");
 try {
 session.getBasicRemote().sendText("Connection 
 Established");
 } catch (IOException ex) {
 ex.printStackTrace();
 }
 }

 @OnMessage
 public void onMessage(String message, Session session){
 System.out.println("Message from " + session.getId() + ": " + 
 message);
 try {
 session.getBasicRemote().sendText(message);
 } catch (IOException ex) {
 ex.printStackTrace();
 }
 }
>

Re: [Dev] [AS]

2015-06-26 Thread Sabra Ossen
Hi,

@Chathura, I am using oracle JDK 7 in Ubuntu 14.04.

@Manoj, Thank you for the samples. But this particular example does not
work in the AS 5.3.0 as well as 5.2.1. The built in samples work well in
both versions of the AS.

Regards.

On Fri, Jun 26, 2015 at 4:57 PM, Chathura Priyankara 
wrote:

> Hi Sabra,
>
> I was able to run the same sample successfully in AS 5.3.0 running on
> Ubuntu machine. I'm using JDK 7.
> Could you please mention the JDK version and OS that you are using ?
>
> Regards,
> Chathura.
>
> On Fri, Jun 26, 2015 at 3:55 PM, Sabra Ossen  wrote:
>
>> Hi,
>>
>> @Thusitha , there are no extra jars in the web app and also is there is
>> method to check out the actual web socket that gets deployed in the AS.
>>
>> @Kasun, the name of the web app is the same "TestWebApp" and I checked
>> the behavior in chrome which displays the following error in the console
>>
>>
>> *Failed to load resource: the server responded with a status of 405
>> (Method Not Allowed)WebSocket connection to
>> 'ws://10.224.29.52:9763/TestWebApp/echo
>> ' failed: Error during WebSocket
>> handshake: Unexpected response code: 404*
>>
>> Regards.
>>
>> On Thu, Jun 25, 2015 at 6:55 PM, KasunG Gajasinghe 
>> wrote:
>>
>>> Hi,
>>>
>>> What's the war name of your webapp? AS do not process the path parameter
>>> in context.xml currently. Rather, it uses the war name as the context.
>>>
>>> Also, you might want to run the same in Chome and verify the behavior.
>>> In some of the Firefox versions, you need to use MozWebSocket object
>>> instead of WebSocket object. See [1].
>>>
>>> [1]
>>> https://github.com/wso2/product-as/blob/master/modules/samples/example/src/main/resources/websocket/chat.xhtml#L55
>>>
>>> On Thu, Jun 25, 2015 at 5:38 PM, Thusitha Thilina Dayaratne <
>>> thusit...@wso2.com> wrote:
>>>
 Hi Sabra,

 AFAIK you don't have to do any extra configurations to make websocket
 works with AS. This kind of issues may pop out when webapp contains
 websoket jars inside the webapp itself (WEB-INF/lib).
 IF not most probably there is some mismatch in the actual websocket
 that get deployed and what you are trying to connect.

 Thanks

 On Thu, Jun 25, 2015 at 5:08 PM, Sabra Ossen 
 wrote:

> Hi Thusitha,
>
> The context path is as follows (present in context.xml),  * antiJARLocking="true" path="/TestWebApp"/>*
>
> and the error code is 404 stating that the html file "echo" was not
> found.
>
> Thanks.
>
> On Thu, Jun 25, 2015 at 4:43 PM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Sabra,
>>
>> Did you check the Context path is correct? Also can you check what is
>> the error code that you get?
>> Thanks
>>
>> On Thu, Jun 25, 2015 at 4:28 PM, Sabra Ossen 
>> wrote:
>>
>>> Hi,
>>>
>>> I am following the blog mentioned in [1] and I can successfully run
>>> the Web App in the local tomcat server, when I run the following code in
>>> the WSO2 AS 5.3.0 alpha the browser returns the following error in the
>>> browser console.
>>>
>>> *Firefox can't establish a connection to the server at
>>> ws://10.225.125.91:9763/TestWebApp/echo
>>> .*
>>>
>>> Server code;
>>>
>>> import java.io.IOException;
>>>  import javax.websocket.OnClose;import javax.websocket.OnMessage;import 
>>> javax.websocket.OnOpen;import javax.websocket.Session;import 
>>> javax.websocket.server.ServerEndpoint;
>>>
>>> @ServerEndpoint("/echo") public class EchoServer {
>>>
>>> @OnOpen
>>> public void onOpen(Session session){
>>> System.out.println(session.getId() + " has opened a 
>>> connection");
>>> try {
>>> session.getBasicRemote().sendText("Connection Established");
>>> } catch (IOException ex) {
>>> ex.printStackTrace();
>>> }
>>> }
>>>
>>> @OnMessage
>>> public void onMessage(String message, Session session){
>>> System.out.println("Message from " + session.getId() + ": " + 
>>> message);
>>> try {
>>> session.getBasicRemote().sendText(message);
>>> } catch (IOException ex) {
>>> ex.printStackTrace();
>>> }
>>> }
>>>
>>> @OnClose
>>> public void onClose(Session session){
>>> System.out.println("Session " +session.getId()+" has ended");
>>> }}
>>>
>>>
>>> index.html;
>>>
>>> 
>>>
>>> 
>>> 
>>> Echo Chamber
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> 
>>> Open>> button>
>>> Send
>>> Close>

Re: [Dev] [AS]

2015-06-26 Thread Chathura Priyankara
Hi Sabra,

I was able to run the same sample successfully in AS 5.3.0 running on
Ubuntu machine. I'm using JDK 7.
Could you please mention the JDK version and OS that you are using ?

Regards,
Chathura.

On Fri, Jun 26, 2015 at 3:55 PM, Sabra Ossen  wrote:

> Hi,
>
> @Thusitha , there are no extra jars in the web app and also is there is
> method to check out the actual web socket that gets deployed in the AS.
>
> @Kasun, the name of the web app is the same "TestWebApp" and I checked the
> behavior in chrome which displays the following error in the console
>
>
> *Failed to load resource: the server responded with a status of 405
> (Method Not Allowed)WebSocket connection to
> 'ws://10.224.29.52:9763/TestWebApp/echo
> ' failed: Error during WebSocket
> handshake: Unexpected response code: 404*
>
> Regards.
>
> On Thu, Jun 25, 2015 at 6:55 PM, KasunG Gajasinghe 
> wrote:
>
>> Hi,
>>
>> What's the war name of your webapp? AS do not process the path parameter
>> in context.xml currently. Rather, it uses the war name as the context.
>>
>> Also, you might want to run the same in Chome and verify the behavior. In
>> some of the Firefox versions, you need to use MozWebSocket object instead
>> of WebSocket object. See [1].
>>
>> [1]
>> https://github.com/wso2/product-as/blob/master/modules/samples/example/src/main/resources/websocket/chat.xhtml#L55
>>
>> On Thu, Jun 25, 2015 at 5:38 PM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Sabra,
>>>
>>> AFAIK you don't have to do any extra configurations to make websocket
>>> works with AS. This kind of issues may pop out when webapp contains
>>> websoket jars inside the webapp itself (WEB-INF/lib).
>>> IF not most probably there is some mismatch in the actual websocket that
>>> get deployed and what you are trying to connect.
>>>
>>> Thanks
>>>
>>> On Thu, Jun 25, 2015 at 5:08 PM, Sabra Ossen  wrote:
>>>
 Hi Thusitha,

 The context path is as follows (present in context.xml),  *>>> antiJARLocking="true" path="/TestWebApp"/>*

 and the error code is 404 stating that the html file "echo" was not
 found.

 Thanks.

 On Thu, Jun 25, 2015 at 4:43 PM, Thusitha Thilina Dayaratne <
 thusit...@wso2.com> wrote:

> Hi Sabra,
>
> Did you check the Context path is correct? Also can you check what is
> the error code that you get?
> Thanks
>
> On Thu, Jun 25, 2015 at 4:28 PM, Sabra Ossen 
> wrote:
>
>> Hi,
>>
>> I am following the blog mentioned in [1] and I can successfully run
>> the Web App in the local tomcat server, when I run the following code in
>> the WSO2 AS 5.3.0 alpha the browser returns the following error in the
>> browser console.
>>
>> *Firefox can't establish a connection to the server at
>> ws://10.225.125.91:9763/TestWebApp/echo
>> .*
>>
>> Server code;
>>
>> import java.io.IOException;
>>  import javax.websocket.OnClose;import javax.websocket.OnMessage;import 
>> javax.websocket.OnOpen;import javax.websocket.Session;import 
>> javax.websocket.server.ServerEndpoint;
>>
>> @ServerEndpoint("/echo") public class EchoServer {
>>
>> @OnOpen
>> public void onOpen(Session session){
>> System.out.println(session.getId() + " has opened a connection");
>> try {
>> session.getBasicRemote().sendText("Connection Established");
>> } catch (IOException ex) {
>> ex.printStackTrace();
>> }
>> }
>>
>> @OnMessage
>> public void onMessage(String message, Session session){
>> System.out.println("Message from " + session.getId() + ": " + 
>> message);
>> try {
>> session.getBasicRemote().sendText(message);
>> } catch (IOException ex) {
>> ex.printStackTrace();
>> }
>> }
>>
>> @OnClose
>> public void onClose(Session session){
>> System.out.println("Session " +session.getId()+" has ended");
>> }}
>>
>>
>> index.html;
>>
>> 
>>
>> 
>> 
>> Echo Chamber
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> Open> button>
>> Send
>> Close> button>
>> 
>> 
>> 
>>
>> 
>> 
>>
>> var webSocket;
>> var messages = document.getElementById("messages");
>>
>> function openSocket(){
>>
>> if(webSocket !== undefined && webSocket.readyState
>> !== WebSocket.CLOSED){
>>writeResponse("WebSocket is already opened.");
>>  

Re: [Dev] [AS]

2015-06-26 Thread Sabra Ossen
Hi,

@Thusitha , there are no extra jars in the web app and also is there is
method to check out the actual web socket that gets deployed in the AS.

@Kasun, the name of the web app is the same "TestWebApp" and I checked the
behavior in chrome which displays the following error in the console


*Failed to load resource: the server responded with a status of 405 (Method
Not Allowed)WebSocket connection to 'ws://10.224.29.52:9763/TestWebApp/echo
' failed: Error during WebSocket
handshake: Unexpected response code: 404*

Regards.

On Thu, Jun 25, 2015 at 6:55 PM, KasunG Gajasinghe  wrote:

> Hi,
>
> What's the war name of your webapp? AS do not process the path parameter
> in context.xml currently. Rather, it uses the war name as the context.
>
> Also, you might want to run the same in Chome and verify the behavior. In
> some of the Firefox versions, you need to use MozWebSocket object instead
> of WebSocket object. See [1].
>
> [1]
> https://github.com/wso2/product-as/blob/master/modules/samples/example/src/main/resources/websocket/chat.xhtml#L55
>
> On Thu, Jun 25, 2015 at 5:38 PM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Sabra,
>>
>> AFAIK you don't have to do any extra configurations to make websocket
>> works with AS. This kind of issues may pop out when webapp contains
>> websoket jars inside the webapp itself (WEB-INF/lib).
>> IF not most probably there is some mismatch in the actual websocket that
>> get deployed and what you are trying to connect.
>>
>> Thanks
>>
>> On Thu, Jun 25, 2015 at 5:08 PM, Sabra Ossen  wrote:
>>
>>> Hi Thusitha,
>>>
>>> The context path is as follows (present in context.xml),  *>> antiJARLocking="true" path="/TestWebApp"/>*
>>>
>>> and the error code is 404 stating that the html file "echo" was not
>>> found.
>>>
>>> Thanks.
>>>
>>> On Thu, Jun 25, 2015 at 4:43 PM, Thusitha Thilina Dayaratne <
>>> thusit...@wso2.com> wrote:
>>>
 Hi Sabra,

 Did you check the Context path is correct? Also can you check what is
 the error code that you get?
 Thanks

 On Thu, Jun 25, 2015 at 4:28 PM, Sabra Ossen 
 wrote:

> Hi,
>
> I am following the blog mentioned in [1] and I can successfully run
> the Web App in the local tomcat server, when I run the following code in
> the WSO2 AS 5.3.0 alpha the browser returns the following error in the
> browser console.
>
> *Firefox can't establish a connection to the server at
> ws://10.225.125.91:9763/TestWebApp/echo
> .*
>
> Server code;
>
> import java.io.IOException;
>  import javax.websocket.OnClose;import javax.websocket.OnMessage;import 
> javax.websocket.OnOpen;import javax.websocket.Session;import 
> javax.websocket.server.ServerEndpoint;
>
> @ServerEndpoint("/echo") public class EchoServer {
>
> @OnOpen
> public void onOpen(Session session){
> System.out.println(session.getId() + " has opened a connection");
> try {
> session.getBasicRemote().sendText("Connection Established");
> } catch (IOException ex) {
> ex.printStackTrace();
> }
> }
>
> @OnMessage
> public void onMessage(String message, Session session){
> System.out.println("Message from " + session.getId() + ": " + 
> message);
> try {
> session.getBasicRemote().sendText(message);
> } catch (IOException ex) {
> ex.printStackTrace();
> }
> }
>
> @OnClose
> public void onClose(Session session){
> System.out.println("Session " +session.getId()+" has ended");
> }}
>
>
> index.html;
>
> 
>
> 
> 
> Echo Chamber
> 
> 
> 
> 
>
> 
> 
> 
> 
> Open button>
> Send
> Close button>
> 
> 
> 
>
> 
> 
>
> var webSocket;
> var messages = document.getElementById("messages");
>
> function openSocket(){
>
> if(webSocket !== undefined && webSocket.readyState
> !== WebSocket.CLOSED){
>writeResponse("WebSocket is already opened.");
> return;
> }
>
> *webSocket = new WebSocket("ws://" +
> window.location.host + "/TestWebApp/echo");*
>
> webSocket.onopen = function(event){
> if(event.data === undefined)
> return;
>
> writeResponse(event.data);
> };
>
> 

Re: [Dev] [AS]

2015-06-25 Thread KasunG Gajasinghe
Hi,

What's the war name of your webapp? AS do not process the path parameter in
context.xml currently. Rather, it uses the war name as the context.

Also, you might want to run the same in Chome and verify the behavior. In
some of the Firefox versions, you need to use MozWebSocket object instead
of WebSocket object. See [1].

[1]
https://github.com/wso2/product-as/blob/master/modules/samples/example/src/main/resources/websocket/chat.xhtml#L55

On Thu, Jun 25, 2015 at 5:38 PM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Sabra,
>
> AFAIK you don't have to do any extra configurations to make websocket
> works with AS. This kind of issues may pop out when webapp contains
> websoket jars inside the webapp itself (WEB-INF/lib).
> IF not most probably there is some mismatch in the actual websocket that
> get deployed and what you are trying to connect.
>
> Thanks
>
> On Thu, Jun 25, 2015 at 5:08 PM, Sabra Ossen  wrote:
>
>> Hi Thusitha,
>>
>> The context path is as follows (present in context.xml),  *> antiJARLocking="true" path="/TestWebApp"/>*
>>
>> and the error code is 404 stating that the html file "echo" was not found.
>>
>> Thanks.
>>
>> On Thu, Jun 25, 2015 at 4:43 PM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Sabra,
>>>
>>> Did you check the Context path is correct? Also can you check what is
>>> the error code that you get?
>>> Thanks
>>>
>>> On Thu, Jun 25, 2015 at 4:28 PM, Sabra Ossen  wrote:
>>>
 Hi,

 I am following the blog mentioned in [1] and I can successfully run the
 Web App in the local tomcat server, when I run the following code in the
 WSO2 AS 5.3.0 alpha the browser returns the following error in the browser
 console.

 *Firefox can't establish a connection to the server at
 ws://10.225.125.91:9763/TestWebApp/echo
 .*

 Server code;

 import java.io.IOException;
  import javax.websocket.OnClose;import javax.websocket.OnMessage;import 
 javax.websocket.OnOpen;import javax.websocket.Session;import 
 javax.websocket.server.ServerEndpoint;

 @ServerEndpoint("/echo") public class EchoServer {

 @OnOpen
 public void onOpen(Session session){
 System.out.println(session.getId() + " has opened a connection");
 try {
 session.getBasicRemote().sendText("Connection Established");
 } catch (IOException ex) {
 ex.printStackTrace();
 }
 }

 @OnMessage
 public void onMessage(String message, Session session){
 System.out.println("Message from " + session.getId() + ": " + 
 message);
 try {
 session.getBasicRemote().sendText(message);
 } catch (IOException ex) {
 ex.printStackTrace();
 }
 }

 @OnClose
 public void onClose(Session session){
 System.out.println("Session " +session.getId()+" has ended");
 }}


 index.html;

 

 
 
 Echo Chamber
 
 
 
 

 
 
 
 
 Open>>> >
 Send
 Close>>> button>
 
 
 

 
 

 var webSocket;
 var messages = document.getElementById("messages");

 function openSocket(){

 if(webSocket !== undefined && webSocket.readyState !==
 WebSocket.CLOSED){
writeResponse("WebSocket is already opened.");
 return;
 }

 *webSocket = new WebSocket("ws://" +
 window.location.host + "/TestWebApp/echo");*

 webSocket.onopen = function(event){
 if(event.data === undefined)
 return;

 writeResponse(event.data);
 };

 webSocket.onmessage = function(event){
 writeResponse(event.data);
 };

 webSocket.onclose = function(event){
 writeResponse("Connection closed");
 };
 }

 function send(){
 var text =
 document.getElementById("messageinput").value;
 webSocket.send(text);
 }

 function closeSocket(){
 webSocket.close();
 }

 function writeResponse(text){
 messages.innerHTML += "
" + text; } Is their any particular way that the web socket is de

Re: [Dev] [AS]

2015-06-25 Thread Thusitha Thilina Dayaratne
Hi Sabra,

AFAIK you don't have to do any extra configurations to make websocket works
with AS. This kind of issues may pop out when webapp contains websoket jars
inside the webapp itself (WEB-INF/lib).
IF not most probably there is some mismatch in the actual websocket that
get deployed and what you are trying to connect.

Thanks

On Thu, Jun 25, 2015 at 5:08 PM, Sabra Ossen  wrote:

> Hi Thusitha,
>
> The context path is as follows (present in context.xml),  * antiJARLocking="true" path="/TestWebApp"/>*
>
> and the error code is 404 stating that the html file "echo" was not found.
>
> Thanks.
>
> On Thu, Jun 25, 2015 at 4:43 PM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Sabra,
>>
>> Did you check the Context path is correct? Also can you check what is the
>> error code that you get?
>> Thanks
>>
>> On Thu, Jun 25, 2015 at 4:28 PM, Sabra Ossen  wrote:
>>
>>> Hi,
>>>
>>> I am following the blog mentioned in [1] and I can successfully run the
>>> Web App in the local tomcat server, when I run the following code in the
>>> WSO2 AS 5.3.0 alpha the browser returns the following error in the browser
>>> console.
>>>
>>> *Firefox can't establish a connection to the server at
>>> ws://10.225.125.91:9763/TestWebApp/echo
>>> .*
>>>
>>> Server code;
>>>
>>> import java.io.IOException;
>>>  import javax.websocket.OnClose;import javax.websocket.OnMessage;import 
>>> javax.websocket.OnOpen;import javax.websocket.Session;import 
>>> javax.websocket.server.ServerEndpoint;
>>>
>>> @ServerEndpoint("/echo") public class EchoServer {
>>>
>>> @OnOpen
>>> public void onOpen(Session session){
>>> System.out.println(session.getId() + " has opened a connection");
>>> try {
>>> session.getBasicRemote().sendText("Connection Established");
>>> } catch (IOException ex) {
>>> ex.printStackTrace();
>>> }
>>> }
>>>
>>> @OnMessage
>>> public void onMessage(String message, Session session){
>>> System.out.println("Message from " + session.getId() + ": " + 
>>> message);
>>> try {
>>> session.getBasicRemote().sendText(message);
>>> } catch (IOException ex) {
>>> ex.printStackTrace();
>>> }
>>> }
>>>
>>> @OnClose
>>> public void onClose(Session session){
>>> System.out.println("Session " +session.getId()+" has ended");
>>> }}
>>>
>>>
>>> index.html;
>>>
>>> 
>>>
>>> 
>>> 
>>> Echo Chamber
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> 
>>> Open
>>> Send
>>> Close>> button>
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>>
>>> var webSocket;
>>> var messages = document.getElementById("messages");
>>>
>>> function openSocket(){
>>>
>>> if(webSocket !== undefined && webSocket.readyState !==
>>> WebSocket.CLOSED){
>>>writeResponse("WebSocket is already opened.");
>>> return;
>>> }
>>>
>>> *webSocket = new WebSocket("ws://" +
>>> window.location.host + "/TestWebApp/echo");*
>>>
>>> webSocket.onopen = function(event){
>>> if(event.data === undefined)
>>> return;
>>>
>>> writeResponse(event.data);
>>> };
>>>
>>> webSocket.onmessage = function(event){
>>> writeResponse(event.data);
>>> };
>>>
>>> webSocket.onclose = function(event){
>>> writeResponse("Connection closed");
>>> };
>>> }
>>>
>>> function send(){
>>> var text = document.getElementById("messageinput").value;
>>> webSocket.send(text);
>>> }
>>>
>>> function closeSocket(){
>>> webSocket.close();
>>> }
>>>
>>> function writeResponse(text){
>>> messages.innerHTML += "
" + text; >>> } >>> >>> >>> >>> >>> >>> >>> Is their any particular way that the web socket is defined within the >>> AS. Can anyone help me with this issue. Thanks in advance. >>> >>> [1] https://blog.idrsolutions.com/2013/12/websockets-an-introduction/ >>> >>> Regards. >>> >>> -- >>> Sabra Ossen >>> Undergraduate | Department of Computer Science and Engineering >>> University of Moratuwa >>> Sri Lanka >>> >>> ___ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Thusitha Dayaratne >> Software Engineer >> WSO2 Inc. - lean . enterprise . middleware | wso2.com >> >> Mobile +94712756809 >> Blog alokayasoya.blogspot.com >> Abouthttp://about.me/thusit

Re: [Dev] [AS]

2015-06-25 Thread Sabra Ossen
Hi Thusitha,

The context path is as follows (present in context.xml),  **

and the error code is 404 stating that the html file "echo" was not found.

Thanks.

On Thu, Jun 25, 2015 at 4:43 PM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Sabra,
>
> Did you check the Context path is correct? Also can you check what is the
> error code that you get?
> Thanks
>
> On Thu, Jun 25, 2015 at 4:28 PM, Sabra Ossen  wrote:
>
>> Hi,
>>
>> I am following the blog mentioned in [1] and I can successfully run the
>> Web App in the local tomcat server, when I run the following code in the
>> WSO2 AS 5.3.0 alpha the browser returns the following error in the browser
>> console.
>>
>> *Firefox can't establish a connection to the server at
>> ws://10.225.125.91:9763/TestWebApp/echo
>> .*
>>
>> Server code;
>>
>> import java.io.IOException;
>>  import javax.websocket.OnClose;import javax.websocket.OnMessage;import 
>> javax.websocket.OnOpen;import javax.websocket.Session;import 
>> javax.websocket.server.ServerEndpoint;
>>
>> @ServerEndpoint("/echo") public class EchoServer {
>>
>> @OnOpen
>> public void onOpen(Session session){
>> System.out.println(session.getId() + " has opened a connection");
>> try {
>> session.getBasicRemote().sendText("Connection Established");
>> } catch (IOException ex) {
>> ex.printStackTrace();
>> }
>> }
>>
>> @OnMessage
>> public void onMessage(String message, Session session){
>> System.out.println("Message from " + session.getId() + ": " + 
>> message);
>> try {
>> session.getBasicRemote().sendText(message);
>> } catch (IOException ex) {
>> ex.printStackTrace();
>> }
>> }
>>
>> @OnClose
>> public void onClose(Session session){
>> System.out.println("Session " +session.getId()+" has ended");
>> }}
>>
>>
>> index.html;
>>
>> 
>>
>> 
>> 
>> Echo Chamber
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> Open
>> Send
>> Close> >
>> 
>> 
>> 
>>
>> 
>> 
>>
>> var webSocket;
>> var messages = document.getElementById("messages");
>>
>> function openSocket(){
>>
>> if(webSocket !== undefined && webSocket.readyState !==
>> WebSocket.CLOSED){
>>writeResponse("WebSocket is already opened.");
>> return;
>> }
>>
>> *webSocket = new WebSocket("ws://" +
>> window.location.host + "/TestWebApp/echo");*
>>
>> webSocket.onopen = function(event){
>> if(event.data === undefined)
>> return;
>>
>> writeResponse(event.data);
>> };
>>
>> webSocket.onmessage = function(event){
>> writeResponse(event.data);
>> };
>>
>> webSocket.onclose = function(event){
>> writeResponse("Connection closed");
>> };
>> }
>>
>> function send(){
>> var text = document.getElementById("messageinput").value;
>> webSocket.send(text);
>> }
>>
>> function closeSocket(){
>> webSocket.close();
>> }
>>
>> function writeResponse(text){
>> messages.innerHTML += "
" + text; >> } >> >> >> >> >> >> >> Is their any particular way that the web socket is defined within the AS. >> Can anyone help me with this issue. Thanks in advance. >> >> [1] https://blog.idrsolutions.com/2013/12/websockets-an-introduction/ >> >> Regards. >> >> -- >> Sabra Ossen >> Undergraduate | Department of Computer Science and Engineering >> University of Moratuwa >> Sri Lanka >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Thusitha Dayaratne > Software Engineer > WSO2 Inc. - lean . enterprise . middleware | wso2.com > > Mobile +94712756809 > Blog alokayasoya.blogspot.com > Abouthttp://about.me/thusithathilina > > -- Sabra Ossen Undergraduate | Department of Computer Science and Engineering University of Moratuwa Sri Lanka ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev

Re: [Dev] [AS]

2015-06-25 Thread Manoj Kumara
You can refer our websocket samples at [1].

[1]
https://github.com/wso2/product-as/tree/master/modules/samples/example/src/main/java/websocket

Regards,
Manoj


*Manoj Kumara |* Senior Software Engineer
 Inc. *| **lean. enterprise. middleware.*
#20, Palm Grove, Colombo 03, Sri Lanka
*Mobile:* +94 713 448188 *|** Work:* +94 112 145345


On Thu, Jun 25, 2015 at 4:43 PM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Sabra,
>
> Did you check the Context path is correct? Also can you check what is the
> error code that you get?
> Thanks
>
> On Thu, Jun 25, 2015 at 4:28 PM, Sabra Ossen  wrote:
>
>> Hi,
>>
>> I am following the blog mentioned in [1] and I can successfully run the
>> Web App in the local tomcat server, when I run the following code in the
>> WSO2 AS 5.3.0 alpha the browser returns the following error in the browser
>> console.
>>
>> *Firefox can't establish a connection to the server at
>> ws://10.225.125.91:9763/TestWebApp/echo
>> .*
>>
>> Server code;
>>
>> import java.io.IOException;
>>  import javax.websocket.OnClose;import javax.websocket.OnMessage;import 
>> javax.websocket.OnOpen;import javax.websocket.Session;import 
>> javax.websocket.server.ServerEndpoint;
>>
>> @ServerEndpoint("/echo") public class EchoServer {
>>
>> @OnOpen
>> public void onOpen(Session session){
>> System.out.println(session.getId() + " has opened a connection");
>> try {
>> session.getBasicRemote().sendText("Connection Established");
>> } catch (IOException ex) {
>> ex.printStackTrace();
>> }
>> }
>>
>> @OnMessage
>> public void onMessage(String message, Session session){
>> System.out.println("Message from " + session.getId() + ": " + 
>> message);
>> try {
>> session.getBasicRemote().sendText(message);
>> } catch (IOException ex) {
>> ex.printStackTrace();
>> }
>> }
>>
>> @OnClose
>> public void onClose(Session session){
>> System.out.println("Session " +session.getId()+" has ended");
>> }}
>>
>>
>> index.html;
>>
>> 
>>
>> 
>> 
>> Echo Chamber
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> Open
>> Send
>> Close> >
>> 
>> 
>> 
>>
>> 
>> 
>>
>> var webSocket;
>> var messages = document.getElementById("messages");
>>
>> function openSocket(){
>>
>> if(webSocket !== undefined && webSocket.readyState !==
>> WebSocket.CLOSED){
>>writeResponse("WebSocket is already opened.");
>> return;
>> }
>>
>> *webSocket = new WebSocket("ws://" +
>> window.location.host + "/TestWebApp/echo");*
>>
>> webSocket.onopen = function(event){
>> if(event.data === undefined)
>> return;
>>
>> writeResponse(event.data);
>> };
>>
>> webSocket.onmessage = function(event){
>> writeResponse(event.data);
>> };
>>
>> webSocket.onclose = function(event){
>> writeResponse("Connection closed");
>> };
>> }
>>
>> function send(){
>> var text = document.getElementById("messageinput").value;
>> webSocket.send(text);
>> }
>>
>> function closeSocket(){
>> webSocket.close();
>> }
>>
>> function writeResponse(text){
>> messages.innerHTML += "
" + text; >> } >> >> >> >> >> >> >> Is their any particular way that the web socket is defined within the AS. >> Can anyone help me with this issue. Thanks in advance. >> >> [1] https://blog.idrsolutions.com/2013/12/websockets-an-introduction/ >> >> Regards. >> >> -- >> Sabra Ossen >> Undergraduate | Department of Computer Science and Engineering >> University of Moratuwa >> Sri Lanka >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Thusitha Dayaratne > Software Engineer > WSO2 Inc. - lean . enterprise . middleware | wso2.com > > Mobile +94712756809 > Blog alokayasoya.blogspot.com > Abouthttp://about.me/thusithathilina > > > ___ > 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] [AS]

2015-06-25 Thread Thusitha Thilina Dayaratne
Hi Sabra,

Did you check the Context path is correct? Also can you check what is the
error code that you get?
Thanks

On Thu, Jun 25, 2015 at 4:28 PM, Sabra Ossen  wrote:

> Hi,
>
> I am following the blog mentioned in [1] and I can successfully run the
> Web App in the local tomcat server, when I run the following code in the
> WSO2 AS 5.3.0 alpha the browser returns the following error in the browser
> console.
>
> *Firefox can't establish a connection to the server at
> ws://10.225.125.91:9763/TestWebApp/echo
> .*
>
> Server code;
>
> import java.io.IOException;
>  import javax.websocket.OnClose;import javax.websocket.OnMessage;import 
> javax.websocket.OnOpen;import javax.websocket.Session;import 
> javax.websocket.server.ServerEndpoint;
>
> @ServerEndpoint("/echo") public class EchoServer {
>
> @OnOpen
> public void onOpen(Session session){
> System.out.println(session.getId() + " has opened a connection");
> try {
> session.getBasicRemote().sendText("Connection Established");
> } catch (IOException ex) {
> ex.printStackTrace();
> }
> }
>
> @OnMessage
> public void onMessage(String message, Session session){
> System.out.println("Message from " + session.getId() + ": " + 
> message);
> try {
> session.getBasicRemote().sendText(message);
> } catch (IOException ex) {
> ex.printStackTrace();
> }
> }
>
> @OnClose
> public void onClose(Session session){
> System.out.println("Session " +session.getId()+" has ended");
> }}
>
>
> index.html;
>
> 
>
> 
> 
> Echo Chamber
> 
> 
> 
> 
>
> 
> 
> 
> 
> Open
> Send
> Close
> 
> 
> 
>
> 
> 
>
> var webSocket;
> var messages = document.getElementById("messages");
>
> function openSocket(){
>
> if(webSocket !== undefined && webSocket.readyState !==
> WebSocket.CLOSED){
>writeResponse("WebSocket is already opened.");
> return;
> }
>
> *webSocket = new WebSocket("ws://" + window.location.host
> + "/TestWebApp/echo");*
>
> webSocket.onopen = function(event){
> if(event.data === undefined)
> return;
>
> writeResponse(event.data);
> };
>
> webSocket.onmessage = function(event){
> writeResponse(event.data);
> };
>
> webSocket.onclose = function(event){
> writeResponse("Connection closed");
> };
> }
>
> function send(){
> var text = document.getElementById("messageinput").value;
> webSocket.send(text);
> }
>
> function closeSocket(){
> webSocket.close();
> }
>
> function writeResponse(text){
> messages.innerHTML += "
" + text; > } > > > > > > > Is their any particular way that the web socket is defined within the AS. > Can anyone help me with this issue. Thanks in advance. > > [1] https://blog.idrsolutions.com/2013/12/websockets-an-introduction/ > > Regards. > > -- > Sabra Ossen > Undergraduate | Department of Computer Science and Engineering > University of Moratuwa > Sri Lanka > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Thusitha Dayaratne Software Engineer WSO2 Inc. - lean . enterprise . middleware | wso2.com Mobile +94712756809 Blog alokayasoya.blogspot.com Abouthttp://about.me/thusithathilina ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev

[Dev] [AS]

2015-06-25 Thread Sabra Ossen
Hi,

I am following the blog mentioned in [1] and I can successfully run the Web
App in the local tomcat server, when I run the following code in the WSO2
AS 5.3.0 alpha the browser returns the following error in the browser
console.

*Firefox can't establish a connection to the server at
ws://10.225.125.91:9763/TestWebApp/echo
.*

Server code;

import java.io.IOException;
 import javax.websocket.OnClose;import
javax.websocket.OnMessage;import javax.websocket.OnOpen;import
javax.websocket.Session;import javax.websocket.server.ServerEndpoint;

@ServerEndpoint("/echo") public class EchoServer {

@OnOpen
public void onOpen(Session session){
System.out.println(session.getId() + " has opened a connection");
try {
session.getBasicRemote().sendText("Connection Established");
} catch (IOException ex) {
ex.printStackTrace();
}
}

@OnMessage
public void onMessage(String message, Session session){
System.out.println("Message from " + session.getId() + ": " + message);
try {
session.getBasicRemote().sendText(message);
} catch (IOException ex) {
ex.printStackTrace();
}
}

@OnClose
public void onClose(Session session){
System.out.println("Session " +session.getId()+" has ended");
}}


index.html;





Echo Chamber









Open
Send
Close







var webSocket;
var messages = document.getElementById("messages");

function openSocket(){

if(webSocket !== undefined && webSocket.readyState !==
WebSocket.CLOSED){
   writeResponse("WebSocket is already opened.");
return;
}

*webSocket = new WebSocket("ws://" + window.location.host +
"/TestWebApp/echo");*

webSocket.onopen = function(event){
if(event.data === undefined)
return;

writeResponse(event.data);
};

webSocket.onmessage = function(event){
writeResponse(event.data);
};

webSocket.onclose = function(event){
writeResponse("Connection closed");
};
}

function send(){
var text = document.getElementById("messageinput").value;
webSocket.send(text);
}

function closeSocket(){
webSocket.close();
}

function writeResponse(text){
messages.innerHTML += "
" + text; } Is their any particular way that the web socket is defined within the AS. Can anyone help me with this issue. Thanks in advance. [1] https://blog.idrsolutions.com/2013/12/websockets-an-introduction/ Regards. -- Sabra Ossen Undergraduate | Department of Computer Science and Engineering University of Moratuwa Sri Lanka ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev

Re: [Dev] [AS] Web socket samples for AS 5.2.1

2015-06-22 Thread Thusitha Thilina Dayaratne
Hi Sabra,

I'm sorry for the mistake version should be AS 5.3.0 Alpha (Not 5.2.3 alpha)
You can download the AS 5.2.3 Alpha pack from
http://svn.wso2.org/repos/wso2/people/kasung/as5.3.0-alpha/

Thanks
/Thusitha

On Tue, Jun 23, 2015 at 10:10 AM, Sabra Ossen  wrote:

> Hi Thusitha,
>
> Thanks for pointing out the samples and if you could point me as to where
> to download AS 5.2.3 alpha version that would be a great help. The website
> contains only the latest version. Thanks in advance.
>
> Regards.
>
> On Tue, Jun 23, 2015 at 9:41 AM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Sabra,
>>
>> AFAIK WSO2-AS 5.2.1 have websocket supports. But that is implemented
>> based on the tomcat specific web socket implementation. You can find the
>> "example" web app which is already in the webapp folder.
>> If you want to try out websocket support based on JSR 356 which is not
>> specific to Tomcat but rather standard implementation, you have to use AS
>> 5.2.3 alpha version.
>>
>> Thanks
>>
>> On Tue, Jun 23, 2015 at 8:54 AM, Sabra Ossen  wrote:
>>
>>> Hi All,
>>>
>>> I am searching for $subject. I have only been able to find samples for
>>> AS 5.1.0 mentioned in [1].
>>> Does AS 5.2.1 support web sockets?
>>>
>>> Could someone clarify and point me out to $subject. Thanks in advance.
>>>
>>> [1]
>>> https://svn.wso2.org/repos/wso2/carbon/platform/tags/4.1.0/products/as/5.1.0/modules/samples/common/webapp/src/main/java/websocket/
>>>
>>> Regards.
>>>
>>> --
>>> Sabra Ossen 
>>> Undergraduate | Department of Computer Science and Engineering
>>> University of Moratuwa
>>> Sri Lanka
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Thusitha Dayaratne
>> Software Engineer
>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>
>> Mobile  +94712756809
>> Blog  alokayasoya.blogspot.com
>> Abouthttp://about.me/thusithathilina
>>
>>
>
>
> --
> Sabra Ossen 
> Undergraduate | Department of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka
>



-- 
Thusitha Dayaratne
Software Engineer
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

Mobile  +94712756809
Blog  alokayasoya.blogspot.com
Abouthttp://about.me/thusithathilina
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Web socket samples for AS 5.2.1

2015-06-22 Thread Sabra Ossen
Hi Thusitha,

Thanks for pointing out the samples and if you could point me as to where
to download AS 5.2.3 alpha version that would be a great help. The website
contains only the latest version. Thanks in advance.

Regards.

On Tue, Jun 23, 2015 at 9:41 AM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Sabra,
>
> AFAIK WSO2-AS 5.2.1 have websocket supports. But that is implemented based
> on the tomcat specific web socket implementation. You can find the
> "example" web app which is already in the webapp folder.
> If you want to try out websocket support based on JSR 356 which is not
> specific to Tomcat but rather standard implementation, you have to use AS
> 5.2.3 alpha version.
>
> Thanks
>
> On Tue, Jun 23, 2015 at 8:54 AM, Sabra Ossen  wrote:
>
>> Hi All,
>>
>> I am searching for $subject. I have only been able to find samples for AS
>> 5.1.0 mentioned in [1].
>> Does AS 5.2.1 support web sockets?
>>
>> Could someone clarify and point me out to $subject. Thanks in advance.
>>
>> [1]
>> https://svn.wso2.org/repos/wso2/carbon/platform/tags/4.1.0/products/as/5.1.0/modules/samples/common/webapp/src/main/java/websocket/
>>
>> Regards.
>>
>> --
>> Sabra Ossen 
>> Undergraduate | Department of Computer Science and Engineering
>> University of Moratuwa
>> Sri Lanka
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thusitha Dayaratne
> Software Engineer
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> Mobile  +94712756809
> Blog  alokayasoya.blogspot.com
> Abouthttp://about.me/thusithathilina
>
>


-- 
Sabra Ossen 
Undergraduate | Department of Computer Science and Engineering
University of Moratuwa
Sri Lanka
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Web socket samples for AS 5.2.1

2015-06-22 Thread Thusitha Thilina Dayaratne
Hi Sabra,

AFAIK WSO2-AS 5.2.1 have websocket supports. But that is implemented based
on the tomcat specific web socket implementation. You can find the
"example" web app which is already in the webapp folder.
If you want to try out websocket support based on JSR 356 which is not
specific to Tomcat but rather standard implementation, you have to use AS
5.2.3 alpha version.

Thanks

On Tue, Jun 23, 2015 at 8:54 AM, Sabra Ossen  wrote:

> Hi All,
>
> I am searching for $subject. I have only been able to find samples for AS
> 5.1.0 mentioned in [1].
> Does AS 5.2.1 support web sockets?
>
> Could someone clarify and point me out to $subject. Thanks in advance.
>
> [1]
> https://svn.wso2.org/repos/wso2/carbon/platform/tags/4.1.0/products/as/5.1.0/modules/samples/common/webapp/src/main/java/websocket/
>
> Regards.
>
> --
> Sabra Ossen 
> Undergraduate | Department of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thusitha Dayaratne
Software Engineer
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

Mobile  +94712756809
Blog  alokayasoya.blogspot.com
Abouthttp://about.me/thusithathilina
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [AS] Web socket samples for AS 5.2.1

2015-06-22 Thread Sabra Ossen
Hi All,

I am searching for $subject. I have only been able to find samples for AS
5.1.0 mentioned in [1].
Does AS 5.2.1 support web sockets?

Could someone clarify and point me out to $subject. Thanks in advance.

[1]
https://svn.wso2.org/repos/wso2/carbon/platform/tags/4.1.0/products/as/5.1.0/modules/samples/common/webapp/src/main/java/websocket/

Regards.

-- 
Sabra Ossen 
Undergraduate | Department of Computer Science and Engineering
University of Moratuwa
Sri Lanka
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS] Illegal access attempt while trying to authenticate access to service WebappAdmin

2015-06-15 Thread Ruwan Abeykoon
Hi All,
Closing the question. This is already documented in [1] with
AuthenticationAdminStub.

@Ayoob
Thanks for the pointer

[1] https://docs.wso2.com/display/IS450/Calling+Admin+Services+from+Apps

Cheers,
Ruwan

On Tue, Jun 9, 2015 at 10:46 AM, Ruwan Abeykoon  wrote:

> Hi All,
>
> I am getting following error on the WSO2 AS console log while I use
> WebAppAdminStub to access the AS admin services. I think that it is most
> probably due to "Basic Authentication" being used in my client whereas in
> AS it uses SAML2SSOAuthenticator. ref [1]
>
> [2015-06-09 tt:tt:tt,N]  WARN
> {org.wso2.carbon.server.admin.module.handler.AuthenticationHandler} -
> Illegal access attempt at [2015-06-09 tt:tt:tt,N] from IP address x.x.x.x
> while trying to authenticate access to service WebappAdmin
>
>
> My client code fragment is similar to,
> WebappAdminStub  stub = new WebappAdminStub(configCtx, serviceURL);
>
> ServiceClient client = stub._getServiceClient();
> Options options = client.getOptions();
>
> HttpTransportProperties.Authenticator auth = new
> HttpTransportProperties.Authenticator();
> auth.setUsername(userName);
> auth.setPassword(password);
> options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
> auth);
>
>
> Questions are,
>
> 1. how can I initiate SAML2 authentication instead of BASIC in the client
> side?
>
> 2. Any other suggestion to prevent the above WARN log, without changing
> anything in AS side, can do anything in the client code.
>
>
>
> [1]
> https://docs.wso2.com/display/AM170/FAQ#FAQ-priorityWhydoIgetthefollowingwarning:org.wso2.carbon.server.admin.module.handler.AuthenticationHandler-IllegalaccessattemptwhiletryingtoauthenticateAPIKeyValidationService
> ?
>
> Cheers,
>
> --
>
> *Ruwan Abeykoon*
> *Architect,*
> *WSO2, Inc. http://wso2.com  *
> *lean.enterprise.middleware.*
>
> email: ruw...@wso2.com
> phone:(+94) 39736
>



-- 

*Ruwan Abeykoon*
*Architect,*
*WSO2, Inc. http://wso2.com  *
*lean.enterprise.middleware.*

email: ruw...@wso2.com
phone:(+94) 39736
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] AS build fails at tests-security-manager due to file permission

2015-06-14 Thread Krishantha Samaraweera
Hi Niranjan,

Can you create a TA Jira to track the issue.

Thanks,
Krishantha.

On Fri, Jun 12, 2015 at 5:18 PM, Niranjan Karunanandham 
wrote:

> Hi,
>
> When I tried to build AS pack from Github (master branch) [1], it failed
> with error in [2], but this is *passing in Jenkins*. Had an offline
> discussion with Nuwan and found out that in my machine "*sign-packs.sh*"
> which is used to sign the jar files in the pack for testing is not executed
> as it does *not have execute permission*. When I check the original
> location of the file and it has the permission - 775, but when it is copied
> the permission is lost.
>
> After I changed the original file permission to 755  and ran the test
> case, it failed when it tried to execute sign-packs.sh with a different
> error (error: that a newline is present (^M)). This is happened because the
> sign-packs.sh file has the Line Separator as *CRLF*. After changing it to
> *LF*, I was able to run the tests-security-manager. Why is this happening?
>
>
> [1] - https://github.com/wso2/product-as/
> [2] -
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ClientConnectionUtil]
> - Port 9763 is closed and available for use
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ClientConnectionUtil]
> - Port 9443 is closed and available for use
> INFO
>  
> [org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager]
> - Starting carbon server.
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> JAVA_HOME environment variable is set to /usr/local/java/jdk1.7.0_51
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> CARBON_HOME environment variable is set to
> /home/nira/git/Nira/product-as/modules/integration/tests-integration/tests-security-manager/target/carbontmp1434108379893/wso2as-6.0.0-SNAPSHOT
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> Property pattern javax.net.ssl.trustStore is restricted for tenant code.
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> Property pattern javax.net.ssl.trustStorePassword is restricted for tenant
> code.
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> Property pattern denied.system.properties is restricted for tenant code.
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> java.security.AccessControlException
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -  -
> klass: 'java/security/AccessControlException'
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> A fatal error has been detected by the Java Runtime Environment:
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>  Internal Error (exceptions.cpp:424), pid=20621, tid=139773740406528
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>  fatal error: ExceptionMark destructor expects no pending exceptions
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build
> 1.7.0_51-b13)
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode
> linux-amd64 compressed oops)
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> Failed to write core dump. Core dumps have been disabled. To enable core
> dumping, try "ulimit -c unlimited" before starting Java again
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> An error report file with more information is saved as:
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> /home/nira/git/Nira/product-as/modules/integration/tests-integration/tests-security-manager/target/carbontmp1434108379893/wso2as-6.0.0-SNAPSHOT/hs_err_pid20621.log
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> If you would like to submit a bug report, please visit:
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>   http://bugreport.sun.com/bugreport/crash.jsp
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> ERROR
> [org.wso2.carbon.automation.extensions.servers.utils.InputStreamHandler] -
> Aborted (core dumped)
>
>
> Regards,
> Nira
>
> --
>
> *Niranjan Karunanandham*
> Senior S

Re: [Dev] AS build fails at tests-security-manager due to file permission

2015-06-14 Thread Nuwan Wimalasekara
Hi
We need to look into this issue in advance since this is working on jenkins
server and mac OS as well. Only problem in Ubuntu. Will check and update.

Thanks,
Nuwanw

On Mon, Jun 15, 2015 at 9:41 AM, Niranjan Karunanandham 
wrote:

> Hi Nuwan,
>
> When I tried to build AS pack from Github (master branch) [1], it failed
>> with error in [2], but this is *passing in Jenkins*. Had an offline
>> discussion with Nuwan and found out that in my machine "*sign-packs.sh*"
>> which is used to sign the jar files in the pack for testing is not executed
>> as it does *not have execute permission*. When I check the original
>> location of the file and it has the permission - 775, but when it is copied
>> the permission is lost.
>>
> Kind reminder.
>
> Regards,
> Nira
>
>
>
> On Fri, Jun 12, 2015 at 5:18 PM, Niranjan Karunanandham  > wrote:
>
>> Hi,
>>
>> When I tried to build AS pack from Github (master branch) [1], it failed
>> with error in [2], but this is *passing in Jenkins*. Had an offline
>> discussion with Nuwan and found out that in my machine "*sign-packs.sh*"
>> which is used to sign the jar files in the pack for testing is not executed
>> as it does *not have execute permission*. When I check the original
>> location of the file and it has the permission - 775, but when it is copied
>> the permission is lost.
>>
>> After I changed the original file permission to 755  and ran the test
>> case, it failed when it tried to execute sign-packs.sh with a different
>> error (error: that a newline is present (^M)). This is happened because the
>> sign-packs.sh file has the Line Separator as *CRLF*. After changing it
>> to *LF*, I was able to run the tests-security-manager. Why is this
>> happening?
>>
>>
>> [1] - https://github.com/wso2/product-as/
>> [2] -
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ClientConnectionUtil]
>> - Port 9763 is closed and available for use
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ClientConnectionUtil]
>> - Port 9443 is closed and available for use
>> INFO
>>  
>> [org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager]
>> - Starting carbon server.
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
>> JAVA_HOME environment variable is set to /usr/local/java/jdk1.7.0_51
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
>> CARBON_HOME environment variable is set to
>> /home/nira/git/Nira/product-as/modules/integration/tests-integration/tests-security-manager/target/carbontmp1434108379893/wso2as-6.0.0-SNAPSHOT
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
>> Property pattern javax.net.ssl.trustStore is restricted for tenant code.
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
>> Property pattern javax.net.ssl.trustStorePassword is restricted for tenant
>> code.
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
>> Property pattern denied.system.properties is restricted for tenant code.
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
>> java.security.AccessControlException
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -  -
>> klass: 'java/security/AccessControlException'
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>> A fatal error has been detected by the Java Runtime Environment:
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>>  Internal Error (exceptions.cpp:424), pid=20621, tid=139773740406528
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>>  fatal error: ExceptionMark destructor expects no pending exceptions
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>> JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build
>> 1.7.0_51-b13)
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>> Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode
>> linux-amd64 compressed oops)
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>> Failed to write core dump. Core dumps have been disabled. To enable core
>> dumping, try "ulimit -c unlimited" before starting Java again
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>> An error report file with more information is saved as:
>> INFO
>>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #

Re: [Dev] AS build fails at tests-security-manager due to file permission

2015-06-14 Thread Niranjan Karunanandham
Hi Nuwan,

When I tried to build AS pack from Github (master branch) [1], it failed
> with error in [2], but this is *passing in Jenkins*. Had an offline
> discussion with Nuwan and found out that in my machine "*sign-packs.sh*"
> which is used to sign the jar files in the pack for testing is not executed
> as it does *not have execute permission*. When I check the original
> location of the file and it has the permission - 775, but when it is copied
> the permission is lost.
>
Kind reminder.

Regards,
Nira



On Fri, Jun 12, 2015 at 5:18 PM, Niranjan Karunanandham 
wrote:

> Hi,
>
> When I tried to build AS pack from Github (master branch) [1], it failed
> with error in [2], but this is *passing in Jenkins*. Had an offline
> discussion with Nuwan and found out that in my machine "*sign-packs.sh*"
> which is used to sign the jar files in the pack for testing is not executed
> as it does *not have execute permission*. When I check the original
> location of the file and it has the permission - 775, but when it is copied
> the permission is lost.
>
> After I changed the original file permission to 755  and ran the test
> case, it failed when it tried to execute sign-packs.sh with a different
> error (error: that a newline is present (^M)). This is happened because the
> sign-packs.sh file has the Line Separator as *CRLF*. After changing it to
> *LF*, I was able to run the tests-security-manager. Why is this happening?
>
>
> [1] - https://github.com/wso2/product-as/
> [2] -
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ClientConnectionUtil]
> - Port 9763 is closed and available for use
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ClientConnectionUtil]
> - Port 9443 is closed and available for use
> INFO
>  
> [org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager]
> - Starting carbon server.
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> JAVA_HOME environment variable is set to /usr/local/java/jdk1.7.0_51
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> CARBON_HOME environment variable is set to
> /home/nira/git/Nira/product-as/modules/integration/tests-integration/tests-security-manager/target/carbontmp1434108379893/wso2as-6.0.0-SNAPSHOT
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> Property pattern javax.net.ssl.trustStore is restricted for tenant code.
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> Property pattern javax.net.ssl.trustStorePassword is restricted for tenant
> code.
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> Property pattern denied.system.properties is restricted for tenant code.
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -
> java.security.AccessControlException
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -  -
> klass: 'java/security/AccessControlException'
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> A fatal error has been detected by the Java Runtime Environment:
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>  Internal Error (exceptions.cpp:424), pid=20621, tid=139773740406528
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
>  fatal error: ExceptionMark destructor expects no pending exceptions
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build
> 1.7.0_51-b13)
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode
> linux-amd64 compressed oops)
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> Failed to write core dump. Core dumps have been disabled. To enable core
> dumping, try "ulimit -c unlimited" before starting Java again
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> An error report file with more information is saved as:
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> /home/nira/git/Nira/product-as/modules/integration/tests-integration/tests-security-manager/target/carbontmp1434108379893/wso2as-6.0.0-SNAPSHOT/hs_err_pid20621.log
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> INFO
>  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - #
> If you would li

[Dev] AS build fails at tests-security-manager due to file permission

2015-06-12 Thread Niranjan Karunanandham
Hi,

When I tried to build AS pack from Github (master branch) [1], it failed
with error in [2], but this is *passing in Jenkins*. Had an offline
discussion with Nuwan and found out that in my machine "*sign-packs.sh*"
which is used to sign the jar files in the pack for testing is not executed
as it does *not have execute permission*. When I check the original
location of the file and it has the permission - 775, but when it is copied
the permission is lost.

After I changed the original file permission to 755  and ran the test case,
it failed when it tried to execute sign-packs.sh with a different error
(error: that a newline is present (^M)). This is happened because the
sign-packs.sh file has the Line Separator as *CRLF*. After changing it to
*LF*, I was able to run the tests-security-manager. Why is this happening?


[1] - https://github.com/wso2/product-as/
[2] -
INFO
 [org.wso2.carbon.automation.extensions.servers.utils.ClientConnectionUtil]
- Port 9763 is closed and available for use
INFO
 [org.wso2.carbon.automation.extensions.servers.utils.ClientConnectionUtil]
- Port 9443 is closed and available for use
INFO
 
[org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager]
- Starting carbon server.
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- JAVA_HOME environment variable is set to /usr/local/java/jdk1.7.0_51
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- CARBON_HOME environment variable is set to
/home/nira/git/Nira/product-as/modules/integration/tests-integration/tests-security-manager/target/carbontmp1434108379893/wso2as-6.0.0-SNAPSHOT
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- Property pattern javax.net.ssl.trustStore is restricted for tenant code.
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- Property pattern javax.net.ssl.trustStorePassword is restricted for
tenant code.
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- Property pattern denied.system.properties is restricted for tenant code.
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- java.security.AccessControlException
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
-  - klass: 'java/security/AccessControlException'
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- #
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- # A fatal error has been detected by the Java Runtime Environment:
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- #
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- #  Internal Error (exceptions.cpp:424), pid=20621, tid=139773740406528
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- #  fatal error: ExceptionMark destructor expects no pending exceptions
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- #
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- # JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build
1.7.0_51-b13)
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- # Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode
linux-amd64 compressed oops)
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- # Failed to write core dump. Core dumps have been disabled. To enable
core dumping, try "ulimit -c unlimited" before starting Java again
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- #
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- # An error report file with more information is saved as:
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- #
/home/nira/git/Nira/product-as/modules/integration/tests-integration/tests-security-manager/target/carbontmp1434108379893/wso2as-6.0.0-SNAPSHOT/hs_err_pid20621.log
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- #
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- # If you would like to submit a bug report, please visit:
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- #   http://bugreport.sun.com/bugreport/crash.jsp
INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
- #
ERROR
[org.wso2.carbon.automation.extensions.servers.utils.InputStreamHandler] -
Aborted (core dumped)


Regards,
Nira

-- 

*Niranjan Karunanandham*
Senior Software Engineer - WSO2 Inc.
WSO2 Inc.: http://www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [AS] Illegal access attempt while trying to authenticate access to service WebappAdmin

2015-06-08 Thread Ruwan Abeykoon
Hi All,

I am getting following error on the WSO2 AS console log while I use
WebAppAdminStub to access the AS admin services. I think that it is most
probably due to "Basic Authentication" being used in my client whereas in
AS it uses SAML2SSOAuthenticator. ref [1]

[2015-06-09 tt:tt:tt,N]  WARN
{org.wso2.carbon.server.admin.module.handler.AuthenticationHandler} -
Illegal access attempt at [2015-06-09 tt:tt:tt,N] from IP address x.x.x.x
while trying to authenticate access to service WebappAdmin


My client code fragment is similar to,
WebappAdminStub  stub = new WebappAdminStub(configCtx, serviceURL);

ServiceClient client = stub._getServiceClient();
Options options = client.getOptions();

HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();
auth.setUsername(userName);
auth.setPassword(password);
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
auth);


Questions are,

1. how can I initiate SAML2 authentication instead of BASIC in the client
side?

2. Any other suggestion to prevent the above WARN log, without changing
anything in AS side, can do anything in the client code.



[1]
https://docs.wso2.com/display/AM170/FAQ#FAQ-priorityWhydoIgetthefollowingwarning:org.wso2.carbon.server.admin.module.handler.AuthenticationHandler-IllegalaccessattemptwhiletryingtoauthenticateAPIKeyValidationService
?

Cheers,

-- 

*Ruwan Abeykoon*
*Architect,*
*WSO2, Inc. http://wso2.com  *
*lean.enterprise.middleware.*

email: ruw...@wso2.com
phone:(+94) 39736
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] AS cluster registry debsync issue

2015-05-23 Thread Udara Liyanage
Hi,

Is this due to a version issue. My svn version is 1.8.8 which seems to be
not supported according to [1]

 svn --version
svn, version 1.8.8 (r1568071)


[1]
https://docs.wso2.com/display/CLUSTER420/SVN-based+Deployment+Synchronizer

On Sun, May 24, 2015 at 10:51 AM, Udara Liyanage  wrote:

> Hi,
>
> I tried svn based deb sync and got the following issue.
>
> 
> true
> true
> true
> svn
> file:///home/udara/experiments/depsync/
> 
> udara
> udara
> true
> 
>
>
>  Error while attempting to create the directory:
> file:///home/udara/experiments/depsync/-1234
> org.tigris.subversion.svnclientadapter.SVNClientException:
> org.tigris.subversion.javahl.ClientException: svn: Unable to open an
> ra_local session to URL
> svn: Unable to open repository 'file:///home/udara/experiments/depsync'
> svn: Expected FS format between '1' and '4'; found format '6'
> at
> org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.mkdir(AbstractJhlClientAdapter.java:2524)
> at
> org.wso2.carbon.deployment.synchronizer.subversion.SVNBasedArtifactRepository.checkRemoteDirectory(SVNBasedArtifactRepository.java:240)
> at
> org.wso2.carbon.deployment.synchronizer.subversion.SVNBasedArtifactRepository.init(SVNBasedArtifactRepository.java:167)
> at
> org.wso2.carbon.deployment.synchronizer.internal.repository.CarbonRepositoryUtils.newCarbonRepositorySynchronizer(CarbonRepositoryUtils.java:71)
> at
> org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizerComponent.initDeploymentSynchronizerForSuperTenant(DeploymentSynchronizerComponent.java:108)
> at
> org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizerComponent.activate(DeploymentSynchronizerComponent.java:77)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>
> On Sun, May 24, 2015 at 10:29 AM, Ajith Vitharana  wrote:
>
>> Hi All
>>
>> The registry based depsync is deprecated. Please try with SVN.
>>
>> -Ajith
>>
>> On Sun, May 24, 2015 at 12:54 AM, Manoj Kumara  wrote:
>>
>>> Hi Udara,
>>>
>>> Did you mounted the registry database between the nodes ? Please follow
>>> [1]
>>>
>>> [1]
>>> http://emsooriyabandara.blogspot.com/2013/01/registry-based-deployment-synchronizer.html
>>>
>>>
>>> *Manoj Kumara*
>>> Software Engineer
>>> WSO2 Inc. http://wso2.com/
>>> *lean.enterprise.middleware*
>>> Mobile: +94713448188
>>>
>>> On Sat, May 23, 2015 at 11:01 AM, Udara Liyanage  wrote:
>>>
 Hi,

 I create a AS 5.2.1 cluster with two nodes as each members is a WKA
 member for other members.  Member join messages appeared. However when a
 web app is deployed to the manager node, it is not propagated to the other
 node. However following repo notification message appeared in the worker
 node.

 Note that I have applied the hazelcast patch patch1297 to both nodes.


 [2015-05-23 10:44:35,797]  INFO
 {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusterMessageListener}
 -  Received ClusteringMessage: SynchronizeRepositoryRequest{tenantId=-1234,
 tenantDomain='carbon.super', 
 messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}
 [2015-05-23 10:44:35,797]  INFO
 {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Received
 [SynchronizeRepositoryRequest{tenantId=-1234, tenantDomain='carbon.super',
 messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}]
 [2015-05-23 10:44:35,797]  INFO
 {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Updating
 repo update required parameter


 --

 Udara Liyanage
 Software Engineer
 WSO2, Inc.: http://wso2.com
 lean. enterprise. middleware

 web: http://udaraliyanage.wordpress.com
 phone: +94 71 443 6897

 ___
 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
>>>
>>>
>>
>>
>> --
>> Ajith Vitharana.
>>
>> WSO2 Inc. - http://wso2.com
>> Email  : aji...@wso2.com
>> Blog: http://vitharana.org
>> Mobile : +1-812-360-5335
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] AS cluster registry debsync issue

2015-05-23 Thread Udara Liyanage
Hi,

I tried svn based deb sync and got the following issue.


true
true
true
svn
file:///home/udara/experiments/depsync/

udara
udara
true



 Error while attempting to create the directory:
file:///home/udara/experiments/depsync/-1234
org.tigris.subversion.svnclientadapter.SVNClientException:
org.tigris.subversion.javahl.ClientException: svn: Unable to open an
ra_local session to URL
svn: Unable to open repository 'file:///home/udara/experiments/depsync'
svn: Expected FS format between '1' and '4'; found format '6'
at
org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.mkdir(AbstractJhlClientAdapter.java:2524)
at
org.wso2.carbon.deployment.synchronizer.subversion.SVNBasedArtifactRepository.checkRemoteDirectory(SVNBasedArtifactRepository.java:240)
at
org.wso2.carbon.deployment.synchronizer.subversion.SVNBasedArtifactRepository.init(SVNBasedArtifactRepository.java:167)
at
org.wso2.carbon.deployment.synchronizer.internal.repository.CarbonRepositoryUtils.newCarbonRepositorySynchronizer(CarbonRepositoryUtils.java:71)
at
org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizerComponent.initDeploymentSynchronizerForSuperTenant(DeploymentSynchronizerComponent.java:108)
at
org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizerComponent.activate(DeploymentSynchronizerComponent.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)


On Sun, May 24, 2015 at 10:29 AM, Ajith Vitharana  wrote:

> Hi All
>
> The registry based depsync is deprecated. Please try with SVN.
>
> -Ajith
>
> On Sun, May 24, 2015 at 12:54 AM, Manoj Kumara  wrote:
>
>> Hi Udara,
>>
>> Did you mounted the registry database between the nodes ? Please follow
>> [1]
>>
>> [1]
>> http://emsooriyabandara.blogspot.com/2013/01/registry-based-deployment-synchronizer.html
>>
>>
>> *Manoj Kumara*
>> Software Engineer
>> WSO2 Inc. http://wso2.com/
>> *lean.enterprise.middleware*
>> Mobile: +94713448188
>>
>> On Sat, May 23, 2015 at 11:01 AM, Udara Liyanage  wrote:
>>
>>> Hi,
>>>
>>> I create a AS 5.2.1 cluster with two nodes as each members is a WKA
>>> member for other members.  Member join messages appeared. However when a
>>> web app is deployed to the manager node, it is not propagated to the other
>>> node. However following repo notification message appeared in the worker
>>> node.
>>>
>>> Note that I have applied the hazelcast patch patch1297 to both nodes.
>>>
>>>
>>> [2015-05-23 10:44:35,797]  INFO
>>> {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusterMessageListener}
>>> -  Received ClusteringMessage: SynchronizeRepositoryRequest{tenantId=-1234,
>>> tenantDomain='carbon.super', messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}
>>> [2015-05-23 10:44:35,797]  INFO
>>> {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Received
>>> [SynchronizeRepositoryRequest{tenantId=-1234, tenantDomain='carbon.super',
>>> messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}]
>>> [2015-05-23 10:44:35,797]  INFO
>>> {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Updating
>>> repo update required parameter
>>>
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>> ___
>>> 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
>>
>>
>
>
> --
> Ajith Vitharana.
>
> WSO2 Inc. - http://wso2.com
> Email  : aji...@wso2.com
> Blog: http://vitharana.org
> Mobile : +1-812-360-5335
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] AS cluster registry debsync issue

2015-05-23 Thread Ajith Vitharana
Hi All

The registry based depsync is deprecated. Please try with SVN.

-Ajith

On Sun, May 24, 2015 at 12:54 AM, Manoj Kumara  wrote:

> Hi Udara,
>
> Did you mounted the registry database between the nodes ? Please follow [1]
>
> [1]
> http://emsooriyabandara.blogspot.com/2013/01/registry-based-deployment-synchronizer.html
>
>
> *Manoj Kumara*
> Software Engineer
> WSO2 Inc. http://wso2.com/
> *lean.enterprise.middleware*
> Mobile: +94713448188
>
> On Sat, May 23, 2015 at 11:01 AM, Udara Liyanage  wrote:
>
>> Hi,
>>
>> I create a AS 5.2.1 cluster with two nodes as each members is a WKA
>> member for other members.  Member join messages appeared. However when a
>> web app is deployed to the manager node, it is not propagated to the other
>> node. However following repo notification message appeared in the worker
>> node.
>>
>> Note that I have applied the hazelcast patch patch1297 to both nodes.
>>
>>
>> [2015-05-23 10:44:35,797]  INFO
>> {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusterMessageListener}
>> -  Received ClusteringMessage: SynchronizeRepositoryRequest{tenantId=-1234,
>> tenantDomain='carbon.super', messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}
>> [2015-05-23 10:44:35,797]  INFO
>> {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Received
>> [SynchronizeRepositoryRequest{tenantId=-1234, tenantDomain='carbon.super',
>> messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}]
>> [2015-05-23 10:44:35,797]  INFO
>> {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Updating
>> repo update required parameter
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>> ___
>> 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
>
>


-- 
Ajith Vitharana.

WSO2 Inc. - http://wso2.com
Email  : aji...@wso2.com
Blog: http://vitharana.org
Mobile : +1-812-360-5335
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] AS cluster registry debsync issue

2015-05-23 Thread Manoj Kumara
Hi Udara,

Did you mounted the registry database between the nodes ? Please follow [1]

[1]
http://emsooriyabandara.blogspot.com/2013/01/registry-based-deployment-synchronizer.html


*Manoj Kumara*
Software Engineer
WSO2 Inc. http://wso2.com/
*lean.enterprise.middleware*
Mobile: +94713448188

On Sat, May 23, 2015 at 11:01 AM, Udara Liyanage  wrote:

> Hi,
>
> I create a AS 5.2.1 cluster with two nodes as each members is a WKA member
> for other members.  Member join messages appeared. However when a web app
> is deployed to the manager node, it is not propagated to the other node.
> However following repo notification message appeared in the worker node.
>
> Note that I have applied the hazelcast patch patch1297 to both nodes.
>
>
> [2015-05-23 10:44:35,797]  INFO
> {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusterMessageListener}
> -  Received ClusteringMessage: SynchronizeRepositoryRequest{tenantId=-1234,
> tenantDomain='carbon.super', messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}
> [2015-05-23 10:44:35,797]  INFO
> {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Received
> [SynchronizeRepositoryRequest{tenantId=-1234, tenantDomain='carbon.super',
> messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}]
> [2015-05-23 10:44:35,797]  INFO
> {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Updating
> repo update required parameter
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>
> ___
> 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] AS cluster registry debsync issue

2015-05-23 Thread Udara Liyanage
Hi Jayanga,

I tried registry based in order to check weather cluster is working. I will
check svn based deb sync and let you know the results.

On Sun, May 24, 2015 at 9:18 AM, Jayanga Dissanayake 
wrote:

> Hi Udara,
>
> As your worker node has received the cluster message, I assume clustering
> works properly in your setup. Can you please check your DepSync
> configurations.
> And verify whether your new artifact is uploaded to the SVN by your master
> node.
>
> Thanks,
> Jayanga.
>
> *Jayanga Dissanayake*
> Senior Software Engineer
> WSO2 Inc. - http://wso2.com/
> lean . enterprise . middleware
> email: jaya...@wso2.com
> mobile: +94772207259
>
> On Sat, May 23, 2015 at 11:01 AM, Udara Liyanage  wrote:
>
>> Hi,
>>
>> I create a AS 5.2.1 cluster with two nodes as each members is a WKA
>> member for other members.  Member join messages appeared. However when a
>> web app is deployed to the manager node, it is not propagated to the other
>> node. However following repo notification message appeared in the worker
>> node.
>>
>> Note that I have applied the hazelcast patch patch1297 to both nodes.
>>
>>
>> [2015-05-23 10:44:35,797]  INFO
>> {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusterMessageListener}
>> -  Received ClusteringMessage: SynchronizeRepositoryRequest{tenantId=-1234,
>> tenantDomain='carbon.super', messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}
>> [2015-05-23 10:44:35,797]  INFO
>> {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Received
>> [SynchronizeRepositoryRequest{tenantId=-1234, tenantDomain='carbon.super',
>> messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}]
>> [2015-05-23 10:44:35,797]  INFO
>> {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Updating
>> repo update required parameter
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] AS cluster registry debsync issue

2015-05-23 Thread Jayanga Dissanayake
Hi Udara,

As your worker node has received the cluster message, I assume clustering
works properly in your setup. Can you please check your DepSync
configurations.
And verify whether your new artifact is uploaded to the SVN by your master
node.

Thanks,
Jayanga.

*Jayanga Dissanayake*
Senior Software Engineer
WSO2 Inc. - http://wso2.com/
lean . enterprise . middleware
email: jaya...@wso2.com
mobile: +94772207259

On Sat, May 23, 2015 at 11:01 AM, Udara Liyanage  wrote:

> Hi,
>
> I create a AS 5.2.1 cluster with two nodes as each members is a WKA member
> for other members.  Member join messages appeared. However when a web app
> is deployed to the manager node, it is not propagated to the other node.
> However following repo notification message appeared in the worker node.
>
> Note that I have applied the hazelcast patch patch1297 to both nodes.
>
>
> [2015-05-23 10:44:35,797]  INFO
> {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusterMessageListener}
> -  Received ClusteringMessage: SynchronizeRepositoryRequest{tenantId=-1234,
> tenantDomain='carbon.super', messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}
> [2015-05-23 10:44:35,797]  INFO
> {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Received
> [SynchronizeRepositoryRequest{tenantId=-1234, tenantDomain='carbon.super',
> messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}]
> [2015-05-23 10:44:35,797]  INFO
> {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Updating
> repo update required parameter
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>
> ___
> 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


[Dev] AS cluster registry debsync issue

2015-05-22 Thread Udara Liyanage
Hi,

I create a AS 5.2.1 cluster with two nodes as each members is a WKA member
for other members.  Member join messages appeared. However when a web app
is deployed to the manager node, it is not propagated to the other node.
However following repo notification message appeared in the worker node.

Note that I have applied the hazelcast patch patch1297 to both nodes.


[2015-05-23 10:44:35,797]  INFO
{org.wso2.carbon.core.clustering.hazelcast.HazelcastClusterMessageListener}
-  Received ClusteringMessage: SynchronizeRepositoryRequest{tenantId=-1234,
tenantDomain='carbon.super', messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}
[2015-05-23 10:44:35,797]  INFO
{org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Received
[SynchronizeRepositoryRequest{tenantId=-1234, tenantDomain='carbon.super',
messageId=68bd3b2f-598a-423c-b876-bd3eb5e9bd3c}]
[2015-05-23 10:44:35,797]  INFO
{org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} -  Updating
repo update required parameter


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AS/Carbon] Please Review and Merge

2015-05-04 Thread KasunG Gajasinghe
Merged.

On Tue, May 5, 2015 at 11:10 AM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi,
>
> Please review and merge the following PR[1]
> [1] - https://github.com/wso2/carbon-deployment/pull/92
>
> Thanks
> Best Regards
>
> On Thu, Apr 30, 2015 at 5:27 PM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Kasun,
>>
>> Noted.
>> I will look in to that as well.
>>
>> Thanks
>>
>> On Thu, Apr 30, 2015 at 5:24 PM, KasunG Gajasinghe 
>> wrote:
>>
>>> Hi Thusitha,
>>>
>>> We will  need make the package, "org.wso2.carbon.tomcat.jndi", visible
>>> to Tomcat CRE since we have extended the default JNDi implementation of
>>> Tomcat. Likewise, we will need to see what other packages especially inside
>>> org.wso2.carbon.tomcat we need make visible for the Tomcat CRE.
>>>
>>> On Thu, Apr 30, 2015 at 5:12 PM, Thusitha Thilina Dayaratne <
>>> thusit...@wso2.com> wrote:
>>>
 Hi,

 I've created the following JIRA issue[1] for this fix.
 [1] https://wso2.org/jira/browse/WSAS-1946

 Thanks
 Best Regards

 On Thu, Apr 30, 2015 at 4:48 PM, Thusitha Thilina Dayaratne <
 thusit...@wso2.com> wrote:

> Hi,
>
> Please review and merged the following PR[1]
> [1] - https://github.com/wso2/product-as/pull/59
>
> Thanks
> Best Regards
>
> --
> Thusitha Dayaratne
> Software Engineer
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> Mobile  +94712756809
> Blog  alokayasoya.blogspot.com
> Abouthttp://about.me/thusithathilina
>
>


 --
 Thusitha Dayaratne
 Software Engineer
 WSO2 Inc. - lean . enterprise . middleware |  wso2.com

 Mobile  +94712756809
 Blog  alokayasoya.blogspot.com
 Abouthttp://about.me/thusithathilina


>>>
>>>
>>> --
>>>
>>> *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
>>> email: kasung AT spamfree wso2.com
>>> linked-in: http://lk.linkedin.com/in/gajasinghe
>>> blog: http://kasunbg.org
>>>
>>>
>>>
>>
>>
>>
>> --
>> Thusitha Dayaratne
>> Software Engineer
>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>
>> Mobile  +94712756809
>> Blog  alokayasoya.blogspot.com
>> Abouthttp://about.me/thusithathilina
>>
>>
>
>
> --
> Thusitha Dayaratne
> Software Engineer
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> Mobile  +94712756809
> Blog  alokayasoya.blogspot.com
> Abouthttp://about.me/thusithathilina
>
>


-- 

*Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


  1   2   3   4   >