Re: [Dev] Fix for Lifecycle Action[promote/demote] is not properly works in Enterprise Store

2015-11-19 Thread Rajeenthini Satkunam
Adding waruna.

On Thu, Nov 19, 2015 at 2:15 PM, Rajeenthini Satkunam 
wrote:

> Hi All,
>
> I have fixed this issue [1] in the Pull Request [2] .We have merged the
> PR to jaggery-extensions master SNAPSHOT version now.To include this fix in
> GREG, update the jaggery-extensions before next release of GREG.
>
> [1] - https://wso2.org/jira/browse/STORE-720
> [2] - https://github.com/wso2/jaggery-extensions/pull/31
> --
>
> *Thank You.*
>
> *Rajeenthini Satkunam*
>
> *Associate Software Engineer | WSO2*
>
>
> *E:rajeenth...@wso2.com *
>
> *M :+94770832823 <%2B94770832823>   *
>
>


-- 

*Thank You.*

*Rajeenthini Satkunam*

*Associate Software Engineer | WSO2*


*E:rajeenth...@wso2.com *

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


[Dev] Fix for Lifecycle Action[promote/demote] is not properly works in Enterprise Store

2015-11-19 Thread Rajeenthini Satkunam
Hi All,

I have fixed this issue [1] in the Pull Request [2] .We have merged the PR
to jaggery-extensions master SNAPSHOT version now.To include this fix in
GREG, update the jaggery-extensions before next release of GREG.

[1] - https://wso2.org/jira/browse/STORE-720
[2] - https://github.com/wso2/jaggery-extensions/pull/31
-- 

*Thank You.*

*Rajeenthini Satkunam*

*Associate Software Engineer | WSO2*


*E:rajeenth...@wso2.com *

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


Re: [Dev] Issue in carbon logs after changing carbon.kernel.version from 4.4.1 to 4.4.2

2015-11-19 Thread Sajith Ariyarathna
Hi Malithi,

Seems that when you log.error(message, e); the stack trace does not get
sanitized, but if you do log.error(e); then the stack trace get sanitized.

Currently we are developing Jaggery app; when an exception occurred in
Jaggery code, Rhino engine logs the stack trace and that stack trace is
sanitized. Looks like our issue goes to Jaggery.

I also notices that in Jaggery, logging exceptions like log.error(e);
outputs a sanitized stack trace. One can avoid that by logging
exceptions log.error(message,
e); like this.

Hoping to discuss this with the Jaggery team. Thank you very much for your
assistance regarding this matter.


On Thu, Nov 19, 2015 at 12:26 PM, Malithi Edirisinghe 
wrote:

> Hi Sajith,
>
> Actually the stack trace does not get sanitized. Could you please give
> some example.
> I have tried a simple test as below
>
> try {
> log.info("XACML policy schema loaded \n successfully.");
> throw new Exception("Test \n Exception");
> } catch (Exception e) {
> log.error("Logging Test \n Exception", e);
> }
>
> But this prints the log properly and here the stack trace is not
> sanitized. Only the message that you log as an error or debug log gets
> sanitized. Even if you refer the code line that I have pointed above you
> will see it.
>
> So the output of the above code segment will be something like below.
>
> [2015-11-19 01:02:07,246]  INFO
> {org.wso2.carbon.identity.entitlement.internal.SchemaBuilder} -  XACML
> policy schema loaded _ successfully. (Sanitized)
>
> [2015-11-19 01:02:07,246] ERROR
> {org.wso2.carbon.identity.entitlement.internal.SchemaBuilder} -  Logging
> Test _ Exception (Sanitized)
>
> java.lang.Exception: Test
>
>  Exception
>
> at
> org.wso2.carbon.identity.entitlement.internal.SchemaBuilder.run(SchemaBuilder.java:46)
>
> at java.lang.Thread.run(Thread.java:722)
>
> Here you can clearly see that the stack trace is not sanitized. It prints
> the new line character in the exception as it is in the stack trace.
>
> Thanks,
>
> Malithi.
>
> On Thu, Nov 19, 2015 at 11:59 AM, Sajith Ariyarathna 
> wrote:
>
>> Hi Malithi,
>>
>> My concern is that current fix sanitizing stack traces even though stack
>> trace does not have CRLF injections in it. I believe sanitizing log
>> messages (e.g. log.error(message) , excaption.getMessage() )
>> is sufficient to prevent  CRLF injections in logs.
>>
>> I think we can overcome this problem with the my earlier proposed
>> approach (extending log4j PatternLayout class and overriding the format
>>  method).
>>
>> Thanks.
>>
>>
>> On Thu, Nov 19, 2015 at 1:07 AM, Malithi Edirisinghe 
>> wrote:
>>
>>> Hi Sajith,
>>>
>>> With the present fix there's no way that stack traces could be sanitized
>>> unless e.getMessage is explicitly used as the log message.
>>>
>>> As you can see at [1] only the logging message is sanitized here.
>>> Could you please elaborate more in case i'm misunderstanding your
>>> concern.
>>>
>>> [1]
>>> https://github.com/wso2/carbon-kernel/pull/278/files#diff-5859ce33cfadc4c7933a6a08a605f8d1R72
>>>
>>> Thanks,
>>> Malithi.
>>>
>>> On Wed, Nov 18, 2015 at 6:42 PM, Sajith Ariyarathna 
>>> wrote:
>>>
 Hi All,

 Me and RasikaP dig a little deep to find a solution to this problem.

 Instead of sanitizing final log message, you can sanitize when it is
 formatted by extending the PatternLayout [1] class. Refer this code [2],
 where public String format(LoggingEvent event) method is overridden to
 achieve a custom log message formatting.  You can configure log4j
 (log4j.xml) to use your extended Pattern Layout class by adding >>> class="org.apache.log4j.MyPatternLayout"> in your  .

 WDYT?

 [1]
 http://grepcode.com/file/repo1.maven.org/maven2/log4j/log4j/1.2.17/org/apache/log4j/PatternLayout.java?av=f

 [2]
 http://apache-logging.6191.n7.nabble.com/how-to-search-and-replace-message-text-in-outgoing-log-messages-td35625.html#a35919

 Thanks.

 On Wed, Nov 18, 2015 at 4:18 PM, Sajith Ariyarathna 
 wrote:

> Hi Malithi,
>
> The problem with the given fix is that, even stack traces are
> sanitized. IMO, you don't need to sanitize stack traces. Sanitizing log
> messages (log.error("message"), exception.getMessage() ) is
> sufficient to prevent log forging.
>
> This problem affects to all products. I think we have to fix this ASAP.
>
> Thanks.
>
> On Wed, Nov 18, 2015 at 3:24 PM, Malithi Edirisinghe <
> malit...@wso2.com> wrote:
>
>> Hi All,
>>
>> This was added for a security fix [1] and was discussed at
>> security-leads@ [2]. So the present fix affects to the existing
>> appenders (CarbonConsoleAppender, CarbonDailyRollingFileAppender,
>> MemoryAppender).
>> The other option that we could have done is to extend the existing
>> appenders and introduce 

[Dev] [Automation][DS] Build is not getting fail since the find-bug finds bugs in the code

2015-11-19 Thread Rajeenthini Satkunam
Hi all,

I would like to integrate find-bug plugin with a maven build of product DS
Integration test module(Dashboard Server).So I have added the plugin maven
find-bug under plugins in POM of integration module of product DS.
Here is the code I have added in POM.


org.codehaus.mojo
findbugs-maven-plugin

Max
Low
true

${project.build.directory}/findbugs
true
true



analyze-compile
verify

check





But the build is not getting fail even I got some bugs through find-bug
tool.I can produce the findbugsXml.xml file under directory findBug.Can
anyone tell that do I need to add any other configurations to run this tool
for test sources rather than adding this plugin to POM?

I have asked this from StackOverFlow as well you can find the question
here[1].
[1] -
http://stackoverflow.com/questions/33796044/how-can-i-integrate-find-bug-maven-plugin-to-integration-test-module

references

[2] - http://gleclaire.github.io/findbugs-maven-plugin/
[3] -
http://stackoverflow.com/questions/33234692/maven-findbugs-plugin-how-to-run-findbug-on-the-test-classes
-- 

*Thank You.*

*Rajeenthini Satkunam*

*Associate Software Engineer | WSO2*


*E:rajeenth...@wso2.com *

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


Re: [Dev] Updating data-publisher agents in carbon-multitenancy

2015-11-19 Thread Nipuni Perera
Hi Amila,

Thanks for the clarification. We are testing if products can use
carbon-commons 4.5.0, without rewriting data publishers in
carbon-deployment and carbon-multitenancy (as we don't have a requirement
atm). Hence we will not updating usage.agent bundle in carbon-multitenancy
as mentioned.
We will consider removing the usage.agent bundle in future releases if it
is not used anymore.

Thanks,
Nipuni

On Wed, Nov 18, 2015 at 7:25 PM, Amila Maha Arachchi 
wrote:

> Hi Nipuni,
>
> Those methods in usage.agent are not used now (not even the usage.agent
> bundle). Ideally, we should get rid of the usage.agent bundle. These were
> used in the days of StratosLive.
>
> Regards,
> Amila.
>
> On Tue, Nov 17, 2015 at 7:36 PM, Nipuni Perera  wrote:
>
>> Hi,
>>
>> I am trying to update carbon-deployment with new data publishers
>> introduced with carbon-commons 4.5.0 and carbon-analytics-common 5.0.6.
>> I have rewritten the data publishers in carbon-deployment and need to test
>> the changes with a AS pack, publishing webapp statistics.
>> While building product-as I could see that carbon-multitenancy need to
>> be updated with the new data publishers as well. I am working on updating
>> carbon-multitenancy to use carbon-commons 4.5.0 and carbon-analytics-common
>> 5.0.6. I am updating methods in : org.wso2.carbon.usage.agent.util.
>> PublisherUtils.
>>
>> Will updating carbon-multitenancy a productive effort? Are we still
>> using this utility methods to publish usage statistics?
>>
>> Thanks,
>> Nipuni
>>
>> --
>> Nipuni Perera
>> Software Engineer; WSO2 Inc.; http://wso2.com
>> Email: nip...@wso2.com
>> Git hub profile: https://github.com/nipuni
>> Blog : http://nipunipererablog.blogspot.com/
>> Mobile: +94 (71) 5626680
>> 
>>
>>
>
>
> --
> *Amila Maharachchi*
> Senior Technical Lead
> WSO2, Inc.; http://wso2.com
>
> Blog: http://maharachchi.blogspot.com
> Mobile: +94719371446
>
>


-- 
Nipuni Perera
Software Engineer; WSO2 Inc.; http://wso2.com
Email: nip...@wso2.com
Git hub profile: https://github.com/nipuni
Blog : http://nipunipererablog.blogspot.com/
Mobile: +94 (71) 5626680

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


Re: [Dev] [ESB] Caching with Service Chaining Pattern

2015-11-19 Thread Viraj Senevirathne
Hi Ruwan,

I was able to use the cache mediator for above scenario by using a separate
sequence for state 2 of the use case.

So If there is a cache hit, response will be taken from the memory and
passed to the *reqCredit* Sequence.

If there is no cache hit it will follow the same way and go it case
*PERSON_INFO_REQUEST
*and response will be put in to the cache memory. After that it will call
the same sequence *reqCredit. *

So it will work as Expected.

I have attached the new Proxy configuration and Sequence configuration.

Thank you,


On Wed, Nov 18, 2015 at 11:01 PM, Ruwan Abeykoon  wrote:

> Hi Devs,
> I would like to know how we can cache the Response to first service only
> when we adopt "Service Chaining Pattern" [1]
>
> For example, how I can cache the response (3) only and skip (2 and 3) for
> subsequent requests until cache timeout occurs. [2]
>
> As far as I can understand, Cache mediator can not be used as
> "collector=true" can be placed only at out-sequence. We need to put the
> response collector on "in-sequence"
>
> [1] https://docs.wso2.com/display/ESB481/Service+Chaining+Example
> [2]
> https://docs.wso2.com/download/attachments/33136352/327.png?version=1=1391008346000=v2
>
> --
>
> *Ruwan Abeykoon*
> *Architect,*
> *WSO2, Inc. http://wso2.com  *
> *lean.enterprise.middleware.*
>
> email: ruw...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Viraj Senevirathne
Software Engineer; WSO2, Inc.

Mobile : +94 71 958 0269
Email : vir...@wso2.com

http://ws.apache.org/ns/synapse;
   name="CreditProxy"
   transports="https http"
   startOnLoad="true"
   trace="disable">
   
   
  
 

 
 http://samples.esb.wso2.org;
   name="ORG_AMOUNT"
   expression="//sam:credit/sam:amount"/>
 


 
 http://samples.esb.wso2.org;
   name="ORG_ID"
   expression="//sam:credit/sam:id"/>
 

   http://samples.esb.wso2.org;>
  ?
   


 
 

http://samples.esb.wso2.org; xpath="//sam:get/sam:id"/>
 
 

 
 
 

 
  
  
 

   
   


   
  
   
   

 
  
   
   


http://ws.apache.org/ns/synapse;
  name="reqCredit"
  trace="disable">
   
  
   
   
  http://org.apache.synapse/xsd;
name="amount"
expression="get-property('ORG_AMOUNT')"/>
   
   
  
   
   
   
  
   

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


Re: [Dev] Updating data-publisher agents in carbon-multitenancy

2015-11-19 Thread Rukshan Premathunga
Hi Nipuni,

APIM Still use the carbon-multitenancy like below.


org.wso2.carbon.multitenancy
org.wso2.carbon.tenant.usage.agent


can you lokking to this?


Thanks and Regards.

On Thu, Nov 19, 2015 at 2:39 PM, Nipuni Perera  wrote:

> Hi Amila,
>
> Thanks for the clarification. We are testing if products can use
> carbon-commons 4.5.0, without rewriting data publishers in
> carbon-deployment and carbon-multitenancy (as we don't have a requirement
> atm). Hence we will not updating usage.agent bundle in carbon-multitenancy
> as mentioned.
> We will consider removing the usage.agent bundle in future releases if it
> is not used anymore.
>
> Thanks,
> Nipuni
>
> On Wed, Nov 18, 2015 at 7:25 PM, Amila Maha Arachchi 
> wrote:
>
>> Hi Nipuni,
>>
>> Those methods in usage.agent are not used now (not even the usage.agent
>> bundle). Ideally, we should get rid of the usage.agent bundle. These were
>> used in the days of StratosLive.
>>
>> Regards,
>> Amila.
>>
>> On Tue, Nov 17, 2015 at 7:36 PM, Nipuni Perera  wrote:
>>
>>> Hi,
>>>
>>> I am trying to update carbon-deployment with new data publishers
>>> introduced with carbon-commons 4.5.0 and carbon-analytics-common 5.0.6.
>>> I have rewritten the data publishers in carbon-deployment and need to test
>>> the changes with a AS pack, publishing webapp statistics.
>>> While building product-as I could see that carbon-multitenancy need to
>>> be updated with the new data publishers as well. I am working on updating
>>> carbon-multitenancy to use carbon-commons 4.5.0 and carbon-analytics-common
>>> 5.0.6. I am updating methods in : org.wso2.carbon.usage.agent.util.
>>> PublisherUtils.
>>>
>>> Will updating carbon-multitenancy a productive effort? Are we still
>>> using this utility methods to publish usage statistics?
>>>
>>> Thanks,
>>> Nipuni
>>>
>>> --
>>> Nipuni Perera
>>> Software Engineer; WSO2 Inc.; http://wso2.com
>>> Email: nip...@wso2.com
>>> Git hub profile: https://github.com/nipuni
>>> Blog : http://nipunipererablog.blogspot.com/
>>> Mobile: +94 (71) 5626680
>>> 
>>>
>>>
>>
>>
>> --
>> *Amila Maharachchi*
>> Senior Technical Lead
>> WSO2, Inc.; http://wso2.com
>>
>> Blog: http://maharachchi.blogspot.com
>> Mobile: +94719371446
>>
>>
>
>
> --
> Nipuni Perera
> Software Engineer; WSO2 Inc.; http://wso2.com
> Email: nip...@wso2.com
> Git hub profile: https://github.com/nipuni
> Blog : http://nipunipererablog.blogspot.com/
> Mobile: +94 (71) 5626680
> 
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Updating data-publisher agents in carbon-multitenancy

2015-11-19 Thread Amila Maha Arachchi
Are org.wso2.carbon.usage.agent and org.wso2.carbon.tenant.usage.agent the
same?

On Thu, Nov 19, 2015 at 3:26 PM, Rukshan Premathunga 
wrote:

> Hi Nipuni,
>
> APIM Still use the carbon-multitenancy like below.
>
> 
> org.wso2.carbon.multitenancy
> org.wso2.carbon.tenant.usage.agent
> 
>
> can you lokking to this?
>
>
> Thanks and Regards.
>
> On Thu, Nov 19, 2015 at 2:39 PM, Nipuni Perera  wrote:
>
>> Hi Amila,
>>
>> Thanks for the clarification. We are testing if products can use
>> carbon-commons 4.5.0, without rewriting data publishers in
>> carbon-deployment and carbon-multitenancy (as we don't have a requirement
>> atm). Hence we will not updating usage.agent bundle in carbon-multitenancy
>> as mentioned.
>> We will consider removing the usage.agent bundle in future releases if
>> it is not used anymore.
>>
>> Thanks,
>> Nipuni
>>
>> On Wed, Nov 18, 2015 at 7:25 PM, Amila Maha Arachchi 
>> wrote:
>>
>>> Hi Nipuni,
>>>
>>> Those methods in usage.agent are not used now (not even the usage.agent
>>> bundle). Ideally, we should get rid of the usage.agent bundle. These were
>>> used in the days of StratosLive.
>>>
>>> Regards,
>>> Amila.
>>>
>>> On Tue, Nov 17, 2015 at 7:36 PM, Nipuni Perera  wrote:
>>>
 Hi,

 I am trying to update carbon-deployment with new data publishers
 introduced with carbon-commons 4.5.0 and carbon-analytics-common
 5.0.6. I have rewritten the data publishers in carbon-deployment and need
 to test the changes with a AS pack, publishing webapp statistics.
 While building product-as I could see that carbon-multitenancy need to
 be updated with the new data publishers as well. I am working on updating
 carbon-multitenancy to use carbon-commons 4.5.0 and carbon-analytics-common
 5.0.6. I am updating methods in : org.wso2.carbon.usage.agent.util.
 PublisherUtils.

 Will updating carbon-multitenancy a productive effort? Are we still
 using this utility methods to publish usage statistics?

 Thanks,
 Nipuni

 --
 Nipuni Perera
 Software Engineer; WSO2 Inc.; http://wso2.com
 Email: nip...@wso2.com
 Git hub profile: https://github.com/nipuni
 Blog : http://nipunipererablog.blogspot.com/
 Mobile: +94 (71) 5626680
 


>>>
>>>
>>> --
>>> *Amila Maharachchi*
>>> Senior Technical Lead
>>> WSO2, Inc.; http://wso2.com
>>>
>>> Blog: http://maharachchi.blogspot.com
>>> Mobile: +94719371446
>>>
>>>
>>
>>
>> --
>> Nipuni Perera
>> Software Engineer; WSO2 Inc.; http://wso2.com
>> Email: nip...@wso2.com
>> Git hub profile: https://github.com/nipuni
>> Blog : http://nipunipererablog.blogspot.com/
>> Mobile: +94 (71) 5626680
>> 
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Rukshan Chathuranga.
> Software Engineer.
> WSO2, Inc.
>



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

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


Re: [Dev] Updating data-publisher agents in carbon-multitenancy

2015-11-19 Thread Sanjeewa Malalgoda
In our APIMgtUsageHandler we use
publisherUtils(org.wso2.carbon.usage.agent.util.PublisherUtils) class to
publish events.
So we have dependency to org.wso2.carbon.usage.agent(2.1.2) jar.
At this point our commons version is 4.4.8 for APIM 1.10 release.

So do you suggest to move commons 4.5.0 and use the publisher agent
available there?

Thanks,
sanjeewa.

On Thu, Nov 19, 2015 at 5:11 PM, Amila Maha Arachchi 
wrote:

> Please check with Sanjeewa on whether APIM is using the old usage.agent
> component or is this a new one. I was under the impression that old agent
> is not used anywhere anymore.
>
> On Thu, Nov 19, 2015 at 4:58 PM, Rukshan Premathunga 
> wrote:
>
>> Hi Amila,
>>
>> I think yes. I think both contain same package names.
>>
>> Thanks and Regards.
>>
>> On Thu, Nov 19, 2015 at 4:55 PM, Amila Maha Arachchi 
>> wrote:
>>
>>> Are org.wso2.carbon.usage.agent and org.wso2.carbon.tenant.usage.agent
>>> the same?
>>>
>>> On Thu, Nov 19, 2015 at 3:26 PM, Rukshan Premathunga 
>>> wrote:
>>>
 Hi Nipuni,

 APIM Still use the carbon-multitenancy like below.

 
 org.wso2.carbon.multitenancy
 org.wso2.carbon.tenant.usage.agent
 

 can you lokking to this?


 Thanks and Regards.

 On Thu, Nov 19, 2015 at 2:39 PM, Nipuni Perera  wrote:

> Hi Amila,
>
> Thanks for the clarification. We are testing if products can use
> carbon-commons 4.5.0, without rewriting data publishers in
> carbon-deployment and carbon-multitenancy (as we don't have a requirement
> atm). Hence we will not updating usage.agent bundle in carbon-multitenancy
> as mentioned.
> We will consider removing the usage.agent bundle in future releases
> if it is not used anymore.
>
> Thanks,
> Nipuni
>
> On Wed, Nov 18, 2015 at 7:25 PM, Amila Maha Arachchi 
> wrote:
>
>> Hi Nipuni,
>>
>> Those methods in usage.agent are not used now (not even the
>> usage.agent bundle). Ideally, we should get rid of the usage.agent 
>> bundle.
>> These were used in the days of StratosLive.
>>
>> Regards,
>> Amila.
>>
>> On Tue, Nov 17, 2015 at 7:36 PM, Nipuni Perera 
>> wrote:
>>
>>> Hi,
>>>
>>> I am trying to update carbon-deployment with new data publishers
>>> introduced with carbon-commons 4.5.0 and carbon-analytics-common
>>> 5.0.6. I have rewritten the data publishers in carbon-deployment and 
>>> need
>>> to test the changes with a AS pack, publishing webapp statistics.
>>> While building product-as I could see that carbon-multitenancy need
>>> to be updated with the new data publishers as well. I am working on
>>> updating carbon-multitenancy to use carbon-commons 4.5.0
>>> and carbon-analytics-common 5.0.6. I am updating methods in :
>>> org.wso2.carbon.usage.agent.util.PublisherUtils.
>>>
>>> Will updating carbon-multitenancy a productive effort? Are we still
>>> using this utility methods to publish usage statistics?
>>>
>>> Thanks,
>>> Nipuni
>>>
>>> --
>>> Nipuni Perera
>>> Software Engineer; WSO2 Inc.; http://wso2.com
>>> Email: nip...@wso2.com
>>> Git hub profile: https://github.com/nipuni
>>> Blog : http://nipunipererablog.blogspot.com/
>>> Mobile: +94 (71) 5626680
>>> 
>>>
>>>
>>
>>
>> --
>> *Amila Maharachchi*
>> Senior Technical Lead
>> WSO2, Inc.; http://wso2.com
>>
>> Blog: http://maharachchi.blogspot.com
>> Mobile: +94719371446
>>
>>
>
>
> --
> Nipuni Perera
> Software Engineer; WSO2 Inc.; http://wso2.com
> Email: nip...@wso2.com
> Git hub profile: https://github.com/nipuni
> Blog : http://nipunipererablog.blogspot.com/
> Mobile: +94 (71) 5626680
> 
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Rukshan Chathuranga.
 Software Engineer.
 WSO2, Inc.

>>>
>>>
>>>
>>> --
>>> *Amila Maharachchi*
>>> Senior Technical Lead
>>> WSO2, Inc.; http://wso2.com
>>>
>>> Blog: http://maharachchi.blogspot.com
>>> Mobile: +94719371446
>>>
>>>
>>
>>
>> --
>> Rukshan Chathuranga.
>> Software Engineer.
>> WSO2, Inc.
>>
>
>
>
> --
> *Amila Maharachchi*
> Senior Technical Lead
> WSO2, Inc.; http://wso2.com
>
> Blog: http://maharachchi.blogspot.com
> Mobile: +94719371446
>
>


-- 

*Sanjeewa Malalgoda*
WSO2 Inc.
Mobile : +94713068779

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

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


Re: [Dev] [BRS] Error in CacheCleanupTask in BRS clustered setup when one node goes OOM

2015-11-19 Thread Milinda Perera
Hi Azeez,

Actually we analyzed the OOM issue and figured out that it's from BRS side
[1] and at the moment we fixed it for stateless rule sessions. But there
are limitations for stateful rule sessions.

When request is received by BRS, It creates knowledgeSession from
KnowledgeBase and feed facts and execute rules.

In Drools there are two types of Knowledge sessions
(1) Stateful [2]
Stateless knowledge sessions are long lived and knowledge keeps
reference until they get disposed. In BRS we have binded Stateful sessions
with Axis2 sessions.

(2) Stateless. [3]
Stateless knowledge session is similar to a function, feed facts,
execute rules and receive results. Stateless knowledge session simply wraps
Stateful knowledge session and dispose it at the end of execution.

Since the knowledge base[4] keeps reference for Stateful knowledge
sessions, memory consumed by knowledgeBase get increase and goes OOM if we
don't dispose them.

Since the stateful rule service will use axis2 transport session scope , we
used the axis2 Lifecyle class to dispose the created session object.
However, it seems the underlying implementation of axis2 does not call the
relevant lifecyle interface dispose method when the session expires. It is
only called when the service context get garbage collected. This is the
cause of the OOM issue.

We tried this scennario to reproduce jira [5]. However, we see that if by
some reason a node in the cluster crashed, the one of other nodes will
start throwing the above mentioned hazelcast exception from cache cleanup
task.
What could be the reason?

[1] mail: [BRS] Solution for OOM issue due to misuse of drools engine in
BRS 220
[2]
https://docs.jboss.org/jbpm/v5.1/javadocs/org/drools/runtime/StatefulKnowledgeSession.html
[3]
https://docs.jboss.org/jbpm/v5.1/javadocs/org/drools/runtime/StatelessKnowledgeSession.html
[4] https://docs.jboss.org/jbpm/v5.1/javadocs/org/drools/KnowledgeBase.html
[5] https://wso2.org/jira/browse/BRS-100


Thanks,
Milinda

On Thu, Nov 19, 2015 at 10:22 AM, Afkham Azeez  wrote:

> Saying just a node went OOM is has no value. Also seeing a Hazelcast error
> in the stacktrace doesn't necessarily mean Hazelcast caused your node to go
> OOM. You have to profile and see why it is going OOM.
>
> On Thu, Nov 19, 2015 at 10:18 AM, Milinda Perera 
> wrote:
>
>> Hi,
>>
>> In BRS 220 snapshot (with kernel upgraded to 442), in clustered setup (in
>> our test 3 nodes). We did load test targeting one node (lets say node3) to
>> a Stateful rule service until it goes OOM, and following are the errors
>> shown in two nodes:
>>
>>
>> * CacheCleanup error is shown from one of the nodes which working fine
>> (in our case node2):*
>> [2015-11-17 17:16:58,951]  WARN {org.wso2.carbon.caching.impl.CacheImpl}
>> -  Exception occurred while expiring item from distributed cache. No
>> response for 12 ms. Aborting invocation! Invocation{
>> serviceName='hz:impl:mapService',
>> op=RemoveOperation{$cache.$domain[carbon.super]Claim.Cache.Manager#Claim.Cache},
>> partitionId=64, replicaIndex=0, tryCount=250, tryPauseMillis=500,
>> invokeCount=1, callTimeout=6, target=Address[10.100.5.92]:4002,
>> backupsExpected=0, backupsCompleted=0} No response has been received!
>> backups-expected:0 backups-completed: 0
>> [2015-11-17 17:21:08,971] ERROR
>> {org.wso2.carbon.caching.impl.CacheCleanupTask} -  Error occurred while
>> running CacheCleanupTask
>> com.hazelcast.core.OperationTimeoutException: No response for 12 ms.
>> Aborting invocation! Invocation{ serviceName='hz:impl:mapService',
>> op=ClearOperation{}, partitionId=46, replicaIndex=0, tryCount=250,
>> tryPauseMillis=500, invokeCount=1, callTimeout=6,
>> target=Address[10.100.5.92]:4002, backupsExpected=0, backupsCompleted=0} No
>> response has been received!  backups-expected:0 backups-completed: 0
>> at
>> com.hazelcast.spi.impl.operationservice.impl.Invocation.newOperationTimeoutException(Invocation.java:491)
>> at
>> com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.waitForResponse(InvocationFuture.java:277)
>> at
>> com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.get(InvocationFuture.java:224)
>> at
>> com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.get(InvocationFuture.java:204)
>> at
>> com.hazelcast.spi.impl.operationservice.impl.InvokeOnPartitions.retryFailedPartitions(InvokeOnPartitions.java:131)
>> at
>> com.hazelcast.spi.impl.operationservice.impl.InvokeOnPartitions.invoke(InvokeOnPartitions.java:67)
>> at
>> com.hazelcast.spi.impl.operationservice.impl.OperationServiceImpl.invokeOnAllPartitions(OperationServiceImpl.java:326)
>> at
>> com.hazelcast.map.impl.proxy.MapProxySupport.clearInternal(MapProxySupport.java:914)
>> at
>> com.hazelcast.map.impl.proxy.MapProxyImpl.clearInternal(MapProxyImpl.java:71)
>> at
>> com.hazelcast.map.impl.proxy.MapProxyImpl.clear(MapProxyImpl.java:532)
>> at
>> 

Re: [Dev] Updating data-publisher agents in carbon-multitenancy

2015-11-19 Thread Nipuni Perera
Hi Rukshan,

Can you try to update APIM to use carbon-commons 4.5.0 and see if any issue
raise due to this dependency. We can keep usage.agent bundle if needed
without updating to carbon-commons 4.5.0 changes.
According to the pom configurations, the only export package is
org.wso2.carbon.usage.agent.api.*, while the changes (if
carbon-multitenancy updated to use carbon-commons 4.5.0) goes to
org.wso2.carbon.usage.agent.util.

Please refer mail thread[1] on migrating to carbon-commons 4.5.0.

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

Thanks,
Nipuni


On Thu, Nov 19, 2015 at 3:26 PM, Rukshan Premathunga 
wrote:

> Hi Nipuni,
>
> APIM Still use the carbon-multitenancy like below.
>
> 
> org.wso2.carbon.multitenancy
> org.wso2.carbon.tenant.usage.agent
> 
>
> can you lokking to this?
>
>
> Thanks and Regards.
>
> On Thu, Nov 19, 2015 at 2:39 PM, Nipuni Perera  wrote:
>
>> Hi Amila,
>>
>> Thanks for the clarification. We are testing if products can use
>> carbon-commons 4.5.0, without rewriting data publishers in
>> carbon-deployment and carbon-multitenancy (as we don't have a requirement
>> atm). Hence we will not updating usage.agent bundle in carbon-multitenancy
>> as mentioned.
>> We will consider removing the usage.agent bundle in future releases if
>> it is not used anymore.
>>
>> Thanks,
>> Nipuni
>>
>> On Wed, Nov 18, 2015 at 7:25 PM, Amila Maha Arachchi 
>> wrote:
>>
>>> Hi Nipuni,
>>>
>>> Those methods in usage.agent are not used now (not even the usage.agent
>>> bundle). Ideally, we should get rid of the usage.agent bundle. These were
>>> used in the days of StratosLive.
>>>
>>> Regards,
>>> Amila.
>>>
>>> On Tue, Nov 17, 2015 at 7:36 PM, Nipuni Perera  wrote:
>>>
 Hi,

 I am trying to update carbon-deployment with new data publishers
 introduced with carbon-commons 4.5.0 and carbon-analytics-common
 5.0.6. I have rewritten the data publishers in carbon-deployment and need
 to test the changes with a AS pack, publishing webapp statistics.
 While building product-as I could see that carbon-multitenancy need to
 be updated with the new data publishers as well. I am working on updating
 carbon-multitenancy to use carbon-commons 4.5.0 and carbon-analytics-common
 5.0.6. I am updating methods in : org.wso2.carbon.usage.agent.util.
 PublisherUtils.

 Will updating carbon-multitenancy a productive effort? Are we still
 using this utility methods to publish usage statistics?

 Thanks,
 Nipuni

 --
 Nipuni Perera
 Software Engineer; WSO2 Inc.; http://wso2.com
 Email: nip...@wso2.com
 Git hub profile: https://github.com/nipuni
 Blog : http://nipunipererablog.blogspot.com/
 Mobile: +94 (71) 5626680
 


>>>
>>>
>>> --
>>> *Amila Maharachchi*
>>> Senior Technical Lead
>>> WSO2, Inc.; http://wso2.com
>>>
>>> Blog: http://maharachchi.blogspot.com
>>> Mobile: +94719371446
>>>
>>>
>>
>>
>> --
>> Nipuni Perera
>> Software Engineer; WSO2 Inc.; http://wso2.com
>> Email: nip...@wso2.com
>> Git hub profile: https://github.com/nipuni
>> Blog : http://nipunipererablog.blogspot.com/
>> Mobile: +94 (71) 5626680
>> 
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Rukshan Chathuranga.
> Software Engineer.
> WSO2, Inc.
>



-- 
Nipuni Perera
Software Engineer; WSO2 Inc.; http://wso2.com
Email: nip...@wso2.com
Git hub profile: https://github.com/nipuni
Blog : http://nipunipererablog.blogspot.com/
Mobile: +94 (71) 5626680

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


Re: [Dev] Updating data-publisher agents in carbon-multitenancy

2015-11-19 Thread Amila Maha Arachchi
Please check with Sanjeewa on whether APIM is using the old usage.agent
component or is this a new one. I was under the impression that old agent
is not used anywhere anymore.

On Thu, Nov 19, 2015 at 4:58 PM, Rukshan Premathunga 
wrote:

> Hi Amila,
>
> I think yes. I think both contain same package names.
>
> Thanks and Regards.
>
> On Thu, Nov 19, 2015 at 4:55 PM, Amila Maha Arachchi 
> wrote:
>
>> Are org.wso2.carbon.usage.agent and org.wso2.carbon.tenant.usage.agent
>> the same?
>>
>> On Thu, Nov 19, 2015 at 3:26 PM, Rukshan Premathunga 
>> wrote:
>>
>>> Hi Nipuni,
>>>
>>> APIM Still use the carbon-multitenancy like below.
>>>
>>> 
>>> org.wso2.carbon.multitenancy
>>> org.wso2.carbon.tenant.usage.agent
>>> 
>>>
>>> can you lokking to this?
>>>
>>>
>>> Thanks and Regards.
>>>
>>> On Thu, Nov 19, 2015 at 2:39 PM, Nipuni Perera  wrote:
>>>
 Hi Amila,

 Thanks for the clarification. We are testing if products can use
 carbon-commons 4.5.0, without rewriting data publishers in
 carbon-deployment and carbon-multitenancy (as we don't have a requirement
 atm). Hence we will not updating usage.agent bundle in carbon-multitenancy
 as mentioned.
 We will consider removing the usage.agent bundle in future releases if
 it is not used anymore.

 Thanks,
 Nipuni

 On Wed, Nov 18, 2015 at 7:25 PM, Amila Maha Arachchi 
 wrote:

> Hi Nipuni,
>
> Those methods in usage.agent are not used now (not even the
> usage.agent bundle). Ideally, we should get rid of the usage.agent bundle.
> These were used in the days of StratosLive.
>
> Regards,
> Amila.
>
> On Tue, Nov 17, 2015 at 7:36 PM, Nipuni Perera 
> wrote:
>
>> Hi,
>>
>> I am trying to update carbon-deployment with new data publishers
>> introduced with carbon-commons 4.5.0 and carbon-analytics-common
>> 5.0.6. I have rewritten the data publishers in carbon-deployment and need
>> to test the changes with a AS pack, publishing webapp statistics.
>> While building product-as I could see that carbon-multitenancy need
>> to be updated with the new data publishers as well. I am working on
>> updating carbon-multitenancy to use carbon-commons 4.5.0
>> and carbon-analytics-common 5.0.6. I am updating methods in :
>> org.wso2.carbon.usage.agent.util.PublisherUtils.
>>
>> Will updating carbon-multitenancy a productive effort? Are we still
>> using this utility methods to publish usage statistics?
>>
>> Thanks,
>> Nipuni
>>
>> --
>> Nipuni Perera
>> Software Engineer; WSO2 Inc.; http://wso2.com
>> Email: nip...@wso2.com
>> Git hub profile: https://github.com/nipuni
>> Blog : http://nipunipererablog.blogspot.com/
>> Mobile: +94 (71) 5626680
>> 
>>
>>
>
>
> --
> *Amila Maharachchi*
> Senior Technical Lead
> WSO2, Inc.; http://wso2.com
>
> Blog: http://maharachchi.blogspot.com
> Mobile: +94719371446
>
>


 --
 Nipuni Perera
 Software Engineer; WSO2 Inc.; http://wso2.com
 Email: nip...@wso2.com
 Git hub profile: https://github.com/nipuni
 Blog : http://nipunipererablog.blogspot.com/
 Mobile: +94 (71) 5626680
 


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


>>>
>>>
>>> --
>>> Rukshan Chathuranga.
>>> Software Engineer.
>>> WSO2, Inc.
>>>
>>
>>
>>
>> --
>> *Amila Maharachchi*
>> Senior Technical Lead
>> WSO2, Inc.; http://wso2.com
>>
>> Blog: http://maharachchi.blogspot.com
>> Mobile: +94719371446
>>
>>
>
>
> --
> Rukshan Chathuranga.
> Software Engineer.
> WSO2, Inc.
>



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

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


Re: [Dev] Issue in carbon logs after changing carbon.kernel.version from 4.4.1 to 4.4.2

2015-11-19 Thread Malithi Edirisinghe
Hi Jagath,

So as I said before this fix affects to CarbonConsoleAppender,
CarbonDailyRollingFileAppender and MemoryAppender. So if this to be
changed, either a new appender could be configured in log4j.properties or
the appender class of the CARBON_CONSOLE appender could be changed to a in
built log4j appender such as org.apache.log4j.ConsoleAppender keeping the
same layout.

Thanks,
Malithi.

On Thu, Nov 19, 2015 at 3:28 PM, Jagath Sisirakumara Ariyarathne <
jaga...@wso2.com> wrote:

> Hi Malithi,
>
> Is there any solution to fix this for ESB Log Mediator? Attached two
> screenshots for before and after updating kernel 4.4.2. As you can see,
> logs printed by log mediator are different and it is not the actual request
> received to the ESB with the new version.
>
> Thanks.
>
> On Thu, Nov 19, 2015 at 2:20 PM, Sajith Ariyarathna 
> wrote:
>
>> Hi Malithi,
>>
>> Seems that when you log.error(message, e); the stack trace does not get
>> sanitized, but if you do log.error(e); then the stack trace get
>> sanitized.
>>
>> Currently we are developing Jaggery app; when an exception occurred in
>> Jaggery code, Rhino engine logs the stack trace and that stack trace is
>> sanitized. Looks like our issue goes to Jaggery.
>>
>> I also notices that in Jaggery, logging exceptions like log.error(e);
>> outputs a sanitized stack trace. One can avoid that by logging exceptions 
>> log.error(message,
>> e); like this.
>>
>> Hoping to discuss this with the Jaggery team. Thank you very much for
>> your assistance regarding this matter.
>>
>>
>> On Thu, Nov 19, 2015 at 12:26 PM, Malithi Edirisinghe 
>> wrote:
>>
>>> Hi Sajith,
>>>
>>> Actually the stack trace does not get sanitized. Could you please give
>>> some example.
>>> I have tried a simple test as below
>>>
>>> try {
>>> log.info("XACML policy schema loaded \n successfully.");
>>> throw new Exception("Test \n Exception");
>>> } catch (Exception e) {
>>> log.error("Logging Test \n Exception", e);
>>> }
>>>
>>> But this prints the log properly and here the stack trace is not
>>> sanitized. Only the message that you log as an error or debug log gets
>>> sanitized. Even if you refer the code line that I have pointed above you
>>> will see it.
>>>
>>> So the output of the above code segment will be something like below.
>>>
>>> [2015-11-19 01:02:07,246]  INFO
>>> {org.wso2.carbon.identity.entitlement.internal.SchemaBuilder} -  XACML
>>> policy schema loaded _ successfully. (Sanitized)
>>>
>>> [2015-11-19 01:02:07,246] ERROR
>>> {org.wso2.carbon.identity.entitlement.internal.SchemaBuilder} -  Logging
>>> Test _ Exception (Sanitized)
>>>
>>> java.lang.Exception: Test
>>>
>>>  Exception
>>>
>>> at
>>> org.wso2.carbon.identity.entitlement.internal.SchemaBuilder.run(SchemaBuilder.java:46)
>>>
>>> at java.lang.Thread.run(Thread.java:722)
>>>
>>> Here you can clearly see that the stack trace is not sanitized. It
>>> prints the new line character in the exception as it is in the stack trace.
>>>
>>> Thanks,
>>>
>>> Malithi.
>>>
>>> On Thu, Nov 19, 2015 at 11:59 AM, Sajith Ariyarathna 
>>> wrote:
>>>
 Hi Malithi,

 My concern is that current fix sanitizing stack traces even though
 stack trace does not have CRLF injections in it. I believe sanitizing
 log messages (e.g. log.error(message) , excaption.getMessage() )
 is sufficient to prevent  CRLF injections in logs.

 I think we can overcome this problem with the my earlier proposed
 approach (extending log4j PatternLayout class and overriding the format
  method).

 Thanks.


 On Thu, Nov 19, 2015 at 1:07 AM, Malithi Edirisinghe  wrote:

> Hi Sajith,
>
> With the present fix there's no way that stack traces could be
> sanitized unless e.getMessage is explicitly used as the log message.
>
> As you can see at [1] only the logging message is sanitized here.
> Could you please elaborate more in case i'm misunderstanding your
> concern.
>
> [1]
> https://github.com/wso2/carbon-kernel/pull/278/files#diff-5859ce33cfadc4c7933a6a08a605f8d1R72
>
> Thanks,
> Malithi.
>
> On Wed, Nov 18, 2015 at 6:42 PM, Sajith Ariyarathna  > wrote:
>
>> Hi All,
>>
>> Me and RasikaP dig a little deep to find a solution to this problem.
>>
>> Instead of sanitizing final log message, you can sanitize when it is
>> formatted by extending the PatternLayout [1] class. Refer this code [2],
>> where public String format(LoggingEvent event) method is overridden
>> to achieve a custom log message formatting.  You can configure log4j
>> (log4j.xml) to use your extended Pattern Layout class by adding > class="org.apache.log4j.MyPatternLayout"> in your  .
>>
>> WDYT?
>>
>> [1]
>> 

Re: [Dev] Updating data-publisher agents in carbon-multitenancy

2015-11-19 Thread Rukshan Premathunga
Hi,

@Nipuni, we have compiling code at here[1] and there was no any issues.

@Sanjeewa, we are moved from org.wso2.carbon.usage.agent to
org.wso2.carbon.tenant.usage.agent
right? Also, does it satisfied "DataPublisherUtil.isEnabledMetering()" at
here[2] and reached to here [1]?

[1]
https://github.com/ruks/carbon-apimgt/blob/1.10.x.3/components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.publisher/src/main/java/org/wso2/carbon/apimgt/usage/publisher/APIMgtUsageHandler.java#L169
[2]
https://github.com/ruks/carbon-apimgt/blob/1.10.x.3/components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.publisher/src/main/java/org/wso2/carbon/apimgt/usage/publisher/APIMgtUsageHandler.java#L162

Thanks and Regards.



On Thu, Nov 19, 2015 at 8:03 PM, Nipuni Perera  wrote:

> Hi all,
>
> I have listed the osgi bundles in a APIM-1.10 pack and could observe that
> (refer [1 for the result from osgi console]) it is using
> org.wso2.carbon.tenant.usage.agent_4.5.0. (which is release with
> carbon-multitenancy 4.5.0. I could not find a 2.1.2 jar from the osgi
> bundle list).
> According to the pom.xml in [2], all the pakcages in 
> org.wso2.carbon.usage.agent
> has declared as private while only package org.wso2.carbon.usage.agent.api
> has exported.
>
> @Sanjeewa: As I have mentioned above the 
> org.wso2.carbon.usage.agent.util.PublisherUtils
> class seems to be private and cannot use outside the bundle. If should give
> a runtime error while trying to publish events using APIMgtUsageHandler.
> @Amila : org.wso2.carbon.tenant.usage.agent is the artifact id and
> org.wso2.carbon.usage.agent is the package name.
>
> [1]osgi> ss | grep agent
>
> 215 ACTIVE  org.wso2.carbon.databridge.agent.thrift_4.4.8
> 289 ACTIVE  org.wso2.carbon.identity.sso.agent_5.0.0
> 446 ACTIVE  org.wso2.carbon.tenant.throttling.agent_4.5.0
> 447 ACTIVE  org.wso2.carbon.tenant.usage.agent_4.5.0
> 449 ACTIVE  org.wso2.carbon.throttling.agent.stub_4.4.7
> true
> osgi>
> osgi>
> osgi>
> osgi> ss | grep usage
> 189 ACTIVE  org.wso2.carbon.apimgt.usage.client_4.3.1.SNAPSHOT
> 190 ACTIVE  org.wso2.carbon.apimgt.usage.publisher_4.3.1.SNAPSHOT
> 447 ACTIVE  org.wso2.carbon.tenant.usage.agent_4.5.0
>
>
> [2]
> https://github.com/wso2/carbon-multitenancy/blob/v4.5.0/components/tenant-mgt/org.wso2.carbon.tenant.usage.agent/pom.xml
>
> Thanks,
> Nipuni
>
> On Thu, Nov 19, 2015 at 5:43 PM, Sanjeewa Malalgoda 
> wrote:
>
>> In our APIMgtUsageHandler we use
>> publisherUtils(org.wso2.carbon.usage.agent.util.PublisherUtils) class to
>> publish events.
>> So we have dependency to org.wso2.carbon.usage.agent(2.1.2) jar.
>> At this point our commons version is 4.4.8 for APIM 1.10 release.
>>
>> So do you suggest to move commons 4.5.0 and use the publisher agent
>> available there?
>>
>> Thanks,
>> sanjeewa.
>>
>> On Thu, Nov 19, 2015 at 5:11 PM, Amila Maha Arachchi 
>> wrote:
>>
>>> Please check with Sanjeewa on whether APIM is using the old usage.agent
>>> component or is this a new one. I was under the impression that old agent
>>> is not used anywhere anymore.
>>>
>>> On Thu, Nov 19, 2015 at 4:58 PM, Rukshan Premathunga 
>>> wrote:
>>>
 Hi Amila,

 I think yes. I think both contain same package names.

 Thanks and Regards.

 On Thu, Nov 19, 2015 at 4:55 PM, Amila Maha Arachchi 
 wrote:

> Are org.wso2.carbon.usage.agent and org.wso2.carbon.tenant.usage.agent
> the same?
>
> On Thu, Nov 19, 2015 at 3:26 PM, Rukshan Premathunga  > wrote:
>
>> Hi Nipuni,
>>
>> APIM Still use the carbon-multitenancy like below.
>>
>> 
>> org.wso2.carbon.multitenancy
>> org.wso2.carbon.tenant.usage.agent
>> 
>>
>> can you lokking to this?
>>
>>
>> Thanks and Regards.
>>
>> On Thu, Nov 19, 2015 at 2:39 PM, Nipuni Perera 
>> wrote:
>>
>>> Hi Amila,
>>>
>>> Thanks for the clarification. We are testing if products can use
>>> carbon-commons 4.5.0, without rewriting data publishers in
>>> carbon-deployment and carbon-multitenancy (as we don't have a 
>>> requirement
>>> atm). Hence we will not updating usage.agent bundle in 
>>> carbon-multitenancy
>>> as mentioned.
>>> We will consider removing the usage.agent bundle in future releases
>>> if it is not used anymore.
>>>
>>> Thanks,
>>> Nipuni
>>>
>>> On Wed, Nov 18, 2015 at 7:25 PM, Amila Maha Arachchi <
>>> ami...@wso2.com> wrote:
>>>
 Hi Nipuni,

 Those methods in usage.agent are not used now (not even the
 usage.agent bundle). Ideally, we should get rid of the usage.agent 
 bundle.
 These were used in the days of StratosLive.

 Regards,
 Amila.

 On 

[Dev] Fwd: [Automation][DS] Build is not getting fail since the find-bug finds bugs in the code

2015-11-19 Thread Chamara Philips
-- Forwarded message --
From: Chamara Philips 
Date: Fri, Nov 20, 2015 at 8:15 AM
Subject: Re: [Dev] [Automation][DS] Build is not getting fail since the
find-bug finds bugs in the code
To: Rajeenthini Satkunam 


Hi Rajeenthini,

It is not necessary to set failOnError to true, as it is default. Can you
please try removing the "failOnError" property. Also you have missed the
version. Following plugin declaration worked for me to run it successfully
without integrating tests. I think adding "includeTests" should work fine
with tests.




org.codehaus.mojo
findbugs-maven-plugin
2.5.2


Max

Low

true


${project.build.directory}/findbugs



analyze-compile
compile

check







Thanks.

On Thu, Nov 19, 2015 at 2:54 PM, Rajeenthini Satkunam 
wrote:

> Hi all,
>
> I would like to integrate find-bug plugin with a maven build of product DS
> Integration test module(Dashboard Server).So I have added the plugin maven
> find-bug under plugins in POM of integration module of product DS.
> Here is the code I have added in POM.
>
> 
> org.codehaus.mojo
> findbugs-maven-plugin
> 
> Max
> Low
> true
> 
> ${project.build.directory}/findbugs
> true
> true
> 
> 
> 
> analyze-compile
> verify
> 
> check
> 
> 
> 
> 
>
> But the build is not getting fail even I got some bugs through find-bug
> tool.I can produce the findbugsXml.xml file under directory findBug.Can
> anyone tell that do I need to add any other configurations to run this tool
> for test sources rather than adding this plugin to POM?
>
> I have asked this from StackOverFlow as well you can find the question
> here[1].
> [1] -
> http://stackoverflow.com/questions/33796044/how-can-i-integrate-find-bug-maven-plugin-to-integration-test-module
>
> references
>
> [2] - http://gleclaire.github.io/findbugs-maven-plugin/
> [3] -
> http://stackoverflow.com/questions/33234692/maven-findbugs-plugin-how-to-run-findbug-on-the-test-classes
> --
>
> *Thank You.*
>
> *Rajeenthini Satkunam*
>
> *Associate Software Engineer | WSO2*
>
>
> *E:rajeenth...@wso2.com *
>
> *M :+94770832823 <%2B94770832823>   *
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Hareendra Chamara P h i l i p s
*Software  Engineer*
Mobile : +94 (0) 767 184161 <%2B94%20%280%29%20773%20451194>
chama...@wso2.com 




-- 
Hareendra Chamara P h i l i p s
*Software  Engineer*
Mobile : +94 (0) 767 184161 <%2B94%20%280%29%20773%20451194>
chama...@wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS] Logout on secondary IDP - LogoutRequestProcessor says session index not in Logout request but it is?

2015-11-19 Thread Chamara Philips
Hi John,

It is actually not that problem in finding SessionIndex value from the
request. Apparently there is a problem of finding the Session Index from
SSOTokenID cookie. I will analyze the trace and get back to you as quickly
as possible.

Thanks.


On Thu, Nov 19, 2015 at 9:38 PM, John Lee  wrote:

> Any further ideas on this?
> If the samlssoTokenId is missing, should you get the sessionIndex from the
> Logout Request message in this case?
>
> On Tue, Nov 17, 2015 at 3:22 PM, John Lee  wrote:
>
>> Hello there Chamara,
>> I'm using IS 5.0.0, but it was patched to support SAML IdP initiated SLO
>> (WSO2-CARBON-PATCH-4.2.0-1456.zip
>> 
>> ).
>> The request SSO trace is attached.
>> Let me know if you spot anything unusual.
>> Thanks,
>> John.
>>
>> On Tue, Nov 17, 2015 at 4:53 AM, Chamara Philips 
>> wrote:
>>
>>> Hi John,
>>>
>>> Which IS version did you try exactly?
>>>
>>> Since we verify the request parameters with the cookie, we need to see
>>> whether something has happened in that verification. SSO tracer will help
>>> in this issue. Can you please add the sso tracer plugin to the firefox, if
>>> you haven't already.
>>>
>>>- Install the sso tracer from [1]
>>>- Start both servers and open firefox
>>>- Go to Tools -> SSO Tracer. New window will be opened. Leave it
>>>opened and goto firefox and continue with logging to travelocity app. 
>>> (Only
>>>the step 6 under the heading 'Setting up an application as the SP in the
>>>primary IS' at [2] is needed.) Then issue the LogOut request as you did
>>>before.
>>>- Then open the SSO Tracer window again.
>>>- Click the save button and save the trace as a text file.
>>>
>>> Please attach the text file. It will be really helpful to come to the
>>> final decision about what is really going under.
>>>
>>> [1] https://addons.mozilla.org/en-US/firefox/addon/sso-tracer/
>>> [2]
>>> https://docs.wso2.com/display/IS500/Connecting+Two+Identity+Servers+with+SAML+SSO
>>>
>>> Thanks.
>>>
>>> On Tue, Nov 17, 2015 at 7:53 AM, Chamara Philips 
>>> wrote:
>>>
 Hi John,

 Since we verify the request parameters with the cookie, we need to see
 whether something has happened in that verification. SSO tracer will help
 in this issue. Can you please add the sso tracer plugin to the firefox, if
 you haven't already. ( You can refer [1] if needed).
 Please take the sso tracer and send the SAML requests and responses. It
 will be really helpful to come to the final decision about what is really
 going under.  Also note that IdP initiated SLO option is given from IS
 5.1.0. IS 5.0.0 has Enable IdP initiated SSO only. Which version did you
 try exactly?

 [1]
 https://ping.force.com/Support/PingOne/PingOne-General/PingOne-How-do-I-use-SSO-Tracer-SAML-Tracer-and-Live-HTTP-Headers-to-Troubleshoot-PingOne-Issues

 Thanks.

 On Mon, Nov 16, 2015 at 3:53 PM, John Lee  wrote:

> Just to mention that I'm proxying re-directs with apache web servers
> at both domains.  So requests from primary to secondary go through apache
> web server in the secondary domain, and responses from the secondary are
> proxied through the web server of the primary domain. In the example
> provided in the documentation both identity servers are communicating
> directly. (
> https://docs.wso2.com/display/IS500/Connecting+Two+Identity+Servers+with+SAML+SSO
> )
>
> I'll first provide some more debug level logs captured immediately
> after the logout operation, and then I'll outline my configuration.
>
> Logs at Primary IS
> ==
> TID: [0] [IS] [2015-11-16 09:49:53,918] DEBUG
> {org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet} -  
> Query
> string : slo=true=https%3A%2F%
> 2Fservices.firecrestclinical.com%2Fsp%2Ffcp
> {org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet}
> TID: [0] [IS] [2015-11-16 09:49:53,920] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.store.SessionDataPersistTask}
> -  Session Data removing Task is started to run
> {org.wso2.carbon.identity.application.authentication.framework.store.SessionDataPersistTask}
> TID: [0] [IS] [2015-11-16 09:49:53,923] DEBUG
> {org.wso2.carbon.identity.application.authentication.framework.store.SessionDataPersistTask}
> -  Session Data persisting Task is started to run
> {org.wso2.carbon.identity.application.authentication.framework.store.SessionDataPersistTask}
> TID: [0] [IS] [2015-11-16 09:49:53,934] DEBUG
> 

Re: [Dev] [IS] "hostname in certificate didn't match:" issue when accessing IS dashboard

2015-11-19 Thread Malintha Adikari
Hi Aprana,

I am getting the same issue while accessing APIM distributed cluster nodes
fronted through loadbalancer(nginx) instance. Did you able to solve this
issue ? If so how did you solve it ?

Regards,
Malintha

On Wed, Oct 28, 2015 at 2:09 PM, Isuru Udana  wrote:

> Hi Aparna,
>
> Bundles are coming from features, whatever version defined in the product
> pom have no relationship for that.
>
>  Thanks.
>
> On Wed, Oct 28, 2015 at 11:20 AM, Aparna Karunarathna 
> wrote:
>
>> Hi Isuru,
>>
>> I checked version from the ESB master branch pom[1].
>>
>> 4.1.2
>>
>> [1] https://github.com/wso2/product-esb/blob/master/pom.xml
>>
>> Regards,
>> Aparna.
>>
>> On Tue, Oct 27, 2015 at 5:41 AM, Isuru Udana  wrote:
>>
>>> Hi Aparna,
>>>
>>> We are using 4.3.1.
>>>
>>>
>>> Thanks.
>>>
>>> On Mon, Oct 26, 2015 at 10:36 AM, Aparna Karunarathna 
>>> wrote:
>>>
 Hi Kasun/Isuru,

 Currently ESB uses Apache httpclient 4.1.2, shouldn't it upgrade to
 newer version?

 @Deep, Thanks for the clarification.

 Regards,
 Aparna

 On Sat, Oct 24, 2015 at 11:38 AM, Deependra Ariyadewa 
 wrote:

> Hi Aparna,
>
> This can happen when the client does not send the SNI[1][2] to the
> server side to select the proper HTTPS virtual host. In this case NGINX
> reverse proxy created in the vhost. Most of the modern browsers send SNI 
> to
> server, therefore you will not observe this when you make the request via 
> a
> modern browser.
>
> Most of the new Java HTTP client libraries also support SNI. As an
> example, Apache httpclient library support SNI from version 4.3.2 [3]. If
> you use a library which does not support SNI, you will get this error for
> HTTPS call going towards services hosted in virtual host environments.
>
> [1] https://en.wikipedia.org/wiki/Server_Name_Indication
> [2] https://www.ietf.org/rfc/rfc3546.txt
> [3] https://hc.apache.org/news.html
>
> On Fri, Oct 23, 2015 at 11:07 AM, Aparna Karunarathna  > wrote:
>
>> Hi all,
>>
>> I have encountered a weird "hostname in certificate didn't match:"
>> issue when accessing IS dashboard. My setup details are as follows.
>>
>> *Setup Details*
>> *IS cluster*
>> - 3 nodes cluster
>> - Hostname - mgt.is.wso2.com
>> - Certificate CN - mgt.is.wso2.com
>>
>> *BPS cluster*
>> - 2 nodes cluster (manager/worker)
>> - Hostnames - Manager - mgt.bps.wso2.com / Worker - wrk.bps.wso2.com
>> - Certificate CN - *.bps.wso2.com
>>
>> * Both nodes are fronted by same Nginx plus load balancer.
>>
>> [1]
>> javax.net.ssl.SSLException: hostname in certificate didn't match: <
>> mgt.is.wso2.com> != <*.bps.wso2.com>
>> at
>> org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:238)
>> at
>> org.apache.http.conn.ssl.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:54)
>> 
>> 
>>
>> When we check the browser cookie, it gave correct certificate. (
>> mgt.is.wso2.com), but when we check it from java client[2] it gives
>> the bps certificate (*.bps.wso2.com) instead of IS.
>>
>> [2]
>> https://darray.wordpress.com/2015/07/12/freak-vulnerability-and-disabling-weak-export-cipher-suites-in-wso2-carbon-4-2-0-based-products/
>>
>> What is the reason for this? Is it my config issue or Nginx issue or
>> our product issue?
>>
>> --
>> *Regards,*
>>
>> *Aparna Karunarathna.*
>>
>>
>> *Associate Technical Lead - QAWSO2 Inc.Mobile: 0714002533
>> <0714002533>*
>>
>
>
>
> --
> Deependra Ariyadewa
> WSO2, Inc. http://wso2.com/ http://wso2.org
>
> email d...@wso2.com; cell +94 71 403 5996 ;
> Blog http://risenfall.wordpress.com/
> PGP info: KeyID: 'DC627E6F'
>
> *WSO2 - Lean . Enterprise . Middleware*
>



 --
 *Regards,*

 *Aparna Karunarathna.*


 *Associate Technical Lead - QAWSO2 Inc.Mobile: 0714002533 <0714002533>*

>>>
>>>
>>>
>>> --
>>> *Isuru Udana*
>>> Associate Technical Lead
>>> WSO2 Inc.; http://wso2.com
>>> email: isu...@wso2.com cell: +94 77 3791887
>>> blog: http://mytecheye.blogspot.com/
>>>
>>
>>
>>
>> --
>> *Regards,*
>>
>> *Aparna Karunarathna.*
>>
>>
>> *Associate Technical Lead - QAWSO2 Inc.Mobile: 0714002533 <0714002533>*
>>
>
>
>
> --
> *Isuru Udana*
> Associate 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
>
>


-- 
*Malintha Adikari*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware


Re: [Dev] Output directory for maven-bundle-plugin

2015-11-19 Thread Chamara Philips
Hi Geesara,

Can you please try with the absolute path to the project.outputDirectory?
It worked for me.
As I remember, there was a problem with having spaces in the path, for
folders.
But not sure whether it was for this plugin.

Thanks.

On Tue, Nov 10, 2015 at 9:16 PM, Geesara Prathap  wrote:

> Hi All,
>
> I started creating an OSGI bundle. So It works fine. But when I add output
> directory in configuration section in maven bundle plugin, it won't add any
> of compiled classes. Simply say, the classpath is empty.  Is there anything
> which I configured in a wrong way.
> This is the build section of pom.xml.
>
>**
> *
>  /home/wso2/products/wso2esb-
> 4.9.0/repository/components/dropins*
> *   *
>
> **
>
> **
>
> **
>
> *maven-compiler-plugin*
>
> *3.3*
>
> **
>
> *1.7*
>
> *1.7*
>
> **
>
> **
>
> **
>
> *org.apache.felix*
>
> *maven-bundle-plugin*
>
> *1.4.0*
>
> *true*
>
> **
>
> **
>
> *
> ${project.artifactId}*
>
> *${project.artifactId}*
>
> *
> org.wso2.carbon.demo.Activator*
>
> **
>
> *org.wso2.carbon.demo.orderprocess.**
>
> **
>
> **
>
> *
> ${project.outputDirectory}*
>
> **
>
> **
>
> **
>
> **
>
>
> According to this[1]
> ,
> it is a bug in the maven bundle plugin. Is this actually a bug or something
> wrong with my configuration.
>
> 1.
> http://stackoverflow.com/questions/9943392/classpath-empty-when-adding-outputdirectory-to-pom
>
> Thanks,
> --
> Geesara Prathap Kulathunga
> Software Engineer
> WSO2 Inc; http://wso2.com
> Mobile : +940772684174
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Hareendra Chamara P h i l i p s
*Software  Engineer*
Mobile : +94 (0) 767 184161 <%2B94%20%280%29%20773%20451194>
chama...@wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Output directory for maven-bundle-plugin

2015-11-19 Thread Geesara Prathap
Hi Chamara,

Nope, it didn't work either.

Thanks,

On Fri, Nov 20, 2015 at 8:38 AM, Chamara Philips  wrote:

> Hi Geesara,
>
> Can you please try with the absolute path to the project.outputDirectory?
> It worked for me.
> As I remember, there was a problem with having spaces in the path, for
> folders.
> But not sure whether it was for this plugin.
>
> Thanks.
>
> On Tue, Nov 10, 2015 at 9:16 PM, Geesara Prathap  wrote:
>
>> Hi All,
>>
>> I started creating an OSGI bundle. So It works fine. But when I add
>> output directory in configuration section in maven bundle plugin, it won't
>> add any of compiled classes. Simply say, the classpath is empty.  Is there
>> anything which I configured in a wrong way.
>> This is the build section of pom.xml.
>>
>>**
>> *
>>  /home/wso2/products/wso2esb-
>> 4.9.0/repository/components/dropins*
>> *   *
>>
>> **
>>
>> **
>>
>> **
>>
>> *maven-compiler-plugin*
>>
>> *3.3*
>>
>> **
>>
>> *1.7*
>>
>> *1.7*
>>
>> **
>>
>> **
>>
>> **
>>
>> *org.apache.felix*
>>
>> *maven-bundle-plugin*
>>
>> *1.4.0*
>>
>> *true*
>>
>> **
>>
>> **
>>
>> *
>> ${project.artifactId}*
>>
>> *${project.artifactId}*
>>
>> *
>> org.wso2.carbon.demo.Activator*
>>
>> **
>>
>> *org.wso2.carbon.demo.orderprocess.**
>>
>> **
>>
>> **
>>
>> *
>> ${project.outputDirectory}*
>>
>> **
>>
>> **
>>
>> **
>>
>> **
>>
>>
>> According to this[1]
>> ,
>> it is a bug in the maven bundle plugin. Is this actually a bug or something
>> wrong with my configuration.
>>
>> 1.
>> http://stackoverflow.com/questions/9943392/classpath-empty-when-adding-outputdirectory-to-pom
>>
>> Thanks,
>> --
>> Geesara Prathap Kulathunga
>> Software Engineer
>> WSO2 Inc; http://wso2.com
>> Mobile : +940772684174
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Hareendra Chamara P h i l i p s
> *Software  Engineer*
> Mobile : +94 (0) 767 184161 <%2B94%20%280%29%20773%20451194>
> chama...@wso2.com 
>
>


-- 
Geesara Prathap Kulathunga
Software Engineer
WSO2 Inc; http://wso2.com
Mobile : +940772684174
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] US Election 2016 Tweet Analyze System

2015-11-19 Thread Srinath Perera
Hi Yudhanjaya,

On Thu, Nov 19, 2015 at 3:40 PM, Yudhanjaya Wijeratne 
wrote:

> Hi Srinath,
>
> Regarding Dinali's graph, we had a chat and realized that using the width
> of the edge makes the graph harder to read as smaller connections are
> hidden. What if we did it this way:
>
> *Distance between nodes = 1 / RTs between nodes*
>

Actually we do not need to do anything. Force base layouts we use will put
connected nodes closer and not connected nodes further.


>
> This will bring together accounts that often retweet a node's content.
> Less enthusiastic retweeters are further and further out.
>
> *Redness = no of RT's done by a node*
>
> High RT accounts, like bots, will show up in stages of red
>
+1

>
> *Size of node = % of original tweets in sample space OR number of RTs
> received by that node*
>
> Content creators and popular influencers are larger
>

I would say let's go with RT's received by that node. IMO that is the best
measure of influence.


>
> Therefore we'll end up with a graph of large nodes (popular influencers)
> surrounded closely by nodes that RT them a lot and at the edges of this
> little community will be the nodes that don't RT them all that often.
>
> What do you think?
>
> Best,
> Yudha
>
> On Thu, Nov 19, 2015 at 11:02 AM, Dinali Dabarera  wrote:
>
>> Yes I will do sir. But I am doing some research on d3 by adding more
>> features and directing getting data from DAS. I hope to do this as it will
>> help in the future.
>>
>> On Thu, Nov 19, 2015 at 9:38 AM, Srinath Perera  wrote:
>>
>>> We must use d3 or a d3 based one, as that WSO2 platform uses.
>>>
>>> Sample I shared shows how to do it with d3.
>>>
>>> Thanks
>>> Srinath
>>>
>>> On Wed, Nov 18, 2015 at 3:36 PM, Dinali Dabarera 
>>> wrote:
>>>
 Hi,
 I have created two tables on DAS which collects fresh data daily(more
 than 1000,000) and run a script which is scheduled hourly to collect data
 into two tables called NodeTable(nose , retweets order by retweets desc)
 and EdgeTable(src,dest,retweets order by retweets desc).

 Now I have to create a node graph. Node size give u from NodeTable and
 Width of edge gives u from retweet count in EdgeTable of  I have looked up
 lot of java script libraries such as vis.js, arbor.js, D3.js,sigmajs.

 I couldn't figured out what is better (as most of them have specific to
 a single node and takes lot of time to study all) then i moved to d3.js as
 many have used and tried  for different purposes. Can i get any other good
 suggestions for my graphing?

 If you have good suggestions, please feel free to post them so that it
 will help me ..


 Cheers!

 On Tue, Nov 17, 2015 at 3:17 PM, Yasara Dissanayake 
 wrote:

> @yudhanjaya
> Ok.Now it's working.Popular tweets are now saved to on database base
> on that rank from CEP. Wrote custom window for siddi to calculate that 
> rank
> and sort them. Currently working with design web page using jaggery 
> server.
>
> Regards
> Yasara
>
> On Tue, Nov 17, 2015 at 3:11 PM, Yudhanjaya Wijeratne <
> yudhanj...@wso2.com> wrote:
>
>> We'll have to talk to Srinath about that, I'm afraid. Let's get the
>> RT system rolling first. Whatever we come up with the replies will also
>> have to be displayed as part of that graph, so let's get the simpler 
>> stuff
>> out of the way.
>>
>> On Tue, Nov 17, 2015 at 2:54 PM, Yasara Dissanayake 
>> wrote:
>>
>>> hi,
>>>
>>> @Nipuna,
>>> Dinali and me both are collecting retweets in same manner which she
>>> explained earlier. Since I also consider the details original tweets of
>>> retweets. Thank you for comments and link it would be very useful. And
>>> about favorite count, isn't it a separate option something like like to 
>>> the
>>> post which can do even non friends? Here I mean the publicity of tweet.
>>> that is initially when tweet are published it will be on friends wall. 
>>> But
>>> it has not impact as much as retweet and favorite count.
>>>
>>> @yudhanjaya
>>> And what about the replies? if we consider them there can be +1, 0
>>> and -1 support for that tweet. do we have to consider them ? if so do we
>>> have to do some analysis?
>>>
>>> regards,
>>> Yasara
>>>
>>> On Tue, Nov 17, 2015 at 2:38 PM, Yudhanjaya Wijeratne <
>>> yudhanj...@wso2.com> wrote:
>>>
 Hi Madhawa, Nipuna,

 We'll be doing a bit of sentiment analysis later down the line
 using the stanford NLP implementation, but for now what we're trying to
 replicate in real-time is to
 a) rank tweets by freshness and popularity, which can give us some
 clue as to opinion influence and b) to basically do this

Re: [Dev] Updating data-publisher agents in carbon-multitenancy

2015-11-19 Thread Nipuni Perera
Hi Sanjeewa,

I checked the imports of the mentioned classes. As per my last reply "
org.wso2.carbon.tenant.usage.agent" is the artifact id while package name
is "org.wso2.carbon.usage.agent" (Note: no "tenant" part). So
org.wso2.carbon.tenant.usage.agent exports "org.wso2.carbon.usage.agent.api"
package only.

And regarding publishing events, if APIM move to carbon-commons 4.5.0
(which has API changes in data publishers), APIM stat publishing part may
need to implement from APIM side. (As carbon-multitenancy still use older
version of carbon-commons. Else we need to update carbon-multitenancy with
carbon-commons new version and rewrite data publishing part and export
required packages. (I am not sure about the recommended approach)).

@Sameera/Kishanthan/Kalpa : Please share your thoughts on this.

@Rukshan: Code may compile, but there can have runtime failures. Can we
test this scenario (publishing events) with APIM 1.10 to see if there are
any issues.

Thanks,
Nipuni

On Thu, Nov 19, 2015 at 8:57 PM, Sanjeewa Malalgoda 
wrote:

>
>
> On Thu, Nov 19, 2015 at 8:39 PM, Rukshan Premathunga 
> wrote:
>
>> Hi,
>>
>> @Nipuni, we have compiling code at here[1] and there was no any issues.
>>
>> @Sanjeewa, we are moved from org.wso2.carbon.usage.agent to 
>> org.wso2.carbon.tenant.usage.agent
>> right? Also, does it satisfied "DataPublisherUtil.isEnabledMetering()" at
>> here[2] and reached to here [1]?
>>
> Yes i missed that. However still we do have usage agent 2.1.2 dependency
> in root pom i thought still it was using.
> I think we need to remove it now.
>
> And if you carefully checked mentioned classes you can see following
> imports(it doesn't have org.wso2.carbon.tenant.usage.agent imports).
>
> import org.wso2.carbon.usage.agent.beans.APIManagerRequestStats;
> import org.wso2.carbon.usage.agent.util.PublisherUtils;
>
> So as i understood its using usage agent 2.1.2 in the build time(as it was
> there in root pom as dependency) and we don't get build failures.
> And as nipuni mentioned it should return run time error even if its build
> fine.
>
> Other question is if we don't have that publisher util class anymore what
> is the recommended implementation to publish events?
> Do we have already released implementation?
>
> Thanks,
> sanjeewa.
>
>
>> [1]
>> https://github.com/ruks/carbon-apimgt/blob/1.10.x.3/components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.publisher/src/main/java/org/wso2/carbon/apimgt/usage/publisher/APIMgtUsageHandler.java#L169
>> [2]
>> https://github.com/ruks/carbon-apimgt/blob/1.10.x.3/components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.publisher/src/main/java/org/wso2/carbon/apimgt/usage/publisher/APIMgtUsageHandler.java#L162
>>
>> Thanks and Regards.
>>
>>
>>
>> On Thu, Nov 19, 2015 at 8:03 PM, Nipuni Perera  wrote:
>>
>>> Hi all,
>>>
>>> I have listed the osgi bundles in a APIM-1.10 pack and could observe
>>> that (refer [1 for the result from osgi console]) it is using
>>> org.wso2.carbon.tenant.usage.agent_4.5.0. (which is release with
>>> carbon-multitenancy 4.5.0. I could not find a 2.1.2 jar from the osgi
>>> bundle list).
>>> According to the pom.xml in [2], all the pakcages in 
>>> org.wso2.carbon.usage.agent
>>> has declared as private while only package org.wso2.carbon.usage.agent.api
>>> has exported.
>>>
>>> @Sanjeewa: As I have mentioned above the org.wso2.
>>> carbon.usage.agent.util.PublisherUtils class seems to be private and
>>> cannot use outside the bundle. If should give a runtime error while trying
>>> to publish events using APIMgtUsageHandler.
>>> @Amila : org.wso2.carbon.tenant.usage.agent is the artifact id and
>>> org.wso2.carbon.usage.agent is the package name.
>>>
>>> [1]osgi> ss | grep agent
>>>
>>> 215 ACTIVE  org.wso2.carbon.databridge.agent.thrift_4.4.8
>>> 289 ACTIVE  org.wso2.carbon.identity.sso.agent_5.0.0
>>> 446 ACTIVE  org.wso2.carbon.tenant.throttling.agent_4.5.0
>>> 447 ACTIVE  org.wso2.carbon.tenant.usage.agent_4.5.0
>>> 449 ACTIVE  org.wso2.carbon.throttling.agent.stub_4.4.7
>>> true
>>> osgi>
>>> osgi>
>>> osgi>
>>> osgi> ss | grep usage
>>> 189 ACTIVE  org.wso2.carbon.apimgt.usage.client_4.3.1.SNAPSHOT
>>> 190 ACTIVE  org.wso2.carbon.apimgt.usage.publisher_4.3.1.SNAPSHOT
>>> 447 ACTIVE  org.wso2.carbon.tenant.usage.agent_4.5.0
>>>
>>>
>>> [2]
>>> https://github.com/wso2/carbon-multitenancy/blob/v4.5.0/components/tenant-mgt/org.wso2.carbon.tenant.usage.agent/pom.xml
>>>
>>> Thanks,
>>> Nipuni
>>>
>>> On Thu, Nov 19, 2015 at 5:43 PM, Sanjeewa Malalgoda 
>>> wrote:
>>>
 In our APIMgtUsageHandler we use
 publisherUtils(org.wso2.carbon.usage.agent.util.PublisherUtils) class to
 publish events.
 So we have dependency to org.wso2.carbon.usage.agent(2.1.2) jar.
 At this point our commons version is 4.4.8 for APIM 1.10 release.

 So do you suggest to move 

Re: [Dev] Updating data-publisher agents in carbon-multitenancy

2015-11-19 Thread Rukshan Premathunga
Hi Nipuni,

Normally we are publishing event using
org.wso2.carbon.databridge.agent.thrift.lb.LoadBalancingDataPublisher like
this[1] and it worked without any problems.

And i'm not sure about this line[2] and it is special scenario. And i'm not
had a chance to use that scenario. i'll try to use that scenario and
monitor the outcome.

[1]
https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.publisher/src/main/java/org/wso2/carbon/apimgt/usage/publisher/APIMgtUsageDataBridgeDataPublisher.java#L122

[2]
https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.publisher/src/main/java/org/wso2/carbon/apimgt/usage/publisher/APIMgtUsageHandler.java#L167


Thanks and Regards.

On Fri, Nov 20, 2015 at 9:00 AM, Nipuni Perera  wrote:

> Hi Sanjeewa,
>
> I checked the imports of the mentioned classes. As per my last reply "
> org.wso2.carbon.tenant.usage.agent" is the artifact id while package name
> is "org.wso2.carbon.usage.agent" (Note: no "tenant" part). So
> org.wso2.carbon.tenant.usage.agent exports "
> org.wso2.carbon.usage.agent.api" package only.
>
> And regarding publishing events, if APIM move to carbon-commons 4.5.0
> (which has API changes in data publishers), APIM stat publishing part may
> need to implement from APIM side. (As carbon-multitenancy still use older
> version of carbon-commons. Else we need to update carbon-multitenancy with
> carbon-commons new version and rewrite data publishing part and export
> required packages. (I am not sure about the recommended approach)).
>
> @Sameera/Kishanthan/Kalpa : Please share your thoughts on this.
>
> @Rukshan: Code may compile, but there can have runtime failures. Can we
> test this scenario (publishing events) with APIM 1.10 to see if there are
> any issues.
>
> Thanks,
> Nipuni
>
> On Thu, Nov 19, 2015 at 8:57 PM, Sanjeewa Malalgoda 
> wrote:
>
>>
>>
>> On Thu, Nov 19, 2015 at 8:39 PM, Rukshan Premathunga 
>> wrote:
>>
>>> Hi,
>>>
>>> @Nipuni, we have compiling code at here[1] and there was no any issues.
>>>
>>> @Sanjeewa, we are moved from org.wso2.carbon.usage.agent to 
>>> org.wso2.carbon.tenant.usage.agent
>>> right? Also, does it satisfied "DataPublisherUtil.isEnabledMetering()" at
>>> here[2] and reached to here [1]?
>>>
>> Yes i missed that. However still we do have usage agent 2.1.2 dependency
>> in root pom i thought still it was using.
>> I think we need to remove it now.
>>
>> And if you carefully checked mentioned classes you can see following
>> imports(it doesn't have org.wso2.carbon.tenant.usage.agent imports).
>>
>> import org.wso2.carbon.usage.agent.beans.APIManagerRequestStats;
>> import org.wso2.carbon.usage.agent.util.PublisherUtils;
>>
>> So as i understood its using usage agent 2.1.2 in the build time(as it
>> was there in root pom as dependency) and we don't get build failures.
>> And as nipuni mentioned it should return run time error even if its build
>> fine.
>>
>> Other question is if we don't have that publisher util class anymore what
>> is the recommended implementation to publish events?
>> Do we have already released implementation?
>>
>> Thanks,
>> sanjeewa.
>>
>>
>>> [1]
>>> https://github.com/ruks/carbon-apimgt/blob/1.10.x.3/components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.publisher/src/main/java/org/wso2/carbon/apimgt/usage/publisher/APIMgtUsageHandler.java#L169
>>> [2]
>>> https://github.com/ruks/carbon-apimgt/blob/1.10.x.3/components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.publisher/src/main/java/org/wso2/carbon/apimgt/usage/publisher/APIMgtUsageHandler.java#L162
>>>
>>> Thanks and Regards.
>>>
>>>
>>>
>>> On Thu, Nov 19, 2015 at 8:03 PM, Nipuni Perera  wrote:
>>>
 Hi all,

 I have listed the osgi bundles in a APIM-1.10 pack and could observe
 that (refer [1 for the result from osgi console]) it is using
 org.wso2.carbon.tenant.usage.agent_4.5.0. (which is release with
 carbon-multitenancy 4.5.0. I could not find a 2.1.2 jar from the osgi
 bundle list).
 According to the pom.xml in [2], all the pakcages in 
 org.wso2.carbon.usage.agent
 has declared as private while only package org.wso2.carbon.usage.agent.api
 has exported.

 @Sanjeewa: As I have mentioned above the org.wso2.
 carbon.usage.agent.util.PublisherUtils class seems to be private and
 cannot use outside the bundle. If should give a runtime error while trying
 to publish events using APIMgtUsageHandler.
 @Amila : org.wso2.carbon.tenant.usage.agent is the artifact id and
 org.wso2.carbon.usage.agent is the package name.

 [1]osgi> ss | grep agent

 215 ACTIVE  org.wso2.carbon.databridge.agent.thrift_4.4.8
 289 ACTIVE  org.wso2.carbon.identity.sso.agent_5.0.0
 446 ACTIVE  

Re: [Dev] Improvements to metrics datasource configurations

2015-11-19 Thread Isuru Perera
Hi Sinthuja,

I have already fixed these issues with commit [1].

These additional datasource configurations were added as commented lines in
metrics-datasources.xml and I added those just before Carbon Metrics v1.1.1
release, which is used in MB and DAS products. We found the issues only
after the release and we created a JIRA to track [2].

I'm sorry for the inconvenience. :(

Thanks for reporting these issues.

Best Regards,

[1]
https://github.com/wso2/carbon-metrics/commit/a9e66190416551d526b266c75f815add1f26cfe9
[2] https://wso2.org/jira/browse/MB-1561

On Thu, Nov 19, 2015 at 7:27 PM, Sinthuja Ragendran 
wrote:

> Hi IsuruP,
>
> There are two issues we saw in the metrics-datasource configurations for
> other datasources such as MySQL, MSSQL than H2.
>
> 1) The JNDI config is mentioned as below. As there is already default
> configurations provided for the database, the jndi config also needed to be
> default. If we have the below element then the actual default name,  then
> we are using the intended advantage of having the sample datasource
> configuration already.
>
>
> The MySQL datasource used for WSO2 Carbon
> Metrics
> 
>
> 2) defaultAutoCommit is set to false in other datasource configurations
> than H2. And I don't think this is required for the metrics datasource, and
> I don't see this config for H2 datasource as well. I believe we need to
> remove this config from the metrics datasource config.
>
> Thanks,
> Sinthuja.
> --
> *Sinthuja Rajendran*
> Associate Technical Lead
> WSO2, Inc.:http://wso2.com
>
> Blog: http://sinthu-rajan.blogspot.com/
> Mobile: +94774273955
>
>
>


-- 
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] Improvements to metrics datasource configurations

2015-11-19 Thread Dilini Gunatilake
Hi Isuru,

Since this a common feature which will be incorporated in other products,
shall we move this bug from MB? Then we can make sure that this fix will be
included in the next release. Do you have any idea where to move this?

Regards,
Dilini

On Fri, Nov 20, 2015 at 10:38 AM, Isuru Perera  wrote:

> Hi Sinthuja,
>
> I have already fixed these issues with commit [1].
>
> These additional datasource configurations were added as commented lines
> in metrics-datasources.xml and I added those just before Carbon Metrics
> v1.1.1 release, which is used in MB and DAS products. We found the issues
> only after the release and we created a JIRA to track [2].
>
> I'm sorry for the inconvenience. :(
>
> Thanks for reporting these issues.
>
> Best Regards,
>
> [1]
> https://github.com/wso2/carbon-metrics/commit/a9e66190416551d526b266c75f815add1f26cfe9
> [2] https://wso2.org/jira/browse/MB-1561
>
> On Thu, Nov 19, 2015 at 7:27 PM, Sinthuja Ragendran 
> wrote:
>
>> Hi IsuruP,
>>
>> There are two issues we saw in the metrics-datasource configurations for
>> other datasources such as MySQL, MSSQL than H2.
>>
>> 1) The JNDI config is mentioned as below. As there is already default
>> configurations provided for the database, the jndi config also needed to be
>> default. If we have the below element then the actual default name,  then
>> we are using the intended advantage of having the sample datasource
>> configuration already.
>>
>>
>> The MySQL datasource used for WSO2 Carbon
>> Metrics
>> 
>>
>> 2) defaultAutoCommit is set to false in other datasource configurations
>> than H2. And I don't think this is required for the metrics datasource, and
>> I don't see this config for H2 datasource as well. I believe we need to
>> remove this config from the metrics datasource config.
>>
>> Thanks,
>> Sinthuja.
>> --
>> *Sinthuja Rajendran*
>> Associate Technical Lead
>> WSO2, Inc.:http://wso2.com
>>
>> Blog: http://sinthu-rajan.blogspot.com/
>> Mobile: +94774273955
>>
>>
>>
>
>
> --
> 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
>
>


-- 

*Dilini GunatilakeSoftware Engineer - QA Team*
Mobile : +94 (0) 771 162518
dili...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS] "hostname in certificate didn't match:" issue when accessing IS dashboard

2015-11-19 Thread Aparna Karunarathna
Actually I have used another Nginx to resolve my issue, not a permanent
solution. AFAIU this is getting due to httpclient 4.3.1 doesn't support
SNI.

@IsuruU, Shouldn't it upgrade to httpclient 4.3.2 ?

Regards,
Aparna.


On Fri, Nov 20, 2015 at 11:24 AM, Malintha Adikari 
wrote:

> Hi Aprana,
>
> I am getting the same issue while accessing APIM distributed cluster nodes
> fronted through loadbalancer(nginx) instance. Did you able to solve this
> issue ? If so how did you solve it ?
>
> Regards,
> Malintha
>
> On Wed, Oct 28, 2015 at 2:09 PM, Isuru Udana  wrote:
>
>> Hi Aparna,
>>
>> Bundles are coming from features, whatever version defined in the product
>> pom have no relationship for that.
>>
>>  Thanks.
>>
>> On Wed, Oct 28, 2015 at 11:20 AM, Aparna Karunarathna 
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> I checked version from the ESB master branch pom[1].
>>>
>>> 4.1.2
>>>
>>> [1] https://github.com/wso2/product-esb/blob/master/pom.xml
>>>
>>> Regards,
>>> Aparna.
>>>
>>> On Tue, Oct 27, 2015 at 5:41 AM, Isuru Udana  wrote:
>>>
 Hi Aparna,

 We are using 4.3.1.


 Thanks.

 On Mon, Oct 26, 2015 at 10:36 AM, Aparna Karunarathna 
 wrote:

> Hi Kasun/Isuru,
>
> Currently ESB uses Apache httpclient 4.1.2, shouldn't it upgrade to
> newer version?
>
> @Deep, Thanks for the clarification.
>
> Regards,
> Aparna
>
> On Sat, Oct 24, 2015 at 11:38 AM, Deependra Ariyadewa 
> wrote:
>
>> Hi Aparna,
>>
>> This can happen when the client does not send the SNI[1][2] to the
>> server side to select the proper HTTPS virtual host. In this case NGINX
>> reverse proxy created in the vhost. Most of the modern browsers send SNI 
>> to
>> server, therefore you will not observe this when you make the request 
>> via a
>> modern browser.
>>
>> Most of the new Java HTTP client libraries also support SNI. As an
>> example, Apache httpclient library support SNI from version 4.3.2 [3]. If
>> you use a library which does not support SNI, you will get this error for
>> HTTPS call going towards services hosted in virtual host environments.
>>
>> [1] https://en.wikipedia.org/wiki/Server_Name_Indication
>> [2] https://www.ietf.org/rfc/rfc3546.txt
>> [3] https://hc.apache.org/news.html
>>
>> On Fri, Oct 23, 2015 at 11:07 AM, Aparna Karunarathna <
>> apa...@wso2.com> wrote:
>>
>>> Hi all,
>>>
>>> I have encountered a weird "hostname in certificate didn't match:"
>>> issue when accessing IS dashboard. My setup details are as follows.
>>>
>>> *Setup Details*
>>> *IS cluster*
>>> - 3 nodes cluster
>>> - Hostname - mgt.is.wso2.com
>>> - Certificate CN - mgt.is.wso2.com
>>>
>>> *BPS cluster*
>>> - 2 nodes cluster (manager/worker)
>>> - Hostnames - Manager - mgt.bps.wso2.com / Worker - wrk.bps.wso2.com
>>> - Certificate CN - *.bps.wso2.com
>>>
>>> * Both nodes are fronted by same Nginx plus load balancer.
>>>
>>> [1]
>>> javax.net.ssl.SSLException: hostname in certificate didn't match: <
>>> mgt.is.wso2.com> != <*.bps.wso2.com>
>>> at
>>> org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:238)
>>> at
>>> org.apache.http.conn.ssl.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:54)
>>> 
>>> 
>>>
>>> When we check the browser cookie, it gave correct certificate. (
>>> mgt.is.wso2.com), but when we check it from java client[2] it gives
>>> the bps certificate (*.bps.wso2.com) instead of IS.
>>>
>>> [2]
>>> https://darray.wordpress.com/2015/07/12/freak-vulnerability-and-disabling-weak-export-cipher-suites-in-wso2-carbon-4-2-0-based-products/
>>>
>>> What is the reason for this? Is it my config issue or Nginx issue or
>>> our product issue?
>>>
>>> --
>>> *Regards,*
>>>
>>> *Aparna Karunarathna.*
>>>
>>>
>>> *Associate Technical Lead - QAWSO2 Inc.Mobile: 0714002533
>>> <0714002533>*
>>>
>>
>>
>>
>> --
>> Deependra Ariyadewa
>> WSO2, Inc. http://wso2.com/ http://wso2.org
>>
>> email d...@wso2.com; cell +94 71 403 5996 ;
>> Blog http://risenfall.wordpress.com/
>> PGP info: KeyID: 'DC627E6F'
>>
>> *WSO2 - Lean . Enterprise . Middleware*
>>
>
>
>
> --
> *Regards,*
>
> *Aparna Karunarathna.*
>
>
> *Associate Technical Lead - QAWSO2 Inc.Mobile: 0714002533 <0714002533>*
>



 --
 *Isuru Udana*
 Associate Technical Lead
 WSO2 Inc.; http://wso2.com
 email: isu...@wso2.com cell: +94 77 3791887
 blog: http://mytecheye.blogspot.com/

>>>
>>>
>>>
>>> --
>>> *Regards,*
>>>
>>> *Aparna Karunarathna.*
>>>
>>>
>>> 

Re: [Dev] [ES 2.0.0] Issue about creating and editing Unbounded Tables

2015-11-19 Thread Ayesha Dissanayaka
Hi Luca,

I have updated the versions of product-es repository[1] dependencies and
commit in the pull request[2]. I havent merge the changes to master branch
yet, since we are still working on updating test cases and other fixes.

In order to build a wso2es product with above fixes, follow the below steps.

   - Build carbon-store repository[3] master
   - Merge, pull request [2] into [1] locally
   - And then build [1]

[1] https://github.com/wso2/product-es/
[2] https://github.com/wso2/product-es/pull/215
[3] https://github.com/wso2/carbon-store

Thanks!
-Ayesha


On Thu, Nov 19, 2015 at 7:04 PM, Luca Mastrangelo <
luca.mastrang...@cefriel.com> wrote:

> Hi Udara,
>
>thank you for the useful information about this fix.
>
>
>
> We have tried to compile the last version in github of the ES
> 2.0.1-SNAPSHOT but does not contain the fix to the unbounded table. So we
> tried to compile the Jaggery and to set in the ES 2.0.1 the
> jaggery.feature.version property to 0.12.0 (in which the unbounded table
> bug is fixed) instead of the default  0.11.1 but we had some problems with
> dependencies.
>
>
>
> If it is possible for you we would like:
>
> 1.   to know when the new stable version of ES 2.0.1 will be released.
>
> 2.   Receive a link with the compiled version of the ES 2.0.0 or
> 2.0.1 with the fix to the unbounded table.
>
>
>
> The last error message is:
>
> “Missing requirement: Jaggery Server Feature 0.12.0
> (org.jaggeryjs.server.feature.group 0.12.0) requires
> 'org.wso2.carbon.security.mgt.server.feature.group [5.0.0,5.1.0)' but it
> could not be found
>
> Cannot satisfy dependency:
>
>   From: Jaggery aggregate Feature 0.12.0 (org.jaggeryjs.feature.group
> 0.12.0)
>
>   To: org.jaggeryjs.server.feature.group [0.12.0]”
>
>
>
>
>
>
>
> *From:* Udara Rathnayake [mailto:uda...@wso2.com]
> *Sent:* Monday, November 16, 2015 3:39 PM
> *To:* Luca Mastrangelo 
> *Cc:* dev@wso2.org
> *Subject:* Re: [Dev] [ES 2.0.0] Issue about creating and editing
> Unbounded Tables
>
>
>
> Hi Luca,
>
> We have already fixed this issue within Jaggery trunk[1][2] and will be
> available with the next ES release.
>
> [1]
> https://github.com/wso2/jaggery/commit/f3a4fa2cac6a548a53292326590b548ac542cffe
> [2]
> https://github.com/wso2/jaggery/commit/0b47f4f727743efd90c9cb53b0514063e5d8807d
>
> Regards,
>
> UdaraR
>
>
>
> On Mon, Nov 16, 2015 at 8:59 AM, Luca Mastrangelo <
> luca.mastrang...@cefriel.com> wrote:
>
> Dear all,
>
>
>
> We are about to use the Enterprise Store 2.0.0 in a production
> environment, so we are performing several tests focusing in particular on
> its advanced features.
>
> Unfortunately we noticed a serious issue that prevents us from effectively
> using your product. Such issue is related in particular to the creation of
> new asset instances where both unbounded tables and uploaded files (e.g.,
> thumbnail or banner image) are involved.
>
>
>
> The issue is described in detail below. Should you need more details
> about the tests we performed, please do not hesitate to contact us.
>
> We look forward to your feedback.
>
>
>
> *Issue description*:
>
>
>
> When a user creates an asset instance with:
>
> · more than one value in an unbounded table (e.g., “Item_1”,
> “Item_2” and “Item_3”)
>
> · and one file (e.g., thumbnail image)
>
> the instance created is stored with only the last item in the unbounded
> table (i.e., “Item_1” and “Item_2” are lost)
>
>
>
> It seems that, in order to correctly store the fields of the asset
> instance, the user must add “Item_1” and “Item_2” to the unbounded table
> without adding any file.
>
> But if the user updates the instance by updating even just one file, the
> fields in the unbounded table are lost again.
>
>
>
> *Details about some tests performed*:
>
>
>
> *a)*  New instance for Test Asset (you can see artifactType rxt in
> the attachments)
>
>
>
> We created a new artifactType called “test” adding an unbounded table to
> the rxt of the standard “gadget” artifactType.
>
>
>
> This is the result visible from the “Creating” page in the ES Publisher
> (the unbounded table is marked in red):
>
>
>
>
>
>
>
> From the ES Publisher interface we created 2 instances: “*Test_noFile*”
> and “*Test_withFile*”.
>
>
>
> As their names imply, the only difference between them is that for the “
> *Test_noFile”* asset we loaded no file (for thumbnail and banner fields),
> while for the “*Test_withFile*” asset we selected an image as thumbnail.
>
> Both assets have the same values for all the other fields, and in
> particular the unbounded table was filled with the values “Item_1”,
> “Item_2” and “Item_3”.
>
> The two assets would have to be identical, but from the Overview screen
> you can see that “*Test_withFile* “, the one with the custom thumbnail,
> has only the last item in the unbounded table, while the “*Test_noFile*”
> asset shows correctly the whole table because no file was loaded.
>
>
>
>  

[Dev] [DEV] [Jaggery]How to convert/cast an exception stachtrace to a string

2015-11-19 Thread Ishara Cooray
Hi,

In Jaggerry If an exception is concatenated to a string it will concatenate
only the message part but the stacktrace is omited.

ex: var exceptionString = "Custom Message" + e;
This exceptionString does not have the stacktrace.

How can i get the exception with the stacktrace as a string in Jaggery?


Thanks & Regards,
Ishara Cooray
Senior Software Engineer
Mobile : +9477 262 9512
WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] [Jaggery]How to convert/cast an exception stachtrace to a string

2015-11-19 Thread Lalanke Athauda
Hi Ishara,
Try this one.

var exceptionString = "Custom Message" + *stringify*(e);

Hope this solve your problem.

On Fri, Nov 20, 2015 at 11:57 AM, Ishara Cooray  wrote:

> Hi,
>
> In Jaggerry If an exception is concatenated to a string it will
> concatenate only the message part but the stacktrace is omited.
>
> ex: var exceptionString = "Custom Message" + e;
> This exceptionString does not have the stacktrace.
>
> How can i get the exception with the stacktrace as a string in Jaggery?
>
>
> Thanks & Regards,
> Ishara Cooray
> Senior Software Engineer
> Mobile : +9477 262 9512
> WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Lalanke Athauda
Software Engineer
WSO2 Inc.
Mobile: 0772264301
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [ESB][Property Mediators] An Error occurred while using the property mediators.

2015-11-19 Thread Lakmini Chathurika
Hi all,

I have written  a proxy service to get the product list. For each of the
product in this product list I need to get its versions.
I used a property mediator for this.
Source view of the Proxy service is as follows ,


http://ws.apache.org/ns/synapse;>
https://redmine-upgrade.private.wso2.com
"/>



{$ctx:apiUrl}
{$ctx:apiKey}
{$ctx:responseType}









RedmineDataStream_27
1.0.27
RedmineEventSink













{$ctx:id}








The following error log received while try to run this proxy service.


[2015-11-20 12:25:53,492] ERROR - DeferredMessageBuilder Error building
message
org.apache.axis2.AxisFault: No JSON payload provided.
at
org.apache.synapse.commons.json.JsonStreamBuilder.processDocument(JsonStreamBuilder.java:52)
at
org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:138)
at
org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133)
at
org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
at
org.apache.synapse.mediators.eip.splitter.IterateMediator.mediate(IterateMediator.java:241)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:679)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:244)
at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529)
at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:247)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[2015-11-20 12:25:53,497] ERROR - RelayUtils Error while building
Passthrough stream
org.apache.axis2.AxisFault: No JSON payload provided.
at
org.apache.synapse.commons.json.JsonStreamBuilder.processDocument(JsonStreamBuilder.java:52)
at
org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:138)
at
org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133)
at
org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
at
org.apache.synapse.mediators.eip.splitter.IterateMediator.mediate(IterateMediator.java:241)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:679)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:244)
at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529)
at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:247)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[2015-11-20 12:25:53,498] ERROR - SequenceMediator Error while building
message
org.apache.axis2.AxisFault: Error while building Passthrough stream
at
org.apache.synapse.transport.passthru.util.RelayUtils.handleException(RelayUtils.java:283)
at
org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:142)
at
org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
at

Re: [Dev] [Automation][DS] Build is not getting fail since the find-bug finds bugs in the code

2015-11-19 Thread Rajeenthini Satkunam
Hi chamara,

I have already tried the way you have mentioned that removing testOnFailure
as well as change  to compile. Even when I changed the phase to
compile, it does not produce findbugxml file.And I have version
specification in a Parent POM as below.


org.apache.maven.plugins
findbugs-maven-plugin
${maven.findbugsplugin.version}


3.0.2

my current find-bug plugin in POM of test module.


org.codehaus.mojo
findbugs-maven-plugin

Max
Low
true

${project.build.directory}/findbugs
true



analyze-compile
compile

check





Can you please give more suggestions on this.Thanks in advance.


On Fri, Nov 20, 2015 at 9:31 AM, Isuru Rupasinghe  wrote:

> Hi Chamara,
>
> Released the message.
>
> Thanks & Regards,
>
> *Isuru Rupasinghe*
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middle-ware
>
> mobile: +94 77 590 4545
> <%2B94%2077%20352%C2%A05930>
> office: +94 11 214 5345 / +94 11 743 5800 ext: 5739
>
>
> On Fri, Nov 20, 2015 at 8:23 AM, Chamara Philips 
> wrote:
>
>> Please release the mail.
>> -- Forwarded message --
>> From: Chamara Philips 
>> Date: Fri, Nov 20, 2015 at 8:21 AM
>> Subject: Fwd: [Dev] [Automation][DS] Build is not getting fail since the
>> find-bug finds bugs in the code
>> To: WSO2 Developers' List 
>>
>>
>>
>> -- Forwarded message --
>> From: Chamara Philips 
>> Date: Fri, Nov 20, 2015 at 8:15 AM
>> Subject: Re: [Dev] [Automation][DS] Build is not getting fail since the
>> find-bug finds bugs in the code
>> To: Rajeenthini Satkunam 
>>
>>
>> Hi Rajeenthini,
>>
>> It is not necessary to set failOnError to true, as it is default. Can you
>> please try removing the "failOnError" property. Also you have missed the
>> version. Following plugin declaration worked for me to run it successfully
>> without integrating tests. I think adding "includeTests" should work fine
>> with tests.
>>
>> 
>> 
>> 
>> org.codehaus.mojo
>> findbugs-maven-plugin
>> 2.5.2
>> 
>>
>> Max
>>
>> Low
>>
>> true
>>
>>
>> ${project.build.directory}/findbugs
>> 
>> 
>> 
>> analyze-compile
>> compile
>> 
>> check
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> Thanks.
>>
>> On Thu, Nov 19, 2015 at 2:54 PM, Rajeenthini Satkunam <
>> rajeenth...@wso2.com> wrote:
>>
>>> Hi all,
>>>
>>> I would like to integrate find-bug plugin with a maven build of product
>>> DS Integration test module(Dashboard Server).So I have added the plugin
>>> maven find-bug under plugins in POM of integration module of product DS.
>>> Here is the code I have added in POM.
>>>
>>> 
>>> org.codehaus.mojo
>>> findbugs-maven-plugin
>>> 
>>> Max
>>> Low
>>> true
>>> 
>>> ${project.build.directory}/findbugs
>>> true
>>> true
>>> 
>>> 
>>> 
>>> analyze-compile
>>> verify
>>> 
>>> check
>>> 
>>> 
>>> 
>>> 
>>>
>>> But the build is not getting fail even I got some bugs through find-bug
>>> tool.I can produce the findbugsXml.xml file under directory findBug.Can
>>> anyone tell that do I need to add any other configurations to run this tool
>>> for test sources rather than adding this plugin to POM?
>>>
>>> I have asked this from StackOverFlow as well you can find the question
>>> here[1].
>>> [1] -
>>> http://stackoverflow.com/questions/33796044/how-can-i-integrate-find-bug-maven-plugin-to-integration-test-module
>>>
>>> references
>>>
>>> [2] - http://gleclaire.github.io/findbugs-maven-plugin/
>>> [3] -
>>> http://stackoverflow.com/questions/33234692/maven-findbugs-plugin-how-to-run-findbug-on-the-test-classes
>>> --
>>>
>>> *Thank You.*
>>>
>>> *Rajeenthini Satkunam*
>>>
>>> *Associate Software Engineer | WSO2*
>>>
>>>
>>> *E:rajeenth...@wso2.com *
>>>
>>> *M :+94770832823 <%2B94770832823>   *
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Hareendra Chamara P h i l i p s
>> *Software  Engineer*
>> Mobile : +94 (0) 767 184161 <%2B94%20%280%29%20773%20451194>
>> chama...@wso2.com 
>>
>>
>>
>>
>> --
>> Hareendra Chamara P h i l i p s
>> *Software  Engineer*
>> Mobile : +94 (0) 767 184161 <%2B94%20%280%29%20773%20451194>
>> chama...@wso2.com 
>>
>>
>>
>>
>> --
>> Hareendra Chamara P h i l i p s
>> *Software  Engineer*
>> Mobile : +94 (0) 767 184161 

[Dev] [DEV][Jaggery][javascript] jagg.post() returns to the error function while post fuction implements properly.

2015-11-19 Thread Ishara Cooray
I have the following code implemented in a jaggery app. In the reInvite
function sends an email and returns email. The issue is though the email is
sent successfully it throws an error.


jagg.post("../blocks/tenant/register/invite/ajax/invite.jag", {
action:"reInvite",
email:email
},
function (result) {
  //do something
},
function (jqXHR, textStatus, errorThrown) {
//handle error
});

What could be the possible reason for this error?
Appreciate your inputs.

Thanks.
Ishara Cooray
Senior Software Engineer
Mobile : +9477 262 9512
WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] [Jaggery]How to convert/cast an exception stachtrace to a string

2015-11-19 Thread Ishara Cooray
Thanks for the reply Lalanke. But *stringify() * results the same.

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

On Fri, Nov 20, 2015 at 12:22 PM, Lalanke Athauda  wrote:

> Hi Ishara,
> Try this one.
>
> var exceptionString = "Custom Message" + *stringify*(e);
>
> Hope this solve your problem.
>
> On Fri, Nov 20, 2015 at 11:57 AM, Ishara Cooray  wrote:
>
>> Hi,
>>
>> In Jaggerry If an exception is concatenated to a string it will
>> concatenate only the message part but the stacktrace is omited.
>>
>> ex: var exceptionString = "Custom Message" + e;
>> This exceptionString does not have the stacktrace.
>>
>> How can i get the exception with the stacktrace as a string in Jaggery?
>>
>>
>> Thanks & Regards,
>> Ishara Cooray
>> Senior Software Engineer
>> Mobile : +9477 262 9512
>> WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Lalanke Athauda
> Software Engineer
> WSO2 Inc.
> Mobile: 0772264301
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issue in carbon logs after changing carbon.kernel.version from 4.4.1 to 4.4.2

2015-11-19 Thread Ruwan Abeykoon
Hi All,
I think sanitizing the log it not the correct remedy for the "log forging"
issue. We need to provide a utility to the developers to sanitize the user
inputs before appending to the logs IMO. Developers should able to log with
any formatted (even with CRLF) for visibility purposes.

Also IMHO, we should not use the servlet filter to "fix" the incorrect
headers etc. We should fail the response sending throwing an exception to
the application side.

I think we can improve the performance of the code [1], there are
unnecessary String search with regx, which is expensive.

[1]
https://github.com/wso2/carbon-kernel/pull/278/files#diff-5859ce33cfadc4c7933a6a08a605f8d1R72

Cheers,
Ruwan



On Thu, Nov 19, 2015 at 4:30 AM, Malithi Edirisinghe 
wrote:

> Hi Jagath,
>
> So as I said before this fix affects to CarbonConsoleAppender,
> CarbonDailyRollingFileAppender and MemoryAppender. So if this to be
> changed, either a new appender could be configured in log4j.properties or
> the appender class of the CARBON_CONSOLE appender could be changed to a in
> built log4j appender such as org.apache.log4j.ConsoleAppender keeping the
> same layout.
>
> Thanks,
> Malithi.
>
> On Thu, Nov 19, 2015 at 3:28 PM, Jagath Sisirakumara Ariyarathne <
> jaga...@wso2.com> wrote:
>
>> Hi Malithi,
>>
>> Is there any solution to fix this for ESB Log Mediator? Attached two
>> screenshots for before and after updating kernel 4.4.2. As you can see,
>> logs printed by log mediator are different and it is not the actual request
>> received to the ESB with the new version.
>>
>> Thanks.
>>
>> On Thu, Nov 19, 2015 at 2:20 PM, Sajith Ariyarathna 
>> wrote:
>>
>>> Hi Malithi,
>>>
>>> Seems that when you log.error(message, e); the stack trace does not get
>>> sanitized, but if you do log.error(e); then the stack trace get
>>> sanitized.
>>>
>>> Currently we are developing Jaggery app; when an exception occurred in
>>> Jaggery code, Rhino engine logs the stack trace and that stack trace is
>>> sanitized. Looks like our issue goes to Jaggery.
>>>
>>> I also notices that in Jaggery, logging exceptions like log.error(e);
>>> outputs a sanitized stack trace. One can avoid that by logging exceptions 
>>> log.error(message,
>>> e); like this.
>>>
>>> Hoping to discuss this with the Jaggery team. Thank you very much for
>>> your assistance regarding this matter.
>>>
>>>
>>> On Thu, Nov 19, 2015 at 12:26 PM, Malithi Edirisinghe >> > wrote:
>>>
 Hi Sajith,

 Actually the stack trace does not get sanitized. Could you please give
 some example.
 I have tried a simple test as below

 try {
 log.info("XACML policy schema loaded \n successfully.");
 throw new Exception("Test \n Exception");
 } catch (Exception e) {
 log.error("Logging Test \n Exception", e);
 }

 But this prints the log properly and here the stack trace is not
 sanitized. Only the message that you log as an error or debug log gets
 sanitized. Even if you refer the code line that I have pointed above you
 will see it.

 So the output of the above code segment will be something like below.

 [2015-11-19 01:02:07,246]  INFO
 {org.wso2.carbon.identity.entitlement.internal.SchemaBuilder} -  XACML
 policy schema loaded _ successfully. (Sanitized)

 [2015-11-19 01:02:07,246] ERROR
 {org.wso2.carbon.identity.entitlement.internal.SchemaBuilder} -  Logging
 Test _ Exception (Sanitized)

 java.lang.Exception: Test

  Exception

 at
 org.wso2.carbon.identity.entitlement.internal.SchemaBuilder.run(SchemaBuilder.java:46)

 at java.lang.Thread.run(Thread.java:722)

 Here you can clearly see that the stack trace is not sanitized. It
 prints the new line character in the exception as it is in the stack trace.

 Thanks,

 Malithi.

 On Thu, Nov 19, 2015 at 11:59 AM, Sajith Ariyarathna  wrote:

> Hi Malithi,
>
> My concern is that current fix sanitizing stack traces even though
> stack trace does not have CRLF injections in it. I believe sanitizing
> log messages (e.g. log.error(message) , excaption.getMessage() )
> is sufficient to prevent  CRLF injections in logs.
>
> I think we can overcome this problem with the my earlier proposed
> approach (extending log4j PatternLayout class and overriding the
> format method).
>
> Thanks.
>
>
> On Thu, Nov 19, 2015 at 1:07 AM, Malithi Edirisinghe <
> malit...@wso2.com> wrote:
>
>> Hi Sajith,
>>
>> With the present fix there's no way that stack traces could be
>> sanitized unless e.getMessage is explicitly used as the log message.
>>
>> As you can see at [1] only the logging message is sanitized here.
>> Could you please elaborate more in case i'm misunderstanding your
>> concern.
>>
>> 

Re: [Dev] Updating data-publisher agents in carbon-multitenancy

2015-11-19 Thread Sanjeewa Malalgoda
On Thu, Nov 19, 2015 at 8:39 PM, Rukshan Premathunga 
wrote:

> Hi,
>
> @Nipuni, we have compiling code at here[1] and there was no any issues.
>
> @Sanjeewa, we are moved from org.wso2.carbon.usage.agent to 
> org.wso2.carbon.tenant.usage.agent
> right? Also, does it satisfied "DataPublisherUtil.isEnabledMetering()" at
> here[2] and reached to here [1]?
>
Yes i missed that. However still we do have usage agent 2.1.2 dependency in
root pom i thought still it was using.
I think we need to remove it now.

And if you carefully checked mentioned classes you can see following
imports(it doesn't have org.wso2.carbon.tenant.usage.agent imports).

import org.wso2.carbon.usage.agent.beans.APIManagerRequestStats;
import org.wso2.carbon.usage.agent.util.PublisherUtils;

So as i understood its using usage agent 2.1.2 in the build time(as it was
there in root pom as dependency) and we don't get build failures.
And as nipuni mentioned it should return run time error even if its build
fine.

Other question is if we don't have that publisher util class anymore what
is the recommended implementation to publish events?
Do we have already released implementation?

Thanks,
sanjeewa.


> [1]
> https://github.com/ruks/carbon-apimgt/blob/1.10.x.3/components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.publisher/src/main/java/org/wso2/carbon/apimgt/usage/publisher/APIMgtUsageHandler.java#L169
> [2]
> https://github.com/ruks/carbon-apimgt/blob/1.10.x.3/components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.publisher/src/main/java/org/wso2/carbon/apimgt/usage/publisher/APIMgtUsageHandler.java#L162
>
> Thanks and Regards.
>
>
>
> On Thu, Nov 19, 2015 at 8:03 PM, Nipuni Perera  wrote:
>
>> Hi all,
>>
>> I have listed the osgi bundles in a APIM-1.10 pack and could observe that
>> (refer [1 for the result from osgi console]) it is using
>> org.wso2.carbon.tenant.usage.agent_4.5.0. (which is release with
>> carbon-multitenancy 4.5.0. I could not find a 2.1.2 jar from the osgi
>> bundle list).
>> According to the pom.xml in [2], all the pakcages in 
>> org.wso2.carbon.usage.agent
>> has declared as private while only package org.wso2.carbon.usage.agent.api
>> has exported.
>>
>> @Sanjeewa: As I have mentioned above the org.wso2.
>> carbon.usage.agent.util.PublisherUtils class seems to be private and
>> cannot use outside the bundle. If should give a runtime error while trying
>> to publish events using APIMgtUsageHandler.
>> @Amila : org.wso2.carbon.tenant.usage.agent is the artifact id and
>> org.wso2.carbon.usage.agent is the package name.
>>
>> [1]osgi> ss | grep agent
>>
>> 215 ACTIVE  org.wso2.carbon.databridge.agent.thrift_4.4.8
>> 289 ACTIVE  org.wso2.carbon.identity.sso.agent_5.0.0
>> 446 ACTIVE  org.wso2.carbon.tenant.throttling.agent_4.5.0
>> 447 ACTIVE  org.wso2.carbon.tenant.usage.agent_4.5.0
>> 449 ACTIVE  org.wso2.carbon.throttling.agent.stub_4.4.7
>> true
>> osgi>
>> osgi>
>> osgi>
>> osgi> ss | grep usage
>> 189 ACTIVE  org.wso2.carbon.apimgt.usage.client_4.3.1.SNAPSHOT
>> 190 ACTIVE  org.wso2.carbon.apimgt.usage.publisher_4.3.1.SNAPSHOT
>> 447 ACTIVE  org.wso2.carbon.tenant.usage.agent_4.5.0
>>
>>
>> [2]
>> https://github.com/wso2/carbon-multitenancy/blob/v4.5.0/components/tenant-mgt/org.wso2.carbon.tenant.usage.agent/pom.xml
>>
>> Thanks,
>> Nipuni
>>
>> On Thu, Nov 19, 2015 at 5:43 PM, Sanjeewa Malalgoda 
>> wrote:
>>
>>> In our APIMgtUsageHandler we use
>>> publisherUtils(org.wso2.carbon.usage.agent.util.PublisherUtils) class to
>>> publish events.
>>> So we have dependency to org.wso2.carbon.usage.agent(2.1.2) jar.
>>> At this point our commons version is 4.4.8 for APIM 1.10 release.
>>>
>>> So do you suggest to move commons 4.5.0 and use the publisher agent
>>> available there?
>>>
>>> Thanks,
>>> sanjeewa.
>>>
>>> On Thu, Nov 19, 2015 at 5:11 PM, Amila Maha Arachchi 
>>> wrote:
>>>
 Please check with Sanjeewa on whether APIM is using the old usage.agent
 component or is this a new one. I was under the impression that old agent
 is not used anywhere anymore.

 On Thu, Nov 19, 2015 at 4:58 PM, Rukshan Premathunga 
 wrote:

> Hi Amila,
>
> I think yes. I think both contain same package names.
>
> Thanks and Regards.
>
> On Thu, Nov 19, 2015 at 4:55 PM, Amila Maha Arachchi 
> wrote:
>
>> Are org.wso2.carbon.usage.agent
>> and org.wso2.carbon.tenant.usage.agent the same?
>>
>> On Thu, Nov 19, 2015 at 3:26 PM, Rukshan Premathunga <
>> ruks...@wso2.com> wrote:
>>
>>> Hi Nipuni,
>>>
>>> APIM Still use the carbon-multitenancy like below.
>>>
>>> 
>>> org.wso2.carbon.multitenancy
>>> org.wso2.carbon.tenant.usage.agent
>>> 
>>>
>>> can you lokking to this?
>>>
>>>
>>> Thanks and Regards.
>>>

Re: [Dev] [ES 2.0.0] Issue about creating and editing Unbounded Tables

2015-11-19 Thread Luca Mastrangelo
Hi Udara,
   thank you for the useful information about this fix.

We have tried to compile the last version in github of the ES 2.0.1-SNAPSHOT 
but does not contain the fix to the unbounded table. So we tried to compile the 
Jaggery and to set in the ES 2.0.1 the jaggery.feature.version property to 
0.12.0 (in which the unbounded table bug is fixed) instead of the default  
0.11.1 but we had some problems with dependencies.

If it is possible for you we would like:

1.   to know when the new stable version of ES 2.0.1 will be released.

2.   Receive a link with the compiled version of the ES 2.0.0 or 2.0.1 with 
the fix to the unbounded table.

The last error message is:
“Missing requirement: Jaggery Server Feature 0.12.0 
(org.jaggeryjs.server.feature.group 0.12.0) requires 
'org.wso2.carbon.security.mgt.server.feature.group [5.0.0,5.1.0)' but it could 
not be found
Cannot satisfy dependency:
  From: Jaggery aggregate Feature 0.12.0 (org.jaggeryjs.feature.group 0.12.0)
  To: org.jaggeryjs.server.feature.group [0.12.0]”



From: Udara Rathnayake [mailto:uda...@wso2.com]
Sent: Monday, November 16, 2015 3:39 PM
To: Luca Mastrangelo 
Cc: dev@wso2.org
Subject: Re: [Dev] [ES 2.0.0] Issue about creating and editing Unbounded Tables

Hi Luca,
We have already fixed this issue within Jaggery trunk[1][2] and will be 
available with the next ES release.

[1] 
https://github.com/wso2/jaggery/commit/f3a4fa2cac6a548a53292326590b548ac542cffe
[2] 
https://github.com/wso2/jaggery/commit/0b47f4f727743efd90c9cb53b0514063e5d8807d
Regards,
UdaraR

On Mon, Nov 16, 2015 at 8:59 AM, Luca Mastrangelo 
> wrote:
Dear all,

We are about to use the Enterprise Store 2.0.0 in a production environment, so 
we are performing several tests focusing in particular on its advanced features.
Unfortunately we noticed a serious issue that prevents us from effectively 
using your product. Such issue is related in particular to the creation of new 
asset instances where both unbounded tables and uploaded files (e.g., thumbnail 
or banner image) are involved.

The issue is described in detail below. Should you need more details about the 
tests we performed, please do not hesitate to contact us.
We look forward to your feedback.

Issue description:

When a user creates an asset instance with:

• more than one value in an unbounded table (e.g., “Item_1”, “Item_2” 
and “Item_3”)

• and one file (e.g., thumbnail image)
the instance created is stored with only the last item in the unbounded table 
(i.e., “Item_1” and “Item_2” are lost)

It seems that, in order to correctly store the fields of the asset instance, 
the user must add “Item_1” and “Item_2” to the unbounded table without adding 
any file.
But if the user updates the instance by updating even just one file, the fields 
in the unbounded table are lost again.

Details about some tests performed:


a)  New instance for Test Asset (you can see artifactType rxt in the 
attachments)

We created a new artifactType called “test” adding an unbounded table to the 
rxt of the standard “gadget” artifactType.

This is the result visible from the “Creating” page in the ES Publisher (the 
unbounded table is marked in red):

[cid:image001.jpg@01D122D2.CA39D7C0]


From the ES Publisher interface we created 2 instances: “Test_noFile” and 
“Test_withFile”.

As their names imply, the only difference between them is that for the 
“Test_noFile” asset we loaded no file (for thumbnail and banner fields), while 
for the “Test_withFile” asset we selected an image as thumbnail.
Both assets have the same values for all the other fields, and in particular 
the unbounded table was filled with the values “Item_1”, “Item_2” and “Item_3”.
The two assets would have to be identical, but from the Overview screen you can 
see that “Test_withFile “, the one with the custom thumbnail, has only the last 
item in the unbounded table, while the “Test_noFile” asset shows correctly the 
whole table because no file was loaded.

   Test_noFile  
  Test_withFile

[cid:image002.jpg@01D122D2.CA39D7C0][cid:image003.jpg@01D122D2.CA39D7C0]




b)  Results of two further tests performed on the previous assets:

Using the ES Publisher we edited the “Test_noFile” asset (in which the 
unbounded table worked as expected). We added a custom thumbnail without 
modifying any other field, then we saved the asset and re-loaded the detail 
view.

Result: Unbounded table does not work anymore.

[cid:image004.jpg@01D122D2.CA39D7C0]

From the ES Publisher we edited the “Test_withFile” (in which the unbounded 
table did not work). We re-inserted “Item_1”, “Item_2”, and “Item_3” in the 
unbounded table without loading any file (keeping the previous custom 
thumbnail), then we saved the asset and re-loaded the detail view.

Result: Unbounded table 

Re: [Dev] [EMM] java.lang.VerifyError after adding few features

2015-11-19 Thread Ayyoob Hamza
Hi Charitha,
We got the same issue on IoT Server and I sent a email regarding
this([DEV][DAS][ESB] Failed to initialise synapse after installing DAS
features). This issue was raised due to a bundle that has packed with the
DAS feature.

Thanks

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

On Thu, Nov 19, 2015 at 6:56 PM, Charitha Goonetilleke 
wrote:

> Hi All,
>
> I'm getting following error on MDM-2.0.0-SNAPSHOT after adding
> *org.wso2.carbon.analytics.core.server.feature* (1.0.4),
> *org.wso2.carbon.analytics.api.feature* (1.0.4) and
> *org.wso2.carbon.databridge.core.server.feature* (5.0.7-SNAPSHOT) along
> with *org.wso2.carbon.device.mgt.analytics.server.feature[1]* which we
> used in IoT-Server previously.(In IoT server we were used *carbon
> analytics* 1.0.4 and *carbon analytics common* 5.0.6 and didn't
> experienced such issue).
>
> I found quite similar issues in stackoverflow[2] and OpenJDK Jiras[3]. But
> those were not helped to fix that problem. So is there any workaround to
> overcome this issue?
>
>
> Operating System : Linux 4.2.5-201.fc22.x86_64, amd64
> Java Home: /usr/java/jdk1.7.0_79/jre
> Java Version : 1.7.0_79
> Java VM  : Java HotSpot(TM) 64-Bit Server VM 24.79-b02,Oracle
> Corporation
>
>
> --
>
> [2015-11-19 18:27:45,666]  INFO
> {org.wso2.carbon.mediation.initializer.ServiceBusInitializer} -  Starting
> ESB...
> [2015-11-19 18:27:45,693]  INFO
> {org.wso2.carbon.mediation.initializer.ServiceBusInitializer} -
>  Initializing Apache Synapse...
> [2015-11-19 18:27:45,738] FATAL
> {org.wso2.carbon.mediation.initializer.ServiceBusInitializer} -  Failed to
> initialize ESB due to a fatal error
> java.lang.VerifyError: Bad type on operand stack
> Exception Details:
>   Location:
>
> org/apache/synapse/config/SynapseConfigUtils.getURLConnection(Ljava/net/URL;)Ljava/net/URLConnection;
> @289: invokevirtual
>   Reason:
> Type 'java/lang/Object' (current frame, stack[0]) is not assignable to
> 'java/net/URLConnection'
>   Current Frame:
> bci: @289
> flags: { }
> locals: { 'java/net/URL', 'java/lang/Object', 'java/util/Properties',
> 'java/lang/String', 'java/lang/String', 'java/util/List',
> 'java/lang/String', 'java/lang/String', 'java/lang/String', '[B',
> 'java/lang/String' }
> stack: { 'java/lang/Object', 'java/lang/String', 'java/lang/String' }
>   Bytecode:
> 000: 2ac7 001a b200 01b9 0020 0100 9900 0db2
> 010: 0001 1292 b900 2602 0001 b02a b600 1d12
> 020: 52b6 0053 9a00 0f2a b600 1d12 54b6 0053
> 030: 9900 f7b8 0093 4d2c 1294 b600 954e 2c12
> 040: 96b6 0095 3a04 2cb8 0097 3a05 2dc6 0051
> 050: 1904 c600 4c19 052d b900 9802 009a 0041
> 060: bb00 9959 2d19 04b8 009a b700 9b3a 06bb
> 070: 009c 59b2 009d 1906 b700 9e3a 072a b600
> 080: 1d12 54b6 0053 9900 0e2a 2c19 07b8 009f
> 090: 4ca7 000a 2a19 07b6 007d 4ca7 001e 2ab6
> 0a0: 001d 1254 b600 5399 000d 2a2c 01b8 009f
> 0b0: 4ca7 0008 2ab6 007f 4c2c 12a0 b600 953a
> 0c0: 062c 12a1 b600 953a 0719 06c6 0059 1907
> 0d0: c600 54bb 0021 59b7 0022 1906 b600 2412
> 0e0: 30b6 0024 1907 b600 24b6 0025 3a08 bb00
> 0f0: 5959 b700 5a19 08b6 005b b600 5c3a 09bb
> 100: 0029 5919 09b7 005d 3a0a 2b12 a2bb 0021
> 110: 59b7 0022 125f b600 2419 0ab6 0024 b600
> 120: 25b6 0060 a700 082a b600 7f4c 2bb8 00a3
> 130: b600 a42b b800 a5b6 00a6 2b12 a712 a8b6
> 140: 0060 2bb0 4cbb 0021 59b7 0022 12a9 b600
> 150: 242a b600 3412 aab6 0024 b600 252b b800
> 160: 1001 b0
>   Exception Handler Table:
> bci [0, 26] => handler: 324
> bci [27, 323] => handler: 324
>   Stackmap Table:
> same_frame(@25)
> same_frame(@27)
> same_frame(@51)
>
> full_frame(@148,{Object[#47],Top,Object[#345],Object[#41],Object[#41],Object[#432],Object[#153],Object[#156]},{})
>
> full_frame(@155,{Object[#47],Object[#281],Object[#345],Object[#41],Object[#41],Object[#432],Object[#153],Object[#156]},{})
>
> full_frame(@158,{Object[#47],Top,Object[#345],Object[#41],Object[#41],Object[#432]},{})
> same_frame(@180)
>
> full_frame(@185,{Object[#47],Object[#281],Object[#345],Object[#41],Object[#41],Object[#432]},{})
> append_frame(@292,Object[#41],Object[#41])
> full_frame(@295,{Object[#47]},{})
> append_frame(@300,Object[#281])
> full_frame(@324,{Object[#47]},{Object[#21]})
>
> at
> org.apache.synapse.SynapseControllerFactory.validate(SynapseControllerFactory.java:104)
> at
> org.apache.synapse.SynapseControllerFactory.createSynapseController(SynapseControllerFactory.java:44)
> at org.apache.synapse.ServerManager.init(ServerManager.java:102)
> at
> 

[Dev] Improvements to metrics datasource configurations

2015-11-19 Thread Sinthuja Ragendran
Hi IsuruP,

There are two issues we saw in the metrics-datasource configurations for
other datasources such as MySQL, MSSQL than H2.

1) The JNDI config is mentioned as below. As there is already default
configurations provided for the database, the jndi config also needed to be
default. If we have the below element then the actual default name,  then
we are using the intended advantage of having the sample datasource
configuration already.

   
The MySQL datasource used for WSO2 Carbon
Metrics


2) defaultAutoCommit is set to false in other datasource configurations
than H2. And I don't think this is required for the metrics datasource, and
I don't see this config for H2 datasource as well. I believe we need to
remove this config from the metrics datasource config.

Thanks,
Sinthuja.
-- 
*Sinthuja Rajendran*
Associate Technical Lead
WSO2, Inc.:http://wso2.com

Blog: http://sinthu-rajan.blogspot.com/
Mobile: +94774273955
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ESB] Caching with Service Chaining Pattern

2015-11-19 Thread Ruwan Abeykoon
Hi VIraj,
Thank you for your response.
This method works, since it implement "Service Proxy" pattern.

But I want to adopt the cache in the "Service Chaining" pattern, where I
call more than one backend services in sequence, make some decisions in
between, enriching the content etc.
I want to cache only one backend service, not the full response from our
ESB sequence. So the sample provided would not work for that case.

BTW: Bhathiya offline suggested to set and reset

around the cache collector=true case.  should work. However, my API is REST
and hence the cache fails at the line 246.
AICU, while going through [1] the cache mediator is written assuming the
service having single backend service and it is a SOAP. I can not use the
inbuilt cache mediator[1] for REST IN->SOAP out-(Backend)>SOAP
out(backend)->->REST Respond sequence.

I think only option I have is to write simple class mediator to achieve the
caching, since I do not need replication. however need to behave properly
at high concurrency.

[1]
https://github.com/wso2/wso2-synapse/blob/master/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java

Cheers,
Ruwan

On Thu, Nov 19, 2015 at 3:29 AM, Viraj Senevirathne  wrote:

> Hi Ruwan,
>
> I was able to use the cache mediator for above scenario by using a
> separate sequence for state 2 of the use case.
>
> So If there is a cache hit, response will be taken from the memory and
> passed to the *reqCredit* Sequence.
>
> If there is no cache hit it will follow the same way and go it case 
> *PERSON_INFO_REQUEST
> *and response will be put in to the cache memory. After that it will call
> the same sequence *reqCredit. *
>
> So it will work as Expected.
>
> I have attached the new Proxy configuration and Sequence configuration.
>
> Thank you,
>
>
> On Wed, Nov 18, 2015 at 11:01 PM, Ruwan Abeykoon  wrote:
>
>> Hi Devs,
>> I would like to know how we can cache the Response to first service only
>> when we adopt "Service Chaining Pattern" [1]
>>
>> For example, how I can cache the response (3) only and skip (2 and 3) for
>> subsequent requests until cache timeout occurs. [2]
>>
>> As far as I can understand, Cache mediator can not be used as
>> "collector=true" can be placed only at out-sequence. We need to put the
>> response collector on "in-sequence"
>>
>> [1] https://docs.wso2.com/display/ESB481/Service+Chaining+Example
>> [2]
>> https://docs.wso2.com/download/attachments/33136352/327.png?version=1=1391008346000=v2
>>
>> --
>>
>> *Ruwan Abeykoon*
>> *Architect,*
>> *WSO2, Inc. http://wso2.com  *
>> *lean.enterprise.middleware.*
>>
>> email: ruw...@wso2.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Viraj Senevirathne
> Software Engineer; WSO2, Inc.
>
> Mobile : +94 71 958 0269
> Email : vir...@wso2.com
>



-- 

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

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


[Dev] [EMM] java.lang.VerifyError after adding few features

2015-11-19 Thread Charitha Goonetilleke
Hi All,

I'm getting following error on MDM-2.0.0-SNAPSHOT after adding
*org.wso2.carbon.analytics.core.server.feature* (1.0.4),
*org.wso2.carbon.analytics.api.feature* (1.0.4) and
*org.wso2.carbon.databridge.core.server.feature* (5.0.7-SNAPSHOT) along
with *org.wso2.carbon.device.mgt.analytics.server.feature[1]* which we used
in IoT-Server previously.(In IoT server we were used *carbon analytics* 1.0.4
and *carbon analytics common* 5.0.6 and didn't experienced such issue).

I found quite similar issues in stackoverflow[2] and OpenJDK Jiras[3]. But
those were not helped to fix that problem. So is there any workaround to
overcome this issue?


Operating System : Linux 4.2.5-201.fc22.x86_64, amd64
Java Home: /usr/java/jdk1.7.0_79/jre
Java Version : 1.7.0_79
Java VM  : Java HotSpot(TM) 64-Bit Server VM 24.79-b02,Oracle
Corporation

--

[2015-11-19 18:27:45,666]  INFO
{org.wso2.carbon.mediation.initializer.ServiceBusInitializer} -  Starting
ESB...
[2015-11-19 18:27:45,693]  INFO
{org.wso2.carbon.mediation.initializer.ServiceBusInitializer} -
 Initializing Apache Synapse...
[2015-11-19 18:27:45,738] FATAL
{org.wso2.carbon.mediation.initializer.ServiceBusInitializer} -  Failed to
initialize ESB due to a fatal error
java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:

org/apache/synapse/config/SynapseConfigUtils.getURLConnection(Ljava/net/URL;)Ljava/net/URLConnection;
@289: invokevirtual
  Reason:
Type 'java/lang/Object' (current frame, stack[0]) is not assignable to
'java/net/URLConnection'
  Current Frame:
bci: @289
flags: { }
locals: { 'java/net/URL', 'java/lang/Object', 'java/util/Properties',
'java/lang/String', 'java/lang/String', 'java/util/List',
'java/lang/String', 'java/lang/String', 'java/lang/String', '[B',
'java/lang/String' }
stack: { 'java/lang/Object', 'java/lang/String', 'java/lang/String' }
  Bytecode:
000: 2ac7 001a b200 01b9 0020 0100 9900 0db2
010: 0001 1292 b900 2602 0001 b02a b600 1d12
020: 52b6 0053 9a00 0f2a b600 1d12 54b6 0053
030: 9900 f7b8 0093 4d2c 1294 b600 954e 2c12
040: 96b6 0095 3a04 2cb8 0097 3a05 2dc6 0051
050: 1904 c600 4c19 052d b900 9802 009a 0041
060: bb00 9959 2d19 04b8 009a b700 9b3a 06bb
070: 009c 59b2 009d 1906 b700 9e3a 072a b600
080: 1d12 54b6 0053 9900 0e2a 2c19 07b8 009f
090: 4ca7 000a 2a19 07b6 007d 4ca7 001e 2ab6
0a0: 001d 1254 b600 5399 000d 2a2c 01b8 009f
0b0: 4ca7 0008 2ab6 007f 4c2c 12a0 b600 953a
0c0: 062c 12a1 b600 953a 0719 06c6 0059 1907
0d0: c600 54bb 0021 59b7 0022 1906 b600 2412
0e0: 30b6 0024 1907 b600 24b6 0025 3a08 bb00
0f0: 5959 b700 5a19 08b6 005b b600 5c3a 09bb
100: 0029 5919 09b7 005d 3a0a 2b12 a2bb 0021
110: 59b7 0022 125f b600 2419 0ab6 0024 b600
120: 25b6 0060 a700 082a b600 7f4c 2bb8 00a3
130: b600 a42b b800 a5b6 00a6 2b12 a712 a8b6
140: 0060 2bb0 4cbb 0021 59b7 0022 12a9 b600
150: 242a b600 3412 aab6 0024 b600 252b b800
160: 1001 b0
  Exception Handler Table:
bci [0, 26] => handler: 324
bci [27, 323] => handler: 324
  Stackmap Table:
same_frame(@25)
same_frame(@27)
same_frame(@51)

full_frame(@148,{Object[#47],Top,Object[#345],Object[#41],Object[#41],Object[#432],Object[#153],Object[#156]},{})

full_frame(@155,{Object[#47],Object[#281],Object[#345],Object[#41],Object[#41],Object[#432],Object[#153],Object[#156]},{})

full_frame(@158,{Object[#47],Top,Object[#345],Object[#41],Object[#41],Object[#432]},{})
same_frame(@180)

full_frame(@185,{Object[#47],Object[#281],Object[#345],Object[#41],Object[#41],Object[#432]},{})
append_frame(@292,Object[#41],Object[#41])
full_frame(@295,{Object[#47]},{})
append_frame(@300,Object[#281])
full_frame(@324,{Object[#47]},{Object[#21]})

at
org.apache.synapse.SynapseControllerFactory.validate(SynapseControllerFactory.java:104)
at
org.apache.synapse.SynapseControllerFactory.createSynapseController(SynapseControllerFactory.java:44)
at org.apache.synapse.ServerManager.init(ServerManager.java:102)
at
org.wso2.carbon.mediation.initializer.ServiceBusInitializer.initESB(ServiceBusInitializer.java:440)
at
org.wso2.carbon.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at

Re: [Dev] [EMM] java.lang.VerifyError after adding few features

2015-11-19 Thread Charitha Goonetilleke
Hi Ayyoob,

Thanks for the update

On Thu, Nov 19, 2015 at 7:13 PM, Ayyoob Hamza  wrote:

> Hi Charitha,
> We got the same issue on IoT Server and I sent a email regarding
> this([DEV][DAS][ESB] Failed to initialise synapse after installing DAS
> features). This issue was raised due to a bundle that has packed with the
> DAS feature.
>
> Thanks
>
> *Ayyoob Hamza*
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
>
> On Thu, Nov 19, 2015 at 6:56 PM, Charitha Goonetilleke  > wrote:
>
>> Hi All,
>>
>> I'm getting following error on MDM-2.0.0-SNAPSHOT after adding
>> *org.wso2.carbon.analytics.core.server.feature* (1.0.4),
>> *org.wso2.carbon.analytics.api.feature* (1.0.4) and
>> *org.wso2.carbon.databridge.core.server.feature* (5.0.7-SNAPSHOT) along
>> with *org.wso2.carbon.device.mgt.analytics.server.feature[1]* which we
>> used in IoT-Server previously.(In IoT server we were used *carbon
>> analytics* 1.0.4 and *carbon analytics common* 5.0.6 and didn't
>> experienced such issue).
>>
>> I found quite similar issues in stackoverflow[2] and OpenJDK Jiras[3].
>> But those were not helped to fix that problem. So is there any workaround
>> to overcome this issue?
>>
>>
>> Operating System : Linux 4.2.5-201.fc22.x86_64, amd64
>> Java Home: /usr/java/jdk1.7.0_79/jre
>> Java Version : 1.7.0_79
>> Java VM  : Java HotSpot(TM) 64-Bit Server VM 24.79-b02,Oracle
>> Corporation
>>
>>
>> --
>>
>> [2015-11-19 18:27:45,666]  INFO
>> {org.wso2.carbon.mediation.initializer.ServiceBusInitializer} -  Starting
>> ESB...
>> [2015-11-19 18:27:45,693]  INFO
>> {org.wso2.carbon.mediation.initializer.ServiceBusInitializer} -
>>  Initializing Apache Synapse...
>> [2015-11-19 18:27:45,738] FATAL
>> {org.wso2.carbon.mediation.initializer.ServiceBusInitializer} -  Failed to
>> initialize ESB due to a fatal error
>> java.lang.VerifyError: Bad type on operand stack
>> Exception Details:
>>   Location:
>>
>> org/apache/synapse/config/SynapseConfigUtils.getURLConnection(Ljava/net/URL;)Ljava/net/URLConnection;
>> @289: invokevirtual
>>   Reason:
>> Type 'java/lang/Object' (current frame, stack[0]) is not assignable
>> to 'java/net/URLConnection'
>>   Current Frame:
>> bci: @289
>> flags: { }
>> locals: { 'java/net/URL', 'java/lang/Object', 'java/util/Properties',
>> 'java/lang/String', 'java/lang/String', 'java/util/List',
>> 'java/lang/String', 'java/lang/String', 'java/lang/String', '[B',
>> 'java/lang/String' }
>> stack: { 'java/lang/Object', 'java/lang/String', 'java/lang/String' }
>>   Bytecode:
>> 000: 2ac7 001a b200 01b9 0020 0100 9900 0db2
>> 010: 0001 1292 b900 2602 0001 b02a b600 1d12
>> 020: 52b6 0053 9a00 0f2a b600 1d12 54b6 0053
>> 030: 9900 f7b8 0093 4d2c 1294 b600 954e 2c12
>> 040: 96b6 0095 3a04 2cb8 0097 3a05 2dc6 0051
>> 050: 1904 c600 4c19 052d b900 9802 009a 0041
>> 060: bb00 9959 2d19 04b8 009a b700 9b3a 06bb
>> 070: 009c 59b2 009d 1906 b700 9e3a 072a b600
>> 080: 1d12 54b6 0053 9900 0e2a 2c19 07b8 009f
>> 090: 4ca7 000a 2a19 07b6 007d 4ca7 001e 2ab6
>> 0a0: 001d 1254 b600 5399 000d 2a2c 01b8 009f
>> 0b0: 4ca7 0008 2ab6 007f 4c2c 12a0 b600 953a
>> 0c0: 062c 12a1 b600 953a 0719 06c6 0059 1907
>> 0d0: c600 54bb 0021 59b7 0022 1906 b600 2412
>> 0e0: 30b6 0024 1907 b600 24b6 0025 3a08 bb00
>> 0f0: 5959 b700 5a19 08b6 005b b600 5c3a 09bb
>> 100: 0029 5919 09b7 005d 3a0a 2b12 a2bb 0021
>> 110: 59b7 0022 125f b600 2419 0ab6 0024 b600
>> 120: 25b6 0060 a700 082a b600 7f4c 2bb8 00a3
>> 130: b600 a42b b800 a5b6 00a6 2b12 a712 a8b6
>> 140: 0060 2bb0 4cbb 0021 59b7 0022 12a9 b600
>> 150: 242a b600 3412 aab6 0024 b600 252b b800
>> 160: 1001 b0
>>   Exception Handler Table:
>> bci [0, 26] => handler: 324
>> bci [27, 323] => handler: 324
>>   Stackmap Table:
>> same_frame(@25)
>> same_frame(@27)
>> same_frame(@51)
>>
>> full_frame(@148,{Object[#47],Top,Object[#345],Object[#41],Object[#41],Object[#432],Object[#153],Object[#156]},{})
>>
>> full_frame(@155,{Object[#47],Object[#281],Object[#345],Object[#41],Object[#41],Object[#432],Object[#153],Object[#156]},{})
>>
>> full_frame(@158,{Object[#47],Top,Object[#345],Object[#41],Object[#41],Object[#432]},{})
>> same_frame(@180)
>>
>> full_frame(@185,{Object[#47],Object[#281],Object[#345],Object[#41],Object[#41],Object[#432]},{})
>> append_frame(@292,Object[#41],Object[#41])
>> full_frame(@295,{Object[#47]},{})
>> append_frame(@300,Object[#281])
>> full_frame(@324,{Object[#47]},{Object[#21]})
>>
>> at
>> org.apache.synapse.SynapseControllerFactory.validate(SynapseControllerFactory.java:104)
>> at
>> 

Re: [Dev] Updating data-publisher agents in carbon-multitenancy

2015-11-19 Thread Nipuni Perera
Hi all,

I have listed the osgi bundles in a APIM-1.10 pack and could observe that
(refer [1 for the result from osgi console]) it is using
org.wso2.carbon.tenant.usage.agent_4.5.0. (which is release with
carbon-multitenancy 4.5.0. I could not find a 2.1.2 jar from the osgi
bundle list).
According to the pom.xml in [2], all the pakcages in
org.wso2.carbon.usage.agent
has declared as private while only package org.wso2.carbon.usage.agent.api
has exported.

@Sanjeewa: As I have mentioned above the
org.wso2.carbon.usage.agent.util.PublisherUtils
class seems to be private and cannot use outside the bundle. If should give
a runtime error while trying to publish events using APIMgtUsageHandler.
@Amila : org.wso2.carbon.tenant.usage.agent is the artifact id and
org.wso2.carbon.usage.agent is the package name.

[1]osgi> ss | grep agent

215 ACTIVE  org.wso2.carbon.databridge.agent.thrift_4.4.8
289 ACTIVE  org.wso2.carbon.identity.sso.agent_5.0.0
446 ACTIVE  org.wso2.carbon.tenant.throttling.agent_4.5.0
447 ACTIVE  org.wso2.carbon.tenant.usage.agent_4.5.0
449 ACTIVE  org.wso2.carbon.throttling.agent.stub_4.4.7
true
osgi>
osgi>
osgi>
osgi> ss | grep usage
189 ACTIVE  org.wso2.carbon.apimgt.usage.client_4.3.1.SNAPSHOT
190 ACTIVE  org.wso2.carbon.apimgt.usage.publisher_4.3.1.SNAPSHOT
447 ACTIVE  org.wso2.carbon.tenant.usage.agent_4.5.0


[2]
https://github.com/wso2/carbon-multitenancy/blob/v4.5.0/components/tenant-mgt/org.wso2.carbon.tenant.usage.agent/pom.xml

Thanks,
Nipuni

On Thu, Nov 19, 2015 at 5:43 PM, Sanjeewa Malalgoda 
wrote:

> In our APIMgtUsageHandler we use
> publisherUtils(org.wso2.carbon.usage.agent.util.PublisherUtils) class to
> publish events.
> So we have dependency to org.wso2.carbon.usage.agent(2.1.2) jar.
> At this point our commons version is 4.4.8 for APIM 1.10 release.
>
> So do you suggest to move commons 4.5.0 and use the publisher agent
> available there?
>
> Thanks,
> sanjeewa.
>
> On Thu, Nov 19, 2015 at 5:11 PM, Amila Maha Arachchi 
> wrote:
>
>> Please check with Sanjeewa on whether APIM is using the old usage.agent
>> component or is this a new one. I was under the impression that old agent
>> is not used anywhere anymore.
>>
>> On Thu, Nov 19, 2015 at 4:58 PM, Rukshan Premathunga 
>> wrote:
>>
>>> Hi Amila,
>>>
>>> I think yes. I think both contain same package names.
>>>
>>> Thanks and Regards.
>>>
>>> On Thu, Nov 19, 2015 at 4:55 PM, Amila Maha Arachchi 
>>> wrote:
>>>
 Are org.wso2.carbon.usage.agent and org.wso2.carbon.tenant.usage.agent
 the same?

 On Thu, Nov 19, 2015 at 3:26 PM, Rukshan Premathunga 
 wrote:

> Hi Nipuni,
>
> APIM Still use the carbon-multitenancy like below.
>
> 
> org.wso2.carbon.multitenancy
> org.wso2.carbon.tenant.usage.agent
> 
>
> can you lokking to this?
>
>
> Thanks and Regards.
>
> On Thu, Nov 19, 2015 at 2:39 PM, Nipuni Perera 
> wrote:
>
>> Hi Amila,
>>
>> Thanks for the clarification. We are testing if products can use
>> carbon-commons 4.5.0, without rewriting data publishers in
>> carbon-deployment and carbon-multitenancy (as we don't have a requirement
>> atm). Hence we will not updating usage.agent bundle in 
>> carbon-multitenancy
>> as mentioned.
>> We will consider removing the usage.agent bundle in future releases
>> if it is not used anymore.
>>
>> Thanks,
>> Nipuni
>>
>> On Wed, Nov 18, 2015 at 7:25 PM, Amila Maha Arachchi > > wrote:
>>
>>> Hi Nipuni,
>>>
>>> Those methods in usage.agent are not used now (not even the
>>> usage.agent bundle). Ideally, we should get rid of the usage.agent 
>>> bundle.
>>> These were used in the days of StratosLive.
>>>
>>> Regards,
>>> Amila.
>>>
>>> On Tue, Nov 17, 2015 at 7:36 PM, Nipuni Perera 
>>> wrote:
>>>
 Hi,

 I am trying to update carbon-deployment with new data publishers
 introduced with carbon-commons 4.5.0 and carbon-analytics-common
 5.0.6. I have rewritten the data publishers in carbon-deployment and 
 need
 to test the changes with a AS pack, publishing webapp statistics.
 While building product-as I could see that
 carbon-multitenancy need to be updated with the new data publishers as
 well. I am working on updating carbon-multitenancy to use 
 carbon-commons
 4.5.0 and carbon-analytics-common 5.0.6. I am updating methods in
 : org.wso2.carbon.usage.agent.util.PublisherUtils.

 Will updating carbon-multitenancy a productive effort? Are we
 still using this utility methods to publish usage statistics?

 Thanks,
 Nipuni

 --