Re: [Dev] Developer Studio changes ordering of XML attributes

2016-06-09 Thread Nuwan Pallewela
Hi Rajeevan,

This behavior happens when we try to format the configuration. We use javax
DocumentBuilder to parse and format and it does not care about the
attribute order, since it's meaningless as far as the standard is
concerned.
This for sure we can fix by manually editing the source configuration but
the concern is it will need some considerable effort to do so. Will it be
worth to spend that much time to fix this now because this is an non
blocking issue and we haven't got any complains about this from customers?
Anyways I think it is better to open a JIRA and keep it to be fixed in a
future.

Thanks,
Nuwan

On Fri, Jun 10, 2016 at 10:22 AM, Vimalanathan Rajeevan 
wrote:

> Hi,
>
> I will explain the issue with the help of Property Mediator. When we are
> adding a property with an expression to a sequence in Graphical Editor, the
> source view for that mediator is as follows,
>
>name="TestProperty" xmlns:m0="http://services.samples;
> xmlns:m1=" http://services.samples/xsd "/>
>
> Here 'expression' is positioned before 'name' of the mediator. IMHO,
> 'name' should be positioned before 'expression'(for better readability) and
> we should try to keep the order as below(from ESB Doc),
>
>  "literal" | expression="xpath") [scope=default|transport|axis2|axis2-client]
> [pattern="regex" [group="integer"]]>
> ?
> 
>
> So I tried to change it from source view but when I switching between
> graphical and source views my changes are removed and ordered by
> alphabetically. It is giving difficulties when we are using Graphical
> Editor and trying to keep some conventions.
> It should be a known issue. Will we be able to fix this?
>
> Appreciate your thoughts on this.
>
> --
> Vimalanathan Rajeevan
> Software Engineer,
> WSO2, Inc. *http://wso2.com* 
> Lean.Enterprise.Middleware
>
> Mobile:
> *+94 773090875 <%2B94%20773090875>*
> LinkedIn:
> *https://www.linkedin.com/in/RajeevanVimalanathan
> *
>



-- 
--

*Nuwan Chamara Pallewela*


*Software Engineer*

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

Email   *nuw...@wso2.com *
Mobile  *+94719079739@*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [CEP] Dynamic key and values support in CEP output adapter

2016-06-09 Thread Rajjaz Mohammed
Hi All,

I'm developing File event publisher as an analytics extension. I have the
requirement to get the key and  values dynamically. How can achieve this in
CEP? any idea?

eg:
uniqueID1--> filePath1
uniqueID2--> filePath2
uniqueID3--> filePath3
uniqueID4--> filePath4


-- 
Thank you
Best Regards

*Rajjaz HM*
Associate Software Engineer
Platform Extension Team
WSO2 Inc. 
lean | enterprise | middleware
Mobile | +94752833834|+94777226874
Email   | raj...@wso2.com
LinkedIn  | Blogger
 | WSO2 Profile

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


Re: [Dev] Encrypting VFS URL

2016-06-09 Thread Yashothara Shanmugarajah
As Isuru mentioned we can fetch parameters from the registry. In file
connector also we have VFS sending facility. We can give values from
Postman. But I am not sure we can use vault-lookup things in that.

Thanks.

Best Regards,
Yashothara.S

Software Engineer
WSO2


On Fri, Jun 10, 2016 at 9:51 AM, Isuru Udana  wrote:

> Hi Manu,
>
> Values for these parameters are set at the deploy time and can only have
> static values.
> Unfortunately there is no way achieve this using vfs proxy.
>
> In inbound endpoints, we have provided a way to fetch parameters from the
> registry.
> However still we cannot use expressions like vault-lookup for inbound
> parameters.
>
> Thanks.
>
>
> On Fri, Jun 10, 2016 at 2:48 AM, Manuranga Perera  wrote:
>
>> I have a FTP secured by a password/username. I want to secure the
>> password.I can use vfs encrypt utils [1], but it is trivially decodable.
>>
>> Is there a way to use a secure vault for this?
>>
>> I tried following
>>
>> http://ws.apache.org/ns/synapse; name="vfsy"
>> transports="https http vfs" startOnLoad="true" trace="disable">
>>
>>   
>>  
>>   
>>
>>
>> *{wso2:vault-lookup('vfsUrl')}*
>>text/plain
>>...
>> 
>>
>> but unfortunately that didn't work
>>
>> [2016-06-09] ERROR - VFSTransportListener Repeatedly failed to resolve
>> the file URI: {wso2:vault-lookup('vfsUrl')}
>> org.apache.commons.vfs2.FileSystemException: Could not find file with URI
>> "{wso2:vault-lookup('vfsUrl')}" because it is a relative path, and no base
>> URI was provided.
>>
>>
>> [1]
>> http://wso2.com/library/articles/2012/01/wso2-esb-example-file-exchanging-hub-part-1/
>>
>> --
>> With regards,
>> *Manu*ranga Perera.
>>
>> phone : 071 7 70 20 50
>> mail : m...@wso2.com
>>
>
>
>
> --
> *Isuru Udana*
> Technical Lead
> WSO2 Inc.; http://wso2.com
> email: isu...@wso2.com cell: +94 77 3791887
> blog: http://mytecheye.blogspot.com/
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Developer Studio changes ordering of XML attributes

2016-06-09 Thread Vimalanathan Rajeevan
Hi,

I will explain the issue with the help of Property Mediator. When we are
adding a property with an expression to a sequence in Graphical Editor, the
source view for that mediator is as follows,

http://services.samples; xmlns:m1="
http://services.samples/xsd "/>

Here 'expression' is positioned before 'name' of the mediator. IMHO, 'name'
should be positioned before 'expression'(for better readability) and we
should try to keep the order as below(from ESB Doc),


?


So I tried to change it from source view but when I switching between
graphical and source views my changes are removed and ordered by
alphabetically. It is giving difficulties when we are using Graphical
Editor and trying to keep some conventions.
It should be a known issue. Will we be able to fix this?

Appreciate your thoughts on this.

-- 
Vimalanathan Rajeevan
Software Engineer,
WSO2, Inc. *http://wso2.com* 
Lean.Enterprise.Middleware

Mobile:
*+94 773090875*
LinkedIn:
*https://www.linkedin.com/in/RajeevanVimalanathan
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Encrypting VFS URL

2016-06-09 Thread Isuru Udana
Hi Manu,

Values for these parameters are set at the deploy time and can only have
static values.
Unfortunately there is no way achieve this using vfs proxy.

In inbound endpoints, we have provided a way to fetch parameters from the
registry.
However still we cannot use expressions like vault-lookup for inbound
parameters.

Thanks.


On Fri, Jun 10, 2016 at 2:48 AM, Manuranga Perera  wrote:

> I have a FTP secured by a password/username. I want to secure the
> password.I can use vfs encrypt utils [1], but it is trivially decodable.
>
> Is there a way to use a secure vault for this?
>
> I tried following
>
> http://ws.apache.org/ns/synapse; name="vfsy"
> transports="https http vfs" startOnLoad="true" trace="disable">
>
>   
>  
>   
>
>*{wso2:vault-lookup('vfsUrl')}*
> 
>text/plain
>...
> 
>
> but unfortunately that didn't work
>
> [2016-06-09] ERROR - VFSTransportListener Repeatedly failed to resolve the
> file URI: {wso2:vault-lookup('vfsUrl')}
> org.apache.commons.vfs2.FileSystemException: Could not find file with URI
> "{wso2:vault-lookup('vfsUrl')}" because it is a relative path, and no base
> URI was provided.
>
>
> [1]
> http://wso2.com/library/articles/2012/01/wso2-esb-example-file-exchanging-hub-part-1/
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



-- 
*Isuru Udana*
Technical Lead
WSO2 Inc.; http://wso2.com
email: isu...@wso2.com cell: +94 77 3791887
blog: http://mytecheye.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSOC 16] Initial Project Progress

2016-06-09 Thread Isuru Haththotuwa
Hi Osura,

This is great progress! This shows that a clustered deployment of WSO2
products on Azure is possible with this membership scheme.

About the error, what is says is that a particular resource that the first
node is expecting to find in the config registry is not found. This can be
due to a mis-configured registry mounts. Did you mount the config and
governance registries? If not please do so by referring [1].

Lets schedule a code review early next week for the membership scheme.

[1]. https://docs.wso2.com/display/CLUSTER44x/Setting+up+the+Database

On Fri, Jun 10, 2016 at 12:42 AM, Osura Rathnayake 
wrote:

> Hi Mentors,
>
> I have two application servers (AS) running on azure and I'm testing the
> azure membership scheme on them. When I run the first AS I could see member
> added and member joined log messages. And when I run the second AS, I could
> see member added log messages and then I get an error saying carbon
> initialization failed (screenshot attached as error6). Also when I stopped
> the second AS I could see member left log message on the first AS(
> screenshot attached as Capture1).
>
> Afterwards I stopped both of them and started the second AS first and it
> ran without errors but the other AS( previous case I started this AS first)
> showed up the same error which I got earlier. I'm getting this error always
> from the secondly started AS. Please share with me if you have any idea why
> I'm getting this.
>
> Thanks,
>
> On Mon, Jun 6, 2016 at 4:16 PM, Osura Rathnayake 
> wrote:
>
>> Hi all,
>>
>> This is the summary of the matters that we discussed during hangout we
>> had on 6th of June, 2016.
>>
>> We had a productive discussion on how to pass the azure specific
>> parameters to the Azure membership scheme and how we should test the Azure
>> membership scheme
>>
>> Current progress : Getting a list of IP addresses of members in the
>> cluster and updating the hazelcast configuration are done but certain azure
>> specific parameters are hard coded in the program.
>>
>> As in kubernetes membership scheme, we agreed upon sending those
>> parameters as either environment variables or system properties. So the
>> next immediate goal is to get those parameters that way. As of how to test
>> the azure membership scheme, [1] was shared get a more clear idea on the
>> subject.
>>
>>
>> [1]
>> https://docs.wso2.com/display/KA100/Kubernetes+Membership+Scheme+for+WSO2+Carbon
>>
>>
>> Thanks,
>>
>>
>>
>> On Mon, Jun 6, 2016 at 1:21 PM, Osura Rathnayake 
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> Thank you very much. Okay will have a hangout today at 3.00 pm.
>>>
>>> thanks,
>>>
>>> On Mon, Jun 6, 2016 at 10:37 AM, Isuru Haththotuwa 
>>> wrote:
>>>
 Hi Osura,

 You need to test the membership scheme following the same method that
 we use for the Kuberntes Membership scheme. Please refer the README [1].
 The only difference is that you will be deploying in Azure.

 Please note the parameters that are added to the axis2.xml:

 membershipSchemeClassName, membershipScheme, KUBERNETES_MASTER,
 KUBERNETES_SERVICES, etc.

 membershipSchemeClassName is the fully qualified classname for the
 relevant Membership Scheme class that you have written. Carbon will try to
 load that class using the class name.
 membershipScheme should be 'azure' or any other suitable name
 KUBERNETES_MASTER and KUBERNETES_SERVICES are the API endpoint and the
 Kubernetes Service Name(s) to be considered in the cluster. You need to
 change these parameters according to your case, reflecting the Azure
 deployment (using Azure API endpoint and the Network Security Group as you
 mentioned in a previous reply, etc.).

 Lets have a hangout today at 3.00 PM if you are free at that time to
 discuss more.

 [1].
 https://github.com/wso2/kubernetes-artifacts/tree/master/common/kubernetes-membership-scheme

 On Fri, Jun 3, 2016 at 11:18 PM, Osura Rathnayake 
 wrote:

> Hi mentors,
>
> please find the updated membership scheme here [1].
> Can you please tell me how to test the membership scheme? Also how can
> I get the parameters that are passed into the constructor of the 
> membership
> class? Also where is the membership class invoked.
>
> [1]https://github.com/osuran/azure-membership-scheme
>
> Thanks,
>
>
>
>
> On Thu, Jun 2, 2016 at 10:38 AM, Imesh Gunaratne 
> wrote:
>
>>
>>
>> On Thu, Jun 2, 2016 at 10:33 AM, Osura Rathnayake > > wrote:
>>
>>> Hi mentors,
>>>
>>> When developing the membership scheme, from where can I get
>>> the HazelcastMembershipScheme interface? I Googled but couldn't find an
>>> appropriate jar file or anything. the one that netbeans suggests also

Re: [Dev] Exception handling in Spark UDF

2016-06-09 Thread Gimantha Bandara
You will have to catch the exception inside the method itself and log a
warning/error meesage and return a default value without throwing the
exception out from the method.

On Friday, June 10, 2016, Dulitha Wijewantha  wrote:

> Below is an example usage -
>
> insert overwrite table TABLE_NAME select date, count(distinct sessionKey)
> as activity, appKey, role, first(y.dateDisplay) as dateDisplay from (select
> sessionKey as sessionKey,  dateFormatter(timestamp, "MM/dd/ HH:mm",
> "-MM-dd:HH") as dateDisplay, appKey as appKey, clientModel as role,
> dateConvertor(timestamp, "MM/dd/ HH:mm", "HOUR") as date  from
> eventStatData) as y group by y.date, y.appKey, y.role;
>
>
>
> On Thu, Jun 9, 2016 at 4:13 PM, Sachith Withana  > wrote:
>
>> Hi Dulitha,
>>
>> Can you provide the query that you are using?
>>
>> That would help us give you a better solution I guess.
>>
>> Regards,
>> Sachith
>>
>> On Thu, Jun 9, 2016 at 2:34 PM, Dulitha Wijewantha > > wrote:
>>
>>> Hi guys,
>>> I have written a customer Spark UDF function that allows me to convert a
>>> date string to a given input format. If there is a ParseException due to
>>> input being invalid - the whole spark script will stop execution. Is there
>>> away to skip that particular iteration and move on to the next in the
>>> record? (this function is used in where clauses). Or is there a better
>>> recommendation for this? Like validation in the EventReceiver?
>>>
>>> public String dateFormatter(String input, String fromFormat, String
>>> toFormat) throws ParseException{
>>> SimpleDateFormat sdf = new SimpleDateFormat(fromFormat);
>>> Date date = sdf.parse(input);
>>> SimpleDateFormat newFormatter = new SimpleDateFormat(toFormat);
>>> return newFormatter.format(date);
>>> }
>>>
>>> Cheers~
>>>
>>> --
>>> Dulitha Wijewantha (Chan)
>>> Software Engineer - Mobile Development
>>> WSO2 Inc
>>> Lean.Enterprise.Middleware
>>>  * ~Email   duli...@wso2.com
>>> *
>>> *  ~Mobile +94712112165 <%2B94712112165>*
>>> *  ~Website   dulitha.me *
>>> *  ~Twitter @dulitharw *
>>>   *~Github @dulichan *
>>>   *~SO @chan *
>>>
>>
>>
>>
>> --
>> Sachith Withana
>> Software Engineer; WSO2 Inc.; http://wso2.com
>> E-mail: sachith AT wso2.com
>> M: +94715518127
>> Linked-In: 
>> https://lk.linkedin.com/in/sachithwithana
>>
>
>
>
> --
> Dulitha Wijewantha (Chan)
> Software Engineer - Mobile Development
> WSO2 Inc
> Lean.Enterprise.Middleware
>  * ~Email   duli...@wso2.com
> *
> *  ~Mobile +94712112165*
> *  ~Website   dulitha.me *
> *  ~Twitter @dulitharw *
>   *~Github @dulichan *
>   *~SO @chan *
>


-- 
Gimantha Bandara
Software Engineer
WSO2. Inc : http://wso2.com
Mobile : +94714961919
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.6 RC2

2016-06-09 Thread Rajith Roshan
Hi all,

We were able to build the G-Reg pack and able to run all the integration
tests without failures. We will send PRs for jasper report orbit bundle and
carbon commons, once the kernel 4.4.6 is released.

Thanks!
Rajith

On Thu, Jun 9, 2016 at 6:40 PM, Viraj Senevirathne  wrote:

> Hi All,
>
> We were able to build the ESB pack after including velocity bundle to the
> mediator feature. Now we are running integration tests with the pack. Will
> update the thread with results.
>
> Regards,
>
> On Thu, Jun 9, 2016 at 10:39 AM, Rajith Roshan  wrote:
>
>> Hi all,
>>
>> Since jasper reports orbit bundle requires org.apache.velocity and
>> org.apache.poi.* packages, we need to upgrade the import package versions
>> for those packages in jasper orbit bundle. Subsequently carbon-commons
>> release would be required  with updated jasper orbit bundle version. We
>> will send the PRs with the relevant changes.
>> Currently we are running integration tests for product-greg.
>>
>> Thanks!
>> Rajith
>>
>> On Wed, Jun 8, 2016 at 12:20 PM, Kalpa Welivitigoda 
>> wrote:
>>
>>> [+Ayoma, Dulanja]
>>>
>>>
>>> On Wed, Jun 8, 2016 at 12:17 PM, Anupama Pathirage 
>>> wrote:
>>>
 Hi Kalpa,

 Thanks for the update.  Please update us with the solution for CSRF
 security issue. We get the same issue for  the DSS try it as well.

 [2016-06-08 11:55:28,396]  WARN {org.owasp.csrfguard.log.JavaLogger} -
 potential cross-site request forgery (CSRF) attack thwarted
 (user:, ip:10.100.7.118, method:POST,
 uri:/carbon/admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp, error:required
 token is missing from the request)

 Private proxy protocol will be attempted as cross-domain browser
 restrictions might be enforced for this endpoint.

 http://tryit.carbon.wso2.org;>
Error connecting to the Tryit ajax proxy
 

 Regards,

 On Wed, Jun 8, 2016 at 8:45 AM, Kasun Bandara  wrote:

> Hi All,
>
> We have done the fix for L1 reported in [1] yesterday.
>
> Thanks,
> Kasun.
>
> [1] https://wso2.org/jira/browse/IDENTITY-4656
>
> On Wed, Jun 8, 2016 at 7:00 AM, Kalpa Welivitigoda 
> wrote:
>
>> Hi Anupama,
>>
>> On Tue, Jun 7, 2016 at 8:45 PM, Anupama Pathirage 
>> wrote:
>>
>>> Hi Kalpa,
>>>
>>> Checked the suggested approaches and those two issues were resolved
>>> after applying both changes. We will further test the service with the
>>> Carbon RC2.
>>>
>>> On Tue, Jun 7, 2016 at 6:15 PM, Kalpa Welivitigoda 
>>> wrote:
>>>
 Hi Anupama,

 On Tue, Jun 7, 2016 at 5:50 PM, Anupama Pathirage  wrote:

> Hi,
>
> We got the following issues when testing WSO2 DSS with the Kernel
> RC2 Release.
>
> *1) *Any action on management console gives the following error.
> It seems to be related with the tomcat upgrade and appreciate your 
> input on
> this.
>
> [2016-06-07 17:21:16,905] ERROR
> {org.apache.coyote.AbstractProtocol$AbstractConnectionHandler} -  
> Error
> reading request, ignored
> java.lang.NoSuchMethodError:
> org.apache.coyote.Request.getBytesRead()I
> at
> org.apache.coyote.RequestInfo.updateCounters(RequestInfo.java:143)
> at org.apache.coyote.Request.updateCounters(Request.java:533)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1140)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1749)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1708)
> 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)
>

 Yes, it is due to the tomcat upgrade in kernel, relevant fixes for
 carbon-deployment are already there in 4.6.2-SNAPSHOT. We have to do a
 deployment release once we release 4.4.6-SNAPSHOT. For the moment, for
 testing purpose, is it possible you try with 4.6.2-SNAPSHOT?

>>>
>>> Could you please do the needful to release the carbon-deployment
>>> 4.6.2 as DSS 3.5.1 release will be on hold until it is done.
>>>
>>

[Dev] Encrypting VFS URL

2016-06-09 Thread Manuranga Perera
I have a FTP secured by a password/username. I want to secure the
password.I can use vfs encrypt utils [1], but it is trivially decodable.

Is there a way to use a secure vault for this?

I tried following

http://ws.apache.org/ns/synapse; name="vfsy"
transports="https http vfs" startOnLoad="true" trace="disable">
   
  
 
  
   
   *{wso2:vault-lookup('vfsUrl')}*

   text/plain
   ...


but unfortunately that didn't work

[2016-06-09] ERROR - VFSTransportListener Repeatedly failed to resolve the
file URI: {wso2:vault-lookup('vfsUrl')}
org.apache.commons.vfs2.FileSystemException: Could not find file with URI
"{wso2:vault-lookup('vfsUrl')}" because it is a relative path, and no base
URI was provided.


[1]
http://wso2.com/library/articles/2012/01/wso2-esb-example-file-exchanging-hub-part-1/

-- 
With regards,
*Manu*ranga Perera.

phone : 071 7 70 20 50
mail : m...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Exception handling in Spark UDF

2016-06-09 Thread Dulitha Wijewantha
Below is an example usage -

insert overwrite table TABLE_NAME select date, count(distinct sessionKey)
as activity, appKey, role, first(y.dateDisplay) as dateDisplay from (select
sessionKey as sessionKey,  dateFormatter(timestamp, "MM/dd/ HH:mm",
"-MM-dd:HH") as dateDisplay, appKey as appKey, clientModel as role,
dateConvertor(timestamp, "MM/dd/ HH:mm", "HOUR") as date  from
eventStatData) as y group by y.date, y.appKey, y.role;



On Thu, Jun 9, 2016 at 4:13 PM, Sachith Withana  wrote:

> Hi Dulitha,
>
> Can you provide the query that you are using?
>
> That would help us give you a better solution I guess.
>
> Regards,
> Sachith
>
> On Thu, Jun 9, 2016 at 2:34 PM, Dulitha Wijewantha 
> wrote:
>
>> Hi guys,
>> I have written a customer Spark UDF function that allows me to convert a
>> date string to a given input format. If there is a ParseException due to
>> input being invalid - the whole spark script will stop execution. Is there
>> away to skip that particular iteration and move on to the next in the
>> record? (this function is used in where clauses). Or is there a better
>> recommendation for this? Like validation in the EventReceiver?
>>
>> public String dateFormatter(String input, String fromFormat, String
>> toFormat) throws ParseException{
>> SimpleDateFormat sdf = new SimpleDateFormat(fromFormat);
>> Date date = sdf.parse(input);
>> SimpleDateFormat newFormatter = new SimpleDateFormat(toFormat);
>> return newFormatter.format(date);
>> }
>>
>> Cheers~
>>
>> --
>> Dulitha Wijewantha (Chan)
>> Software Engineer - Mobile Development
>> WSO2 Inc
>> Lean.Enterprise.Middleware
>>  * ~Email   duli...@wso2.com *
>> *  ~Mobile +94712112165 <%2B94712112165>*
>> *  ~Website   dulitha.me *
>> *  ~Twitter @dulitharw *
>>   *~Github @dulichan *
>>   *~SO @chan *
>>
>
>
>
> --
> Sachith Withana
> Software Engineer; WSO2 Inc.; http://wso2.com
> E-mail: sachith AT wso2.com
> M: +94715518127
> Linked-In: 
> https://lk.linkedin.com/in/sachithwithana
>



-- 
Dulitha Wijewantha (Chan)
Software Engineer - Mobile Development
WSO2 Inc
Lean.Enterprise.Middleware
 * ~Email   duli...@wso2.com *
*  ~Mobile +94712112165*
*  ~Website   dulitha.me *
*  ~Twitter @dulitharw *
  *~Github @dulichan *
  *~SO @chan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Exception handling in Spark UDF

2016-06-09 Thread Sachith Withana
Hi Dulitha,

Can you provide the query that you are using?

That would help us give you a better solution I guess.

Regards,
Sachith

On Thu, Jun 9, 2016 at 2:34 PM, Dulitha Wijewantha  wrote:

> Hi guys,
> I have written a customer Spark UDF function that allows me to convert a
> date string to a given input format. If there is a ParseException due to
> input being invalid - the whole spark script will stop execution. Is there
> away to skip that particular iteration and move on to the next in the
> record? (this function is used in where clauses). Or is there a better
> recommendation for this? Like validation in the EventReceiver?
>
> public String dateFormatter(String input, String fromFormat, String
> toFormat) throws ParseException{
> SimpleDateFormat sdf = new SimpleDateFormat(fromFormat);
> Date date = sdf.parse(input);
> SimpleDateFormat newFormatter = new SimpleDateFormat(toFormat);
> return newFormatter.format(date);
> }
>
> Cheers~
>
> --
> Dulitha Wijewantha (Chan)
> Software Engineer - Mobile Development
> WSO2 Inc
> Lean.Enterprise.Middleware
>  * ~Email   duli...@wso2.com *
> *  ~Mobile +94712112165 <%2B94712112165>*
> *  ~Website   dulitha.me *
> *  ~Twitter @dulitharw *
>   *~Github @dulichan *
>   *~SO @chan *
>



-- 
Sachith Withana
Software Engineer; WSO2 Inc.; http://wso2.com
E-mail: sachith AT wso2.com
M: +94715518127
Linked-In: https://lk.linkedin.com/in/sachithwithana
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS] RESTful Fine Grained Authorization-as-a-Service (AZaaS)

2016-06-09 Thread Manujith Pallewatte
Hi Pushpalanka,

Was confused in the PR procedure, and figured that I forgot to initialize
the github repo as you have mentioned in a previous message.
So the new location of the codebase is at [1]
Over the weekend, I'll fix any remaining issues and send the PR
For now I have used the wso2-codestyle given by Omindu and reformatted the
code
and added Findbug as well.

Thank You
Manujith

[1]
https://github.com/ManZzup/identity-framework/tree/master/components/entitlement/org.wso2.carbon.identity.entitlement.endpoint

On Wed, Jun 8, 2016 at 11:35 AM, Pushpalanka Jayawardhana 
wrote:

>
>
> On Tue, Jun 7, 2016 at 11:01 AM, Manujith Pallewatte <
> manujith...@gmail.com> wrote:
>
>> Hi all,
>>
>> Code is almost all refracted (apart from the part where authenticators
>> are hard coded) and it' is available at [1]
>> I have attached a readme so everyone can help with testing it. But
>> there's still an issue remaining to debug with the *entitled-attribs *service
>> call, that came up in preliminary testing by Omindu.
>>
>> Thank You Omindu, I will use the formatting configs and format the code
>> asap. For now i added a gitignore as in the sample you sent, but I left 
>> *target
>> *directory intact so that i can share the war file through the repo.
>>
>> Also for the PR, to which repo should I send the PR for? Or shall I wait
>> for further testing of the code so that we can minimize any bugs?
>>
> If code refactoring, formatting, cleanup are done, you have run Findbug
> plugin(This is a plugin that can integrate to IDE. If you already haven't
> try it.) and fixed any issues reported against code and functionality is
> working, we are OK to review the code. You can further test the code and
> fix the bugs while integrating any review comments we put on the PR.
>
> "Please share the code progress via Github, once you are satisfied with
> refactoring.
> Please fork [1] to your private repo, and at location [2], you may have a
> new component named 'org.wso2.carbon.identity.entitlement.endpoint' where
> the implementation can reside.
>
> [1] - https://github.com/wso2/carbon-identity-framework
> [2] -
> https://github.com/wso2/carbon-identity-framework/tree/master/components/entitlement
> "
>
>>
>> [1] https://github.com/ManZzup/identity-entitlement-endpoint
>>
>> Thank You,
>> Best Regards
>> Manujith
>>
>> On Tue, Jun 7, 2016 at 10:30 AM, Omindu Rathnaweera 
>> wrote:
>>
>>> Adding a .gitignore to the repo will be the easiest way to keep the
>>> unwanted files away from the repo. See [1].
>>>
>>> [1] -
>>> https://github.com/wso2/carbon-identity-framework/blob/master/.gitignore
>>>
>>> Regards,
>>> Omindu
>>>
>>> On Tue, Jun 7, 2016 at 10:26 AM, Pushpalanka Jayawardhana <
>>> la...@wso2.com> wrote:
>>>
 Hi Manujith,

 The IDE specific files(.iml) or code can be removed from the repository.
 Once the code refactoring is done and code is cleaned please feel free
 to send the PR. Then we can easily comment on the code.

 Thanks,
 Pushpalanka


 On Tue, Jun 7, 2016 at 10:12 AM, Omindu Rathnaweera 
 wrote:

> Hi Manujith,
>
> Better if you can clean up the unnecessary code and do some code
> refactoring. We can do another round of testing once you fix the issues I
> have mention. You can use the attached Idea Code Formatting Template [1].
>
> To apply the template, follow the steps below.
>
> 1. In IDEA settings, goto Editor -> Code Style.
> 2. Click 'Manage' then 'Save As...' an existing scheme with the name
> 'wso2-codestyle' and Close the IDE.
> 3. Goto ~/.IntelliJIdea16/config/codestyles directory and replace the
> 'wso2-codestyle.xml' file with the attached one.
>
> [1] -
> https://drive.google.com/file/d/0BzRDbfbIaYjCSzhGRUR1aGdlTXM/view?usp=sharing
>
> Regards,
> Omindu.
>
>
> On Mon, Jun 6, 2016 at 8:29 AM, Manujith Pallewatte <
> manujith...@gmail.com> wrote:
>
>> Hi all,
>>
>> After a bit of refactoring I added the code to [1]. Please feel free
>> to check the source and give your ideas to improve, specially on the
>> service related code. All the service related code is available at [2]
>>
>> Also Omindu tested the initial war file and reported several issues
>> with it, hoping to debug those within the week
>>
>>
>> [1] https://github.com/ManZzup/identity-entitlement-endpoint
>> [2]
>> https://github.com/ManZzup/identity-entitlement-endpoint/blob/master/src/main/java/org/wso2/carbon/identity/entitlement/provider/resources/DecisionResource.java
>>
>> On Wed, Jun 1, 2016 at 10:21 AM, Pushpalanka Jayawardhana <
>> la...@wso2.com> wrote:
>>
>>> Hi Manujith,
>>>
>>> Please share the code progress via Github, once you are satisfied
>>> with refactoring.
>>> Please fork [1] to your private repo, and at location [2], you may
>>> 

[Dev] Exception handling in Spark UDF

2016-06-09 Thread Dulitha Wijewantha
Hi guys,
I have written a customer Spark UDF function that allows me to convert a
date string to a given input format. If there is a ParseException due to
input being invalid - the whole spark script will stop execution. Is there
away to skip that particular iteration and move on to the next in the
record? (this function is used in where clauses). Or is there a better
recommendation for this? Like validation in the EventReceiver?

public String dateFormatter(String input, String fromFormat, String
toFormat) throws ParseException{
SimpleDateFormat sdf = new SimpleDateFormat(fromFormat);
Date date = sdf.parse(input);
SimpleDateFormat newFormatter = new SimpleDateFormat(toFormat);
return newFormatter.format(date);
}

Cheers~

-- 
Dulitha Wijewantha (Chan)
Software Engineer - Mobile Development
WSO2 Inc
Lean.Enterprise.Middleware
 * ~Email   duli...@wso2.com *
*  ~Mobile +94712112165*
*  ~Website   dulitha.me *
*  ~Twitter @dulitharw *
  *~Github @dulichan *
  *~SO @chan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GREG] Invalid value error for REG_CREATED_TIME column in REG_RESOURCE with mysql 5.7

2016-06-09 Thread Uvindra Dias Jayasinha
Note that the above feature(auto initialize time stamp columns) was
introduced in MYSQL 5.6.5[1], so this kind of change to the scripts will
not be compatible with older MySQL versions.


[1]
http://dev.mysql.com/doc/refman/5.6/en/timestamp-initialization.html#idm139923373307456

On 9 June 2016 at 22:50, Uvindra Dias Jayasinha  wrote:

> Lets just try DEFAULT CURRENT_TIMESTAMP for all TIMESTAMP fields.
>
> Avoid using ON UPDATE CURRENT_TIMESTAMP, our code already explicitly
> updates time stamp fields where required so we do not want MySQL to do this
> for us.
>
> On 9 June 2016 at 22:43, Sewmini Jayaweera  wrote:
>
>> [Adding Uvindra and Maduranga]
>>
>> Sewmini Jayaweera
>> *Software Engineer - QA Team*
>> Mobile: +94 (0) 773 381 250
>> sewm...@wso2.com
>>
>> On Thu, Jun 9, 2016 at 12:16 PM, Sewmini Jayaweera 
>> wrote:
>>
>>> Hi All,
>>>
>>> I get "ERROR 1067 (42000): Invalid default value for
>>> 'REG_LAST_UPDATED_TIME' error when sourcing
>>> '/dbscripts/mysql.sql, even after removing 'DEFAULT 0'
>>>  Please find further information below.
>>>
>>> *1. Issue description*
>>>
>>> CREATE TABLE IF NOT EXISTS REG_RESOURCE(
>>> REG_PATH_ID INTEGER NOT NULL,
>>> REG_NAMEVARCHAR(256),
>>> REG_VERSION INTEGER NOT NULL AUTO_INCREMENT,
>>> REG_MEDIA_TYPE  VARCHAR(500),
>>> REG_CREATOR VARCHAR(31) NOT NULL,
>>> REG_CREATED_TIMETIMESTAMP NOT NULL,
>>> REG_LAST_UPDATORVARCHAR(31),
>>> REG_LAST_UPDATED_TIMETIMESTAMP NOT NULL,
>>> REG_DESCRIPTION VARCHAR(1000),
>>> REG_CONTENT_ID  INTEGER,
>>> REG_TENANT_ID INTEGER DEFAULT 0,
>>> REG_UUID VARCHAR(100) NOT NULL,
>>> CONSTRAINT PK_REG_RESOURCE PRIMARY KEY(REG_VERSION,
>>> REG_TENANT_ID)
>>> )ENGINE INNODB;
>>>
>>> When creating above table "ERROR 1067 (42000): Invalid default value for
>>> 'REG_LAST_UPDATED_TIME' error occurred and table didn't get created. Please
>>> note that this error shows *only when there are two timestamp columns* 
>>> (REG_CREATED_TIME
>>> and REG_LAST_UPDATED_TIME) in the table.
>>>
>>> *2. What happens when there are two time stamp columns?*
>>>
>>> According to [1] when we have two timestamp columns not declared an
>>> explicit 'DEFAULT' or 'ON UPDATE' clause, first column is automatically
>>> assigned the DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP
>>> attributes, while the second one is assigned the '-00-00 00:00:00' (the
>>> “zero” timestamp).
>>>
>>> *3. Why are we getting the Error explained In issue description?*
>>>
>>> When 'strict SQL mode' and ' NO_ZERO_DATE' mode is enabled in MySQL
>>> server the “zero” timestamp is not allowed and it gives an error [2]. In
>>> MySQL 5.7 by default 'NO_ZERO_DATE' mode is enabled.
>>>
>>> *4.Question*
>>>
>>> As a fix I found below
>>>  1. Setting MySQL mode to  'ALLOW_INVALID_DATES' [3].
>>> EX: SET SQL_MODE='ALLOW_INVALID_DATES';
>>>
>>> *Is it okay to use this or is there a much more appropriate way of doing
>>> that? *
>>>
>>> [1].
>>> http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_explicit_defaults_for_timestamp
>>> [2].
>>> http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_zero_date
>>> [3].
>>> http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_allow_invalid_dates
>>>
>>>
>>> Thank You,
>>> Best Regards,
>>> Sewmini.
>>>
>>>
>>>
>>> Sewmini Jayaweera
>>> *Software Engineer - QA Team*
>>> Mobile: +94 (0) 773 381 250
>>> sewm...@wso2.com
>>>
>>> On Wed, May 25, 2016 at 12:13 PM, Kishanthan Thangarajah <
>>> kishant...@wso2.com> wrote:
>>>
 We can verify and fix this for 4.4.6.

 On Tue, May 24, 2016 at 3:17 PM, Nuwan Dias  wrote:

> This issue is still open.
>
> If we don't fix this before kernel 4.4.6, none of our new products are
> going to be compatible with MySQL 5.7. Which would be a major limitation 
> in
> the platform.
>
> Thanks,
> NuwanD.
>
> On Tue, May 10, 2016 at 4:15 PM, Chandana Napagoda 
> wrote:
>
>> Hi Janaka,
>>
>> Please note that, this fix will be available in the next kernel
>> release.
>>
>> Regards,
>> Chandana
>> On May 10, 2016 3:14 PM, "Thilini Cooray"  wrote:
>>
>>> Hi,
>>>
>>> A public JIRA is raised in [1].
>>>
>>> [1] https://wso2.org/jira/browse/REGISTRY-3610
>>>
>>> Thanks.
>>>
>>> On Tue, May 10, 2016 at 12:11 PM, Janaka Ranabahu 
>>> wrote:
>>>
 Hi Thushara

 On Tue, May 10, 2016 at 12:06 PM, Thushara Ranawaka <
 thusha...@wso2.com> wrote:

> Hi Thilini,
>
> AFAIU you workaround need to be updated with the current
> timestamp[1][2]. 

Re: [Dev] [GREG] Invalid value error for REG_CREATED_TIME column in REG_RESOURCE with mysql 5.7

2016-06-09 Thread Uvindra Dias Jayasinha
Lets just try DEFAULT CURRENT_TIMESTAMP for all TIMESTAMP fields.

Avoid using ON UPDATE CURRENT_TIMESTAMP, our code already explicitly
updates time stamp fields where required so we do not want MySQL to do this
for us.

On 9 June 2016 at 22:43, Sewmini Jayaweera  wrote:

> [Adding Uvindra and Maduranga]
>
> Sewmini Jayaweera
> *Software Engineer - QA Team*
> Mobile: +94 (0) 773 381 250
> sewm...@wso2.com
>
> On Thu, Jun 9, 2016 at 12:16 PM, Sewmini Jayaweera 
> wrote:
>
>> Hi All,
>>
>> I get "ERROR 1067 (42000): Invalid default value for
>> 'REG_LAST_UPDATED_TIME' error when sourcing
>> '/dbscripts/mysql.sql, even after removing 'DEFAULT 0'
>>  Please find further information below.
>>
>> *1. Issue description*
>>
>> CREATE TABLE IF NOT EXISTS REG_RESOURCE(
>> REG_PATH_ID INTEGER NOT NULL,
>> REG_NAMEVARCHAR(256),
>> REG_VERSION INTEGER NOT NULL AUTO_INCREMENT,
>> REG_MEDIA_TYPE  VARCHAR(500),
>> REG_CREATOR VARCHAR(31) NOT NULL,
>> REG_CREATED_TIMETIMESTAMP NOT NULL,
>> REG_LAST_UPDATORVARCHAR(31),
>> REG_LAST_UPDATED_TIMETIMESTAMP NOT NULL,
>> REG_DESCRIPTION VARCHAR(1000),
>> REG_CONTENT_ID  INTEGER,
>> REG_TENANT_ID INTEGER DEFAULT 0,
>> REG_UUID VARCHAR(100) NOT NULL,
>> CONSTRAINT PK_REG_RESOURCE PRIMARY KEY(REG_VERSION,
>> REG_TENANT_ID)
>> )ENGINE INNODB;
>>
>> When creating above table "ERROR 1067 (42000): Invalid default value for
>> 'REG_LAST_UPDATED_TIME' error occurred and table didn't get created. Please
>> note that this error shows *only when there are two timestamp columns* 
>> (REG_CREATED_TIME
>> and REG_LAST_UPDATED_TIME) in the table.
>>
>> *2. What happens when there are two time stamp columns?*
>>
>> According to [1] when we have two timestamp columns not declared an
>> explicit 'DEFAULT' or 'ON UPDATE' clause, first column is automatically
>> assigned the DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP
>> attributes, while the second one is assigned the '-00-00 00:00:00' (the
>> “zero” timestamp).
>>
>> *3. Why are we getting the Error explained In issue description?*
>>
>> When 'strict SQL mode' and ' NO_ZERO_DATE' mode is enabled in MySQL
>> server the “zero” timestamp is not allowed and it gives an error [2]. In
>> MySQL 5.7 by default 'NO_ZERO_DATE' mode is enabled.
>>
>> *4.Question*
>>
>> As a fix I found below
>>  1. Setting MySQL mode to  'ALLOW_INVALID_DATES' [3].
>> EX: SET SQL_MODE='ALLOW_INVALID_DATES';
>>
>> *Is it okay to use this or is there a much more appropriate way of doing
>> that? *
>>
>> [1].
>> http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_explicit_defaults_for_timestamp
>> [2].
>> http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_zero_date
>> [3].
>> http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_allow_invalid_dates
>>
>>
>> Thank You,
>> Best Regards,
>> Sewmini.
>>
>>
>>
>> Sewmini Jayaweera
>> *Software Engineer - QA Team*
>> Mobile: +94 (0) 773 381 250
>> sewm...@wso2.com
>>
>> On Wed, May 25, 2016 at 12:13 PM, Kishanthan Thangarajah <
>> kishant...@wso2.com> wrote:
>>
>>> We can verify and fix this for 4.4.6.
>>>
>>> On Tue, May 24, 2016 at 3:17 PM, Nuwan Dias  wrote:
>>>
 This issue is still open.

 If we don't fix this before kernel 4.4.6, none of our new products are
 going to be compatible with MySQL 5.7. Which would be a major limitation in
 the platform.

 Thanks,
 NuwanD.

 On Tue, May 10, 2016 at 4:15 PM, Chandana Napagoda 
 wrote:

> Hi Janaka,
>
> Please note that, this fix will be available in the next kernel
> release.
>
> Regards,
> Chandana
> On May 10, 2016 3:14 PM, "Thilini Cooray"  wrote:
>
>> Hi,
>>
>> A public JIRA is raised in [1].
>>
>> [1] https://wso2.org/jira/browse/REGISTRY-3610
>>
>> Thanks.
>>
>> On Tue, May 10, 2016 at 12:11 PM, Janaka Ranabahu 
>> wrote:
>>
>>> Hi Thushara
>>>
>>> On Tue, May 10, 2016 at 12:06 PM, Thushara Ranawaka <
>>> thusha...@wso2.com> wrote:
>>>
 Hi Thilini,

 AFAIU you workaround need to be updated with the current
 timestamp[1][2]. Setting default value to zero is not nice. You might 
 have
 to figure out the correct syntax for other DB types and test against 
 them.

>>> ​What Thilini is pointing is an issue in the Registry database
>>> creation script. Hence we will create a public JIRA and assign it to you
>>> guys. Please fix them.
>>>
>>> We can not modify the Registry database creation script since API
>>> Manager would not capture the complete scenarios of G-Reg.
>>>

Re: [Dev] [GREG] Invalid value error for REG_CREATED_TIME column in REG_RESOURCE with mysql 5.7

2016-06-09 Thread Sewmini Jayaweera
[Adding Uvindra and Maduranga]

Sewmini Jayaweera
*Software Engineer - QA Team*
Mobile: +94 (0) 773 381 250
sewm...@wso2.com

On Thu, Jun 9, 2016 at 12:16 PM, Sewmini Jayaweera  wrote:

> Hi All,
>
> I get "ERROR 1067 (42000): Invalid default value for
> 'REG_LAST_UPDATED_TIME' error when sourcing
> '/dbscripts/mysql.sql, even after removing 'DEFAULT 0'
>  Please find further information below.
>
> *1. Issue description*
>
> CREATE TABLE IF NOT EXISTS REG_RESOURCE(
> REG_PATH_ID INTEGER NOT NULL,
> REG_NAMEVARCHAR(256),
> REG_VERSION INTEGER NOT NULL AUTO_INCREMENT,
> REG_MEDIA_TYPE  VARCHAR(500),
> REG_CREATOR VARCHAR(31) NOT NULL,
> REG_CREATED_TIMETIMESTAMP NOT NULL,
> REG_LAST_UPDATORVARCHAR(31),
> REG_LAST_UPDATED_TIMETIMESTAMP NOT NULL,
> REG_DESCRIPTION VARCHAR(1000),
> REG_CONTENT_ID  INTEGER,
> REG_TENANT_ID INTEGER DEFAULT 0,
> REG_UUID VARCHAR(100) NOT NULL,
> CONSTRAINT PK_REG_RESOURCE PRIMARY KEY(REG_VERSION,
> REG_TENANT_ID)
> )ENGINE INNODB;
>
> When creating above table "ERROR 1067 (42000): Invalid default value for
> 'REG_LAST_UPDATED_TIME' error occurred and table didn't get created. Please
> note that this error shows *only when there are two timestamp columns* 
> (REG_CREATED_TIME
> and REG_LAST_UPDATED_TIME) in the table.
>
> *2. What happens when there are two time stamp columns?*
>
> According to [1] when we have two timestamp columns not declared an
> explicit 'DEFAULT' or 'ON UPDATE' clause, first column is automatically
> assigned the DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP
> attributes, while the second one is assigned the '-00-00 00:00:00' (the
> “zero” timestamp).
>
> *3. Why are we getting the Error explained In issue description?*
>
> When 'strict SQL mode' and ' NO_ZERO_DATE' mode is enabled in MySQL server
> the “zero” timestamp is not allowed and it gives an error [2]. In MySQL 5.7
> by default 'NO_ZERO_DATE' mode is enabled.
>
> *4.Question*
>
> As a fix I found below
>  1. Setting MySQL mode to  'ALLOW_INVALID_DATES' [3].
> EX: SET SQL_MODE='ALLOW_INVALID_DATES';
>
> *Is it okay to use this or is there a much more appropriate way of doing
> that? *
>
> [1].
> http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_explicit_defaults_for_timestamp
> [2].
> http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_zero_date
> [3].
> http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_allow_invalid_dates
>
>
> Thank You,
> Best Regards,
> Sewmini.
>
>
>
> Sewmini Jayaweera
> *Software Engineer - QA Team*
> Mobile: +94 (0) 773 381 250
> sewm...@wso2.com
>
> On Wed, May 25, 2016 at 12:13 PM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> We can verify and fix this for 4.4.6.
>>
>> On Tue, May 24, 2016 at 3:17 PM, Nuwan Dias  wrote:
>>
>>> This issue is still open.
>>>
>>> If we don't fix this before kernel 4.4.6, none of our new products are
>>> going to be compatible with MySQL 5.7. Which would be a major limitation in
>>> the platform.
>>>
>>> Thanks,
>>> NuwanD.
>>>
>>> On Tue, May 10, 2016 at 4:15 PM, Chandana Napagoda 
>>> wrote:
>>>
 Hi Janaka,

 Please note that, this fix will be available in the next kernel release.

 Regards,
 Chandana
 On May 10, 2016 3:14 PM, "Thilini Cooray"  wrote:

> Hi,
>
> A public JIRA is raised in [1].
>
> [1] https://wso2.org/jira/browse/REGISTRY-3610
>
> Thanks.
>
> On Tue, May 10, 2016 at 12:11 PM, Janaka Ranabahu 
> wrote:
>
>> Hi Thushara
>>
>> On Tue, May 10, 2016 at 12:06 PM, Thushara Ranawaka <
>> thusha...@wso2.com> wrote:
>>
>>> Hi Thilini,
>>>
>>> AFAIU you workaround need to be updated with the current
>>> timestamp[1][2]. Setting default value to zero is not nice. You might 
>>> have
>>> to figure out the correct syntax for other DB types and test against 
>>> them.
>>>
>> ​What Thilini is pointing is an issue in the Registry database
>> creation script. Hence we will create a public JIRA and assign it to you
>> guys. Please fix them.
>>
>> We can not modify the Registry database creation script since API
>> Manager would not capture the complete scenarios of G-Reg.
>>
>> Thanks,
>> Janaka​
>>
>>
>>>
>>>
>>> [1] - DEFAULT CURRENT_TIMESTAMP
>>> [2] -
>>> http://stackoverflow.com/questions/168736/how-do-you-set-a-default-value-for-a-mysql-datetime-column
>>>
>>> Thanks,
>>> Thushara.
>>>
>>> On Tue, May 10, 2016 at 11:52 AM, Thilini Cooray 
>>> wrote:
>>>
 Hi GReg team,

 We encounter following issue [1] 

Re: [Dev] [GSOC 16] Initial Project Progress

2016-06-09 Thread Osura Rathnayake
Hi Akila,

Thank you it worked.


On Thu, Jun 9, 2016 at 6:51 PM, Akila Ravihansa Perera 
wrote:

> Hi Osura,
>
> Please make sure that you have kernel patch0012 applied in
> repository/components/patches for Carbon 4.2.0 based products. You can
> refer to Carbon release matrix [1] to get a list of products that are based
> on Carbon 4.2.0.
>
> For Carbon 4.4.1 based products you need kernel patch0005.
>
> [1] http://wso2.com/products/carbon/release-matrix/
>
> Thanks.
>
>
> On Thursday, 9 June 2016, Osura Rathnayake  wrote:
>
>> Hi Mentors,
>>
>> When i was testing the azure membership scheme, the error in the attached
>> screenshot occurred. I added the jar file of azure membership scheme in 
>> "repository/components/lib"
>> and updated the axis2.xml with following parameters. Can you please point
>> out any possible mistakes I have done?
>>
>> > class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent"
>> enable="true">
>>   > name="membershipSchemeClassName">com.osura.membershipscheme.AzureMembershipScheme
>>   Azure
>>
>>   > name="credential">uduq558Ble9TlucvGECEFDvRqGv6q0WsFvFWYWOTaRs=
>>   > name="tenantId">7a94c74f-5ab1-46c2-a98c-df7df7c5f41e
>>   > name="clientId">ce86678c-8520-431c-9c9f-0bdf733e4133
>>   > name="subscriptionId">0820043e-501c-43ff-ab1d-a96258a301de
>>
>> 
>>
>> thanks
>>
>> On Mon, Jun 6, 2016 at 4:16 PM, Osura Rathnayake 
>> wrote:
>>
>>> Hi all,
>>>
>>> This is the summary of the matters that we discussed during hangout we
>>> had on 6th of June, 2016.
>>>
>>> We had a productive discussion on how to pass the azure specific
>>> parameters to the Azure membership scheme and how we should test the Azure
>>> membership scheme
>>>
>>> Current progress : Getting a list of IP addresses of members in the
>>> cluster and updating the hazelcast configuration are done but certain azure
>>> specific parameters are hard coded in the program.
>>>
>>> As in kubernetes membership scheme, we agreed upon sending those
>>> parameters as either environment variables or system properties. So the
>>> next immediate goal is to get those parameters that way. As of how to test
>>> the azure membership scheme, [1] was shared get a more clear idea on the
>>> subject.
>>>
>>>
>>> [1]
>>> https://docs.wso2.com/display/KA100/Kubernetes+Membership+Scheme+for+WSO2+Carbon
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> On Mon, Jun 6, 2016 at 1:21 PM, Osura Rathnayake 
>>> wrote:
>>>
 Hi Isuru,

 Thank you very much. Okay will have a hangout today at 3.00 pm.

 thanks,

 On Mon, Jun 6, 2016 at 10:37 AM, Isuru Haththotuwa 
 wrote:

> Hi Osura,
>
> You need to test the membership scheme following the same method that
> we use for the Kuberntes Membership scheme. Please refer the README [1].
> The only difference is that you will be deploying in Azure.
>
> Please note the parameters that are added to the axis2.xml:
>
> membershipSchemeClassName, membershipScheme, KUBERNETES_MASTER,
> KUBERNETES_SERVICES, etc.
>
> membershipSchemeClassName is the fully qualified classname for the
> relevant Membership Scheme class that you have written. Carbon will try to
> load that class using the class name.
> membershipScheme should be 'azure' or any other suitable name
> KUBERNETES_MASTER and KUBERNETES_SERVICES are the API endpoint and the
> Kubernetes Service Name(s) to be considered in the cluster. You need to
> change these parameters according to your case, reflecting the Azure
> deployment (using Azure API endpoint and the Network Security Group as you
> mentioned in a previous reply, etc.).
>
> Lets have a hangout today at 3.00 PM if you are free at that time to
> discuss more.
>
> [1].
> https://github.com/wso2/kubernetes-artifacts/tree/master/common/kubernetes-membership-scheme
>
> On Fri, Jun 3, 2016 at 11:18 PM, Osura Rathnayake 
> wrote:
>
>> Hi mentors,
>>
>> please find the updated membership scheme here [1].
>> Can you please tell me how to test the membership scheme? Also how
>> can I get the parameters that are passed into the constructor of the
>> membership class? Also where is the membership class invoked.
>>
>> [1]https://github.com/osuran/azure-membership-scheme
>>
>> Thanks,
>>
>>
>>
>>
>> On Thu, Jun 2, 2016 at 10:38 AM, Imesh Gunaratne 
>> wrote:
>>
>>>
>>>
>>> On Thu, Jun 2, 2016 at 10:33 AM, Osura Rathnayake <
>>> osura...@gmail.com> wrote:
>>>
 Hi mentors,

 When developing the membership scheme, from where can I get
 the HazelcastMembershipScheme interface? I Googled but couldn't find an
 appropriate jar file or anything. the one that netbeans suggests also
 cannot be 

Re: [Dev] Use of WSO2_ANALYTICS_FS_DB in WSO2 DAS

2016-06-09 Thread Sachith Withana
For analytics datasources, in DAS 3.0.1, yes, only those two are needed.

On Thu, Jun 9, 2016 at 9:14 AM, Dulitha Wijewantha  wrote:

>
>
> On Wed, Jun 8, 2016 at 4:10 PM, Sachith Withana  wrote:
>
>> Hi Dulitha,
>>
>> The doc you are referring to is for DAS 3.0.0 NOT DAS 3.0.1.
>> Refer to [1] for DAS 3.0.1 docs.
>>
>> In DAS 3.0.0, ANALYTICS_FS_DB is used to store the index data.
>>
>> But from 3.0.1 onwards, we are storing those data in the local
>> filesystem, not in a database.
>> That's why we have removed the FS_DB from the latest release.
>> So you don't have to configure the ANALYTICS_FS_DB in DAS 3.0.1.
>>
>
> ​+1. Thank you. So that means that there are only 2 datasources that are
> needed right?​
>
>
>
>>
>> [1] https://docs.wso2.com/display/DAS301/Configuring+Data+Persistence
>>
>> Regards,
>> Sachith
>>
>> On Wed, Jun 8, 2016 at 2:54 PM, Dulitha Wijewantha 
>> wrote:
>>
>>> Hi guys,
>>> The doc [1] mentions that there are 3 event stores in DAS. In DAS 3.0.1
>>> vanila pack - there are only 2 datasources that are configured
>>> [WSO2_ANALYTICS_EVENT_STORE_DB,  WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB].
>>> Does that mean that the Indexing meta data is stored in
>>> WSO2_ANALYTICS_EVENT_STORE_DB datasource?
>>>
>>> The doc [1] currently  also mentions about WSO2_ANALYTICS_FS_DB which is
>>> configured for the analytics file system (am I to assume this as another
>>> datasource?)
>>>
>>> 
>>>>> >org.wso2.carbon.analytics.datasource.rdbms.RDBMSAnalyticsFileSystem>> implementation>
>>>
>>>  
>>>  WSO2_ANALYTICS_FS_DB
>>>  large_dataset_optimized
>>>
>>> 
>>> What is the production recommendation? Keep 3 datasources separately for
>>> the 3 event stores?
>>>
>>> [1] - https://docs.wso2.com/display/DAS300/Configuring+Data+Persistence
>>>
>>> Cheers~
>>>
>>> --
>>> Dulitha Wijewantha (Chan)
>>> Software Engineer - Mobile Development
>>> WSO2 Inc
>>> Lean.Enterprise.Middleware
>>>  * ~Email   duli...@wso2.com *
>>> *  ~Mobile +94712112165 <%2B94712112165>*
>>> *  ~Website   dulitha.me *
>>> *  ~Twitter @dulitharw *
>>>   *~Github @dulichan *
>>>   *~SO @chan *
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Sachith Withana
>> Software Engineer; WSO2 Inc.; http://wso2.com
>> E-mail: sachith AT wso2.com
>> M: +94715518127
>> Linked-In: 
>> https://lk.linkedin.com/in/sachithwithana
>>
>
>
>
> --
> Dulitha Wijewantha (Chan)
> Software Engineer - Mobile Development
> WSO2 Inc
> Lean.Enterprise.Middleware
>  * ~Email   duli...@wso2.com *
> *  ~Mobile +94712112165 <%2B94712112165>*
> *  ~Website   dulitha.me *
> *  ~Twitter @dulitharw *
>   *~Github @dulichan *
>   *~SO @chan *
>



-- 
Sachith Withana
Software Engineer; WSO2 Inc.; http://wso2.com
E-mail: sachith AT wso2.com
M: +94715518127
Linked-In: https://lk.linkedin.com/in/sachithwithana
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Use of WSO2_ANALYTICS_FS_DB in WSO2 DAS

2016-06-09 Thread Dulitha Wijewantha
On Wed, Jun 8, 2016 at 4:10 PM, Sachith Withana  wrote:

> Hi Dulitha,
>
> The doc you are referring to is for DAS 3.0.0 NOT DAS 3.0.1.
> Refer to [1] for DAS 3.0.1 docs.
>
> In DAS 3.0.0, ANALYTICS_FS_DB is used to store the index data.
>
> But from 3.0.1 onwards, we are storing those data in the local filesystem,
> not in a database.
> That's why we have removed the FS_DB from the latest release.
> So you don't have to configure the ANALYTICS_FS_DB in DAS 3.0.1.
>

​+1. Thank you. So that means that there are only 2 datasources that are
needed right?​



>
> [1] https://docs.wso2.com/display/DAS301/Configuring+Data+Persistence
>
> Regards,
> Sachith
>
> On Wed, Jun 8, 2016 at 2:54 PM, Dulitha Wijewantha 
> wrote:
>
>> Hi guys,
>> The doc [1] mentions that there are 3 event stores in DAS. In DAS 3.0.1
>> vanila pack - there are only 2 datasources that are configured
>> [WSO2_ANALYTICS_EVENT_STORE_DB,  WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB].
>> Does that mean that the Indexing meta data is stored in
>> WSO2_ANALYTICS_EVENT_STORE_DB datasource?
>>
>> The doc [1] currently  also mentions about WSO2_ANALYTICS_FS_DB which is
>> configured for the analytics file system (am I to assume this as another
>> datasource?)
>>
>> 
>>> >org.wso2.carbon.analytics.datasource.rdbms.RDBMSAnalyticsFileSystem> implementation>
>>
>>  
>>  WSO2_ANALYTICS_FS_DB
>>  large_dataset_optimized
>>
>> 
>> What is the production recommendation? Keep 3 datasources separately for
>> the 3 event stores?
>>
>> [1] - https://docs.wso2.com/display/DAS300/Configuring+Data+Persistence
>>
>> Cheers~
>>
>> --
>> Dulitha Wijewantha (Chan)
>> Software Engineer - Mobile Development
>> WSO2 Inc
>> Lean.Enterprise.Middleware
>>  * ~Email   duli...@wso2.com *
>> *  ~Mobile +94712112165 <%2B94712112165>*
>> *  ~Website   dulitha.me *
>> *  ~Twitter @dulitharw *
>>   *~Github @dulichan *
>>   *~SO @chan *
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sachith Withana
> Software Engineer; WSO2 Inc.; http://wso2.com
> E-mail: sachith AT wso2.com
> M: +94715518127
> Linked-In: 
> https://lk.linkedin.com/in/sachithwithana
>



-- 
Dulitha Wijewantha (Chan)
Software Engineer - Mobile Development
WSO2 Inc
Lean.Enterprise.Middleware
 * ~Email   duli...@wso2.com *
*  ~Mobile +94712112165*
*  ~Website   dulitha.me *
*  ~Twitter @dulitharw *
  *~Github @dulichan *
  *~SO @chan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSOC 16] Initial Project Progress

2016-06-09 Thread Akila Ravihansa Perera
Hi Osura,

Please make sure that you have kernel patch0012 applied in
repository/components/patches for Carbon 4.2.0 based products. You can
refer to Carbon release matrix [1] to get a list of products that are based
on Carbon 4.2.0.

For Carbon 4.4.1 based products you need kernel patch0005.

[1] http://wso2.com/products/carbon/release-matrix/

Thanks.

On Thursday, 9 June 2016, Osura Rathnayake  wrote:

> Hi Mentors,
>
> When i was testing the azure membership scheme, the error in the attached
> screenshot occurred. I added the jar file of azure membership scheme in 
> "repository/components/lib"
> and updated the axis2.xml with following parameters. Can you please point
> out any possible mistakes I have done?
>
>  class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent"
> enable="true">
>name="membershipSchemeClassName">com.osura.membershipscheme.AzureMembershipScheme
>   Azure
>
>name="credential">uduq558Ble9TlucvGECEFDvRqGv6q0WsFvFWYWOTaRs=
>name="tenantId">7a94c74f-5ab1-46c2-a98c-df7df7c5f41e
>name="clientId">ce86678c-8520-431c-9c9f-0bdf733e4133
>name="subscriptionId">0820043e-501c-43ff-ab1d-a96258a301de
>
> 
>
> thanks
>
> On Mon, Jun 6, 2016 at 4:16 PM, Osura Rathnayake  > wrote:
>
>> Hi all,
>>
>> This is the summary of the matters that we discussed during hangout we
>> had on 6th of June, 2016.
>>
>> We had a productive discussion on how to pass the azure specific
>> parameters to the Azure membership scheme and how we should test the Azure
>> membership scheme
>>
>> Current progress : Getting a list of IP addresses of members in the
>> cluster and updating the hazelcast configuration are done but certain azure
>> specific parameters are hard coded in the program.
>>
>> As in kubernetes membership scheme, we agreed upon sending those
>> parameters as either environment variables or system properties. So the
>> next immediate goal is to get those parameters that way. As of how to test
>> the azure membership scheme, [1] was shared get a more clear idea on the
>> subject.
>>
>>
>> [1]
>> https://docs.wso2.com/display/KA100/Kubernetes+Membership+Scheme+for+WSO2+Carbon
>>
>>
>> Thanks,
>>
>>
>>
>> On Mon, Jun 6, 2016 at 1:21 PM, Osura Rathnayake > > wrote:
>>
>>> Hi Isuru,
>>>
>>> Thank you very much. Okay will have a hangout today at 3.00 pm.
>>>
>>> thanks,
>>>
>>> On Mon, Jun 6, 2016 at 10:37 AM, Isuru Haththotuwa >> > wrote:
>>>
 Hi Osura,

 You need to test the membership scheme following the same method that
 we use for the Kuberntes Membership scheme. Please refer the README [1].
 The only difference is that you will be deploying in Azure.

 Please note the parameters that are added to the axis2.xml:

 membershipSchemeClassName, membershipScheme, KUBERNETES_MASTER,
 KUBERNETES_SERVICES, etc.

 membershipSchemeClassName is the fully qualified classname for the
 relevant Membership Scheme class that you have written. Carbon will try to
 load that class using the class name.
 membershipScheme should be 'azure' or any other suitable name
 KUBERNETES_MASTER and KUBERNETES_SERVICES are the API endpoint and the
 Kubernetes Service Name(s) to be considered in the cluster. You need to
 change these parameters according to your case, reflecting the Azure
 deployment (using Azure API endpoint and the Network Security Group as you
 mentioned in a previous reply, etc.).

 Lets have a hangout today at 3.00 PM if you are free at that time to
 discuss more.

 [1].
 https://github.com/wso2/kubernetes-artifacts/tree/master/common/kubernetes-membership-scheme

 On Fri, Jun 3, 2016 at 11:18 PM, Osura Rathnayake > wrote:

> Hi mentors,
>
> please find the updated membership scheme here [1].
> Can you please tell me how to test the membership scheme? Also how can
> I get the parameters that are passed into the constructor of the 
> membership
> class? Also where is the membership class invoked.
>
> [1]https://github.com/osuran/azure-membership-scheme
>
> Thanks,
>
>
>
>
> On Thu, Jun 2, 2016 at 10:38 AM, Imesh Gunaratne  > wrote:
>
>>
>>
>> On Thu, Jun 2, 2016 at 10:33 AM, Osura Rathnayake > > wrote:
>>
>>> Hi mentors,
>>>
>>> When developing the membership scheme, from where can I get
>>> the HazelcastMembershipScheme interface? I Googled but couldn't find an
>>> appropriate jar file or anything. the one that 

Re: [Dev] [VOTE] Release WSO2 Carbon Kernel 4.4.6 RC2

2016-06-09 Thread Viraj Senevirathne
Hi All,

We were able to build the ESB pack after including velocity bundle to the
mediator feature. Now we are running integration tests with the pack. Will
update the thread with results.

Regards,

On Thu, Jun 9, 2016 at 10:39 AM, Rajith Roshan  wrote:

> Hi all,
>
> Since jasper reports orbit bundle requires org.apache.velocity and
> org.apache.poi.* packages, we need to upgrade the import package versions
> for those packages in jasper orbit bundle. Subsequently carbon-commons
> release would be required  with updated jasper orbit bundle version. We
> will send the PRs with the relevant changes.
> Currently we are running integration tests for product-greg.
>
> Thanks!
> Rajith
>
> On Wed, Jun 8, 2016 at 12:20 PM, Kalpa Welivitigoda 
> wrote:
>
>> [+Ayoma, Dulanja]
>>
>>
>> On Wed, Jun 8, 2016 at 12:17 PM, Anupama Pathirage 
>> wrote:
>>
>>> Hi Kalpa,
>>>
>>> Thanks for the update.  Please update us with the solution for CSRF
>>> security issue. We get the same issue for  the DSS try it as well.
>>>
>>> [2016-06-08 11:55:28,396]  WARN {org.owasp.csrfguard.log.JavaLogger} -
>>> potential cross-site request forgery (CSRF) attack thwarted
>>> (user:, ip:10.100.7.118, method:POST,
>>> uri:/carbon/admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp, error:required
>>> token is missing from the request)
>>>
>>> Private proxy protocol will be attempted as cross-domain browser
>>> restrictions might be enforced for this endpoint.
>>>
>>> http://tryit.carbon.wso2.org;>
>>>Error connecting to the Tryit ajax proxy
>>> 
>>>
>>> Regards,
>>>
>>> On Wed, Jun 8, 2016 at 8:45 AM, Kasun Bandara  wrote:
>>>
 Hi All,

 We have done the fix for L1 reported in [1] yesterday.

 Thanks,
 Kasun.

 [1] https://wso2.org/jira/browse/IDENTITY-4656

 On Wed, Jun 8, 2016 at 7:00 AM, Kalpa Welivitigoda 
 wrote:

> Hi Anupama,
>
> On Tue, Jun 7, 2016 at 8:45 PM, Anupama Pathirage 
> wrote:
>
>> Hi Kalpa,
>>
>> Checked the suggested approaches and those two issues were resolved
>> after applying both changes. We will further test the service with the
>> Carbon RC2.
>>
>> On Tue, Jun 7, 2016 at 6:15 PM, Kalpa Welivitigoda 
>> wrote:
>>
>>> Hi Anupama,
>>>
>>> On Tue, Jun 7, 2016 at 5:50 PM, Anupama Pathirage 
>>> wrote:
>>>
 Hi,

 We got the following issues when testing WSO2 DSS with the Kernel
 RC2 Release.

 *1) *Any action on management console gives the following error.
 It seems to be related with the tomcat upgrade and appreciate your 
 input on
 this.

 [2016-06-07 17:21:16,905] ERROR
 {org.apache.coyote.AbstractProtocol$AbstractConnectionHandler} -  Error
 reading request, ignored
 java.lang.NoSuchMethodError:
 org.apache.coyote.Request.getBytesRead()I
 at
 org.apache.coyote.RequestInfo.updateCounters(RequestInfo.java:143)
 at org.apache.coyote.Request.updateCounters(Request.java:533)
 at
 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1140)
 at
 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
 at
 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1749)
 at
 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1708)
 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)

>>>
>>> Yes, it is due to the tomcat upgrade in kernel, relevant fixes for
>>> carbon-deployment are already there in 4.6.2-SNAPSHOT. We have to do a
>>> deployment release once we release 4.4.6-SNAPSHOT. For the moment, for
>>> testing purpose, is it possible you try with 4.6.2-SNAPSHOT?
>>>
>>
>> Could you please do the needful to release the carbon-deployment
>> 4.6.2 as DSS 3.5.1 release will be on hold until it is done.
>>
>
> Yes, we will be doing component released once we are done with kernel
> 4.4.6.
>
>
>>
>>
>>>
>>>

 *2) *DBS file uploads gives the following error which returns
 Error 403 - Forbidden

 [2016-06-07 17:21:16,904]  WARN
 {org.owasp.csrfguard.log.JavaLogger} -  potential cross-site request
 forgery (CSRF) attack thwarted (user:, ip:10.100.7.118,
 

Re: [Dev] GSOC 2016 - Project 21 : MongoDB Userstore Development

2016-06-09 Thread Tharindu Edirisinghe
Hi Asantha,

Great ! There has been a delay in my replies but it's really good to see
your progress with the project with a minimum level of supervision.

I will arrange a review next week with the Identity Server team for the
work completed so far and then we can provide the Mid Review feedback for
the project.

Keep on communicating the progress and the issues you face via emails and
also update your blog with the findings.

Thank you,
TharinduE

On Thu, Jun 9, 2016 at 4:44 PM, Asantha Thilina 
wrote:

> Hi Tharindu,
>
> i rearranged the UM_USER_ATTRIBUTE collection now when ever user update
> his profile, claim values will save in the collection the way we discussed
> in hangout i updated my repo[1] with latest modification
>
> [1] https://github.com/asanthamax/mongodbuserstore
>
> Thanks,
> Asantha
>
> On Wed, Jun 8, 2016 at 8:03 AM, Asantha Thilina 
> wrote:
>
>> Hi Tharindu,
>>
>> sorry i forget to attach my github repository here is the repository link
>> i have update the repository with my latest errors fixed
>> https://github.com/asanthamax/mongodbuserstore
>>
>> Thanks,
>> Asantha
>>
>> On Wed, Jun 8, 2016 at 8:00 AM, Asantha Thilina > > wrote:
>>
>>> Hi Tharindu,
>>>
>>> I have fixed the claims issue now it can update and add claims to user
>>> but still the db structure is same as in relational structure i have
>>> currently mapping it to a way we discussed ,most of the issues being fixed
>>> now following tasks can do in now MongoDBUserStoreManager
>>> can add users.
>>> can add roles.
>>> can assign roles to users.
>>> can assign users to roles.
>>> can edit user claim values in update profile.
>>> I creating the documentation of my MongoDBUserStoreManager as well
>>> sooner i will publish the document and also test scripts as well
>>> And also following are the issues now i facing in
>>> registered users in my user store domain can't login to the IS it's
>>> giving error as MongoDBUserStoreManager can't cast to
>>> AbstractUserStoreManager since i done MongoDBUserStoreManager by
>>> implementing the UserStoreManager is there any special changes to do in my
>>> code to authenticate user ? i debugged and see my doAuthenticate method not
>>> get triggered during runtime
>>> expect some advice from you
>>>
>>> Thanks,
>>> Asantha
>>>
>>> On Mon, Jun 6, 2016 at 1:18 AM, Asantha Thilina <
>>> asanthathil...@gmail.com> wrote:
>>>
 Hi Tharindu,

 ok sure i will modify the readme content as appropriately,at the moment
 i didn't add that feature, set to all default i will modify that to add a
 port number also,

 Thanks,
 Asantha

 On Mon, Jun 6, 2016 at 12:04 AM, Tharindu Edirisinghe <
 tharin...@wso2.com> wrote:

> Hi Asantha,
>
> We might not need implementing the HybridRoleManager... I'll provide
> you the exact details after trying out the functionality you have
> implemented up to now.
>
> Can you please write a basic document with the steps for creating the
> mongodb database and adding a userstore in IS pointing to the created
> mongodb database and include in the ReadMe of github repo.
>
> Also if mongodb server is running in a different port other than the
> default port, can we still connect to that ? I didn't see a place to 
> define
> the port in the configuration.. should it be added as a connection string 
> ?
> (didn't go through the code to find what is going wrong)
>
> Thanks,
> TharinduE
>
> On Sun, Jun 5, 2016 at 11:55 PM, Asantha Thilina <
> asanthathil...@gmail.com> wrote:
>
>> Hi Tharindu,
>>
>> As we discussed on hangout i doing the changes in UM_USER_ATTRIBUTE
>> collection and also changing the hybrid role to master datasource but 
>> when
>> i try to add user to hybrid role i facing a small issue i can't grab the
>> datasource ,in HybridRoleManager class it need to give 
>> java.sql.DataSource
>> but in my current user store manager class i have never used a sql
>> datasource(since it nosql) so i think i need to grab the master 
>> datasource
>> of IS which is h2 database datasource, is there a way to get the primary
>> datasource?
>>
>> Thanks,
>> Asantha
>>
>> On Sat, Jun 4, 2016 at 1:59 PM, Tharindu Edirisinghe <
>> tharin...@wso2.com> wrote:
>>
>>> The call details are as following.
>>>
>>> 1. Demonstrated how to use WSO2 admin services.
>>>
>>> 2. All the user operations in *RemoteUserStoreManagerService *[1]
>>> should be tested (using SOAP UI) for the mongodb userstore.
>>>
>>> 3. When the user profile is saved in a JDBC userstore, for each
>>> attribute of the user, it will add a new entry in *UM_USER_ATTRIBUTE
>>> **(Refer [2] for more information) *like below.
>>>
>>>
>>> 

Re: [Dev] YAML configuration for HTTP Monitoring Interceptor in MSF4J

2016-06-09 Thread Isuru Perera
So, will the next MSF4J release use that util?

Will there be a release of MSF4J with Carbon Kernel 5.1.0?

On Thu, Jun 9, 2016 at 3:23 PM, Afkham Azeez  wrote:

> It will be in the kernel. Still wip.
>
> On Thu, Jun 9, 2016 at 3:18 PM, Isuru Perera  wrote:
>
>> On Thu, Jun 9, 2016 at 3:08 PM, Afkham Azeez  wrote:
>>
>>> We are building a separate util which will take care of loading stuff
>>> from the env & making it possible to override the config using a
>>> deployment.properties file. Ideally you should be using that util. We can
>>> have it ready by the end of this week.
>>>
>> Is it only for MSF4J or a generic util to be used by the platform?
>>
>> Where is the code? Can I look at the current implementation?
>>
>>>
>>> On Thu, Jun 9, 2016 at 2:40 PM, Isuru Perera  wrote:
>>>
 Hi,

 Currently the MSF4J uses environment variables to configure HTTP
 Monitoring Interceptor and Metrics Interceptor.

 In Metrics 2.0.0-SNAPSHOT, there is a yaml file for metrics
 configuration. I'm now integrating Metrics 2.0.0 to MSF4J. Therefore the
 metrics configurations must be done from the yaml file. The yaml file
 supports environment variable references.

 I will add another yaml file for configuring HTTP Monitoring
 Interceptor in MSF4J.

 How about httpmonitoring.yml for configuration file?

 Then we will have httpmonitoring.yml for HTTP Monitoring Interceptor
 and metrics.yml for Metrics Interceptor. Both configurations can refer to
 common environment variables if both are using the same WSO2 DAS.

 Any feedback on $subject?

 Thanks!

 Best Regards,

 --
 Isuru Perera
 Associate Technical Lead | WSO2, Inc. | http://wso2.com/
 Lean . Enterprise . Middleware

 about.me/chrishantha
 Contact: +IsuruPereraWSO2
 

>>>
>>>
>>>
>>> --
>>> *Afkham Azeez*
>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>> Member; Apache Software Foundation; http://www.apache.org/
>>> * *
>>> *email: **az...@wso2.com* 
>>> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
>>> *http://blog.afkham.org* 
>>> *twitter: **http://twitter.com/afkham_azeez*
>>> 
>>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>>> *
>>>
>>> *Lean . Enterprise . Middleware*
>>>
>>
>>
>>
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2 
>>
>
>
>
> --
> *Afkham Azeez*
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * *
> *email: **az...@wso2.com* 
> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
> *http://blog.afkham.org* 
> *twitter: **http://twitter.com/afkham_azeez*
> 
> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
> *
>
> *Lean . Enterprise . Middleware*
>



-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Where is MSF4J product?

2016-06-09 Thread Afkham Azeez
Bundle samples are for WSO2 developers only. At the moment you have to
install it on to the Carbon kernel.

On Thu, Jun 9, 2016 at 4:50 PM, Isuru Perera  wrote:

> So, how do we test the "MSF4J feature" without a product? I think it would
> be much easier if there is a sample distribution. For example
> carbon-datasources has a distribution.
> https://github.com/wso2/carbon-datasources/tree/master/distribution
>
> We may not need to deploy it to Maven Repository.
>
> If we are not giving a standard distribution, we need to explain how to
> test the bundle samples.
>
> WDYT?
>
>
> On Thu, Jun 9, 2016 at 4:33 PM, Afkham Azeez  wrote:
>
>> We have removed the product because we no longer ship it.
>>
>> On Thu, Jun 9, 2016 at 4:17 PM, Isuru Perera  wrote:
>>
>>> Hi,
>>>
>>> How should we test MSF4J bundles. For example, see:
>>> https://github.com/wso2/msf4j/tree/master/samples/log-interceptor-bundle
>>>
>>> It says that we can use WSO2 MSF4J product. But where is it?
>>>
>>> Thanks!
>>>
>>> Best Regards,
>>>
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> 
>>>
>>
>>
>>
>> --
>> *Afkham Azeez*
>> Director of Architecture; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://www.apache.org/
>> * *
>> *email: **az...@wso2.com* 
>> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
>> *http://blog.afkham.org* 
>> *twitter: **http://twitter.com/afkham_azeez*
>> 
>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>> *
>>
>> *Lean . Enterprise . Middleware*
>>
>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* *
*email: **az...@wso2.com* 
* cell: +94 77 3320919blog: **http://blog.afkham.org*

*twitter: **http://twitter.com/afkham_azeez*

*linked-in: **http://lk.linkedin.com/in/afkhamazeez
*

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


Re: [Dev] Checking isDebugEnabled() for formatted debug logs

2016-06-09 Thread Isuru Perera
On Thu, Jun 9, 2016 at 4:28 PM, Abimaran Kugathasan 
wrote:

> I think, it's depends on the framework and their versions.
>
> latest versions of slf4j or log4j 2 don't require guard statements.
>
Have they mentioned about this somewhere?

> They use a parameterized log statement so that an event can be logged
> unconditionally, but message formatting only occurs if the event is
> enabled. Message construction is performed as needed by the logger, rather
> than pre-emptively by the application.
>
That's right, but if we have a guard condition, there won't be a string
object created in the runtime. This is what I said earlier and we need to
avoid unnecessary strings.

>
> On Thu, Jun 9, 2016 at 3:13 PM, Isuru Perera  wrote:
>
>> I think it's better to use isDebugEnabled for any debug log, even if it
>> is using parameters for a formatted string. If the debug is not enabled, we
>> don't even want to create the String object.
>>
>> No need to assign to a final variable. Checking the condition just before
>> logging should be enough.
>>
>> On Thu, Jun 9, 2016 at 3:06 PM, Afkham Azeez  wrote:
>>
>>> No need to do isDebugEnabled ideally for formatted logs.
>>>
>>> On Thu, Jun 9, 2016 at 3:01 PM, Jayanga Kaushalya 
>>> wrote:
>>>
 Hi,

 Do we need to check whether the isDebugEnabled() for formatted debug
 logs without any string concatenations? For example below code:

 if (log.isDebugEnabled) {
log.debug("Test log with var: {} and var: {}", var1, var2);
 }

 If we have to check it is, what is the best way to check it? Assign it
 to a final variable in the class header or check it every time where their
 is a debug log like above code?

 Thanks!

 *Jayanga Kaushalya*
 Software Engineer
 Mobile: +94777860160
 WSO2 Inc. | http://wso2.com
 lean.enterprise.middleware

>>>
>>>
>>>
>>> --
>>> *Afkham Azeez*
>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>> Member; Apache Software Foundation; http://www.apache.org/
>>> * *
>>> *email: **az...@wso2.com* 
>>> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
>>> *http://blog.afkham.org* 
>>> *twitter: **http://twitter.com/afkham_azeez*
>>> 
>>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>>> *
>>>
>>> *Lean . Enterprise . Middleware*
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thanks
> Abimaran Kugathasan
> Senior Software Engineer
>
> Email : abima...@wso2.com
> Mobile : +94 773922820
>
> 
> 
>   
> 
>
>


-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Where is MSF4J product?

2016-06-09 Thread Isuru Perera
So, how do we test the "MSF4J feature" without a product? I think it would
be much easier if there is a sample distribution. For example
carbon-datasources has a distribution.
https://github.com/wso2/carbon-datasources/tree/master/distribution

We may not need to deploy it to Maven Repository.

If we are not giving a standard distribution, we need to explain how to
test the bundle samples.

WDYT?


On Thu, Jun 9, 2016 at 4:33 PM, Afkham Azeez  wrote:

> We have removed the product because we no longer ship it.
>
> On Thu, Jun 9, 2016 at 4:17 PM, Isuru Perera  wrote:
>
>> Hi,
>>
>> How should we test MSF4J bundles. For example, see:
>> https://github.com/wso2/msf4j/tree/master/samples/log-interceptor-bundle
>>
>> It says that we can use WSO2 MSF4J product. But where is it?
>>
>> Thanks!
>>
>> Best Regards,
>>
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2 
>>
>
>
>
> --
> *Afkham Azeez*
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * *
> *email: **az...@wso2.com* 
> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
> *http://blog.afkham.org* 
> *twitter: **http://twitter.com/afkham_azeez*
> 
> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
> *
>
> *Lean . Enterprise . Middleware*
>



-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] [IS] IS as KM Error Caused by: java.lang.ClassNotFoundException: org.wso2.carbon.apimgt.keymgt.util.APIManagerOAuthCallbackHandler

2016-06-09 Thread Harsha Kumara
+Bhathiya

On Thu, Jun 9, 2016 at 4:45 PM, Harsha Kumara  wrote:

> Hi All,
>
> In the IS as KM setup, we are getting error mentioned in the $Subject.
> This is a intermittent behavior which occurs when generating a user token.
> As I went through the code, IS side, it's initialize the handlers
> configured in the identity.xml when the first token request has made to the
> server.
>
> It seems this behavior cause due to using
> the Thread.currentThread().getContextClassLoader(). If we
> use getClass().getClassLoader() this issue won't get when we requesting a
> token.
>
> As I read through some articles recommends
> Thread.currentThread().getContextClassLoader() and vice versa. As I read
> through getContextClassLoader loader uses the class loader of the current
> thread. If someone not explicitly set a class loader it will be pickup
> default class loader of parent thread which is system class loader while
> getClass().getClassLoader() will use the class loader of the current class.
>
> I'm not sure changing the class name is the best way to solve the issue
> but appears that it's fixed it. I have made a pull request changing the
> class loader in [3].
>
>
> [1] http://blog.osgi.org/2011/05/what-you-should-know-about-class.html
> [2]
> http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html
> [3] https://github.com/wso2-extensions/identity-inbound-auth-oauth/pull/78
> [4]
> http://stackoverflow.com/questions/1771679/difference-between-threads-context-class-loader-and-normal-classloader
>
> Thanks,
> Harsha
> --
> Harsha Kumara
> Software Engineer, WSO2 Inc.
> Mobile: +94775505618
> Blog:harshcreationz.blogspot.com
>



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


[Dev] [APIM] [IS] IS as KM Error Caused by: java.lang.ClassNotFoundException: org.wso2.carbon.apimgt.keymgt.util.APIManagerOAuthCallbackHandler

2016-06-09 Thread Harsha Kumara
Hi All,

In the IS as KM setup, we are getting error mentioned in the $Subject. This
is a intermittent behavior which occurs when generating a user token. As I
went through the code, IS side, it's initialize the handlers configured in
the identity.xml when the first token request has made to the server.

It seems this behavior cause due to using
the Thread.currentThread().getContextClassLoader(). If we
use getClass().getClassLoader() this issue won't get when we requesting a
token.

As I read through some articles recommends
Thread.currentThread().getContextClassLoader() and vice versa. As I read
through getContextClassLoader loader uses the class loader of the current
thread. If someone not explicitly set a class loader it will be pickup
default class loader of parent thread which is system class loader while
getClass().getClassLoader() will use the class loader of the current class.

I'm not sure changing the class name is the best way to solve the issue but
appears that it's fixed it. I have made a pull request changing the class
loader in [3].


[1] http://blog.osgi.org/2011/05/what-you-should-know-about-class.html
[2]
http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html
[3] https://github.com/wso2-extensions/identity-inbound-auth-oauth/pull/78
[4]
http://stackoverflow.com/questions/1771679/difference-between-threads-context-class-loader-and-normal-classloader

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


Re: [Dev] GSOC 2016 - Project 21 : MongoDB Userstore Development

2016-06-09 Thread Asantha Thilina
Hi Tharindu,

i rearranged the UM_USER_ATTRIBUTE collection now when ever user update his
profile, claim values will save in the collection the way we discussed in
hangout i updated my repo[1] with latest modification

[1] https://github.com/asanthamax/mongodbuserstore

Thanks,
Asantha

On Wed, Jun 8, 2016 at 8:03 AM, Asantha Thilina 
wrote:

> Hi Tharindu,
>
> sorry i forget to attach my github repository here is the repository link
> i have update the repository with my latest errors fixed
> https://github.com/asanthamax/mongodbuserstore
>
> Thanks,
> Asantha
>
> On Wed, Jun 8, 2016 at 8:00 AM, Asantha Thilina 
> wrote:
>
>> Hi Tharindu,
>>
>> I have fixed the claims issue now it can update and add claims to user
>> but still the db structure is same as in relational structure i have
>> currently mapping it to a way we discussed ,most of the issues being fixed
>> now following tasks can do in now MongoDBUserStoreManager
>> can add users.
>> can add roles.
>> can assign roles to users.
>> can assign users to roles.
>> can edit user claim values in update profile.
>> I creating the documentation of my MongoDBUserStoreManager as well sooner
>> i will publish the document and also test scripts as well
>> And also following are the issues now i facing in
>> registered users in my user store domain can't login to the IS it's
>> giving error as MongoDBUserStoreManager can't cast to
>> AbstractUserStoreManager since i done MongoDBUserStoreManager by
>> implementing the UserStoreManager is there any special changes to do in my
>> code to authenticate user ? i debugged and see my doAuthenticate method not
>> get triggered during runtime
>> expect some advice from you
>>
>> Thanks,
>> Asantha
>>
>> On Mon, Jun 6, 2016 at 1:18 AM, Asantha Thilina > > wrote:
>>
>>> Hi Tharindu,
>>>
>>> ok sure i will modify the readme content as appropriately,at the moment
>>> i didn't add that feature, set to all default i will modify that to add a
>>> port number also,
>>>
>>> Thanks,
>>> Asantha
>>>
>>> On Mon, Jun 6, 2016 at 12:04 AM, Tharindu Edirisinghe <
>>> tharin...@wso2.com> wrote:
>>>
 Hi Asantha,

 We might not need implementing the HybridRoleManager... I'll provide
 you the exact details after trying out the functionality you have
 implemented up to now.

 Can you please write a basic document with the steps for creating the
 mongodb database and adding a userstore in IS pointing to the created
 mongodb database and include in the ReadMe of github repo.

 Also if mongodb server is running in a different port other than the
 default port, can we still connect to that ? I didn't see a place to define
 the port in the configuration.. should it be added as a connection string ?
 (didn't go through the code to find what is going wrong)

 Thanks,
 TharinduE

 On Sun, Jun 5, 2016 at 11:55 PM, Asantha Thilina <
 asanthathil...@gmail.com> wrote:

> Hi Tharindu,
>
> As we discussed on hangout i doing the changes in UM_USER_ATTRIBUTE
> collection and also changing the hybrid role to master datasource but when
> i try to add user to hybrid role i facing a small issue i can't grab the
> datasource ,in HybridRoleManager class it need to give java.sql.DataSource
> but in my current user store manager class i have never used a sql
> datasource(since it nosql) so i think i need to grab the master datasource
> of IS which is h2 database datasource, is there a way to get the primary
> datasource?
>
> Thanks,
> Asantha
>
> On Sat, Jun 4, 2016 at 1:59 PM, Tharindu Edirisinghe <
> tharin...@wso2.com> wrote:
>
>> The call details are as following.
>>
>> 1. Demonstrated how to use WSO2 admin services.
>>
>> 2. All the user operations in *RemoteUserStoreManagerService *[1]
>> should be tested (using SOAP UI) for the mongodb userstore.
>>
>> 3. When the user profile is saved in a JDBC userstore, for each
>> attribute of the user, it will add a new entry in *UM_USER_ATTRIBUTE
>> **(Refer [2] for more information) *like below.
>>
>>
>> +---+--+-+---++--+
>> | UM_ID | UM_ATTR_NAME | UM_ATTR_VALUE   | UM_PROFILE_ID |
>> UM_USER_ID | UM_TENANT_ID |
>>
>> +---+--+-+---++--+
>> | 1 | im   | | default
>> |  1 |-1234 |
>> | 2 | region   | Western | default
>> |  1 |-1234 |
>> | 3 | streetAddress| | default
>> |  1 |-1234 |
>> | 4 | country  | | default
>> |  1 |-1234 |
>> | 5 | mobile 

Re: [Dev] Where is MSF4J product?

2016-06-09 Thread Afkham Azeez
We have removed the product because we no longer ship it.

On Thu, Jun 9, 2016 at 4:17 PM, Isuru Perera  wrote:

> Hi,
>
> How should we test MSF4J bundles. For example, see:
> https://github.com/wso2/msf4j/tree/master/samples/log-interceptor-bundle
>
> It says that we can use WSO2 MSF4J product. But where is it?
>
> Thanks!
>
> Best Regards,
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* *
*email: **az...@wso2.com* 
* cell: +94 77 3320919blog: **http://blog.afkham.org*

*twitter: **http://twitter.com/afkham_azeez*

*linked-in: **http://lk.linkedin.com/in/afkhamazeez
*

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


Re: [Dev] Checking isDebugEnabled() for formatted debug logs

2016-06-09 Thread Abimaran Kugathasan
I think, it's depends on the framework and their versions.

latest versions of slf4j or log4j 2 don't require guard statements. They
use a parameterized log statement so that an event can be logged
unconditionally, but message formatting only occurs if the event is
enabled. Message construction is performed as needed by the logger, rather
than pre-emptively by the application.

On Thu, Jun 9, 2016 at 3:13 PM, Isuru Perera  wrote:

> I think it's better to use isDebugEnabled for any debug log, even if it is
> using parameters for a formatted string. If the debug is not enabled, we
> don't even want to create the String object.
>
> No need to assign to a final variable. Checking the condition just before
> logging should be enough.
>
> On Thu, Jun 9, 2016 at 3:06 PM, Afkham Azeez  wrote:
>
>> No need to do isDebugEnabled ideally for formatted logs.
>>
>> On Thu, Jun 9, 2016 at 3:01 PM, Jayanga Kaushalya 
>> wrote:
>>
>>> Hi,
>>>
>>> Do we need to check whether the isDebugEnabled() for formatted debug
>>> logs without any string concatenations? For example below code:
>>>
>>> if (log.isDebugEnabled) {
>>>log.debug("Test log with var: {} and var: {}", var1, var2);
>>> }
>>>
>>> If we have to check it is, what is the best way to check it? Assign it
>>> to a final variable in the class header or check it every time where their
>>> is a debug log like above code?
>>>
>>> Thanks!
>>>
>>> *Jayanga Kaushalya*
>>> Software Engineer
>>> Mobile: +94777860160
>>> WSO2 Inc. | http://wso2.com
>>> lean.enterprise.middleware
>>>
>>
>>
>>
>> --
>> *Afkham Azeez*
>> Director of Architecture; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://www.apache.org/
>> * *
>> *email: **az...@wso2.com* 
>> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
>> *http://blog.afkham.org* 
>> *twitter: **http://twitter.com/afkham_azeez*
>> 
>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>> *
>>
>> *Lean . Enterprise . Middleware*
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thanks
Abimaran Kugathasan
Senior Software Engineer

Email : abima...@wso2.com
Mobile : +94 773922820


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


Re: [Dev] Where is MSF4J product?

2016-06-09 Thread Niranjan Karunanandham
Hi Isuru,

AFAIK, in-order to test MSF4J bundles, you need to install the ms4fj (and
dependent) features in the Carbon 5 server and test the bundle.

Regards,
Nira

On Thu, Jun 9, 2016 at 4:17 PM, Isuru Perera  wrote:

> Hi,
>
> How should we test MSF4J bundles. For example, see:
> https://github.com/wso2/msf4j/tree/master/samples/log-interceptor-bundle
>
> It says that we can use WSO2 MSF4J product. But where is it?
>
> Thanks!
>
> Best Regards,
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 


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


[Dev] Where is MSF4J product?

2016-06-09 Thread Isuru Perera
Hi,

How should we test MSF4J bundles. For example, see:
https://github.com/wso2/msf4j/tree/master/samples/log-interceptor-bundle

It says that we can use WSO2 MSF4J product. But where is it?

Thanks!

Best Regards,

-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] SnapshotService info logs to debug mode

2016-06-09 Thread Mohanadarshan Vivekanandalingam
On Thu, Jun 9, 2016 at 2:56 PM, Nirmal Fernando  wrote:

> Still see these INFO logs. Shall we please remove them?
>

Yes, we'll check and fix.. Grainer has added to jira [1].

[1] https://wso2.org/jira/browse/CEP-1508

Thanks,
Mohan


>
> On Wed, Apr 13, 2016 at 8:03 AM, Nirmal Fernando  wrote:
>
>> I think I found what's happening.
>>
>> * CEP starts to synch from a Snapshot as soon as it got to know that
>> there's a new member, hence, it complains that there're no exec. plans
>> (other node is still starting up, hence no execution plans yet). (there was
>> a NPE while doing this and I fixed it in
>> https://github.com/wso2/siddhi/pull/135/files)
>> * Then the active node, keeps trying till the other node gets to the
>> correct state.
>>
>> And I think we can implement an exponential backoff instead of doing the
>> check one after another. Wdyt?
>>
>>
>> On Tue, Apr 12, 2016 at 2:26 PM, Nirmal Fernando  wrote:
>>
>>> Yes me too. There were more logs. Basically, once the other node joined,
>>> these kind of logs got printed around 3/4 times.
>>>
>>> On Tue, Apr 12, 2016 at 2:18 PM, Sriskandarajah Suhothayan <
>>> s...@wso2.com> wrote:
>>>
 I'm wondering why there are lots of Snapshot taken at with close time
 gap.

 On Tue, Apr 12, 2016 at 1:56 PM, Nirmal Fernando 
 wrote:

> Hi CEP team,
>
> Shall we move these info logs to debug level?
>
> TID: [-1] [] [2016-04-12 08:24:47,094]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization finished. 
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,096]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot 
> ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization started ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization finished. 
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot 
> ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization started ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization finished. 
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot 
> ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization started ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization finished. 
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot 
> ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
> finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization started ...
> {org.wso2.siddhi.core.util.snapshot.SnapshotService}
>
> TID: [-1] [] [2016-04-12 08:24:47,103]  INFO
> {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
> serialization 

Re: [Dev] YAML configuration for HTTP Monitoring Interceptor in MSF4J

2016-06-09 Thread Afkham Azeez
It will be in the kernel. Still wip.

On Thu, Jun 9, 2016 at 3:18 PM, Isuru Perera  wrote:

> On Thu, Jun 9, 2016 at 3:08 PM, Afkham Azeez  wrote:
>
>> We are building a separate util which will take care of loading stuff
>> from the env & making it possible to override the config using a
>> deployment.properties file. Ideally you should be using that util. We can
>> have it ready by the end of this week.
>>
> Is it only for MSF4J or a generic util to be used by the platform?
>
> Where is the code? Can I look at the current implementation?
>
>>
>> On Thu, Jun 9, 2016 at 2:40 PM, Isuru Perera  wrote:
>>
>>> Hi,
>>>
>>> Currently the MSF4J uses environment variables to configure HTTP
>>> Monitoring Interceptor and Metrics Interceptor.
>>>
>>> In Metrics 2.0.0-SNAPSHOT, there is a yaml file for metrics
>>> configuration. I'm now integrating Metrics 2.0.0 to MSF4J. Therefore the
>>> metrics configurations must be done from the yaml file. The yaml file
>>> supports environment variable references.
>>>
>>> I will add another yaml file for configuring HTTP Monitoring Interceptor
>>> in MSF4J.
>>>
>>> How about httpmonitoring.yml for configuration file?
>>>
>>> Then we will have httpmonitoring.yml for HTTP Monitoring Interceptor and
>>> metrics.yml for Metrics Interceptor. Both configurations can refer to
>>> common environment variables if both are using the same WSO2 DAS.
>>>
>>> Any feedback on $subject?
>>>
>>> Thanks!
>>>
>>> Best Regards,
>>>
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> 
>>>
>>
>>
>>
>> --
>> *Afkham Azeez*
>> Director of Architecture; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://www.apache.org/
>> * *
>> *email: **az...@wso2.com* 
>> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
>> *http://blog.afkham.org* 
>> *twitter: **http://twitter.com/afkham_azeez*
>> 
>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>> *
>>
>> *Lean . Enterprise . Middleware*
>>
>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* *
*email: **az...@wso2.com* 
* cell: +94 77 3320919blog: **http://blog.afkham.org*

*twitter: **http://twitter.com/afkham_azeez*

*linked-in: **http://lk.linkedin.com/in/afkhamazeez
*

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


Re: [Dev] YAML configuration for HTTP Monitoring Interceptor in MSF4J

2016-06-09 Thread Isuru Perera
On Thu, Jun 9, 2016 at 3:08 PM, Afkham Azeez  wrote:

> We are building a separate util which will take care of loading stuff from
> the env & making it possible to override the config using a
> deployment.properties file. Ideally you should be using that util. We can
> have it ready by the end of this week.
>
Is it only for MSF4J or a generic util to be used by the platform?

Where is the code? Can I look at the current implementation?

>
> On Thu, Jun 9, 2016 at 2:40 PM, Isuru Perera  wrote:
>
>> Hi,
>>
>> Currently the MSF4J uses environment variables to configure HTTP
>> Monitoring Interceptor and Metrics Interceptor.
>>
>> In Metrics 2.0.0-SNAPSHOT, there is a yaml file for metrics
>> configuration. I'm now integrating Metrics 2.0.0 to MSF4J. Therefore the
>> metrics configurations must be done from the yaml file. The yaml file
>> supports environment variable references.
>>
>> I will add another yaml file for configuring HTTP Monitoring Interceptor
>> in MSF4J.
>>
>> How about httpmonitoring.yml for configuration file?
>>
>> Then we will have httpmonitoring.yml for HTTP Monitoring Interceptor and
>> metrics.yml for Metrics Interceptor. Both configurations can refer to
>> common environment variables if both are using the same WSO2 DAS.
>>
>> Any feedback on $subject?
>>
>> Thanks!
>>
>> Best Regards,
>>
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2 
>>
>
>
>
> --
> *Afkham Azeez*
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * *
> *email: **az...@wso2.com* 
> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
> *http://blog.afkham.org* 
> *twitter: **http://twitter.com/afkham_azeez*
> 
> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
> *
>
> *Lean . Enterprise . Middleware*
>



-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Checking isDebugEnabled() for formatted debug logs

2016-06-09 Thread Isuru Perera
I think it's better to use isDebugEnabled for any debug log, even if it is
using parameters for a formatted string. If the debug is not enabled, we
don't even want to create the String object.

No need to assign to a final variable. Checking the condition just before
logging should be enough.

On Thu, Jun 9, 2016 at 3:06 PM, Afkham Azeez  wrote:

> No need to do isDebugEnabled ideally for formatted logs.
>
> On Thu, Jun 9, 2016 at 3:01 PM, Jayanga Kaushalya 
> wrote:
>
>> Hi,
>>
>> Do we need to check whether the isDebugEnabled() for formatted debug logs
>> without any string concatenations? For example below code:
>>
>> if (log.isDebugEnabled) {
>>log.debug("Test log with var: {} and var: {}", var1, var2);
>> }
>>
>> If we have to check it is, what is the best way to check it? Assign it to
>> a final variable in the class header or check it every time where their is
>> a debug log like above code?
>>
>> Thanks!
>>
>> *Jayanga Kaushalya*
>> Software Engineer
>> Mobile: +94777860160
>> WSO2 Inc. | http://wso2.com
>> lean.enterprise.middleware
>>
>
>
>
> --
> *Afkham Azeez*
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * *
> *email: **az...@wso2.com* 
> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
> *http://blog.afkham.org* 
> *twitter: **http://twitter.com/afkham_azeez*
> 
> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
> *
>
> *Lean . Enterprise . Middleware*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] YAML configuration for HTTP Monitoring Interceptor in MSF4J

2016-06-09 Thread Afkham Azeez
We are building a separate util which will take care of loading stuff from
the env & making it possible to override the config using a
deployment.properties file. Ideally you should be using that util. We can
have it ready by the end of this week.

On Thu, Jun 9, 2016 at 2:40 PM, Isuru Perera  wrote:

> Hi,
>
> Currently the MSF4J uses environment variables to configure HTTP
> Monitoring Interceptor and Metrics Interceptor.
>
> In Metrics 2.0.0-SNAPSHOT, there is a yaml file for metrics configuration.
> I'm now integrating Metrics 2.0.0 to MSF4J. Therefore the metrics
> configurations must be done from the yaml file. The yaml file supports
> environment variable references.
>
> I will add another yaml file for configuring HTTP Monitoring Interceptor
> in MSF4J.
>
> How about httpmonitoring.yml for configuration file?
>
> Then we will have httpmonitoring.yml for HTTP Monitoring Interceptor and
> metrics.yml for Metrics Interceptor. Both configurations can refer to
> common environment variables if both are using the same WSO2 DAS.
>
> Any feedback on $subject?
>
> Thanks!
>
> Best Regards,
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* *
*email: **az...@wso2.com* 
* cell: +94 77 3320919blog: **http://blog.afkham.org*

*twitter: **http://twitter.com/afkham_azeez*

*linked-in: **http://lk.linkedin.com/in/afkhamazeez
*

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


Re: [Dev] [IS 510] Keystore configs required in multiple locations

2016-06-09 Thread Udara Liyanage
Hi Maliti,

We removed it from repo/conf, then IS throws errors when starting.

On Thu, Jun 9, 2016 at 5:25 AM, Malithi Edirisinghe 
wrote:

>
>
> On Thu, Jun 9, 2016 at 11:48 AM, Udara Liyanage  wrote:
>
>> Hi,
>>
>> When migrating from IS 500 to 510 we get keystore errors while starting
>> up the server regardless of the fact that all configurations are correct.
>> We noticed that IS 510 has another configuration file
>> (repository/conf/identity/EndpointConfig.properties.) which requires
>> keystore configurations.
>>
>> According to the doc, this is useful when the web app is hosted outside
>> of IS. But IS gives web app deployment error if I remove this file from IS.
>> If it is to be deployed externally, IS server should start without any
>> issue without this file existing.
>>
>
> Did you try removing the file from the repository/conf path or from the
> webapp itself.
> AFAIK, it can be removed from the repository/conf path and the app will
> rely on the file within the web application it self. It will behave
> similarly when deployed externally.
>
>
>>
>> [1]
>> https://docs.wso2.com/display/IS510/Hosting+the+Authentication+Endpoint+on+a+Separate+Server
>>
>>
>> --
>>
>> 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
>>
>>
> Thanks,
> Malithi
>
>
> --
>
> *Malithi Edirisinghe*
> Associate Technical Lead
> WSO2 Inc.
>
> Mobile : +94 (0) 718176807
> malit...@wso2.com
>



-- 

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] Checking isDebugEnabled() for formatted debug logs

2016-06-09 Thread Afkham Azeez
No need to do isDebugEnabled ideally for formatted logs.

On Thu, Jun 9, 2016 at 3:01 PM, Jayanga Kaushalya  wrote:

> Hi,
>
> Do we need to check whether the isDebugEnabled() for formatted debug logs
> without any string concatenations? For example below code:
>
> if (log.isDebugEnabled) {
>log.debug("Test log with var: {} and var: {}", var1, var2);
> }
>
> If we have to check it is, what is the best way to check it? Assign it to
> a final variable in the class header or check it every time where their is
> a debug log like above code?
>
> Thanks!
>
> *Jayanga Kaushalya*
> Software Engineer
> Mobile: +94777860160
> WSO2 Inc. | http://wso2.com
> lean.enterprise.middleware
>



-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* *
*email: **az...@wso2.com* 
* cell: +94 77 3320919blog: **http://blog.afkham.org*

*twitter: **http://twitter.com/afkham_azeez*

*linked-in: **http://lk.linkedin.com/in/afkhamazeez
*

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


Re: [Dev] Error while registering UDF method in Spark

2016-06-09 Thread Supun Sethunga
Hi Dharshana/Sachith,

We are observing the same error in analytics-esb server as well. Even
though the exception is harmless directly, it causes any Test cases which
extend *ServerStartupBaseTest*[1]  to be failed (coz of the "ERROR" string
in the logs).

I tried excluding the UDF class in the  filter.txt, but had no luck. Same
testcases passes if we disable the coverage. :(

Any idea of a solution?

[1]
https://github.com/wso2/carbon-platform-integration-utils/blob/master/common-framework-tests/src/main/java/org/wso2/carbon/integration/common/tests/ServerStartupBaseTest.java


Thanks,
Supun

On Sun, Jun 5, 2016 at 4:17 PM, Dharshana Warusavitharana <
dharsha...@wso2.com> wrote:

> Hi Nirmal,
>
> Yes this is the nature of jacoco in coverage. We are using offline
> instrumentation which adds few data in to classes to determine whether they
> are loaded in to JVM
>
> in /src/test/resource directory you have two files called filter.txt and
> instrumentation.txt
>
> You can remove any pattern in filter.txt by
>
> -org.wso2.carbon.throttle.core.impl.ipbase.* -org.wso2.uri.template.parser.*
> Thank you,
> Dharshana.
>
> On Sun, Jun 5, 2016 at 6:28 AM, Nirmal Fernando  wrote:
>
>> Can we skip certain classes getting this $jacocoInit method?
>>
>> On Sat, Jun 4, 2016 at 11:38 PM, Sachith Withana 
>> wrote:
>>
>>> Hi Fazlan,
>>>
>>> To add to what Gimantha said, since we register methods, only the jacoco
>>> injected method would fail to register.
>>> All the other methods would be registered as UDFs.
>>>
>>> Regards,
>>> Sachith
>>>
>>> On Sat, Jun 4, 2016 at 12:35 PM, Gimantha Bandara 
>>> wrote:
>>>
 Hi Fazlan,

 Spark UDFs are the Java methods that we define. Jacoco actually injects
 a static method called "$jacocoInit" to every test class, so every UDF
 class will contain an additional method called "$jacocoInit". Spark cannot
 determine the datatypes passed in the parameters and registering
 "$jacocoInit" as a spark UDF fails. Thats why that error comes, and since
 it is not a method that we define as a spark UDF, it is harmless.

 Thanks,

 On Sat, Jun 4, 2016 at 10:12 PM, Nirmal Fernando 
 wrote:

> Hi Fazlan,
>
> AFAIK this is an unharmful error and Sachith should know some context.
>
> On Sat, Jun 4, 2016 at 10:09 PM, Fazlan Nazeem 
> wrote:
>
>> Hi,
>>
>> We are observing some errors related to UDF registration in API-M
>> analytics Test integration phase. The error keeps on printing till the
>> Spark Client is started. This error is only present during the test 
>> phase.
>> It does not occur when the server is started separately. DAS team, Any 
>> idea
>> on how we could get rid of this? Jenkins log in [1].
>>
>>  [2016-06-04 02:23:32,998] ERROR 
>> {org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor} - 
>>  Error while registering the UDF method: $jacocoInit, Cannot determine 
>> the return DataType: class [Z
>>
>> INFO  
>> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] - 
>> org.wso2.carbon.analytics.spark.core.exception.AnalyticsUDFException: 
>> Cannot determine the return DataType: class [Z
>> INFO  
>> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -  
>>   at 
>> org.wso2.carbon.analytics.spark.core.util.AnalyticsCommonUtils.getDataType(AnalyticsCommonUtils.java:104)
>> INFO  
>> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -  
>>   at 
>> org.wso2.carbon.analytics.spark.core.udf.AnalyticsUDFsRegister.registerUDF(AnalyticsUDFsRegister.java:62)
>> INFO  
>> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -  
>>   at 
>> org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.registerUDFs(SparkAnalyticsExecutor.java:414)
>> INFO  
>> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -  
>>   at 
>> org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.initializeSqlContext(SparkAnalyticsExecutor.java:378)
>> INFO  
>> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -  
>>   at 
>> org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.initializeClient(SparkAnalyticsExecutor.java:360)
>> INFO  
>> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -  
>>   at 
>> org.wso2.carbon.analytics.spark.core.internal.SparkAnalyticsExecutor.initializeSparkServer(SparkAnalyticsExecutor.java:189)
>> INFO  
>> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader] -  
>>   at 
>> org.wso2.carbon.analytics.spark.core.internal.AnalyticsComponent.activate(AnalyticsComponent.java:77)
>> INFO  
>> 

[Dev] Checking isDebugEnabled() for formatted debug logs

2016-06-09 Thread Jayanga Kaushalya
Hi,

Do we need to check whether the isDebugEnabled() for formatted debug logs
without any string concatenations? For example below code:

if (log.isDebugEnabled) {
   log.debug("Test log with var: {} and var: {}", var1, var2);
}

If we have to check it is, what is the best way to check it? Assign it to a
final variable in the class header or check it every time where their is a
debug log like above code?

Thanks!

*Jayanga Kaushalya*
Software Engineer
Mobile: +94777860160
WSO2 Inc. | http://wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Rest Services in mdm-admin

2016-06-09 Thread First NameTangwe Caleb
Good day all, 
I am having problems adding Rest Services to mdm-admin
I had some troubles with mdm-android-* I created the service and refrence in 
the permition.xml file
Creating a rest service in mdm-admin it has sefinitin as below
@GET @Path("{type}/{id}/logs") public List 
getDeviceLogs( @PathParam("type") String type, @PathParam("id") String id) 
throws MDMAPIException { List applications; 
ApplicationManagementProviderService appManagerConnector; DeviceIdentifier 
deviceIdentifier = new DeviceIdentifier(); try { 
deviceIdentifier.setType(type); deviceIdentifier.setId(id); appManagerConnector 
= MDMAPIUtils.getAppManagementService(); applications = 
appManagerConnector.getApplicationListForDevice(deviceIdentifier); } catch 
(ApplicationManagementException e) { String msg = "Error occurred while 
fetching the apps of the device."; log.error(msg, e); throw new 
MDMAPIException(msg, e); } return applications; }
Its a clone of the get list of application method with just the path and 
function name changed. when I deploy it. my webapp returns a 404 error status 
Code. 
How do i resolve this pls___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS 510] Keystore configs required in multiple locations

2016-06-09 Thread Malithi Edirisinghe
On Thu, Jun 9, 2016 at 11:48 AM, Udara Liyanage  wrote:

> Hi,
>
> When migrating from IS 500 to 510 we get keystore errors while starting up
> the server regardless of the fact that all configurations are correct. We
> noticed that IS 510 has another configuration file
> (repository/conf/identity/EndpointConfig.properties.) which requires
> keystore configurations.
>
> According to the doc, this is useful when the web app is hosted outside of
> IS. But IS gives web app deployment error if I remove this file from IS. If
> it is to be deployed externally, IS server should start without any issue
> without this file existing.
>

Did you try removing the file from the repository/conf path or from the
webapp itself.
AFAIK, it can be removed from the repository/conf path and the app will
rely on the file within the web application it self. It will behave
similarly when deployed externally.


>
> [1]
> https://docs.wso2.com/display/IS510/Hosting+the+Authentication+Endpoint+on+a+Separate+Server
>
>
> --
>
> 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
>
>
Thanks,
Malithi


-- 

*Malithi Edirisinghe*
Associate Technical Lead
WSO2 Inc.

Mobile : +94 (0) 718176807
malit...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] SnapshotService info logs to debug mode

2016-06-09 Thread Nirmal Fernando
Still see these INFO logs. Shall we please remove them?

On Wed, Apr 13, 2016 at 8:03 AM, Nirmal Fernando  wrote:

> I think I found what's happening.
>
> * CEP starts to synch from a Snapshot as soon as it got to know that
> there's a new member, hence, it complains that there're no exec. plans
> (other node is still starting up, hence no execution plans yet). (there was
> a NPE while doing this and I fixed it in
> https://github.com/wso2/siddhi/pull/135/files)
> * Then the active node, keeps trying till the other node gets to the
> correct state.
>
> And I think we can implement an exponential backoff instead of doing the
> check one after another. Wdyt?
>
>
> On Tue, Apr 12, 2016 at 2:26 PM, Nirmal Fernando  wrote:
>
>> Yes me too. There were more logs. Basically, once the other node joined,
>> these kind of logs got printed around 3/4 times.
>>
>> On Tue, Apr 12, 2016 at 2:18 PM, Sriskandarajah Suhothayan > > wrote:
>>
>>> I'm wondering why there are lots of Snapshot taken at with close time
>>> gap.
>>>
>>> On Tue, Apr 12, 2016 at 1:56 PM, Nirmal Fernando 
>>> wrote:
>>>
 Hi CEP team,

 Shall we move these info logs to debug level?

 TID: [-1] [] [2016-04-12 08:24:47,094]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
 serialization finished. 
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,096]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
 finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
 serialization started ...
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
 serialization finished. 
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,097]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
 finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,098]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
 serialization started ...
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
 serialization finished. 
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
 finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,101]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
 serialization started ...
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
 serialization finished. 
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot ...
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Taking snapshot
 finished. {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,102]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
 serialization started ...
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}

 TID: [-1] [] [2016-04-12 08:24:47,103]  INFO
 {org.wso2.siddhi.core.util.snapshot.SnapshotService} -  Snapshot
 serialization finished. 
 {org.wso2.siddhi.core.util.snapshot.SnapshotService}
 --

 Thanks & regards,
 Nirmal

 Team Lead - WSO2 Machine Learner
 Associate Technical Lead - Data Technologies Team, WSO2 Inc.
 Mobile: +94715779733
 Blog: http://nirmalfdo.blogspot.com/



>>>
>>>
>>> --
>>>
>>> *S. 

[Dev] YAML configuration for HTTP Monitoring Interceptor in MSF4J

2016-06-09 Thread Isuru Perera
Hi,

Currently the MSF4J uses environment variables to configure HTTP Monitoring
Interceptor and Metrics Interceptor.

In Metrics 2.0.0-SNAPSHOT, there is a yaml file for metrics configuration.
I'm now integrating Metrics 2.0.0 to MSF4J. Therefore the metrics
configurations must be done from the yaml file. The yaml file supports
environment variable references.

I will add another yaml file for configuring HTTP Monitoring Interceptor in
MSF4J.

How about httpmonitoring.yml for configuration file?

Then we will have httpmonitoring.yml for HTTP Monitoring Interceptor and
metrics.yml for Metrics Interceptor. Both configurations can refer to
common environment variables if both are using the same WSO2 DAS.

Any feedback on $subject?

Thanks!

Best Regards,

-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS 510] Keystore configs required in multiple locations

2016-06-09 Thread Niranjan Karunanandham
Hi Darshana,

On Thu, Jun 9, 2016 at 11:48 AM, Udara Liyanage  wrote:

> Hi,
>
> When migrating from IS 500 to 510 we get keystore errors while starting up
> the server regardless of the fact that all configurations are correct. We
> noticed that IS 510 has another configuration file
> (repository/conf/identity/EndpointConfig.properties.) which requires
> keystore configurations.
>
Is this keystore used to encrypting and decrypting values? If so, shouldn't
we use the value from carbon.xml. Any particular reason for mentioning the
keystore in another properties file?


>
> According to the doc, this is useful when the web app is hosted outside of
> IS. But IS gives web app deployment error if I remove this file from IS. If
> it is to be deployed externally, IS server should start without any issue
> without this file existing.
>
> [1]
> https://docs.wso2.com/display/IS510/Hosting+the+Authentication+Endpoint+on+a+Separate+Server
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>


Regards,
Nira
-- 


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


Re: [Dev] Modifications to the DCR endpoint

2016-06-09 Thread Amila De Silva
Hi,

IMO DCR implementation should not depend on/use AMDefaultKeyManagerImpl
because;
1. DCR offers a more basic functionality than AMDefaultKeyManagerImpl and
it should be KeyManager using DCR not the other way around.
2. Using methods in apimgt bundles will create a dependancy on those
components, so before using DCR, users would have to install apimgt
features.

So good if we can remove the call to retrieveApplication method.

On Thu, Jun 9, 2016 at 10:16 AM, Kaveesha Perera  wrote:

> Hi,
>
> I worked on a issue in APIM of DCR that was described in [1].While working
> on it, observed that it has used APIM key manager interface based
> implementations for DCR related operations.After discussed with the team,I
> have  modified the DCR endpoint implementation to calll directly the
> identity components based implementation,  than accessing it via KeyManager
> implementation.
>
> The related PR can be found from here[2].
>
> If any feedback, let me know.
>
> [1] [Architecture] Behavior of OAuth 2.0 Dynamic Client Registration
> [2] https://github.com/wso2/carbon-apimgt/pull/2495
>
>
> Regards,
> --
> Kaveesha Perera
> Intern - Software Engineering
>
> mobile: 0716130471
>



-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: WSO2 API Manager 2.0.0 BETA Released!

2016-06-09 Thread Kavitha Subramaniyam
Hi Bhathiya,

Thanks!

On Thu, Jun 9, 2016 at 1:52 PM, Bhathiya Jayasekara 
wrote:

> Hi Kavitha,
>
> Please download latest p2-repo (for BETA) from here[1]. The issue you have
> mentioned is an intermittent one and we have identified the reason. That
> needs to be fixed from IS side. We will be doing that soon.
>
> [1]
> https://svn.wso2.org/repos/wso2/scratch/2016/apim-2.0.0/p2-repos/beta/p2-repo.zip
>
> Thanks,
> Bhathiya
>
> On Thu, Jun 9, 2016 at 12:34 PM, Kavitha Subramaniyam 
> wrote:
>
>> Hi Bhathiya,
>>
>> For IS as KM setup I could use the P2 repo shared on 6th-June[1], but
>> observed CNF exception in IS side when up the apim server. We suspect the
>> reason could be the P2 repo I have used. Could you please confirm whether I
>> can use the same repo or please share if you have latest P2 repo and also
>> confirm the IS 5.2.0 pack[2] which am using is compatible with beta.
>>
>> [1]
>> https://svn.wso2.org/repos/wso2/scratch/2016/apim-2.0.0/p2-repos/beta/p2-repo.zip
>> [2] https://svn.wso2.org/repos/wso2/people/kasunb/wso2is-5.2.0
>> -SNAPSHOT.zip
>> 
>>
>> Thanks,
>> Kavitha
>>
>> On Wed, Jun 8, 2016 at 7:25 PM, Bhathiya Jayasekara 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jun 8, 2016 at 6:53 PM, Amila De Silva  wrote:
>>>

 *WSO2 API Manager 2.0.0 BETA Released!*


 We are pleased to announce the BETA release of WSO2 API Manager 2.0.0.

 WSO2 API Manager is a complete solution for designing and publishing
 APIs, securing and routing API traffic in a scalable way, whilst
 nurturing a developer community around the API ecosystem.

 This release comes with both the runtime and analytics, providing
 out-of-the-box support for API usage and performance analysis. You can
 download these distributions below.

 Runtime  - wso2am-2.0.0-BETA.zip
 
 Analytics - wso2analytics-apim-1.0.0-beta.zip
 



 *Improvements and Bug Fixes*

 Improvements

-

[APIMANAGER-3816 ] -
Admin Dashboard URL to be included in the list of services available on 
 the
carbon message console
-

[APIMANAGER-4475 ] -
API authentication error response should bear the message type provided 
 the
Accept header of the request
-

[APIMANAGER-4595 ] -
Message type of "invalid token" error message should change based on the
Content-Type Header
-

[APIMANAGER-4600 ] -
Provide a configuration to allow for disabling the Forum in the API 
 Store UI
-

[APIMANAGER-4719 ] -
Error message doesn't convey it's purpose in API Versioning
-

[APIMANAGER-4737 ] -
Remove the ( ) brackets when a description is not given for an
applicationlevel tier
-

[APIMANAGER-4740 ] -
Remove Exception thrown when subscribing to blocked subscription
-

[APIMANAGER-4852 ] -
system should allow to delete alerts that are shown on admin dashboard
-

[APIMANAGER-4893 ] -
Revisit the UI of "Add Subscription Tier"
-

[ANLYAPIM-20 ] - New
theme needed for API Analytics
-

[ANLYAPIM-20 ] - New
theme needed for API Analytics

 Bug Fixes

-

[APIMANAGER-2522 ] -
Wrong rights for the Implement Stage for creator role
-

[APIMANAGER-2688 ] -
Forum topic search issue
-

[APIMANAGER-2703 ] -
Blank drop down menu and wrong caption in the absence of tier permission
for the logged in user
-

[APIMANAGER-2922 ] -
JWT TokenGeneration Certificate Header Parameter x5t encoding.
-

[APIMANAGER-4117 ] -
exp claim in JWT does not comply with rfc7519

[Dev] Could not access DNS suffix

2016-06-09 Thread Nifras Ismail
Hi infra,

I need to configure DNS on VMware ESxi server. while i ping my machine
ipconfig I got the details as follow
[image: Inline image 1]

>From this there is DNS suffix is already available on private.wso2.com

Can't we use this DNS settings to configure a virtual appliance ( in my
case VMware ESxi Virtual Appliance)   DNS configurations?

I have tried on VMware ESxi virtual appliance it's give a ping error on
test cases.
[image: Inline image 2]

Why this is happen? why we are not able to use this DNS suffix without
setting up DNS Server or AD server

-- 
Nifras Ismail
Associate Software Engineer
WSO2
Email : nif...@wso2.com
Mobile : 0094 77 89 90 300
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: WSO2 API Manager 2.0.0 BETA Released!

2016-06-09 Thread Bhathiya Jayasekara
Hi Kavitha,

Please download latest p2-repo (for BETA) from here[1]. The issue you have
mentioned is an intermittent one and we have identified the reason. That
needs to be fixed from IS side. We will be doing that soon.

[1]
https://svn.wso2.org/repos/wso2/scratch/2016/apim-2.0.0/p2-repos/beta/p2-repo.zip

Thanks,
Bhathiya

On Thu, Jun 9, 2016 at 12:34 PM, Kavitha Subramaniyam 
wrote:

> Hi Bhathiya,
>
> For IS as KM setup I could use the P2 repo shared on 6th-June[1], but
> observed CNF exception in IS side when up the apim server. We suspect the
> reason could be the P2 repo I have used. Could you please confirm whether I
> can use the same repo or please share if you have latest P2 repo and also
> confirm the IS 5.2.0 pack[2] which am using is compatible with beta.
>
> [1]
> https://svn.wso2.org/repos/wso2/scratch/2016/apim-2.0.0/p2-repos/beta/p2-repo.zip
> [2] https://svn.wso2.org/repos/wso2/people/kasunb/wso2is-5.2.0
> -SNAPSHOT.zip
> 
>
> Thanks,
> Kavitha
>
> On Wed, Jun 8, 2016 at 7:25 PM, Bhathiya Jayasekara 
> wrote:
>
>>
>>
>> On Wed, Jun 8, 2016 at 6:53 PM, Amila De Silva  wrote:
>>
>>>
>>> *WSO2 API Manager 2.0.0 BETA Released!*
>>>
>>>
>>> We are pleased to announce the BETA release of WSO2 API Manager 2.0.0.
>>>
>>> WSO2 API Manager is a complete solution for designing and publishing
>>> APIs, securing and routing API traffic in a scalable way, whilst
>>> nurturing a developer community around the API ecosystem.
>>>
>>> This release comes with both the runtime and analytics, providing
>>> out-of-the-box support for API usage and performance analysis. You can
>>> download these distributions below.
>>>
>>> Runtime  - wso2am-2.0.0-BETA.zip
>>> 
>>> Analytics - wso2analytics-apim-1.0.0-beta.zip
>>> 
>>>
>>>
>>>
>>> *Improvements and Bug Fixes*
>>>
>>> Improvements
>>>
>>>-
>>>
>>>[APIMANAGER-3816 ] -
>>>Admin Dashboard URL to be included in the list of services available on 
>>> the
>>>carbon message console
>>>-
>>>
>>>[APIMANAGER-4475 ] -
>>>API authentication error response should bear the message type provided 
>>> the
>>>Accept header of the request
>>>-
>>>
>>>[APIMANAGER-4595 ] -
>>>Message type of "invalid token" error message should change based on the
>>>Content-Type Header
>>>-
>>>
>>>[APIMANAGER-4600 ] -
>>>Provide a configuration to allow for disabling the Forum in the API 
>>> Store UI
>>>-
>>>
>>>[APIMANAGER-4719 ] -
>>>Error message doesn't convey it's purpose in API Versioning
>>>-
>>>
>>>[APIMANAGER-4737 ] -
>>>Remove the ( ) brackets when a description is not given for an
>>>applicationlevel tier
>>>-
>>>
>>>[APIMANAGER-4740 ] -
>>>Remove Exception thrown when subscribing to blocked subscription
>>>-
>>>
>>>[APIMANAGER-4852 ] -
>>>system should allow to delete alerts that are shown on admin dashboard
>>>-
>>>
>>>[APIMANAGER-4893 ] -
>>>Revisit the UI of "Add Subscription Tier"
>>>-
>>>
>>>[ANLYAPIM-20 ] - New theme
>>>needed for API Analytics
>>>-
>>>
>>>[ANLYAPIM-20 ] - New theme
>>>needed for API Analytics
>>>
>>> Bug Fixes
>>>
>>>-
>>>
>>>[APIMANAGER-2522 ] -
>>>Wrong rights for the Implement Stage for creator role
>>>-
>>>
>>>[APIMANAGER-2688 ] -
>>>Forum topic search issue
>>>-
>>>
>>>[APIMANAGER-2703 ] -
>>>Blank drop down menu and wrong caption in the absence of tier permission
>>>for the logged in user
>>>-
>>>
>>>[APIMANAGER-2922 ] -
>>>JWT TokenGeneration Certificate Header Parameter x5t encoding.
>>>-
>>>
>>>[APIMANAGER-4117 ] -
>>>exp claim in JWT does not comply with rfc7519
>>>-
>>>
>>>[APIMANAGER-4242 ] -
>>>API Custom Mediation Sequences Doesn't Foward the Call To Taget Endpoint
>>>When a Call Mediator is Used
>>>-
>>>
>>>[APIMANAGER-4325 

[Dev] [App Cloud] Reproduce the intermittent Malformed JSON Exception when calling tier api

2016-06-09 Thread Sabra Ossen
Hi All,

Regarding jira mentioned in [1] I investigated the logs and was able to
identify that the issue is from tier API which we call to get details on
subscription plans.

The stack trace is as follows.

org.mozilla.javascript.WrappedException: Wrapped
com.google.gson.JsonSyntaxException:
com.google.gson.stream.MalformedJsonException: Expected EOF at line 1
column 27 (http#17) {org.jaggeryjs.jaggery.core.manager.WebAppManager}
org.jaggeryjs.scriptengine.exceptions.ScriptException:
org.mozilla.javascript.WrappedException: Wrapped
com.google.gson.JsonSyntaxException:
com.google.gson.stream.MalformedJsonException: Expected EOF at line 1
column 27 (http#17) at
org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:575)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at
org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:432)
at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.wso2.carbon.ui.valve.XSSValve.invoke(XSSValve.java:118) at
org.wso2.carbon.ui.valve.CSRFValve.invoke(CSRFValve.java:72) at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
at
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
at
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatSessionReplicationValve.invoke(CarbonTomcatSessionReplicationValve.java:39)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:333)
at
org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:219)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745) Caused by:
org.mozilla.javascript.WrappedException: Wrapped
com.google.gson.JsonSyntaxException:
com.google.gson.stream.MalformedJsonException: Expected EOF at line 1
column 27 (http#17) at
org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754) at
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148) at
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386) at
org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63) at
org.mozilla.javascript.gen.http_6._c_anonymous_2(http:17) at
org.mozilla.javascript.gen.http_6.call(http) at
org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63) at
org.mozilla.javascript.gen.http_6._c_anonymous_5(http:195) at
org.mozilla.javascript.gen.http_6.call(http) at

Re: [Dev] [GREG] Invalid value error for REG_CREATED_TIME column in REG_RESOURCE with mysql 5.7

2016-06-09 Thread Thilini Cooray
[+Uvindra]

Hi,

IMO we need to go for a solution which we do not have to push users to
change their database server settings as all the users may not have direct
access or their company policies may not allow such.

I suppose that we can overcome this issue by removing NOT NULL attribute as
we always fill these time stamp columns on every database update operation.

As per the article [1], I came across another approach which we can try out
just in case we will not retrieve any values for these columns.
We can check the behaviour of REG_RESOURCE table when created time set
to DEFAULT
CURRENT_TIMESTAMP and last updated time set to ON UPDATE CURRENT_TIMESTAMP. By
that AFAIU the default value of created time will be set to current time
and won't get updated while last_updated_time will get updated on each
record modification.


[1] http://dev.mysql.com/doc/refman/5.7/en/timestamp-initialization.html

Thanks.




On Thu, Jun 9, 2016 at 12:16 PM, Sewmini Jayaweera  wrote:

> Hi All,
>
> I get "ERROR 1067 (42000): Invalid default value for
> 'REG_LAST_UPDATED_TIME' error when sourcing
> '/dbscripts/mysql.sql, even after removing 'DEFAULT 0'
>  Please find further information below.
>
> *1. Issue description*
>
> CREATE TABLE IF NOT EXISTS REG_RESOURCE(
> REG_PATH_ID INTEGER NOT NULL,
> REG_NAMEVARCHAR(256),
> REG_VERSION INTEGER NOT NULL AUTO_INCREMENT,
> REG_MEDIA_TYPE  VARCHAR(500),
> REG_CREATOR VARCHAR(31) NOT NULL,
> REG_CREATED_TIMETIMESTAMP NOT NULL,
> REG_LAST_UPDATORVARCHAR(31),
> REG_LAST_UPDATED_TIMETIMESTAMP NOT NULL,
> REG_DESCRIPTION VARCHAR(1000),
> REG_CONTENT_ID  INTEGER,
> REG_TENANT_ID INTEGER DEFAULT 0,
> REG_UUID VARCHAR(100) NOT NULL,
> CONSTRAINT PK_REG_RESOURCE PRIMARY KEY(REG_VERSION,
> REG_TENANT_ID)
> )ENGINE INNODB;
>
> When creating above table "ERROR 1067 (42000): Invalid default value for
> 'REG_LAST_UPDATED_TIME' error occurred and table didn't get created. Please
> note that this error shows *only when there are two timestamp columns* 
> (REG_CREATED_TIME
> and REG_LAST_UPDATED_TIME) in the table.
>
> *2. What happens when there are two time stamp columns?*
>
> According to [1] when we have two timestamp columns not declared an
> explicit 'DEFAULT' or 'ON UPDATE' clause, first column is automatically
> assigned the DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP
> attributes, while the second one is assigned the '-00-00 00:00:00' (the
> “zero” timestamp).
>
> *3. Why are we getting the Error explained In issue description?*
>
> When 'strict SQL mode' and ' NO_ZERO_DATE' mode is enabled in MySQL server
> the “zero” timestamp is not allowed and it gives an error [2]. In MySQL 5.7
> by default 'NO_ZERO_DATE' mode is enabled.
>
> *4.Question*
>
> As a fix I found below
>  1. Setting MySQL mode to  'ALLOW_INVALID_DATES' [3].
> EX: SET SQL_MODE='ALLOW_INVALID_DATES';
>
> *Is it okay to use this or is there a much more appropriate way of doing
> that? *
>
> [1].
> http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_explicit_defaults_for_timestamp
> [2].
> http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_zero_date
> [3].
> http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_allow_invalid_dates
>
>
> Thank You,
> Best Regards,
> Sewmini.
>
>
>
> Sewmini Jayaweera
> *Software Engineer - QA Team*
> Mobile: +94 (0) 773 381 250
> sewm...@wso2.com
>
> On Wed, May 25, 2016 at 12:13 PM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> We can verify and fix this for 4.4.6.
>>
>> On Tue, May 24, 2016 at 3:17 PM, Nuwan Dias  wrote:
>>
>>> This issue is still open.
>>>
>>> If we don't fix this before kernel 4.4.6, none of our new products are
>>> going to be compatible with MySQL 5.7. Which would be a major limitation in
>>> the platform.
>>>
>>> Thanks,
>>> NuwanD.
>>>
>>> On Tue, May 10, 2016 at 4:15 PM, Chandana Napagoda 
>>> wrote:
>>>
 Hi Janaka,

 Please note that, this fix will be available in the next kernel release.

 Regards,
 Chandana
 On May 10, 2016 3:14 PM, "Thilini Cooray"  wrote:

> Hi,
>
> A public JIRA is raised in [1].
>
> [1] https://wso2.org/jira/browse/REGISTRY-3610
>
> Thanks.
>
> On Tue, May 10, 2016 at 12:11 PM, Janaka Ranabahu 
> wrote:
>
>> Hi Thushara
>>
>> On Tue, May 10, 2016 at 12:06 PM, Thushara Ranawaka <
>> thusha...@wso2.com> wrote:
>>
>>> Hi Thilini,
>>>
>>> AFAIU you workaround need to be updated with the current
>>> timestamp[1][2]. Setting default value to zero is not nice. You might 
>>> have
>>> to figure out the correct syntax for other DB types and test against 

Re: [Dev] Emm Alpha 2.1.0 first Build Errors Pls Help

2016-06-09 Thread Inosh Perera
Hi Caleb,

You can download the alpha pack here[1].

[1]. https://github.com/wso2/product-emm/releases
/download/v2.1.0-alpha/wso2emm-2.1.0-alpha.zip

Regards,
Inosh

On Wed, Jun 8, 2016 at 11:42 PM, Darshana Gunawardana 
wrote:

> Hi Caleb,
>
> Can you specify from where do you get the source? Are you building from
> 2.1.0 alpha tag[1]?
>
> [1] https://github.com/wso2/product-emm/tree/v2.1.0-alpha
>
> Regards,
>
> On Wed, Jun 8, 2016 at 5:29 PM, First NameTangwe Caleb <
> tangweca...@yahoo.com> wrote:
>
>> I Downloaded the latest release Emm Alpha 2.1.0 and on running build "mvn
>> install" thats my error pls help
>>
>>
>>
>> *[INFO] 33 errors*
>> *[INFO] -*
>> *[INFO]
>> *
>> *[INFO] Reactor Summary:*
>> *[INFO]*
>> *[INFO] WSO2 MDM - Parent .. SUCCESS [
>>  1.995 s]*
>> *[INFO] WSO2 MDM - Mobile Device Management Admin Services . FAILURE [
>> 23.470 s]*
>> *[INFO] wso2mdm-product-mobileservices . SKIPPED*
>> *[INFO] JAX-RS Windows API . SKIPPED*
>> *[INFO] JAX-RS Android API . SKIPPED*
>> *[INFO] WSO2 EMM - Enterprise Mobility Manager End-user Web Application
>> SKIPPED*
>> *[INFO] WSO2 EMM - Enterprise Mobility Manager Web Agent ... SKIPPED*
>> *[INFO] WSO2 Mobile Device Manager (MDM) - UI styles ... SKIPPED*
>> *[INFO] WSO2 Mobile Device Manager (MDM) Features .. SKIPPED*
>> *[INFO] WSO2 Mobile Device Manager (MDM) Styles Feature  SKIPPED*
>> *[INFO] WSO2 Mobile Device Manager (MDM) - P2 Profile Gen .. SKIPPED*
>> *[INFO] WSO2 Mobile Device Manager (MDM) - Distribution  SKIPPED*
>> *[INFO] WSO2 MDM - Integration Tests ... SKIPPED*
>> *[INFO] WSO2 MDM Integration Test Common ... SKIPPED*
>> *[INFO] WSO2 MDM Integration Test Common ... SKIPPED*
>> *[INFO] WSO2 MDM - Integration Admin Clients ... SKIPPED*
>> *[INFO] WSO2 MDM - Integration Test Utils .. SKIPPED*
>> *[INFO] WSO2 MDM - Integration Test UI Pages ... SKIPPED*
>> *[INFO] WSO2 MDM Backend Integration Tests . SKIPPED*
>> *[INFO] WSO2 MDM - Integration Test UI Module .. SKIPPED*
>> *[INFO] WSO2 MDM Platform Integration Tests  SKIPPED*
>> *[INFO]
>> *
>> *[INFO] BUILD FAILURE*
>> *[INFO]
>> *
>> *[INFO] Total time: 27.131 s*
>> *[INFO] Finished at: 2016-06-08T12:39:47+01:00*
>> *[INFO] Final Memory: 67M/1279M*
>> *[INFO]
>> *
>> *[ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile
>> (default-compile) on project mdm-admin: Compilation failure: Compilation
>> failure:*
>> *[ERROR]
>> \JAVA\proMDM\product-emm-2.1.0-alpha\modules\apps\jax-rs\mdm-admin\src\main\java\org\wso2\carbon\mdm\api\Dashboard.java:[71,10]
>> error: exception SQLException is never thrown in body of corresponding try
>> statement*
>> *[ERROR]*
>> *[ERROR]
>> \JAVA\proMDM\product-emm-2.1.0-alpha\modules\apps\jax-rs\mdm-admin\src\main\java\org\wso2\carbon\mdm\api\Dashboard.java:[88,10]
>> error: exception SQLException is never thrown in body of corresponding try
>> statement*
>> *[ERROR]*
>> *[ERROR]
>> \JAVA\proMDM\product-emm-2.1.0-alpha\modules\apps\jax-rs\mdm-admin\src\main\java\org\wso2\carbon\mdm\api\Dashboard.java:[70,68]
>> error: unreported exception DataAccessLayerException; must be caught or
>> declared to be thrown*
>> *[ERROR]*
>> *[ERROR]
>> \JAVA\proMDM\product-emm-2.1.0-alpha\modules\apps\jax-rs\mdm-admin\src\main\java\org\wso2\carbon\mdm\api\Dashboard.java:[87,104]
>> error: unreported exception DataAccessLayerException; must be caught or
>> declared to be thrown*
>> *[ERROR]*
>> *[ERROR]
>> \JAVA\proMDM\product-emm-2.1.0-alpha\modules\apps\jax-rs\mdm-admin\src\main\java\org\wso2\carbon\mdm\api\Dashboard.java:[116,10]
>> error: exception SQLException is never thrown in body of corresponding try
>> statement*
>> *[ERROR]*
>> *[ERROR]
>> \JAVA\proMDM\product-emm-2.1.0-alpha\modules\apps\jax-rs\mdm-admin\src\main\java\org\wso2\carbon\mdm\api\Dashboard.java:[115,112]
>> error: unreported exception DataAccessLayerException; must be caught or
>> declared to be thrown*
>> *[ERROR]*
>> *[ERROR]
>> \JAVA\proMDM\product-emm-2.1.0-alpha\modules\apps\jax-rs\mdm-admin\src\main\java\org\wso2\carbon\mdm\api\Dashboard.java:[154,10]
>> error: exception SQLException is never thrown in body of corresponding try
>> statement*
>> *[ERROR]*
>> *[ERROR]
>> \JAVA\proMDM\product-emm-2.1.0-alpha\modules\apps\jax-rs\mdm-admin\src\main\java\org\wso2\carbon\mdm\api\Dashboard.java:[146,53]
>> error: unreported exception 

Re: [Dev] Fwd: WSO2 API Manager 2.0.0 BETA Released!

2016-06-09 Thread Kavitha Subramaniyam
Hi Bhathiya,

For IS as KM setup I could use the P2 repo shared on 6th-June[1], but
observed CNF exception in IS side when up the apim server. We suspect the
reason could be the P2 repo I have used. Could you please confirm whether I
can use the same repo or please share if you have latest P2 repo and also
confirm the IS 5.2.0 pack[2] which am using is compatible with beta.

[1]
https://svn.wso2.org/repos/wso2/scratch/2016/apim-2.0.0/p2-repos/beta/p2-repo.zip
[2] https://svn.wso2.org/repos/wso2/people/kasunb/wso2is-5.2.0-SNAPSHOT.zip


Thanks,
Kavitha

On Wed, Jun 8, 2016 at 7:25 PM, Bhathiya Jayasekara 
wrote:

>
>
> On Wed, Jun 8, 2016 at 6:53 PM, Amila De Silva  wrote:
>
>>
>> *WSO2 API Manager 2.0.0 BETA Released!*
>>
>>
>> We are pleased to announce the BETA release of WSO2 API Manager 2.0.0.
>>
>> WSO2 API Manager is a complete solution for designing and publishing
>> APIs, securing and routing API traffic in a scalable way, whilst
>> nurturing a developer community around the API ecosystem.
>>
>> This release comes with both the runtime and analytics, providing
>> out-of-the-box support for API usage and performance analysis. You can
>> download these distributions below.
>>
>> Runtime  - wso2am-2.0.0-BETA.zip
>> 
>> Analytics - wso2analytics-apim-1.0.0-beta.zip
>> 
>>
>>
>>
>> *Improvements and Bug Fixes*
>>
>> Improvements
>>
>>-
>>
>>[APIMANAGER-3816 ] -
>>Admin Dashboard URL to be included in the list of services available on 
>> the
>>carbon message console
>>-
>>
>>[APIMANAGER-4475 ] -
>>API authentication error response should bear the message type provided 
>> the
>>Accept header of the request
>>-
>>
>>[APIMANAGER-4595 ] -
>>Message type of "invalid token" error message should change based on the
>>Content-Type Header
>>-
>>
>>[APIMANAGER-4600 ] -
>>Provide a configuration to allow for disabling the Forum in the API Store 
>> UI
>>-
>>
>>[APIMANAGER-4719 ] -
>>Error message doesn't convey it's purpose in API Versioning
>>-
>>
>>[APIMANAGER-4737 ] -
>>Remove the ( ) brackets when a description is not given for an
>>applicationlevel tier
>>-
>>
>>[APIMANAGER-4740 ] -
>>Remove Exception thrown when subscribing to blocked subscription
>>-
>>
>>[APIMANAGER-4852 ] -
>>system should allow to delete alerts that are shown on admin dashboard
>>-
>>
>>[APIMANAGER-4893 ] -
>>Revisit the UI of "Add Subscription Tier"
>>-
>>
>>[ANLYAPIM-20 ] - New theme
>>needed for API Analytics
>>-
>>
>>[ANLYAPIM-20 ] - New theme
>>needed for API Analytics
>>
>> Bug Fixes
>>
>>-
>>
>>[APIMANAGER-2522 ] -
>>Wrong rights for the Implement Stage for creator role
>>-
>>
>>[APIMANAGER-2688 ] -
>>Forum topic search issue
>>-
>>
>>[APIMANAGER-2703 ] -
>>Blank drop down menu and wrong caption in the absence of tier permission
>>for the logged in user
>>-
>>
>>[APIMANAGER-2922 ] -
>>JWT TokenGeneration Certificate Header Parameter x5t encoding.
>>-
>>
>>[APIMANAGER-4117 ] -
>>exp claim in JWT does not comply with rfc7519
>>-
>>
>>[APIMANAGER-4242 ] -
>>API Custom Mediation Sequences Doesn't Foward the Call To Taget Endpoint
>>When a Call Mediator is Used
>>-
>>
>>[APIMANAGER-4325 ] -
>>Carbon console shows inconsistent error log for subsequent invocations 
>> when
>>access token is expired.
>>-
>>
>>[APIMANAGER-4468 ] -
>>ERROR - NativeWorkerPool Uncaught exception
>>-
>>
>>[APIMANAGER-4534 ] -
>>APIConsole is not showing response content type,even we set a value for
>>'produces' attribute in APIPublisher
>>-
>>
>>[APIMANAGER-4554 

Re: [Dev] [GREG] Invalid value error for REG_CREATED_TIME column in REG_RESOURCE with mysql 5.7

2016-06-09 Thread Sewmini Jayaweera
Hi All,

I get "ERROR 1067 (42000): Invalid default value for
'REG_LAST_UPDATED_TIME' error when sourcing
'/dbscripts/mysql.sql, even after removing 'DEFAULT 0'
 Please find further information below.

*1. Issue description*

CREATE TABLE IF NOT EXISTS REG_RESOURCE(
REG_PATH_ID INTEGER NOT NULL,
REG_NAMEVARCHAR(256),
REG_VERSION INTEGER NOT NULL AUTO_INCREMENT,
REG_MEDIA_TYPE  VARCHAR(500),
REG_CREATOR VARCHAR(31) NOT NULL,
REG_CREATED_TIMETIMESTAMP NOT NULL,
REG_LAST_UPDATORVARCHAR(31),
REG_LAST_UPDATED_TIMETIMESTAMP NOT NULL,
REG_DESCRIPTION VARCHAR(1000),
REG_CONTENT_ID  INTEGER,
REG_TENANT_ID INTEGER DEFAULT 0,
REG_UUID VARCHAR(100) NOT NULL,
CONSTRAINT PK_REG_RESOURCE PRIMARY KEY(REG_VERSION,
REG_TENANT_ID)
)ENGINE INNODB;

When creating above table "ERROR 1067 (42000): Invalid default value for
'REG_LAST_UPDATED_TIME' error occurred and table didn't get created. Please
note that this error shows *only when there are two timestamp columns*
(REG_CREATED_TIME
and REG_LAST_UPDATED_TIME) in the table.

*2. What happens when there are two time stamp columns?*

According to [1] when we have two timestamp columns not declared an
explicit 'DEFAULT' or 'ON UPDATE' clause, first column is automatically
assigned the DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP
attributes, while the second one is assigned the '-00-00 00:00:00' (the
“zero” timestamp).

*3. Why are we getting the Error explained In issue description?*

When 'strict SQL mode' and ' NO_ZERO_DATE' mode is enabled in MySQL server
the “zero” timestamp is not allowed and it gives an error [2]. In MySQL 5.7
by default 'NO_ZERO_DATE' mode is enabled.

*4.Question*

As a fix I found below
 1. Setting MySQL mode to  'ALLOW_INVALID_DATES' [3].
EX: SET SQL_MODE='ALLOW_INVALID_DATES';

*Is it okay to use this or is there a much more appropriate way of doing
that? *

[1].
http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_explicit_defaults_for_timestamp
[2].
http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_zero_date
[3].
http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_allow_invalid_dates


Thank You,
Best Regards,
Sewmini.



Sewmini Jayaweera
*Software Engineer - QA Team*
Mobile: +94 (0) 773 381 250
sewm...@wso2.com

On Wed, May 25, 2016 at 12:13 PM, Kishanthan Thangarajah <
kishant...@wso2.com> wrote:

> We can verify and fix this for 4.4.6.
>
> On Tue, May 24, 2016 at 3:17 PM, Nuwan Dias  wrote:
>
>> This issue is still open.
>>
>> If we don't fix this before kernel 4.4.6, none of our new products are
>> going to be compatible with MySQL 5.7. Which would be a major limitation in
>> the platform.
>>
>> Thanks,
>> NuwanD.
>>
>> On Tue, May 10, 2016 at 4:15 PM, Chandana Napagoda 
>> wrote:
>>
>>> Hi Janaka,
>>>
>>> Please note that, this fix will be available in the next kernel release.
>>>
>>> Regards,
>>> Chandana
>>> On May 10, 2016 3:14 PM, "Thilini Cooray"  wrote:
>>>
 Hi,

 A public JIRA is raised in [1].

 [1] https://wso2.org/jira/browse/REGISTRY-3610

 Thanks.

 On Tue, May 10, 2016 at 12:11 PM, Janaka Ranabahu 
 wrote:

> Hi Thushara
>
> On Tue, May 10, 2016 at 12:06 PM, Thushara Ranawaka <
> thusha...@wso2.com> wrote:
>
>> Hi Thilini,
>>
>> AFAIU you workaround need to be updated with the current
>> timestamp[1][2]. Setting default value to zero is not nice. You might 
>> have
>> to figure out the correct syntax for other DB types and test against 
>> them.
>>
> ​What Thilini is pointing is an issue in the Registry database
> creation script. Hence we will create a public JIRA and assign it to you
> guys. Please fix them.
>
> We can not modify the Registry database creation script since API
> Manager would not capture the complete scenarios of G-Reg.
>
> Thanks,
> Janaka​
>
>
>>
>>
>> [1] - DEFAULT CURRENT_TIMESTAMP
>> [2] -
>> http://stackoverflow.com/questions/168736/how-do-you-set-a-default-value-for-a-mysql-datetime-column
>>
>> Thanks,
>> Thushara.
>>
>> On Tue, May 10, 2016 at 11:52 AM, Thilini Cooray 
>> wrote:
>>
>>> Hi GReg team,
>>>
>>> We encounter following issue [1] while testing API Manager with
>>> MySQL 5.7
>>> MySQL 5.7 has enabled NO_ZERO_IN_DATE, NO_ZERO_DATE policies by
>>> default. Therefore it does not allow 0 as a valid default value for
>>> date/time.
>>>
>>> As a workaround we can set MySQL server to accept 0 changing the
>>> default server settings if the database owner agrees on it.
>>> [2] contains the related table creation 

[Dev] [IS 510] Keystore configs required in multiple locations

2016-06-09 Thread Udara Liyanage
Hi,

When migrating from IS 500 to 510 we get keystore errors while starting up
the server regardless of the fact that all configurations are correct. We
noticed that IS 510 has another configuration file
(repository/conf/identity/EndpointConfig.properties.) which requires
keystore configurations.

According to the doc, this is useful when the web app is hosted outside of
IS. But IS gives web app deployment error if I remove this file from IS. If
it is to be deployed externally, IS server should start without any issue
without this file existing.

[1]
https://docs.wso2.com/display/IS510/Hosting+the+Authentication+Endpoint+on+a+Separate+Server


-- 

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] [MB] MB 3.1.0 goes OOM with compression enabled with MSSQL as message store

2016-06-09 Thread Pumudu Ruhunage
Hi all,

we saw that in MB 3.1.0, for several scenarios (ex: 10KB messages, with
compression enabled) servers went OOM half way to 1M messages[1]. Please
note that this happens with default flow control settings.

AFAIU this is what happened.

1. With MySQL, database was the overall bottleneck in both compression and
non-compression scenarios.

2. MSSQL is faster than MySQL and with compression enabled DB is not the
bottleneck anymore in inbound message flow.
Compression was taking more execution time than db read/writes. Therefore,
compression logic becomes the bottleneck in MSSQL scenario.

3. In "contentChunckHandler" (which compress chunks if compression enabled)
has executed before[2] "messagePreprocessor" which has the flow control
logic[3] implemented. Therefore, lag in compression has not counted in flow
control logic. This leads inbound path accept messages from publishers more
than server can handle.

4. This might have lead to the OOM.

WDYT?


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

[2]
https://github.com/wso2/andes/blob/v3.1.0/modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/disruptor/inbound/InboundEventManager.java#L154

[3]
https://github.com/wso2/andes/blob/v3.1.0/modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/disruptor/inbound/MessagePreProcessor.java#L148


Thanks,
-- 
Pumudu Ruhunage
Software Engineer | WSO2 Inc
http://wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev