Re: [Dev] [DAS] Packaging artifacts as CAR file

2015-09-17 Thread Sinthuja Ragendran
adding Dunith,

I think it should be possible, and should be same as gadget. Are you
experiencing any exception when you do so?

Thanks,
Sinthuja.

On Thu, Sep 17, 2015 at 12:26 PM, Thanuja Uruththirakodeeswaran <
thanu...@wso2.com> wrote:

> Hi Devs,
>
> I refer this document [1] to create car file to deploy the artifacts in
> DAS. According to this, can't we package a widget inside the car file?
>
> [1].
> https://docs.wso2.com/display/DAS300/Packaging+Artifacts+as+a+C-App+Archive
>
> Thanks.
>
> --
> Thanuja Uruththirakodeeswaran
> Software Engineer
> WSO2 Inc.;http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 774363167
>



-- 
*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] "Method threw 'java.lang.LinkageError' exception" while calling a stub method

2015-09-17 Thread Kasun Bandara
Hi Chamila,

Can you please attach the error stack-trace you are getting ?


Thanks.

On Thu, Sep 17, 2015 at 9:43 AM, Chamila Wijayarathna 
wrote:

> Hi all,
>
> Currently I am trying to call some methods of BPS-HumanTaskClientAPIAdmin
> from an IS back end component. To do this I have added
> "HumanTaskClientAPIAdmin.wsdl", "ws-humanyask-types.xsd" and "xml.xsd"
> files to currently existing service stub at IS, which is 
> org.wso2.carbon.identity.workflow.mgt.bps.stub
> [1]. I took the HumanTaskClientAPIAdmin.wsdl from a latest BPS pack and
> other 2 files from [2].
> I newly added following task to the pom.xml of the service stub.
>
>
>
>
>
>
>
> * line="-uri src/main/resources/HumanTaskUploader.wsdl -u -uw -o 
> target/generated-code -p org.wso2.carbon.humantask.stub.upload -ns2p 
> http://services.deployer.humantask.carbon.wso2.org 
> =org.wso2.carbon.humantask.stub.upload,http://services.deployer.humantask.carbon.wso2.org/xsd=org.wso2.carbon.humantask.stub.upload.types
>  
> "/>
>  refid="maven.compile.classpath"/> refid="maven.runtime.classpath"/>*
>
> In my backend component where I need to call the methods of this stub, we
> already had a dependency to the stub.
>
>
> **
>
>
>
> *org.wso2.carbon.identity
> org.wso2.carbon.identity.workflow.mgt.bps.stub*
>
> Then I added following code to call the service through the stub.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *int tenantId = 
> CarbonContext.getThreadLocalCarbonContext().getTenantId();List 
> bpsProfiles = 
> bpsProfileDAO.listBPSProfiles(tenantId);HumanTaskClientAPIAdminStub stub = 
> null;TSimpleQueryInput input = new TSimpleQueryInput();TStatus readyState = 
> new TStatus();//TSimpleQueryCategory queryCategory = new 
> TSimpleQueryCategory("ALL_TASKS", 
> true);readyState.setTStatus("READY");input.addStatus(readyState);input.setPageSize(10);input.setPageNumber(0);input.setSimpleQueryCategory(TSimpleQueryCategory.ALL_TASKS);for
>  (int i = 0; i < bpsProfiles.size(); i++) {String host = 
> bpsProfiles.get(i).getHost();URL servicesUrl = new URL(new URL(host), 
> "services/HumanTaskClientAPIAdmin");stub = new 
> HumanTaskClientAPIAdminStub(servicesUrl.toString());ServiceClient client 
> = stub._getServiceClient();authenticate(client, 
> bpsProfiles.get(i).getUsername(), bpsProfiles.get(i).getUsername());
> TTaskSimpleQueryResultSet results = stub.simpleQuery(input);}*
>
> But when I call the stub.simpleQuery() method I am getting an error without 
> any details and when I debugged the code, I found out that it gives a *Method 
> threw 'java.lang.LinkageError' exception. Cannot evaluate 
> org.apache.axiom.soap.impl.llom.soap11.SOAP11BodyImpl.toString()*
> error at auto generated stub method while creating the SOAP envelope.
> Following is the auto generated code for above method.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *public  
> org.wso2.carbon.identity.workflow.mgt.bps.stub.types.TTaskSimpleQueryResultSet
>  simpleQuery(
> org.wso2.carbon.identity.workflow.mgt.bps.stub.types.TSimpleQueryInput 
> simpleQueryInput587)throws 
> java.rmi.RemoteException
> ,org.wso2.carbon.humantask.stub.upload.IllegalStateFault
> ,org.wso2.carbon.humantask.stub.upload.IllegalArgumentFault{  
> org.apache.axis2.context.MessageContext _messageContext = null;  try{ 
>   org.apache.axis2.client.OperationClient _operationClient = 
> _serviceClient.createClient(_operations[22].getName());  
> _operationClient.getOptions().setAction("http://docs.oasis-open.org/ns/bpel4people/ws-humantask/api/200803/simpleQuery
>  
> ");
>   _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);  
> 
> addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&");
> // create a message context  _messageContext = new 
> org.apache.axis2.context.MessageContext();// create SOAP envelope 
> with that payload  org.apache.axiom.soap.SOAPEnvelope env = null; 
>org.oasis_open.docs.ns.bpel4people.ws_humantask.api._200803.SimpleQuery 
> dummyWrappedType = null;env = 
> toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), 
>simpleQueryInput587,   
>  dummyWrappedType,
>   

Re: [Dev] "Method threw 'java.lang.LinkageError' exception" while calling a stub method

2015-09-17 Thread Chamila Wijayarathna
Hi Kasun,

I am not getting any error stack-trace.
When I am remote debugging the code, it assigns

*Method threw 'java.lang.LinkageError' exception. Cannot evaluate
org.apache.axiom.soap.impl.llom.soap11.SOAP11BodyImpl.toString()*

as the value of env.

Thanks


On Thu, Sep 17, 2015 at 12:46 PM, Kasun Bandara  wrote:

> Hi Chamila,
>
> Can you please attach the error stack-trace you are getting ?
>
>
> Thanks.
>
> On Thu, Sep 17, 2015 at 9:43 AM, Chamila Wijayarathna 
> wrote:
>
>> Hi all,
>>
>> Currently I am trying to call some methods of BPS-HumanTaskClientAPIAdmin
>> from an IS back end component. To do this I have added
>> "HumanTaskClientAPIAdmin.wsdl", "ws-humanyask-types.xsd" and "xml.xsd"
>> files to currently existing service stub at IS, which is 
>> org.wso2.carbon.identity.workflow.mgt.bps.stub
>> [1]. I took the HumanTaskClientAPIAdmin.wsdl from a latest BPS pack and
>> other 2 files from [2].
>> I newly added following task to the pom.xml of the service stub.
>>
>>
>>
>>
>>
>>
>>
>> *> line="-uri src/main/resources/HumanTaskUploader.wsdl -u -uw -o 
>> target/generated-code -p org.wso2.carbon.humantask.stub.upload -ns2p 
>> http://services.deployer.humantask.carbon.wso2.org 
>> =org.wso2.carbon.humantask.stub.upload,http://services.deployer.humantask.carbon.wso2.org/xsd=org.wso2.carbon.humantask.stub.upload.types
>>  
>> "/>
>> > refid="maven.compile.classpath"/>> refid="maven.runtime.classpath"/>*
>>
>> In my backend component where I need to call the methods of this stub, we
>> already had a dependency to the stub.
>>
>>
>> **
>>
>>
>>
>> *org.wso2.carbon.identity
>> org.wso2.carbon.identity.workflow.mgt.bps.stub*
>>
>> Then I added following code to call the service through the stub.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *int tenantId = 
>> CarbonContext.getThreadLocalCarbonContext().getTenantId();List
>>  bpsProfiles = 
>> bpsProfileDAO.listBPSProfiles(tenantId);HumanTaskClientAPIAdminStub stub = 
>> null;TSimpleQueryInput input = new TSimpleQueryInput();TStatus readyState = 
>> new TStatus();//TSimpleQueryCategory queryCategory = new 
>> TSimpleQueryCategory("ALL_TASKS", 
>> true);readyState.setTStatus("READY");input.addStatus(readyState);input.setPageSize(10);input.setPageNumber(0);input.setSimpleQueryCategory(TSimpleQueryCategory.ALL_TASKS);for
>>  (int i = 0; i < bpsProfiles.size(); i++) {String host = 
>> bpsProfiles.get(i).getHost();URL servicesUrl = new URL(new URL(host), 
>> "services/HumanTaskClientAPIAdmin");stub = new 
>> HumanTaskClientAPIAdminStub(servicesUrl.toString());ServiceClient client 
>> = stub._getServiceClient();authenticate(client, 
>> bpsProfiles.get(i).getUsername(), bpsProfiles.get(i).getUsername());
>> TTaskSimpleQueryResultSet results = stub.simpleQuery(input);}*
>>
>> But when I call the stub.simpleQuery() method I am getting an error without 
>> any details and when I debugged the code, I found out that it gives a 
>> *Method threw 'java.lang.LinkageError' exception. Cannot evaluate 
>> org.apache.axiom.soap.impl.llom.soap11.SOAP11BodyImpl.toString()*
>> error at auto generated stub method while creating the SOAP envelope.
>> Following is the auto generated code for above method.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *public  
>> org.wso2.carbon.identity.workflow.mgt.bps.stub.types.TTaskSimpleQueryResultSet
>>  simpleQuery(
>> org.wso2.carbon.identity.workflow.mgt.bps.stub.types.TSimpleQueryInput 
>> simpleQueryInput587)throws 
>> java.rmi.RemoteException
>> ,org.wso2.carbon.humantask.stub.upload.IllegalStateFault
>> ,org.wso2.carbon.humantask.stub.upload.IllegalArgumentFault{  
>> org.apache.axis2.context.MessageContext _messageContext = null;  try{
>>org.apache.axis2.client.OperationClient _operationClient = 
>> _serviceClient.createClient(_operations[22].getName());  
>> _operationClient.getOptions().setAction("http://docs.oasis-open.org/ns/bpel4people/ws-humantask/api/200803/simpleQuery
>>  
>> ");
>>   _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true); 
>>  
>> addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&");
>> // create a message context  _messageContext = new 
>> org.ap

Re: [Dev] "Method threw 'java.lang.LinkageError' exception" while calling a stub method

2015-09-17 Thread Thusitha Thilina Dayaratne
Hi Chamila,

Linkage error occur due to class loading issues. Most probably same class
might be exported by 2 bundles. Can you check on that?

Thanks
/Thusitha

On Thu, Sep 17, 2015 at 12:52 PM, Chamila Wijayarathna 
wrote:

> Hi Kasun,
>
> I am not getting any error stack-trace.
> When I am remote debugging the code, it assigns
>
> *Method threw 'java.lang.LinkageError' exception. Cannot evaluate 
> org.apache.axiom.soap.impl.llom.soap11.SOAP11BodyImpl.toString()*
>
> as the value of env.
>
> Thanks
>
>
> On Thu, Sep 17, 2015 at 12:46 PM, Kasun Bandara  wrote:
>
>> Hi Chamila,
>>
>> Can you please attach the error stack-trace you are getting ?
>>
>>
>> Thanks.
>>
>> On Thu, Sep 17, 2015 at 9:43 AM, Chamila Wijayarathna 
>> wrote:
>>
>>> Hi all,
>>>
>>> Currently I am trying to call some methods of
>>> BPS-HumanTaskClientAPIAdmin from an IS back end component. To do this I
>>> have added "HumanTaskClientAPIAdmin.wsdl", "ws-humanyask-types.xsd" and
>>> "xml.xsd" files to currently existing service stub at IS, which is 
>>> org.wso2.carbon.identity.workflow.mgt.bps.stub
>>> [1]. I took the HumanTaskClientAPIAdmin.wsdl from a latest BPS pack and
>>> other 2 files from [2].
>>> I newly added following task to the pom.xml of the service stub.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *>> line="-uri src/main/resources/HumanTaskUploader.wsdl -u -uw -o 
>>> target/generated-code -p org.wso2.carbon.humantask.stub.upload -ns2p 
>>> http://services.deployer.humantask.carbon.wso2.org 
>>> =org.wso2.carbon.humantask.stub.upload,http://services.deployer.humantask.carbon.wso2.org/xsd=org.wso2.carbon.humantask.stub.upload.types
>>>  
>>> "/>
>>> >> refid="maven.compile.classpath"/>>> refid="maven.runtime.classpath"/>*
>>>
>>> In my backend component where I need to call the methods of this stub,
>>> we already had a dependency to the stub.
>>>
>>>
>>> **
>>>
>>>
>>>
>>> *org.wso2.carbon.identity
>>> org.wso2.carbon.identity.workflow.mgt.bps.stub*
>>>
>>> Then I added following code to call the service through the stub.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *int tenantId = 
>>> CarbonContext.getThreadLocalCarbonContext().getTenantId();List
>>>  bpsProfiles = 
>>> bpsProfileDAO.listBPSProfiles(tenantId);HumanTaskClientAPIAdminStub stub = 
>>> null;TSimpleQueryInput input = new TSimpleQueryInput();TStatus readyState = 
>>> new TStatus();//TSimpleQueryCategory queryCategory = new 
>>> TSimpleQueryCategory("ALL_TASKS", 
>>> true);readyState.setTStatus("READY");input.addStatus(readyState);input.setPageSize(10);input.setPageNumber(0);input.setSimpleQueryCategory(TSimpleQueryCategory.ALL_TASKS);for
>>>  (int i = 0; i < bpsProfiles.size(); i++) {String host = 
>>> bpsProfiles.get(i).getHost();URL servicesUrl = new URL(new URL(host), 
>>> "services/HumanTaskClientAPIAdmin");stub = new 
>>> HumanTaskClientAPIAdminStub(servicesUrl.toString());ServiceClient 
>>> client = stub._getServiceClient();authenticate(client, 
>>> bpsProfiles.get(i).getUsername(), bpsProfiles.get(i).getUsername());
>>> TTaskSimpleQueryResultSet results = stub.simpleQuery(input);}*
>>>
>>> But when I call the stub.simpleQuery() method I am getting an error without 
>>> any details and when I debugged the code, I found out that it gives a 
>>> *Method threw 'java.lang.LinkageError' exception. Cannot evaluate 
>>> org.apache.axiom.soap.impl.llom.soap11.SOAP11BodyImpl.toString()*
>>> error at auto generated stub method while creating the SOAP envelope.
>>> Following is the auto generated code for above method.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *public  
>>> org.wso2.carbon.identity.workflow.mgt.bps.stub.types.TTaskSimpleQueryResultSet
>>>  simpleQuery(
>>> org.wso2.carbon.identity.workflow.mgt.bps.stub.types.TSimpleQueryInput 
>>> simpleQueryInput587)throws 
>>> java.rmi.RemoteException
>>> ,org.wso2.carbon.humantask.stub.upload.IllegalStateFault
>>> ,org.wso2.carbon.humantask.stub.upload.IllegalArgumentFault{  
>>> org.apache.axis2.context.MessageContext _messageContext = null;  try{   
>>> org.apache.axis2.client.OperationClient _operationClient = 
>>> _serviceClient.createClient(_operations[22].getName());  
>>> _operationClient.getOptions().setAction("http://docs.oasis-o

Re: [Dev] [DAS] Packaging artifacts as CAR file

2015-09-17 Thread Thanuja Uruththirakodeeswaran
Hi Sinthuja,

Yes I'm getting this error:
[2015-09-17 12:21:44,174] ERROR
{org.wso2.carbon.application.deployer.internal.ApplicationManager} -  Some
dependencies in cApp : Stratos-Metering-Service_1.0.0 were not satisfied.
Check whether all dependent artifacts are included in cApp file :
/home/thanujau/Music/wso2das-3.0.0-SNAPSHOT/repository/deployment/server/carbonapps/Stratos-Metering-Service.car

Thanks.

On Thu, Sep 17, 2015 at 12:33 PM, Sinthuja Ragendran 
wrote:

> adding Dunith,
>
> I think it should be possible, and should be same as gadget. Are you
> experiencing any exception when you do so?
>
> Thanks,
> Sinthuja.
>
> On Thu, Sep 17, 2015 at 12:26 PM, Thanuja Uruththirakodeeswaran <
> thanu...@wso2.com> wrote:
>
>> Hi Devs,
>>
>> I refer this document [1] to create car file to deploy the artifacts in
>> DAS. According to this, can't we package a widget inside the car file?
>>
>> [1].
>> https://docs.wso2.com/display/DAS300/Packaging+Artifacts+as+a+C-App+Archive
>>
>> Thanks.
>>
>> --
>> Thanuja Uruththirakodeeswaran
>> Software Engineer
>> WSO2 Inc.;http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 774363167
>>
>
>
>
> --
> *Sinthuja Rajendran*
> Associate Technical Lead
> WSO2, Inc.:http://wso2.com
>
> Blog: http://sinthu-rajan.blogspot.com/
> Mobile: +94774273955
>
>
>


-- 
Thanuja Uruththirakodeeswaran
Software Engineer
WSO2 Inc.;http://wso2.com
lean.enterprise.middleware

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


Re: [Dev] "Method threw 'java.lang.LinkageError' exception" while calling a stub method

2015-09-17 Thread Hasunie Adikari
Hi Chamila,

You likely included jars multiple times. The linkageErrors you see are from
the same name class being loaded in two different ways by two different
loaders on the same name. Make sure you don't include any extra jars.If you
can find what is the exact dependency,you can modify it with the scope
provided.so Maven doesn't try to multiple-load it.



On Thu, Sep 17, 2015 at 1:24 PM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Chamila,
>
> Linkage error occur due to class loading issues. Most probably same class
> might be exported by 2 bundles. Can you check on that?
>
> Thanks
> /Thusitha
>
> On Thu, Sep 17, 2015 at 12:52 PM, Chamila Wijayarathna 
> wrote:
>
>> Hi Kasun,
>>
>> I am not getting any error stack-trace.
>> When I am remote debugging the code, it assigns
>>
>> *Method threw 'java.lang.LinkageError' exception. Cannot evaluate 
>> org.apache.axiom.soap.impl.llom.soap11.SOAP11BodyImpl.toString()*
>>
>> as the value of env.
>>
>> Thanks
>>
>>
>> On Thu, Sep 17, 2015 at 12:46 PM, Kasun Bandara  wrote:
>>
>>> Hi Chamila,
>>>
>>> Can you please attach the error stack-trace you are getting ?
>>>
>>>
>>> Thanks.
>>>
>>> On Thu, Sep 17, 2015 at 9:43 AM, Chamila Wijayarathna 
>>> wrote:
>>>
 Hi all,

 Currently I am trying to call some methods of
 BPS-HumanTaskClientAPIAdmin from an IS back end component. To do this I
 have added "HumanTaskClientAPIAdmin.wsdl", "ws-humanyask-types.xsd" and
 "xml.xsd" files to currently existing service stub at IS, which is 
 org.wso2.carbon.identity.workflow.mgt.bps.stub
 [1]. I took the HumanTaskClientAPIAdmin.wsdl from a latest BPS pack
 and other 2 files from [2].
 I newly added following task to the pom.xml of the service stub.







 *>>> line="-uri src/main/resources/HumanTaskUploader.wsdl -u -uw -o 
 target/generated-code -p org.wso2.carbon.humantask.stub.upload -ns2p 
 http://services.deployer.humantask.carbon.wso2.org 
 =org.wso2.carbon.humantask.stub.upload,http://services.deployer.humantask.carbon.wso2.org/xsd=org.wso2.carbon.humantask.stub.upload.types
  
 "/>
 >>> refid="maven.compile.classpath"/>>>> refid="maven.runtime.classpath"/>*

 In my backend component where I need to call the methods of this stub,
 we already had a dependency to the stub.


 **



 *org.wso2.carbon.identity
 org.wso2.carbon.identity.workflow.mgt.bps.stub*

 Then I added following code to call the service through the stub.




















 *int tenantId = 
 CarbonContext.getThreadLocalCarbonContext().getTenantId();List
  bpsProfiles = 
 bpsProfileDAO.listBPSProfiles(tenantId);HumanTaskClientAPIAdminStub stub = 
 null;TSimpleQueryInput input = new TSimpleQueryInput();TStatus readyState 
 = new TStatus();//TSimpleQueryCategory queryCategory = new 
 TSimpleQueryCategory("ALL_TASKS", 
 true);readyState.setTStatus("READY");input.addStatus(readyState);input.setPageSize(10);input.setPageNumber(0);input.setSimpleQueryCategory(TSimpleQueryCategory.ALL_TASKS);for
  (int i = 0; i < bpsProfiles.size(); i++) {String host = 
 bpsProfiles.get(i).getHost();URL servicesUrl = new URL(new URL(host), 
 "services/HumanTaskClientAPIAdmin");stub = new 
 HumanTaskClientAPIAdminStub(servicesUrl.toString());ServiceClient 
 client = stub._getServiceClient();authenticate(client, 
 bpsProfiles.get(i).getUsername(), bpsProfiles.get(i).getUsername());
 TTaskSimpleQueryResultSet results = stub.simpleQuery(input);}*

 But when I call the stub.simpleQuery() method I am getting an error 
 without any details and when I debugged the code, I found out that it 
 gives a *Method threw 'java.lang.LinkageError' exception. Cannot evaluate 
 org.apache.axiom.soap.impl.llom.soap11.SOAP11BodyImpl.toString()*
 error at auto generated stub method while creating the SOAP envelope.
 Following is the auto generated code for above method.























































































































 *public  
 org.wso2.carbon.identity.workflow.mgt.bps.stub.type

Re: [Dev] [DAS] Packaging artifacts as CAR file

2015-09-17 Thread Sinthuja Ragendran
Hi Thanuja,

Check whether your artefact.xml are properly confifgured with correct type,
and you don't have any spelling mistakes in the files. I have seen similar
issues when there are issue in the car file..

Thanks,
Sinthuja.



On Thu, Sep 17, 2015 at 1:55 PM, Thanuja Uruththirakodeeswaran <
thanu...@wso2.com> wrote:

> Hi Sinthuja,
>
> Yes I'm getting this error:
> [2015-09-17 12:21:44,174] ERROR
> {org.wso2.carbon.application.deployer.internal.ApplicationManager} -  Some
> dependencies in cApp : Stratos-Metering-Service_1.0.0 were not satisfied.
> Check whether all dependent artifacts are included in cApp file :
> /home/thanujau/Music/wso2das-3.0.0-SNAPSHOT/repository/deployment/server/carbonapps/Stratos-Metering-Service.car
>
> Thanks.
>
> On Thu, Sep 17, 2015 at 12:33 PM, Sinthuja Ragendran 
> wrote:
>
>> adding Dunith,
>>
>> I think it should be possible, and should be same as gadget. Are you
>> experiencing any exception when you do so?
>>
>> Thanks,
>> Sinthuja.
>>
>> On Thu, Sep 17, 2015 at 12:26 PM, Thanuja Uruththirakodeeswaran <
>> thanu...@wso2.com> wrote:
>>
>>> Hi Devs,
>>>
>>> I refer this document [1] to create car file to deploy the artifacts in
>>> DAS. According to this, can't we package a widget inside the car file?
>>>
>>> [1].
>>> https://docs.wso2.com/display/DAS300/Packaging+Artifacts+as+a+C-App+Archive
>>>
>>> Thanks.
>>>
>>> --
>>> Thanuja Uruththirakodeeswaran
>>> Software Engineer
>>> WSO2 Inc.;http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: +94 774363167
>>>
>>
>>
>>
>> --
>> *Sinthuja Rajendran*
>> Associate Technical Lead
>> WSO2, Inc.:http://wso2.com
>>
>> Blog: http://sinthu-rajan.blogspot.com/
>> Mobile: +94774273955
>>
>>
>>
>
>
> --
> Thanuja Uruththirakodeeswaran
> Software Engineer
> WSO2 Inc.;http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 774363167
>



-- 
*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] [DAS] Packaging artifacts as CAR file

2015-09-17 Thread Dunith Dhanushka
Hi Thanuja,

Widget deployment has not been enabled yet for DAS since Widget concept was
introduced later. For the moment you have to manually copy your widgets
into /portal/store//widgets folder.

Regards,
Dunith

On Thu, Sep 17, 2015 at 2:10 PM, Sinthuja Ragendran 
wrote:

> Hi Thanuja,
>
> Check whether your artefact.xml are properly confifgured with correct
> type, and you don't have any spelling mistakes in the files. I have seen
> similar issues when there are issue in the car file..
>
> Thanks,
> Sinthuja.
>
>
>
> On Thu, Sep 17, 2015 at 1:55 PM, Thanuja Uruththirakodeeswaran <
> thanu...@wso2.com> wrote:
>
>> Hi Sinthuja,
>>
>> Yes I'm getting this error:
>> [2015-09-17 12:21:44,174] ERROR
>> {org.wso2.carbon.application.deployer.internal.ApplicationManager} -  Some
>> dependencies in cApp : Stratos-Metering-Service_1.0.0 were not satisfied.
>> Check whether all dependent artifacts are included in cApp file :
>> /home/thanujau/Music/wso2das-3.0.0-SNAPSHOT/repository/deployment/server/carbonapps/Stratos-Metering-Service.car
>>
>> Thanks.
>>
>> On Thu, Sep 17, 2015 at 12:33 PM, Sinthuja Ragendran 
>> wrote:
>>
>>> adding Dunith,
>>>
>>> I think it should be possible, and should be same as gadget. Are you
>>> experiencing any exception when you do so?
>>>
>>> Thanks,
>>> Sinthuja.
>>>
>>> On Thu, Sep 17, 2015 at 12:26 PM, Thanuja Uruththirakodeeswaran <
>>> thanu...@wso2.com> wrote:
>>>
 Hi Devs,

 I refer this document [1] to create car file to deploy the artifacts in
 DAS. According to this, can't we package a widget inside the car file?

 [1].
 https://docs.wso2.com/display/DAS300/Packaging+Artifacts+as+a+C-App+Archive

 Thanks.

 --
 Thanuja Uruththirakodeeswaran
 Software Engineer
 WSO2 Inc.;http://wso2.com
 lean.enterprise.middleware

 mobile: +94 774363167

>>>
>>>
>>>
>>> --
>>> *Sinthuja Rajendran*
>>> Associate Technical Lead
>>> WSO2, Inc.:http://wso2.com
>>>
>>> Blog: http://sinthu-rajan.blogspot.com/
>>> Mobile: +94774273955
>>>
>>>
>>>
>>
>>
>> --
>> Thanuja Uruththirakodeeswaran
>> Software Engineer
>> WSO2 Inc.;http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 774363167
>>
>
>
>
> --
> *Sinthuja Rajendran*
> Associate Technical Lead
> WSO2, Inc.:http://wso2.com
>
> Blog: http://sinthu-rajan.blogspot.com/
> Mobile: +94774273955
>
>
>


-- 
Regards,

Dunith Dhanushka,
Senior Software Engineer
WSO2 Inc,

Mobile - +94 71 8615744
Blog - dunithd.wordpress.com 
Twitter - @dunithd 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] "Method threw 'java.lang.LinkageError' exception" while calling a stub method

2015-09-17 Thread Kasun Bandara
Hi Chamila,

AFAIK, Linkage error prompts when two classloaders loading the same class
and one component in one classloader wants to talk to other component in
other classloader using this common class. To fix the issue, ensure that
the required class you are referring is loaded only by one classloader.

Thanks,
KasunB.





On Thu, Sep 17, 2015 at 12:52 PM, Chamila Wijayarathna 
wrote:

> Hi Kasun,
>
> I am not getting any error stack-trace.
> When I am remote debugging the code, it assigns
>
> *Method threw 'java.lang.LinkageError' exception. Cannot evaluate 
> org.apache.axiom.soap.impl.llom.soap11.SOAP11BodyImpl.toString()*
>
> as the value of env.
>
> Thanks
>
>
> On Thu, Sep 17, 2015 at 12:46 PM, Kasun Bandara  wrote:
>
>> Hi Chamila,
>>
>> Can you please attach the error stack-trace you are getting ?
>>
>>
>> Thanks.
>>
>> On Thu, Sep 17, 2015 at 9:43 AM, Chamila Wijayarathna 
>> wrote:
>>
>>> Hi all,
>>>
>>> Currently I am trying to call some methods of
>>> BPS-HumanTaskClientAPIAdmin from an IS back end component. To do this I
>>> have added "HumanTaskClientAPIAdmin.wsdl", "ws-humanyask-types.xsd" and
>>> "xml.xsd" files to currently existing service stub at IS, which is 
>>> org.wso2.carbon.identity.workflow.mgt.bps.stub
>>> [1]. I took the HumanTaskClientAPIAdmin.wsdl from a latest BPS pack and
>>> other 2 files from [2].
>>> I newly added following task to the pom.xml of the service stub.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *>> line="-uri src/main/resources/HumanTaskUploader.wsdl -u -uw -o 
>>> target/generated-code -p org.wso2.carbon.humantask.stub.upload -ns2p 
>>> http://services.deployer.humantask.carbon.wso2.org 
>>> =org.wso2.carbon.humantask.stub.upload,http://services.deployer.humantask.carbon.wso2.org/xsd=org.wso2.carbon.humantask.stub.upload.types
>>>  
>>> "/>
>>> >> refid="maven.compile.classpath"/>>> refid="maven.runtime.classpath"/>*
>>>
>>> In my backend component where I need to call the methods of this stub,
>>> we already had a dependency to the stub.
>>>
>>>
>>> **
>>>
>>>
>>>
>>> *org.wso2.carbon.identity
>>> org.wso2.carbon.identity.workflow.mgt.bps.stub*
>>>
>>> Then I added following code to call the service through the stub.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *int tenantId = 
>>> CarbonContext.getThreadLocalCarbonContext().getTenantId();List
>>>  bpsProfiles = 
>>> bpsProfileDAO.listBPSProfiles(tenantId);HumanTaskClientAPIAdminStub stub = 
>>> null;TSimpleQueryInput input = new TSimpleQueryInput();TStatus readyState = 
>>> new TStatus();//TSimpleQueryCategory queryCategory = new 
>>> TSimpleQueryCategory("ALL_TASKS", 
>>> true);readyState.setTStatus("READY");input.addStatus(readyState);input.setPageSize(10);input.setPageNumber(0);input.setSimpleQueryCategory(TSimpleQueryCategory.ALL_TASKS);for
>>>  (int i = 0; i < bpsProfiles.size(); i++) {String host = 
>>> bpsProfiles.get(i).getHost();URL servicesUrl = new URL(new URL(host), 
>>> "services/HumanTaskClientAPIAdmin");stub = new 
>>> HumanTaskClientAPIAdminStub(servicesUrl.toString());ServiceClient 
>>> client = stub._getServiceClient();authenticate(client, 
>>> bpsProfiles.get(i).getUsername(), bpsProfiles.get(i).getUsername());
>>> TTaskSimpleQueryResultSet results = stub.simpleQuery(input);}*
>>>
>>> But when I call the stub.simpleQuery() method I am getting an error without 
>>> any details and when I debugged the code, I found out that it gives a 
>>> *Method threw 'java.lang.LinkageError' exception. Cannot evaluate 
>>> org.apache.axiom.soap.impl.llom.soap11.SOAP11BodyImpl.toString()*
>>> error at auto generated stub method while creating the SOAP envelope.
>>> Following is the auto generated code for above method.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *public  
>>> org.wso2.carbon.identity.workflow.mgt.bps.stub.types.TTaskSimpleQueryResultSet
>>>  simpleQuery(
>>> org.wso2.carbon.identity.workflow.mgt.bps.stub.types.TSimpleQueryInput 
>>> simpleQueryInput587)throws 
>>> java.rmi.RemoteException
>>> ,org.wso2.carbon.humantask.stub.upload.IllegalStateFault
>>> ,org.wso2.carbon.humantask.stub.upload.IllegalArgumentFault{  
>>> org.apache.axis2.context.MessageContext _messageContext = null;  try{   
>>> org.apache.axis2.client.

Re: [Dev] [DAS] Packaging artifacts as CAR file

2015-09-17 Thread Thanuja Uruththirakodeeswaran
Hi Dunith,

Thanks a lot for pointing this out.

Thanks.

On Thu, Sep 17, 2015 at 2:19 PM, Dunith Dhanushka  wrote:

> Hi Thanuja,
>
> Widget deployment has not been enabled yet for DAS since Widget concept
> was introduced later. For the moment you have to manually copy your widgets
> into /portal/store//widgets folder.
>
> Regards,
> Dunith
>
> On Thu, Sep 17, 2015 at 2:10 PM, Sinthuja Ragendran 
> wrote:
>
>> Hi Thanuja,
>>
>> Check whether your artefact.xml are properly confifgured with correct
>> type, and you don't have any spelling mistakes in the files. I have seen
>> similar issues when there are issue in the car file..
>>
>> Thanks,
>> Sinthuja.
>>
>>
>>
>> On Thu, Sep 17, 2015 at 1:55 PM, Thanuja Uruththirakodeeswaran <
>> thanu...@wso2.com> wrote:
>>
>>> Hi Sinthuja,
>>>
>>> Yes I'm getting this error:
>>> [2015-09-17 12:21:44,174] ERROR
>>> {org.wso2.carbon.application.deployer.internal.ApplicationManager} -  Some
>>> dependencies in cApp : Stratos-Metering-Service_1.0.0 were not satisfied.
>>> Check whether all dependent artifacts are included in cApp file :
>>> /home/thanujau/Music/wso2das-3.0.0-SNAPSHOT/repository/deployment/server/carbonapps/Stratos-Metering-Service.car
>>>
>>> Thanks.
>>>
>>> On Thu, Sep 17, 2015 at 12:33 PM, Sinthuja Ragendran 
>>> wrote:
>>>
 adding Dunith,

 I think it should be possible, and should be same as gadget. Are you
 experiencing any exception when you do so?

 Thanks,
 Sinthuja.

 On Thu, Sep 17, 2015 at 12:26 PM, Thanuja Uruththirakodeeswaran <
 thanu...@wso2.com> wrote:

> Hi Devs,
>
> I refer this document [1] to create car file to deploy the artifacts
> in DAS. According to this, can't we package a widget inside the car file?
>
> [1].
> https://docs.wso2.com/display/DAS300/Packaging+Artifacts+as+a+C-App+Archive
>
> Thanks.
>
> --
> Thanuja Uruththirakodeeswaran
> Software Engineer
> WSO2 Inc.;http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 774363167
>



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

 Blog: http://sinthu-rajan.blogspot.com/
 Mobile: +94774273955



>>>
>>>
>>> --
>>> Thanuja Uruththirakodeeswaran
>>> Software Engineer
>>> WSO2 Inc.;http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: +94 774363167
>>>
>>
>>
>>
>> --
>> *Sinthuja Rajendran*
>> Associate Technical Lead
>> WSO2, Inc.:http://wso2.com
>>
>> Blog: http://sinthu-rajan.blogspot.com/
>> Mobile: +94774273955
>>
>>
>>
>
>
> --
> Regards,
>
> Dunith Dhanushka,
> Senior Software Engineer
> WSO2 Inc,
>
> Mobile - +94 71 8615744
> Blog - dunithd.wordpress.com 
> Twitter - @dunithd 
>



-- 
Thanuja Uruththirakodeeswaran
Software Engineer
WSO2 Inc.;http://wso2.com
lean.enterprise.middleware

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


[Dev] Only "sequence" type get processed in axis2-json message builder

2015-09-17 Thread Rajith Vitharana
Hi,

In DSS we use [1] in our service wsdl files. When we send requests as
"application/json",  it won't get processed. According to [2] and [3] if
order doesn't matter we have to use "all". Created a public jira for this
at [4]


[1] -  



[2] - http://www.w3schools.com/schema/el_all.asp
[3] - http://www.w3schools.com/schema/schema_complex_indicators.asp
[4] - https://wso2.org/jira/browse/CARBON-15433

Thanks,
-- 
Rajith Vitharana

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


[Dev] [DEV] [CEP] Issues noted in CEP RC3 pack

2015-09-17 Thread Sashika Wijesinghe
Hi CEP team,

We have setup distributed mode CEP cluster in given EC2 instances for RC3
pack. In our setup we have observed below mentioned issues and raised JIRA
tickets on those.

[1] https://wso2.org/jira/browse/CEP-1373
[2] https://wso2.org/jira/browse/CEP-1377
[2] https://wso2.org/jira/browse/CEP-1379

Regards,
-- 

*Sashika WijesingheSoftware Engineer - QA Team*
Mobile : +94 (0) 774537487
sash...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] (no subject)

2015-09-17 Thread Irham Iqbal
Hi ,

I am trying to add workflow extensions to APIM by following the
document[1]. First I am trying with the "Adding an Application Creation
Workflow" document [2].  Under "Engaging the WS Workflow Executor in the
API Manager" when I am doing the 3rd point "Creating a application in
store" I am getting a popup window with a "null" value. Also as mention in
the 5th point i tried https://localhost:9443/workflow-admin URL and got
"HTTP Status 405 - HTTP method GET is not supported by this URL". Is there
any necessary steps that I need to follow other than the document ?

[1] https://docs.wso2.com/display/AM190/Adding+Workflow+Extensions
[2]
https://docs.wso2.com/display/AM190/Adding+an+Application+Creation+Workflow

Please note I am using APIM 1.9 and BPS 3.2

Thanks,
Iqbal



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


[Dev] Problem when adding Workflow Extensions to APIM

2015-09-17 Thread Irham Iqbal
Hi ,

I am trying to add workflow extensions to APIM by following the
document[1]. First I am trying with the "Adding an Application Creation
Workflow" document [2].  Under "Engaging the WS Workflow Executor in the
API Manager" when I am doing the 3rd point "Creating a application in
store" I am getting a popup window with a "null" value. Also as mention in
the 5th point i tried https://localhost:9443/workflow-admin URL and got
"HTTP Status 405 - HTTP method GET is not supported by this URL". Is there
any necessary steps that I need to follow other than the document ?

[1] https://docs.wso2.com/display/AM190/Adding+Workflow+Extensions
[2]
https://docs.wso2.com/display/AM190/Adding+an+Application+Creation+Workflow

Please note I am using APIM 1.9.0 and BPS 3.2

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


[Dev] [IS] - Single Sign out is not working when integrated with Google OpenID - Connect Authentication

2015-09-17 Thread Nadeesha Meegoda
Hi,

Followed the blog in [1] and configured Google as OpenID Connect IDP. Login
in to travelocity.com with SAML was successful with google authentication.
Also when the logout was clicked it directed to
http://localhost:8080/travelocity.com/index.jsp from the home.jsp so I
thought the logout was successful. But when I tried to sign in with SAML
again I got logged in automatically without asking for the Google
authentication credentials. Have I missed some configurations?

Note : I have enabled single logout in the SP I created and double checked
the travelocity.properties file and there also it is marked as true.
(SAML.EnableSLO=true). With the SAML tracer I monitored the logout but I
couldn't see any request sent to google where I think is the issue.

[1] - http://xacmlinfo.org/2014/12/02/621/

Any help on above is highly appreciated.


Thank you
-- 
*Nadeesha Meegoda*
Software Engineer - QA
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
email : nadees...@wso2.com
mobile: +94783639540
<%2B94%2077%202273555>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Problem when adding Workflow Extensions to APIM

2015-09-17 Thread Nuwan Dias
The correct url to try is /admin-dashboard. Not /workflow-admin.

On Thu, Sep 17, 2015 at 2:44 PM, Irham Iqbal  wrote:

>
> Hi ,
>
> I am trying to add workflow extensions to APIM by following the
> document[1]. First I am trying with the "Adding an Application Creation
> Workflow" document [2].  Under "Engaging the WS Workflow Executor in the
> API Manager" when I am doing the 3rd point "Creating a application in
> store" I am getting a popup window with a "null" value. Also as mention in
> the 5th point i tried https://localhost:9443/workflow-admin URL and got
> "HTTP Status 405 - HTTP method GET is not supported by this URL". Is there
> any necessary steps that I need to follow other than the document ?
>
> [1] https://docs.wso2.com/display/AM190/Adding+Workflow+Extensions
> [2]
> https://docs.wso2.com/display/AM190/Adding+an+Application+Creation+Workflow
>
> Please note I am using APIM 1.9.0 and BPS 3.2
>
> Thanks,
> Iqbal
> --
> Irham Iqbal
> Software Engineer - Test Automation
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
> phone: +94 777888452
>



-- 
Nuwan Dias

Technical Lead - WSO2, Inc. http://wso2.com
email : nuw...@wso2.com
Phone : +94 777 775 729
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Problem when adding Workflow Extensions to APIM

2015-09-17 Thread Irham Iqbal
Hi,

Fixed the problem by commenting only the
ApplicationCreationSimpleWorkflowExecutor and
uncommenting ApplicationCreationWSWorkflowExecutor in
workflow-extensions.xml.
Earlier i was replacing all the configurations in workflow-extensions.xml with
the bellowing.



 
http://localhost:9765/services/ApplicationApprovalWorkFlowProcess/
 admin
 admin
 
https://localhost:8243/services/WorkflowCallbackService



I believe it's better to change the 2nd point under "Engaging the WS
Workflow Executor in the API Manager" in a way that we only have to comment
the ApplicationCreationSimpleWorkflowExecutor and uncomment the
ApplicationCreationWSWorkflowExecutor in workflow-extensions.xml.
Thanks,
Iqbal

On Thu, Sep 17, 2015 at 2:44 PM, Irham Iqbal  wrote:

>
> Hi ,
>
> I am trying to add workflow extensions to APIM by following the
> document[1]. First I am trying with the "Adding an Application Creation
> Workflow" document [2].  Under "Engaging the WS Workflow Executor in the
> API Manager" when I am doing the 3rd point "Creating a application in
> store" I am getting a popup window with a "null" value. Also as mention in
> the 5th point i tried https://localhost:9443/workflow-admin URL and got
> "HTTP Status 405 - HTTP method GET is not supported by this URL". Is there
> any necessary steps that I need to follow other than the document ?
>
> [1] https://docs.wso2.com/display/AM190/Adding+Workflow+Extensions
> [2]
> https://docs.wso2.com/display/AM190/Adding+an+Application+Creation+Workflow
>
> Please note I am using APIM 1.9.0 and BPS 3.2
>
> Thanks,
> Iqbal
> --
> Irham Iqbal
> Software Engineer - Test Automation
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
> phone: +94 777888452
>



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


[Dev] [PPAAS] Error when deploying the available samples

2015-09-17 Thread Gayan Gunarathne
Getting the following exception when deploying the ESB 4.8.1 on Kubernetes
cluster with Stratos 4.1.x branch. Seems this is due to the length of the
application name that we are using with the samples. We may need to
validate the application name and update the samples appropriately.

javax.ws.rs.WebApplicationException: HTTP 422 Service
"wso2esb-481-application-service-1" is invalid: metadata.name: invalid
value 'wso2esb-481-application-service-1': must be a DNS 952 label (at most
24 characters, matching regex [a-z]([-a-z0-9]*[a-z0-9])?): e.g. "my-name"
at
io.fabric8.kubernetes.api.ExceptionResponseMapper.fromResponse(ExceptionResponseMapper.java:40)
at
io.fabric8.kubernetes.api.ExceptionResponseMapper.fromResponse(ExceptionResponseMapper.java:31)
at
org.apache.cxf.jaxrs.client.ClientProxyImpl.checkResponse(ClientProxyImpl.java:302)
at
org.apache.cxf.jaxrs.client.ClientProxyImpl.handleResponse(ClientProxyImpl.java:725)
at
org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:683)
at
org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:224)
at com.sun.proxy.$Proxy84.createService(Unknown Source)
at
io.fabric8.kubernetes.api.KubernetesClient.createService(KubernetesClient.java:440)
at
io.fabric8.kubernetes.api.KubernetesClient.createService(KubernetesClient.java:430)
at
org.apache.stratos.kubernetes.client.KubernetesApiClient.createService(KubernetesApiClient.java:217)
at
org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.createKubernetesServices(KubernetesIaas.java:533)
at
org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.startContainer(KubernetesIaas.java:221)
at
org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.startInstance(KubernetesIaas.java:125)
at
org.apache.stratos.cloud.controller.services.impl.InstanceCreator.startInstance(InstanceCreator.java:109)
at
org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:68)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Thanks,
Gayan
-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS] - Single Sign out is not working when integrated with Google OpenID - Connect Authentication

2015-09-17 Thread Hasanthi Purnima Dissanayake
Hi Nadeesha,

Once you logout from the travelocity app, please make sure to logout from
the google account too. Otherwise if there is a session of the google
account it will automatically redirect to travelocity app in the second
attempt without asking the permission. Please let us know if you face the
same issue even after logging out from the google account too.

Thanks.

Hasanthi Dissanayake

Software Engineer | WSO2

E: hasan...@wso2.com 
M :0718407133| http://wso2.com 

On Thu, Sep 17, 2015 at 2:57 PM, Nadeesha Meegoda 
wrote:

> Hi,
>
> Followed the blog in [1] and configured Google as OpenID Connect IDP.
> Login in to travelocity.com with SAML was successful with google
> authentication. Also when the logout was clicked it directed to
> http://localhost:8080/travelocity.com/index.jsp from the home.jsp so I
> thought the logout was successful. But when I tried to sign in with SAML
> again I got logged in automatically without asking for the Google
> authentication credentials. Have I missed some configurations?
>
> Note : I have enabled single logout in the SP I created and double checked
> the travelocity.properties file and there also it is marked as true.
> (SAML.EnableSLO=true). With the SAML tracer I monitored the logout but I
> couldn't see any request sent to google where I think is the issue.
>
> [1] - http://xacmlinfo.org/2014/12/02/621/
>
> Any help on above is highly appreciated.
>
>
> Thank you
> --
> *Nadeesha Meegoda*
> Software Engineer - QA
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
> email : nadees...@wso2.com
> mobile: +94783639540
> <%2B94%2077%202273555>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CEP over Out-of-Order Data Streams

2015-09-17 Thread Miyuru Dayarathna
Hi Suho,

Today's afternoon I merged the out-of-order handler (OOH) code to Siddhi
and created a pull request. It comprises of a simple test case [2
]
which is described in [3
].
I tested the code with DEBS 2015 Grand Challenge's taxi trips data set [1
] as well. I used the
small 2 million events data set in the tests. Since the events in the
original data set were in sorted order, I introduced a delay to certain
events in the event stream before sending them to the OOH (Shown in green
color highlighting in [4
]).
The results are listed in [4
].
The OOH reorders event streams in both example scenarios except for few
glitches. For 100 events case there was one unordered event output by OOH
(Highlighted in yellow color in [4
]).
I am investigating solutions for such unordered events output by OOH.
However, a similar situation has been described in Figure 2 of [3
]
as well. Another notable observation is that considerable amount of events
were buffered in the OOH while the extension was running. In certain cases
(as shown in [4
])
there were about 41 events buffered in OOH. Hence, both the test cases
ended up outputting lesser number of events than what is input to OOH
because the remaining set of events were buffered inside the OOH when the
test case terminated. This is expected behavior of a buffer based
out-of-order handler. Next, I will continue experiments with full data sets
of DEBS 2013 and 2015 data sets and observe the characteristics of OOH
buffer for different out-of-order scenarios.

[1] http://www.debs2015.org/call-grand-challenge.html

[2]
https://github.com/miyurud/siddhi/blob/master/modules/siddhi-extensions/ooh/src/test/java/org/wso2/siddhi/extension/ooh/KSlackExtensionTestCase.java

[3]
https://drive.google.com/a/wso2.com/file/d/0B8UIlB9H3rv_THpoRi0xTFFERVE/view?usp=sharing

[4]
https://docs.google.com/a/wso2.com/spreadsheets/d/1xYGJoNfCSQTv1KsAuPNYsSSFqOEpn8gqCZy35L8GDmo/edit?usp=sharing

-- 
Thanks,
Miyuru Dayarathna
Senior Technical Lead
Mobile: +94713527783
Blog: http://miyurublog.blogspot.com

On Wed, Sep 16, 2015 at 11:10 PM, Sriskandarajah Suhothayan 
wrote:

> Hi Miyuru
>
> Any update on this ?
>
> Suho
>
> On Tue, Sep 8, 2015 at 7:58 PM, Miyuru Dayarathna 
> wrote:
>
>> Hi Suho,
>>
>> Ok, I will work on that.
>>
>> --
>> Thanks,
>> Miyuru Dayarathna
>> Senior Technical Lead
>> Mobile: +94713527783
>> Blog: http://miyurublog.blogspot.com
>>
>> On Tue, Sep 8, 2015 at 5:38 PM, Sriskandarajah Suhothayan 
>> wrote:
>>
>>> Can you merge this code to siddhi and send a pull we will be able to add
>>> this to the release
>>>
>>> Suho
>>>
>>> On Tue, Sep 8, 2015 at 5:17 PM, Miyuru Dayarathna 
>>> wrote:
>>>
 Hi Suho,

 I have completed developing the K-Slack extension for Siddhi and I have
 hosted the code in [1 ]. I have
 tested the KSlackExtension class [2
 ]
 using a test scenario described in [3
 ]
 and I have verified the correctness of the implementation. The test case is
 accessible from [4
 ].
 We need to discuss whether we should keep the following Siddhi syntax or
 change it to some different version by removing the use of "window."
 construct. This code assumes that the very first field present in the input
 event as the timestamp used for reordering the events.

 @info(name = 'query1') from inputStream#window.ooh:kslack() select
 eventtt , price, volume insert into outputStream;

 I have assigned myself the Redmine issue [5
 ]. Next, I will move onto
 testing the performance of K-slack approach using the DEBS 2013 Grand
 Challenge data set. Also I will try out other approaches for Out-of-Order
 event processing 

[Dev] UpdateScopes method deletes all Scopes of an API when API is updated

2015-09-17 Thread Harshan Liyanage
Hi,

We have a requirement to automatically publish APIs when the EMM server
starts-up. We need to also add the scopes to APIs when its get published.
For that we are calling addAPI method if its a new API or updateAPI method
if that API already exists (in APIProvider implementation).

This is working fine in the first server start-up. But when I restart the
EMM server all the added scopes to an API is lost from related database
tables. After analyzing the issue I've found out that the updateScopes
method in [1] deletes all existing scopes of an API and then adding the
updated scopes to the API using URI templates (api.getUriTemplates()). But
in addAPI method, it uses api.getScopes() to add the scope data to the
database. If I change the line
"addScopes(api.getUriTemplates(),apiId,tenantId);" to
"addScopes(api.getScopes(),apiId,tenantId);" this functionality works fine.
So is there a specific reason to populate scopes of a updated API using
api.getUriTemplates()?

public void updateScopes(API api, int tenantId) throws
APIManagementException {

Connection connection = null;
PreparedStatement prepStmt = null;
int apiId = -1;
String deleteScopes = "DELETE FROM IDN_OAUTH2_SCOPE WHERE SCOPE_ID IN (
SELECT SCOPE_ID FROM AM_API_SCOPES WHERE API_ID = ? )";
try {

connection = APIMgtDBUtil.getConnection();

connection.setAutoCommit(false);

apiId = getAPIID(api.getId(),connection);

if (apiId == -1) {

//application addition has failed

return;

}

prepStmt = connection.prepareStatement(deleteScopes);

prepStmt.setInt(1,apiId);

prepStmt.execute();

prepStmt.close();

connection.commit();

} catch (SQLException e) {

handleException("Error while deleting Scopes for API : " +
api.getId().toString(), e);

} finally {

APIMgtDBUtil.closeAllConnections(prepStmt, connection, null);

}
//addScopes(api.getScopes(),apiId,tenantId);
addScopes(api.getUriTemplates(),apiId,tenantId);

}

[1].
https://github.com/wso2/carbon-apimgt/blob/435163dd0f60058d8cfecbb0c4230984f0882fb6/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java

Thanks,

Harshan Liyanage
Software Engineer
Mobile: *+94724423048*
Email: hars...@wso2.com
Blog : http://harshanliyanage.blogspot.com/
*WSO2, Inc. :** wso2.com *
lean.enterprise.middleware.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Release] carbon-analytics 1.0.3 released

2015-09-17 Thread Gokul Balakrishnan
Hi Repo owners,

Please note $subject, and please update your repos if using
carbon-analytics components as dependencies.

Thanks,

-- 
Gokul Balakrishnan
Senior Software Engineer,
WSO2, Inc. http://wso2.com
Mob: +94 77 593 5789 | +1 650 272 9927
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 Application Server 5.3.0 released!

2015-09-17 Thread Kalpa Welivitigoda
WSO2 Application Server (WSO2 AS) 5.3.0 Released September 2015

The WSO2 Application Server is an enterprise-ready cloud-enabled
application server, powered by Apache Tomcat, and Apache TomEE, it
integrates Apache CXF framework. It provides first class support for
standard Web applications, JAX-WS/JAX-RS applications and Jaggery scripting
applications. Coupled with features of WSO2 Carbon
, users can now manage their applications
including JAX-WS and JAX-RS to web applications in a unified manner within
the management console itself.

WSO2 Application Server also provides a comprehensive Web services server
platform using CXF as its Web services runtime, and provides many value
additions on top of this runtime. It can expose services using both SOAP
and REST models and supports a comprehensive set of WS-* specifications
such as WS-Security, WS-Trust, WS-SecureConversation, WS-Addressing,
WS-SecurityPolicy, etc. WSO2 Application Server also has inbuilt support
for Jaggery. WSO2 Application Server can be installed on on-premise or any
public/private cloud infrastructure and provide unified management console
and lifecycle management features which are independent from underlying
deployment option.

An open source product, WSO2 Application Server is available under the Apache
Software License (v2.0)  .
This includes all of the extra integration and management functionality as
well.

For more information on WSO2 Application Server and to download the product
please visit http://wso2.com/products/application-server.
New Features

   - JavaEE 6 Web Profile support via TomEE 1.7.2 integration
   - WebSocket 1.1 API Support as defined by the JSR-356 specification
   - Tomcat Virtual Hosts support
   - SAML2 Single-Sign-On support for web applications
   - WS-Discovery support for CXF JAX-WS and JAX-RS services
   - OSGi ServiceLoader Mediator specification support via SPI-Fly

Key Features

   - Support for Servlet 3, JSP 2.2, EL 2.2, JSTL 1.2 specifications.
   - Full JAX-WS 2.2 and JAX-RS 2.0 Specification support
   - Integration of Jaggery - server side scripting framework
   - Unified Application listing and management UI for WebApps, JAX-WS/RS,
   Jaggery
   - Multi Tenant support for standalone deployment
   - 100% Apache Tomcat compliance runtime
   - Lazy loading for web applications and services
   - AppServer tooling - AppServer related artifacts can be easily
   generated using WSO2 Developer Studio
   - Clustering support for High Availability and High Scalability
   - Full support for WS-Security, WS-Trust, WS-Policy and
   WS-SecureConversation
   - JMX and Web interface based monitoring and management
   - WS-* and REST support
   - GUI, command line, and IDE based tools for Web service development
   - Equinox P2 based provisioning support
   - WSDL2Java/Java2WSDL/WSDL 1.1 and try it (invoke any remote Web service)

XML & WS-* Standards Support

   - SOAP 1.1/1.2
   - WSDL 1.1
   - WSDL 2.0
   - MTOM, XOP & SOAP with Attachments
   - WS-Addressing
   - WS-Security 1.0/1.1
   - WS-Trust
   - WS-SecureConversation
   - WS-SecurityPolicy
   - WS-Policy
   - WS-PolicyAttachment
   - WS-MetadataExchange

JavaEE Web application Standards Support

   - Java API for RESTful Web Services (JAX-RS) 1.1
   - Java API for XML-Based Web Services (JAX-WS) 2.2
   - Java Servlet 3.0
   - JavaServer Pages (JSP) 2.2
   - Expression Language (EL) 2.2
   - Standard Tag Library for JavaServer Pages (JSTL) 1.2
   - Java Server Faces (JSF) 2.0
   - Java Persistence API (JPA) 2.0
   - Java Transaction API (JTA) 1.1
   - Contexts and Dependency Injection for Java (CDI) 1.0
   - Enterprise JavaBeans (EJB) Lite 3.1
   - Bean Validation 1.0
   - Java Architecture for XML Binding (JAXB) 2.2
   - Common Annotations for the Java Platform (JSR-250) 1.1

Open Source components included in WSO2 Application Server

   - Embedded Apache Tomcat
   - Apache TomEE
   - Apache CXF: Supporting JAX-WS and JAX-RS
   - Apache Axis2 (SOAP)
   - Hazelcast
   - Apache Axiom (High performance XML Object Model)
   - Apache Rampart/Apache WSS4J (WS-Security)
   - Apache Rahas (WS-SecureConversation)
   - WS-Addressing implementation in Axis2
   - Apache Neethi (WS-Policy)
   - WS-SecurityPolicy implementation in Axis2
   - Apache XML Schema
   - Apache Tribes (Group Communications Framework)


NOTE: Data services hosting support has been removed from WSO2 Application
Server 5.3.0. Users can use the WSO2 Data Services Server product to deploy
data services.


Issues Fixed for this release

   - https://wso2.org/jira/issues/?filter=12251

Known Issues

   - https://wso2.org/jira/issues/?filter=12250

Reporting Problems

Issues can be reported using the public JIRA available at
https://wso2.org/jira/browse/WSAS.
Contact us WSO2 Application Server developers can be contacted via the
mailing list:
Carbon developer mailing list 
Alternatively, questions can also be raise

Re: [Dev] [IS] - Single Sign out is not working when integrated with Google OpenID - Connect Authentication

2015-09-17 Thread Nadeesha Meegoda
Hi Hasinthi,

It works fine when I logout from Google account. But my concern is, Is that
the expected behavior of  Single Logout? If so, when trying to sign in from
travelocity app if we are sending request for Google for authentication why
does the logout acts differently? Why can't it send a request for Google
for single logout? Clicking logout in my point of view is to logout from
the application/session, and when trying to login again Google credentials
should be provided. Otherwise what is the point of the logout if the
session stays persistent? Please clarify!

On Thu, Sep 17, 2015 at 4:02 PM, Hasanthi Purnima Dissanayake <
hasan...@wso2.com> wrote:

> Hi Nadeesha,
>
> Once you logout from the travelocity app, please make sure to logout from
> the google account too. Otherwise if there is a session of the google
> account it will automatically redirect to travelocity app in the second
> attempt without asking the permission. Please let us know if you face the
> same issue even after logging out from the google account too.
>
> Thanks.
>
> Hasanthi Dissanayake
>
> Software Engineer | WSO2
>
> E: hasan...@wso2.com 
> M :0718407133| http://wso2.com 
>
> On Thu, Sep 17, 2015 at 2:57 PM, Nadeesha Meegoda 
> wrote:
>
>> Hi,
>>
>> Followed the blog in [1] and configured Google as OpenID Connect IDP.
>> Login in to travelocity.com with SAML was successful with google
>> authentication. Also when the logout was clicked it directed to
>> http://localhost:8080/travelocity.com/index.jsp from the home.jsp so I
>> thought the logout was successful. But when I tried to sign in with SAML
>> again I got logged in automatically without asking for the Google
>> authentication credentials. Have I missed some configurations?
>>
>> Note : I have enabled single logout in the SP I created and double
>> checked the travelocity.properties file and there also it is marked as
>> true. (SAML.EnableSLO=true). With the SAML tracer I monitored the logout
>> but I couldn't see any request sent to google where I think is the issue.
>>
>> [1] - http://xacmlinfo.org/2014/12/02/621/
>>
>> Any help on above is highly appreciated.
>>
>>
>> Thank you
>> --
>> *Nadeesha Meegoda*
>> Software Engineer - QA
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>> email : nadees...@wso2.com
>> mobile: +94783639540
>> <%2B94%2077%202273555>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>


-- 
*Nadeesha Meegoda*
Software Engineer - QA
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
email : nadees...@wso2.com
mobile: +94783639540
<%2B94%2077%202273555>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Vote] Release WSO2 Carbon Kernel 4.4.2 RC1

2015-09-17 Thread Manuri Amaya Perera
Hi Devs,

WSO2 Carbon Kernel 4.4.2 RC1 Release Vote.

This release fixes the following issues:
https://wso2.org/jira/issues/?filter=12396

Please download and test your products with kernel 4.4.2 RC1 and vote. Vote
will be open for 72 hours or as longer as needed.

*​Source and binary distribution files:*
http://svn.wso2.org/repos/wso2/people/sameera/work/carbon-4.4.2

*Maven staging repository:*
http://maven.wso2.org/nexus/content/repositories/orgwso2carbon-109/


*The tag to be voted upon:*
https://github.com/wso2/carbon4-kernel/tree/v4.4.2-rc1


[ ] Broken - do not release (explain why)
[ ] Stable - go ahead and release


Thank you
Carbon Team

​

-- 

*Manuri Amaya Perera*

*Software Engineer*

*WSO2 Inc.*

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


[Dev] [DEV] [CEP] Integrating ML extension in CEP distributed mode setup

2015-09-17 Thread Sashika Wijesinghe
Hi All,

I want to test how ML extension can be integrated with CEP storm
distributed cluster. So for that I have set up CEP with a manager node and
a worker node. And installed ML features using p2-repository in manager
node. Then deployed an event flow in CEP manager node and send events to
the receiver in worker node. Then I observed " No extension exist for
StreamFunctionExtension{namespace='ml'}  in execution plan
"ExecutionPlanML" in worker node.

To overcome this issue, I have started worker node without
"-DworkerNode=true" argument and installed ML features in worker node as
well. Then restart the entire cluster (worker started with
-DworkerNode=true) and send events to the worker node. But events are not
logged in worker node (logger publisher is used).

Further I have tested the same flow in standalone CEP pack according to the
instructions given in [1]

, and it works as expected.
[1]
https://docs.wso2.com/display/CEP400/Predictive+Analytics+with+WSO2+Machine+Learner


Please help me to clarify below issues

1) When we setup a storm distributed cluster and installed a feature in
manager node, isn't there any way of synchronizing that feature details
with worker node rather than installing the same features in worker node?

2) Even after I installed the feature in worker node I didn't get any
events. What can be the possible reasons for that?

Since there are no documentation on how to set up the ML extension in CEP
storm distribute cluster , it would be better to update the documents with
relevant details.


Appreciate your help on this matter.

Thanks

-- 

*Sashika WijesingheSoftware Engineer - QA Team*
Mobile : +94 (0) 774537487
sash...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CEP over Out-of-Order Data Streams

2015-09-17 Thread Sriskandarajah Suhothayan
Thanks for the pull request there are some comments on the code please fix
them

Thanks
Suho

On Thu, Sep 17, 2015 at 4:56 PM, Miyuru Dayarathna  wrote:

> Hi Suho,
>
> Today's afternoon I merged the out-of-order handler (OOH) code to Siddhi
> and created a pull request. It comprises of a simple test case [2
> ]
> which is described in [3
> ].
> I tested the code with DEBS 2015 Grand Challenge's taxi trips data set [1
> ] as well. I used the
> small 2 million events data set in the tests. Since the events in the
> original data set were in sorted order, I introduced a delay to certain
> events in the event stream before sending them to the OOH (Shown in green
> color highlighting in [4
> ]).
> The results are listed in [4
> ].
> The OOH reorders event streams in both example scenarios except for few
> glitches. For 100 events case there was one unordered event output by OOH
> (Highlighted in yellow color in [4
> ]).
> I am investigating solutions for such unordered events output by OOH.
> However, a similar situation has been described in Figure 2 of [3
> ]
> as well. Another notable observation is that considerable amount of events
> were buffered in the OOH while the extension was running. In certain cases
> (as shown in [4
> ])
> there were about 41 events buffered in OOH. Hence, both the test cases
> ended up outputting lesser number of events than what is input to OOH
> because the remaining set of events were buffered inside the OOH when the
> test case terminated. This is expected behavior of a buffer based
> out-of-order handler. Next, I will continue experiments with full data sets
> of DEBS 2013 and 2015 data sets and observe the characteristics of OOH
> buffer for different out-of-order scenarios.
>
> [1] http://www.debs2015.org/call-grand-challenge.html
>
> [2]
> https://github.com/miyurud/siddhi/blob/master/modules/siddhi-extensions/ooh/src/test/java/org/wso2/siddhi/extension/ooh/KSlackExtensionTestCase.java
>
> [3]
> https://drive.google.com/a/wso2.com/file/d/0B8UIlB9H3rv_THpoRi0xTFFERVE/view?usp=sharing
>
> [4]
> https://docs.google.com/a/wso2.com/spreadsheets/d/1xYGJoNfCSQTv1KsAuPNYsSSFqOEpn8gqCZy35L8GDmo/edit?usp=sharing
>
> --
> Thanks,
> Miyuru Dayarathna
> Senior Technical Lead
> Mobile: +94713527783
> Blog: http://miyurublog.blogspot.com
>
> On Wed, Sep 16, 2015 at 11:10 PM, Sriskandarajah Suhothayan  > wrote:
>
>> Hi Miyuru
>>
>> Any update on this ?
>>
>> Suho
>>
>> On Tue, Sep 8, 2015 at 7:58 PM, Miyuru Dayarathna 
>> wrote:
>>
>>> Hi Suho,
>>>
>>> Ok, I will work on that.
>>>
>>> --
>>> Thanks,
>>> Miyuru Dayarathna
>>> Senior Technical Lead
>>> Mobile: +94713527783
>>> Blog: http://miyurublog.blogspot.com
>>>
>>> On Tue, Sep 8, 2015 at 5:38 PM, Sriskandarajah Suhothayan >> > wrote:
>>>
 Can you merge this code to siddhi and send a pull we will be able to
 add this to the release

 Suho

 On Tue, Sep 8, 2015 at 5:17 PM, Miyuru Dayarathna 
 wrote:

> Hi Suho,
>
> I have completed developing the K-Slack extension for Siddhi and I
> have hosted the code in [1 ].
> I have tested the KSlackExtension class [2
> ]
> using a test scenario described in [3
> ]
> and I have verified the correctness of the implementation. The test case 
> is
> accessible from [4
> ].
> We need to discuss whether we should keep the following Siddhi syntax or
> change it to some different version by removing the use of "window."
> construct. This code assumes that the very first field present in the 
> input
> event as the timestamp used for reordering the events.
>
> @info(name = 'query1') from inputStream#window.ooh:kslack() select
> eventtt , price, volume inser

Re: [Dev] [DEV] [CEP] Integrating ML extension in CEP distributed mode setup

2015-09-17 Thread Sriskandarajah Suhothayan
On Thu, Sep 17, 2015 at 8:55 PM, Sashika Wijesinghe 
wrote:

> Hi All,
>
> I want to test how ML extension can be integrated with CEP storm
> distributed cluster. So for that I have set up CEP with a manager node and
> a worker node. And installed ML features using p2-repository in manager
> node. Then deployed an event flow in CEP manager node and send events to
> the receiver in worker node. Then I observed " No extension exist for
> StreamFunctionExtension{namespace='ml'}  in execution plan
> "ExecutionPlanML" in worker node.
>

> To overcome this issue, I have started worker node without
> "-DworkerNode=true" argument and installed ML features in worker node as
> well. Then restart the entire cluster (worker started with
> -DworkerNode=true) and send events to the worker node. But events are not
> logged in worker node (logger publisher is used).
>
> Further I have tested the same flow in standalone CEP pack according to
> the instructions given in [1]
> 
> , and it works as expected.
> [1]
> https://docs.wso2.com/display/CEP400/Predictive+Analytics+with+WSO2+Machine+Learner
>
>
> Please help me to clarify below issues
>
> 1) When we setup a storm distributed cluster and installed a feature in
> manager node, isn't there any way of synchronizing that feature details
> with worker node rather than installing the same features in worker node?
>
> No this is not supported in WSO2 Servers, need to install in all nodes.


> 2) Even after I installed the feature in worker node I didn't get any
> events. What can be the possible reasons for that?
>
> Since there are no documentation on how to set up the ML extension in CEP
> storm distribute cluster , it would be better to update the documents with
> relevant details.
>
> We have to also update the storm dependency jar, @ML forks can you update
the docs with the storm story too?

Regards
Suho


> Appreciate your help on this matter.
>
> Thanks
>
> --
>
> *Sashika WijesingheSoftware Engineer - QA Team*
> Mobile : +94 (0) 774537487
> sash...@wso2.com
>



-- 

*S. Suhothayan*
Technical Lead & Team Lead of WSO2 Complex Event Processor
*WSO2 Inc. *http://wso2.com
* *
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
twitter: http://twitter.com/suhothayan
 | linked-in:
http://lk.linkedin.com/in/suhothayan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [CEP 3.1.0] Syncing failed when becoming a Passive Node for tenant

2015-09-17 Thread Imesh Gunaratne
On Thu, Sep 17, 2015 at 9:44 AM, Sriskandarajah Suhothayan 
 wrote:

> have you properly migrated SecondDerivativeFinderWindowProcessor to new
> siddhi version. the bug is there.
>
> I also doubt this, it looks like this error has been raised by the
following method in SecondDerivativeFinderWindowProcessor:

@Override
protected void restoreState(Object[] data) {
window.restoreState(data);
window.restoreState((Object[]) data[0]);
oldEventList = ((ArrayList) data[1]);
newEventList = ((ArrayList) data[2]);
window.reSchedule();
}

@Anuruddha: Will us be able to debug this method in the second CEP node and
see the type of the data object being passed? It would be better if we can
also get siddhi source code attached.

Other question is do we need to migrate this logic?

On Thu, Sep 17, 2015 at 9:44 AM, Sriskandarajah Suhothayan 
wrote:

> have you properly migrated SecondDerivativeFinderWindowProcessor to new
> siddhi version. the bug is there.
>
> Suho
>
> On Thu, Sep 17, 2015 at 9:32 AM, Anuruddha Liyanarachchi <
> anurudd...@wso2.com> wrote:
>
>> Hi Ramindu,
>>
>> Please find the CEP artefacts that is being used [1].
>> Please note that the node starts first is not throwing any error.
>>
>> [1]
>> https://drive.google.com/a/wso2.com/file/d/0Bw0NgSFZG5YkWUZybUoxbzM0TTg/view?usp=sharing
>> 
>>
>> On Wed, Sep 16, 2015 at 10:34 PM, Sriskandarajah Suhothayan <
>> s...@wso2.com> wrote:
>>
>>> From the logs it looks like its an issue in
>>> SecondDerivativeFinderWindowProcessor check the getting and restoring the
>>> state part.
>>>
>>> Suho
>>>
>>> On Wed, Sep 16, 2015 at 10:16 PM, Ramindu De Silva 
>>> wrote:
>>>
 Hi Anuruddha,

 Is it possible to send me the artefacts you used for this scenario, so
 that i can reproduce and debug and see whats causing this issue.

 Best Regards,

 On Wed, Sep 16, 2015 at 7:30 PM, Anuruddha Liyanarachchi <
 anurudd...@wso2.com> wrote:

> Hi,
>
> I created CEP HA cluster with Deployment for full-active-active mode
> as per [1].
> I am seeing following error when starting the 2nd member.
> I have also attached execution plan [2].
>
> What is causing this issue ?
>
> [2015-09-16 13:22:38,191] ERROR - {HAManager}  Syncing failed when
> becoming a Passive Node for tenant:-1234
> on:SecondDerivativeOfRequestsInFlightFinder execution plan
> java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
> java.util.concurrent.LinkedBlockingQueue
> at
> org.wso2.siddhi.core.util.collection.queue.SiddhiQueue.restoreState(SiddhiQueue.java:48)
> at
> org.apache.stratos.cep.extension.SecondDerivativeFinderWindowProcessor.restoreState(SecondDerivativeFinderWindowProcessor.java:229)
> at
> org.wso2.siddhi.core.query.processor.window.WindowProcessor.restore(WindowProcessor.java:113)
> at
> org.wso2.siddhi.core.snapshot.SnapshotService.restore(SnapshotService.java:70)
> at org.wso2.siddhi.core.SiddhiManager.restore(SiddhiManager.java:443)
> at
> org.wso2.carbon.event.processor.core.internal.ha.HAManager.becomePassive(HAManager.java:161)
> at
> org.wso2.carbon.event.processor.core.internal.ha.HAManager.tryChangeState(HAManager.java:111)
> at
> org.wso2.carbon.event.processor.core.internal.ha.HAManager.init(HAManager.java:97)
> at
> org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService.addExecutionPlanConfiguration(CarbonEventProcessorService.java:358)
> at
> org.wso2.carbon.event.processor.core.EventProcessorDeployer.processDeploy(EventProcessorDeployer.java:138)
> at
> org.wso2.carbon.event.processor.core.internal.util.EventProcessorConfigurationFilesystemInvoker.reload(EventProcessorConfigurationFilesystemInvoker.java:86)
> at
> org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService.activateInactiveExecutionPlanConfigurations(CarbonEventProcessorService.java:749)
> at
> org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService.notifyServiceAvailability(CarbonEventProcessorService.java:530)
> at
> org.wso2.carbon.event.processor.core.internal.ds.EventProcessorServiceDS.setHazelcastInstance(EventProcessorServiceDS.java:102)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:376)
> at
> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:432)
> at
> org.eclipse.equinox.internal.ds.InstanceProcess.dynamicBi

Re: [Dev] [DEV] [CEP] Integrating ML extension in CEP distributed mode setup

2015-09-17 Thread Nirmal Fernando
Hi Suho,

Mano started to work on a document on this.

On Thu, Sep 17, 2015 at 11:06 PM, Sriskandarajah Suhothayan 
wrote:

>
>
> On Thu, Sep 17, 2015 at 8:55 PM, Sashika Wijesinghe 
> wrote:
>
>> Hi All,
>>
>> I want to test how ML extension can be integrated with CEP storm
>> distributed cluster. So for that I have set up CEP with a manager node and
>> a worker node. And installed ML features using p2-repository in manager
>> node. Then deployed an event flow in CEP manager node and send events to
>> the receiver in worker node. Then I observed " No extension exist for
>> StreamFunctionExtension{namespace='ml'}  in execution plan
>> "ExecutionPlanML" in worker node.
>>
>
>> To overcome this issue, I have started worker node without
>> "-DworkerNode=true" argument and installed ML features in worker node as
>> well. Then restart the entire cluster (worker started with
>> -DworkerNode=true) and send events to the worker node. But events are not
>> logged in worker node (logger publisher is used).
>>
>> Further I have tested the same flow in standalone CEP pack according to
>> the instructions given in [1]
>> 
>> , and it works as expected.
>> [1]
>> https://docs.wso2.com/display/CEP400/Predictive+Analytics+with+WSO2+Machine+Learner
>>
>>
>> Please help me to clarify below issues
>>
>> 1) When we setup a storm distributed cluster and installed a feature in
>> manager node, isn't there any way of synchronizing that feature details
>> with worker node rather than installing the same features in worker node?
>>
>> No this is not supported in WSO2 Servers, need to install in all nodes.
>
>
>> 2) Even after I installed the feature in worker node I didn't get any
>> events. What can be the possible reasons for that?
>>
>> Since there are no documentation on how to set up the ML extension in CEP
>> storm distribute cluster , it would be better to update the documents with
>> relevant details.
>>
>> We have to also update the storm dependency jar, @ML forks can you update
> the docs with the storm story too?
>
> Regards
> Suho
>
>
>> Appreciate your help on this matter.
>>
>> Thanks
>>
>> --
>>
>> *Sashika WijesingheSoftware Engineer - QA Team*
>> Mobile : +94 (0) 774537487
>> sash...@wso2.com
>>
>
>
>
> --
>
> *S. Suhothayan*
> Technical Lead & Team Lead of WSO2 Complex Event Processor
> *WSO2 Inc. *http://wso2.com
> * *
> lean . enterprise . middleware
>
>
> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
> http://suhothayan.blogspot.com/ twitter:
> http://twitter.com/suhothayan  | linked-in:
> http://lk.linkedin.com/in/suhothayan *
>



-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Strange Error in WSO2 Private Paas 4.1.2

2015-09-17 Thread Imesh Gunaratne
Hi Marco,

It's really nice to hear that you were able to deploy ESB 4.8.1 on Private
PaaS 4.1.0 latest code base. Thanks for sharing your experience with us.
Please see my comments inline:

On Mon, Sep 14, 2015 at 11:56 PM, Monaco Marco 
 wrote:

>
> 1) on /etc/puppet/manifests/nodes/base.pp I had to add $mb_url =
> "tcp://[mb_ip]:[mb_port]" since PCA complained about the missing MB
> information
>

We have made Puppet Master configurations optional with Private PaaS 4.1.0.
We can now define these parameters in the network partitions and have
Puppet Master with zero configurations. You can find a sample here:

https://github.com/wso2/product-private-paas/blob/master/samples/network-partitions/openstack/network-partition-openstack.json

>
>
2) on plugin plugins/wso2esb-481-startup-handler.py on line 75 i received
> error on MB_IP since PCA looks in values array with MB_IP keys and it don't
> find any MB_IP property. Since I didn't want to recreate the full
> cartridge, groups and application I just hardcoded MB_IP to
> "tcp://[mb_ip]:[mb_port]", but I suppose that I just need to create the
> cartridge with MB_IP property. This was not documented and present on
> sample cartridge.
>
> I think this has happened because of 1). Please try to define MB_IP in the
relevant network partition.


> Now I have just few questions:
>
> 1) in PPaas 4.0.0 for each cartridge it was automatically spawned and
> configured an LB. Now not, plus I should need to pass LB_IP on cartridge
> definition, so I suppose it requires a manually loadel LB (WSO2 ELB was
> great). Am I right?
>
> Yes your understanding is correct. Now we do not automatically spin load
balancers, rather they need to be started separately. We now have support
for Nginx, Haproxy, LVS, EC2 load balancer & GCE load balancer. What we
mean by support is that the load balancer configuration can be
auto-generated according to the topology.


> 2) I saw that configurator only supports WSO2 AM, IS and ESB. For other
> WSO2 Products (I need MB, IS, DES (or CEP + BAM) and EMS) can I use old
> PPAS 4.0.0 cartridges and puppet definitions?
>
> At the moment we have Configurator Template Modules for API-M 1.9.0, IS
5.0.0, ESB 4.8.1, AS 5.2.1, DAS 3.0.0, CEP 4.0.0, & DSS 3.2.2 [1], [2]. MB
is in the road map and it will be available in a month or two, BAM won't be
there because of DAS.

No, we can't use Private PaaS 4.0.0 cartridges and their puppet definitions
with 4.1.0. We have completely re-architected the cartridge and the
cartridge agent design.

[1]
https://github.com/wso2/product-private-paas/tree/master/cartridges/templates-modules
[2]
https://github.com/wso2/product-private-paas/tree/ppaas-4.2.0/cartridges/templates-modules

Thanks

On Mon, Sep 14, 2015 at 11:56 PM, Monaco Marco 
wrote:

> Hi Imesh,
>
> I just successfully deployed ESB 4.81 cartridge (manager + workers) on
> openstack right now, but I had to make some changes on cartridge
> configuration:
>
> 1) on /etc/puppet/manifests/nodes/base.pp I had to add $mb_url =
> "tcp://[mb_ip]:[mb_port]" since PCA complained about the missing MB
> information
>
> 2) on plugin plugins/wso2esb-481-startup-handler.py on line 75 i received
> error on MB_IP since PCA looks in values array with MB_IP keys and it don't
> find any MB_IP property. Since I didn't want to recreate the full
> cartridge, groups and application I just hardcoded MB_IP to
> "tcp://[mb_ip]:[mb_port]", but I suppose that I just need to create the
> cartridge with MB_IP property. This was not documented and present on
> sample cartridge.
>
> Now I have just few questions:
>
> 1) in PPaas 4.0.0 for each cartridge it was automatically spawned and
> configured an LB. Now not, plus I should need to pass LB_IP on cartridge
> definition, so I suppose it requires a manually loadel LB (WSO2 ELB was
> great). Am I right?
>
> 2) I saw that configurator only supports WSO2 AM, IS and ESB. For other
> WSO2 Products (I need MB, IS, DES (or CEP + BAM) and EMS) can I use old
> PPAS 4.0.0 cartridges and puppet definitions?
>
> Thank you very much,
>
> Marco
> --
> *Da:* Imesh Gunaratne [im...@wso2.com]
> *Inviato:* venerdì 11 settembre 2015 14.43
>
> *A:* Monaco Marco
> *Cc:* Anuruddha Liyanarachchi; WSO2 Developers' List
> *Oggetto:* Re: Strange Error in WSO2 Private Paas 4.1.2
>
> Hi Marco,
>
> On Fri, Sep 11, 2015 at 12:49 PM, Monaco Marco 
>  wrote:
>
>> Hi Imesh,
>>
>> thanks for suggestion, I solved deleting the entire VM of stratos and
>> creating everything new from scratch. Anyway even if I can spawn new
>> instances I'm still facing problems here: i forgot to modify
>> ./repository/conf/cartridge-config.properties and now in lauch-params file
>> I have the wrong puppet master ip. I fixed the file after the first try and
>> also restarted stratos but when I try to deploy instances I still see that
>> launch-params has wrong configurations.
>>
>> I'm sorry this is a bug. You could overcome this for the moment by
> deleting the applic

Re: [Dev] Strange Error in WSO2 Private Paas 4.1.2

2015-09-17 Thread Imesh Gunaratne
Hi Marco,

Please find my answers inline:

On Tue, Sep 15, 2015 at 4:11 AM, Monaco Marco  wrote:
>
>
> Plus another question: is possible to use Stratos to automatically assign
> floating ips to spawned openstack vm?
>
> Yes this is possible. Please refer following wiki page, if you find any
problem please send configuration files, logs (stratos, cartridge agent)
and other information to have a look.
https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Multiple+Network+Interfaces

>
> Now I have just few questions:
>>
>> 1) in PPaas 4.0.0 for each cartridge it was automatically spawned and
>> configured an LB. Now not, plus I should need to pass LB_IP on cartridge
>> definition, so I suppose it requires a manually loadel LB (WSO2 ELB was
>> great). Am I right?
>>
>> Yes your understanding is correct. Now we do not automatically spin load
> balancers, rather they need to be started separately. We now have support
> for Nginx, Haproxy, LVS, EC2 load balancer & GCE load balancer. What we
> mean by support is that the load balancer configuration can be
> auto-generated according to the topology.
>
> Clarification: does balancer configuration automatically update when new
> instances are spawned from autoscaler?
>
> Yes, that's the responsibility of the load balancer extension. For each
load balancer above we have a separate extension.

>
> 2) I saw that configurator only supports WSO2 AM, IS and ESB. For other
>> WSO2 Products (I need MB, IS, DES (or CEP + BAM) and EMS) can I use old
>> PPAS 4.0.0 cartridges and puppet definitions?
>>
>> At the moment we have Configurator Template Modules for API-M 1.9.0, IS
> 5.0.0, ESB 4.8.1, AS 5.2.1, DAS 3.0.0, CEP 4.0.0, & DSS 3.2.2 [1], [2]. MB
> is in the road map and it will be available in a month or two, BAM won't be
> there because of DAS.
>
> Clarification: Are there some documentation on how to create configurator
> templates? We can try to manage to develop some templates and make them
> available to community.
>

Currently I do not think we have documented this but its not that complex:

   1. Take the product distribution and copy of the set of configuration
   files that need to be templated to a folder.
   2. Refer Jinja2 for template syntax: http://jinja.pocoo.org/docs/dev/
   and add place holders.
   3. Add a module.ini file to the root fo the above folder.
   4. Now this template module can be used with the Configurator.

It's great to hear that you are willing to contribute to this. Appreciate
it!

No, we can't use Private PaaS 4.0.0 cartridges and their puppet definitions
> with 4.1.0. We have completely re-architected the cartridge and the
> cartridge agent design.
>
> Clarification: what about new cartridges? What if we use old stratos
> cartirdge agent on some type of services? I'm referring to some cartridges
> that we developed for 4.0.0 version. They won't be usable with 4.1.0?
>
> No it may not work properly because there is a protocol for the cartridge
agent to communicate with Stratos and it has been changed from 4.0.0 to
4.1.0.

On Tue, Sep 15, 2015 at 4:11 AM, Monaco Marco  wrote:

> Hi Imesh,
>
> Now it's very late in Italy, I'll try your suggestion tomorrow. Thank you.
>
> I need just few clarification (inline to your previuos email).
>
> Plus another question: is possible to use Stratos to automatically assign
> floating ips to spawned openstack vm?
>
> We have configured only 1 private network on neutron witha router
> connected to the external openstack network. A floating pool has been
> preallocated on the wso2 tenant, but when Stratos starts instances only
> private ip is assigned. We configured cloud-controller.xml with both
> autoAssignIp true and flase, but it do not change behaviour.
>
> Thanks,
>
> Marco
>
>
>
> Inviato dal mio dispositivo Samsung
>
>
>  Messaggio originale 
> Da: Imesh Gunaratne 
> Data: 14/09/2015 21:07 (GMT+01:00)
> A: Monaco Marco 
> Cc: Anuruddha Liyanarachchi , WSO2 Developers' List <
> dev@wso2.org>
> Oggetto: Re: Strange Error in WSO2 Private Paas 4.1.2
>
> Hi Marco,
>
> It's really nice to hear that you were able to deploy ESB 4.8.1 on Private
> PaaS 4.1.0 latest code base. Thanks for sharing your experience with us.
> Please see my comments inline:
>
> On Mon, Sep 14, 2015 at 11:56 PM, Monaco Marco 
>  wrote:
>
>>
>> 1) on /etc/puppet/manifests/nodes/base.pp I had to add $mb_url =
>> "tcp://[mb_ip]:[mb_port]" since PCA complained about the missing MB
>> information
>>
>
> We have made Puppet Master configurations optional with Private PaaS
> 4.1.0. We can now define these parameters in the network partitions and
> have Puppet Master with zero configurations. You can find a sample here:
>
>
> https://github.com/wso2/product-private-paas/blob/master/samples/network-partitions/openstack/network-partition-openstack.json
>
>>
>>
> 2) on plugin plugins/wso2esb-481-startup-handler.py on line 75 i received
>> error on MB_IP since PCA looks in values array with MB_IP keys and it don't
>> fin

Re: [Dev] Strange Error in WSO2 Private Paas 4.1.2

2015-09-17 Thread Imesh Gunaratne
Hi Marco,

On Tue, Sep 15, 2015 at 7:13 PM, Monaco Marco  wrote:
>
>
> This is the log of nginx-extension:
> 2015-09-15 13:35:17,905 [-] [pool-1-thread-2] ERROR Nginx Could not start
> nginx instance
> 2015-09-15 13:35:17,906 [-] [pool-1-thread-2] ERROR LoadBalancerExtension
> Could not start load balancer
> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
> java.lang.RuntimeException: Command execution failed:
> nginx: [emerg] duplicate upstream "wso2esb-481-application.esb.iotsp.it"
> in /etc/nginx/nginx.conf:27
>

This looks like a bug in the nginx extension. It would be great if you can
report this in JIRA with the details to reproduce. We will fix this ASAP.

Thanks

On Tue, Sep 15, 2015 at 7:13 PM, Monaco Marco  wrote:

> Hi Imesh,
>
> Your suggestion worked as a charme, now seems working fine, but we'are
> still facing problems with LB.
>
> If PPAAS try to spawn several instances of same cartridge the nginx fails
> configuration.
>
> This is the scenario: esb manager (min 1 instance, max 1 instance) + esb
> worker (min 2 instance, max 5 instances).
>
> When PPAAS deploy the 2nd worker cartridge, nginx extension modify
> configuration and nginx stop working beacuse of several upstream that goes
> in conflict.
>
> This is the log of nginx-extension:
> 2015-09-15 13:35:17,905 [-] [pool-1-thread-2] ERROR Nginx Could not start
> nginx instance
> 2015-09-15 13:35:17,906 [-] [pool-1-thread-2] ERROR LoadBalancerExtension
> Could not start load balancer
> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
> java.lang.RuntimeException: Command execution failed:
> nginx: [emerg] duplicate upstream "wso2esb-481-application.esb.iotsp.it"
> in /etc/nginx/nginx.conf:27
>
> at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:91)
> at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
> at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
> at
> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
> at
> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
> at java.util.Observable.notifyObservers(Observable.java:159)
> at
> org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
> at
> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:69)
> at
> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
> at
> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.RuntimeException: Command execution failed:
> nginx: [emerg] duplicate upstream "wso2esb-481-application.esb.iotsp.it"
> in /etc/nginx/nginx.conf:27
>
> at
> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)
> at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:87)
> ... 12 more
> 2015-09-15 13:35:17,918 [-] [pool-1-thread-2]  INFO Nginx Stopping nginx...
> 2015-09-15 13:35:17,929 [-] [pool-1-thread-2] ERROR Nginx Could not stop
> nginx
>
>
> this is the log of nginx:
>
> 2015/09/15 13:35:17 [emerg] 6034#0: duplicate upstream "
> wso2esb-481-application.esb.iotsp.it" in /etc/nginx/nginx.conf:27
> 2015/09/15 13:35:17 [emerg] 6037#0: duplicate upstream "
> wso2esb-481-application.esb.iotsp.it" in /etc/nginx/nginx.conf:27
>
> This is the nginx.conf after extension modifications:
>
> events {
> worker_connections  1024;
> }
>
> http {
> server_names_hash_bucket_size 128;
> upstream wso2esb-481-application.esb.iotsp.it {
> server 192.168.0.60:8243;
> }
>
> server {
> listen 8243 ssl;
> server_name wso2esb-481-application.esb.iotsp.it;
> location / {
> proxy_passhttps://wso2esb-481-application.esb.iotsp.it;
> }
> location /nginx_status {
> stub_status on;
> access_log off;
> allow 127.0.0.1;
> deny all;
> }
> ssl on;
> ssl_certificate /etc/nginx/ssl/server.crt;
> ssl_certificate_key /etc/nginx/ssl/server.key;
> }
> upstream wso2esb-481-application.esb.iotsp.it {
> server 192.168.0.62:8243;
> server 192.168.0.61:8243;
> }
>
> server {
> listen 8243 ssl;
> server_name wso2esb-481-application.esb.iotsp.it;
>

Re: [Dev] Strange Error in WSO2 Private Paas 4.1.2

2015-09-17 Thread Monaco Marco
Hi Imesh,

I just successfully deployed ESB 4.81 cartridge (manager + workers) on 
openstack right now, but I had to make some changes on cartridge configuration:

1) on /etc/puppet/manifests/nodes/base.pp I had to add $mb_url = 
"tcp://[mb_ip]:[mb_port]" since PCA complained about the missing MB information

2) on plugin plugins/wso2esb-481-startup-handler.py on line 75 i received error 
on MB_IP since PCA looks in values array with MB_IP keys and it don't find any 
MB_IP property. Since I didn't want to recreate the full cartridge, groups and 
application I just hardcoded MB_IP to "tcp://[mb_ip]:[mb_port]", but I suppose 
that I just need to create the cartridge with MB_IP property. This was not 
documented and present on sample cartridge.

Now I have just few questions:

1) in PPaas 4.0.0 for each cartridge it was automatically spawned and 
configured an LB. Now not, plus I should need to pass LB_IP on cartridge 
definition, so I suppose it requires a manually loadel LB (WSO2 ELB was great). 
Am I right?

2) I saw that configurator only supports WSO2 AM, IS and ESB. For other WSO2 
Products (I need MB, IS, DES (or CEP + BAM) and EMS) can I use old PPAS 4.0.0 
cartridges and puppet definitions?

Thank you very much,

Marco

Da: Imesh Gunaratne [im...@wso2.com]
Inviato: venerdì 11 settembre 2015 14.43
A: Monaco Marco
Cc: Anuruddha Liyanarachchi; WSO2 Developers' List
Oggetto: Re: Strange Error in WSO2 Private Paas 4.1.2

Hi Marco,

On Fri, Sep 11, 2015 at 12:49 PM, Monaco Marco 
mailto:ma.mon...@almaviva.it>> wrote:
Hi Imesh,

thanks for suggestion, I solved deleting the entire VM of stratos and creating 
everything new from scratch. Anyway even if I can spawn new instances I'm still 
facing problems here: i forgot to modify 
./repository/conf/cartridge-config.properties and now in lauch-params file I 
have the wrong puppet master ip. I fixed the file after the first try and also 
restarted stratos but when I try to deploy instances I still see that 
launch-params has wrong configurations.

I'm sorry this is a bug. You could overcome this for the moment by deleting the 
application and creating it again. The problem is that the puppet master 
properties are added to the payload once an application is created.

I noticed the same with iaas configuration: if I want to change some iaas 
properties in cloud-controller.xml file after the first lauch of Stratos, such 
modification does not take place. The only way is to delete all files, H2 db 
and mysql db and configure everything from scratch.

Yes this is similar to the above issue, if you redeploy the cartridge this 
problem can be solved. Here the problem is that we have a IaaS configuration 
cache in cloud controller. It first take the configuration from the 
cloud-controller.xml and then apply values specified in the cartridge 
definition (to be overwritten) on top of that. This cache is not updated once 
we update the cloud-controller.xml file.

Just to clarify, except for the above issues were you able to deploy an 
application in OpenStack successfully with Private PaaS 4.1.0? If not please 
let us know, we can arrange a google hangout and have a look.

Thanks

On Fri, Sep 11, 2015 at 12:49 PM, Monaco Marco 
mailto:ma.mon...@almaviva.it>> wrote:
Hi Imesh,

thanks for suggestion, I solved deleting the entire VM of stratos and creating 
everything new from scratch. Anyway even if I can spawn new instances I'm still 
facing problems here: i forgot to modify 
./repository/conf/cartridge-config.properties and now in lauch-params file I 
have the wrong puppet master ip. I fixed the file after the first try and also 
restarted stratos but when I try to deploy instances I still see that 
launch-params has wrong configurations.

I noticed the same with iaas configuration: if I want to change some iaas 
properties in cloud-controller.xml file after the first lauch of Stratos, such 
modification does not take place. The only way is to delete all files, H2 db 
and mysql db and configure everything from scratch.

Hope you guys have a method to change such configuration without require a 
fresh reinstall of the product...

Thank you as usual,

Marco

Da: Imesh Gunaratne [im...@wso2.com]
Inviato: mercoledì 9 settembre 2015 18.58
A: Monaco Marco
Cc: Anuruddha Liyanarachchi; WSO2 Developers' List

Oggetto: Re: Strange Error in WSO2 Private Paas 4.1.2

Hi Marco,

What's Private PaaS distribution you are using? Can you please try with 
4.1.0-Alpha:
https://svn.wso2.org/repos/wso2/scratch/PPAAS/wso2ppaas-4.1.0-ALPHA/

Thanks

On Wed, Sep 9, 2015 at 11:22 AM, Monaco Marco 
mailto:ma.mon...@almaviva.it>> wrote:
Hi Anuruddha,

many thanks. I did it also with gui pasting JSON, and did it with UI, too.

When I do with GUI it justs hangs for a while and came back to previous page... 
nothing is logged, also with DEBUG loglevel.

Still stucked at this point.

Marco


Inviato dal mio dispositi

Re: [Dev] Strange Error in WSO2 Private Paas 4.1.2

2015-09-17 Thread Monaco Marco
Hi Imesh,

Your suggestion worked as a charme, now seems working fine, but we'are still 
facing problems with LB.

If PPAAS try to spawn several instances of same cartridge the nginx fails 
configuration.

This is the scenario: esb manager (min 1 instance, max 1 instance) + esb worker 
(min 2 instance, max 5 instances).

When PPAAS deploy the 2nd worker cartridge, nginx extension modify 
configuration and nginx stop working beacuse of several upstream that goes in 
conflict.

This is the log of nginx-extension:
2015-09-15 13:35:17,905 [-] [pool-1-thread-2] ERROR Nginx Could not start nginx 
instance
2015-09-15 13:35:17,906 [-] [pool-1-thread-2] ERROR LoadBalancerExtension Could 
not start load balancer
org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
 java.lang.RuntimeException: Command execution failed:
nginx: [emerg] duplicate upstream "wso2esb-481-application.esb.iotsp.it" in 
/etc/nginx/nginx.conf:27

at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:91)
at 
org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
at 
org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
at 
org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
at 
org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
at java.util.Observable.notifyObservers(Observable.java:159)
at 
org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
at 
org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:69)
at 
org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
at 
org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Command execution failed:
nginx: [emerg] duplicate upstream "wso2esb-481-application.esb.iotsp.it" in 
/etc/nginx/nginx.conf:27

at 
org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)
at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:87)
... 12 more
2015-09-15 13:35:17,918 [-] [pool-1-thread-2]  INFO Nginx Stopping nginx...
2015-09-15 13:35:17,929 [-] [pool-1-thread-2] ERROR Nginx Could not stop nginx


this is the log of nginx:

2015/09/15 13:35:17 [emerg] 6034#0: duplicate upstream 
"wso2esb-481-application.esb.iotsp.it" in /etc/nginx/nginx.conf:27
2015/09/15 13:35:17 [emerg] 6037#0: duplicate upstream 
"wso2esb-481-application.esb.iotsp.it" in /etc/nginx/nginx.conf:27

This is the nginx.conf after extension modifications:

events {
worker_connections  1024;
}

http {
server_names_hash_bucket_size 128;
upstream wso2esb-481-application.esb.iotsp.it {
server 192.168.0.60:8243;
}

server {
listen 8243 ssl;
server_name wso2esb-481-application.esb.iotsp.it;
location / {
proxy_passhttps://wso2esb-481-application.esb.iotsp.it;
}
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
}
upstream wso2esb-481-application.esb.iotsp.it {
server 192.168.0.62:8243;
server 192.168.0.61:8243;
}

server {
listen 8243 ssl;
server_name wso2esb-481-application.esb.iotsp.it;
location / {
proxy_passhttps://wso2esb-481-application.esb.iotsp.it;
}
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
}
}
http {
server_names_hash_bucket_size 128;
upstream wso2esb-481-application.esb.iotsp.it {
server 192.168.0.60:9443;
}

server {
listen 9443 ssl;
server_name wso2esb-481-application.esb.iotsp.it;
location / {
proxy_passhttps://wso2esb-481-application.esb.iotsp.it;
}
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_cer

[Dev] R: Strange Error in WSO2 Private Paas 4.1.2

2015-09-17 Thread Monaco Marco
Hi Imesh,

Now it's very late in Italy, I'll try your suggestion tomorrow. Thank you.

I need just few clarification (inline to your previuos email).

Plus another question: is possible to use Stratos to automatically assign 
floating ips to spawned openstack vm?

We have configured only 1 private network on neutron witha router connected to 
the external openstack network. A floating pool has been preallocated on the 
wso2 tenant, but when Stratos starts instances only private ip is assigned. We 
configured cloud-controller.xml with both autoAssignIp true and flase, but it 
do not change behaviour.

Thanks,

Marco



Inviato dal mio dispositivo Samsung


 Messaggio originale 
Da: Imesh Gunaratne 
Data: 14/09/2015 21:07 (GMT+01:00)
A: Monaco Marco 
Cc: Anuruddha Liyanarachchi , WSO2 Developers' List 

Oggetto: Re: Strange Error in WSO2 Private Paas 4.1.2

Hi Marco,

It's really nice to hear that you were able to deploy ESB 4.8.1 on Private PaaS 
4.1.0 latest code base. Thanks for sharing your experience with us. Please see 
my comments inline:

On Mon, Sep 14, 2015 at 11:56 PM, Monaco Marco 
mailto:ma.mon...@almaviva.it>> wrote:

1) on /etc/puppet/manifests/nodes/base.pp I had to add $mb_url = 
"tcp://[mb_ip]:[mb_port]" since PCA complained about the missing MB information

We have made Puppet Master configurations optional with Private PaaS 4.1.0. We 
can now define these parameters in the network partitions and have Puppet 
Master with zero configurations. You can find a sample here:

https://github.com/wso2/product-private-paas/blob/master/samples/network-partitions/openstack/network-partition-openstack.json

2) on plugin plugins/wso2esb-481-startup-handler.py on line 75 i received error 
on MB_IP since PCA looks in values array with MB_IP keys and it don't find any 
MB_IP property. Since I didn't want to recreate the full cartridge, groups and 
application I just hardcoded MB_IP to "tcp://[mb_ip]:[mb_port]", but I suppose 
that I just need to create the cartridge with MB_IP property. This was not 
documented and present on sample cartridge.

I think this has happened because of 1). Please try to define MB_IP in the 
relevant network partition.

Now I have just few questions:

1) in PPaas 4.0.0 for each cartridge it was automatically spawned and 
configured an LB. Now not, plus I should need to pass LB_IP on cartridge 
definition, so I suppose it requires a manually loadel LB (WSO2 ELB was great). 
Am I right?

Yes your understanding is correct. Now we do not automatically spin load 
balancers, rather they need to be started separately. We now have support for 
Nginx, Haproxy, LVS, EC2 load balancer & GCE load balancer. What we mean by 
support is that the load balancer configuration can be auto-generated according 
to the topology.

Clarification: does balancer configuration automatically update when new 
instances are spawned from autoscaler?


2) I saw that configurator only supports WSO2 AM, IS and ESB. For other WSO2 
Products (I need MB, IS, DES (or CEP + BAM) and EMS) can I use old PPAS 4.0.0 
cartridges and puppet definitions?

At the moment we have Configurator Template Modules for API-M 1.9.0, IS 5.0.0, 
ESB 4.8.1, AS 5.2.1, DAS 3.0.0, CEP 4.0.0, & DSS 3.2.2 [1], [2]. MB is in the 
road map and it will be available in a month or two, BAM won't be there because 
of DAS.

Clarification: Are there some documentation on how to create configurator 
templates? We can try to manage to develop some templates and make them 
available to communtiy.

No, we can't use Private PaaS 4.0.0 cartridges and their puppet definitions 
with 4.1.0. We have completely re-architected the cartridge and the cartridge 
agent design.

Clarification: what about new cartridges? What if we use old stratos cartirdge 
agent on some type of services? I'm referring to some cartridges that we 
developed for 4.0.0 version. They won't be usable with 4.1.0?


[1] 
https://github.com/wso2/product-private-paas/tree/master/cartridges/templates-modules
[2] 
https://github.com/wso2/product-private-paas/tree/ppaas-4.2.0/cartridges/templates-modules

Thanks

On Mon, Sep 14, 2015 at 11:56 PM, Monaco Marco 
mailto:ma.mon...@almaviva.it>> wrote:
Hi Imesh,

I just successfully deployed ESB 4.81 cartridge (manager + workers) on 
openstack right now, but I had to make some changes on cartridge configuration:

1) on /etc/puppet/manifests/nodes/base.pp I had to add $mb_url = 
"tcp://[mb_ip]:[mb_port]" since PCA complained about the missing MB information

2) on plugin plugins/wso2esb-481-startup-handler.py on line 75 i received error 
on MB_IP since PCA looks in values array with MB_IP keys and it don't find any 
MB_IP property. Since I didn't want to recreate the full cartridge, groups and 
application I just hardcoded MB_IP to "tcp://[mb_ip]:[mb_port]", but I suppose 
that I just need to create the cartridge with MB_IP property. This was not 
documented and present on sample cartridge.

Now I have just few questions:

1) in PPaa

Re: [Dev] Strange Error in WSO2 Private Paas 4.1.2

2015-09-17 Thread Monaco Marco
Hi Imesh.

Done: https://wso2.org/jira/browse/PAAS-238

Please, try to send update to ma.mon...@almaviva.it.

Thanks,

Marco

Da: Imesh Gunaratne [im...@wso2.com]
Inviato: martedì 15 settembre 2015 18.23
A: Monaco Marco
Cc: Anuruddha Liyanarachchi; WSO2 Developers' List
Oggetto: Re: Strange Error in WSO2 Private Paas 4.1.2

Hi Marco,

On Tue, Sep 15, 2015 at 7:13 PM, Monaco Marco 
mailto:ma.mon...@almaviva.it>> wrote:

This is the log of nginx-extension:
2015-09-15 13:35:17,905 [-] [pool-1-thread-2] ERROR Nginx Could not start nginx 
instance
2015-09-15 13:35:17,906 [-] [pool-1-thread-2] ERROR LoadBalancerExtension Could 
not start load balancer
org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
 java.lang.RuntimeException: Command execution failed:
nginx: [emerg] duplicate upstream 
"wso2esb-481-application.esb.iotsp.it"
 in /etc/nginx/nginx.conf:27

This looks like a bug in the nginx extension. It would be great if you can 
report this in JIRA with the details to reproduce. We will fix this ASAP.

Thanks

On Tue, Sep 15, 2015 at 7:13 PM, Monaco Marco 
mailto:ma.mon...@almaviva.it>> wrote:
Hi Imesh,

Your suggestion worked as a charme, now seems working fine, but we'are still 
facing problems with LB.

If PPAAS try to spawn several instances of same cartridge the nginx fails 
configuration.

This is the scenario: esb manager (min 1 instance, max 1 instance) + esb worker 
(min 2 instance, max 5 instances).

When PPAAS deploy the 2nd worker cartridge, nginx extension modify 
configuration and nginx stop working beacuse of several upstream that goes in 
conflict.

This is the log of nginx-extension:
2015-09-15 13:35:17,905 [-] [pool-1-thread-2] ERROR Nginx Could not start nginx 
instance
2015-09-15 13:35:17,906 [-] [pool-1-thread-2] ERROR LoadBalancerExtension Could 
not start load balancer
org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
 java.lang.RuntimeException: Command execution failed:
nginx: [emerg] duplicate upstream 
"wso2esb-481-application.esb.iotsp.it"
 in /etc/nginx/nginx.conf:27

at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:91)
at 
org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
at 
org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
at 
org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
at 
org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
at java.util.Observable.notifyObservers(Observable.java:159)
at 
org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
at 
org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:69)
at 
org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
at 
org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Command execution failed:
nginx: [emerg] duplicate upstream 
"wso2esb-481-application.esb.iotsp.it"
 in /etc/nginx/nginx.conf:27

at 
org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUtils.java:62)
at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:87)
... 12 more
2015-09-15 13:35:17,918 [-] [pool-1-thread-2]  INFO Nginx Stopping nginx...
2015-09-15 13:35:17,929 [-] [pool-1-thread-2] ERROR Nginx Could not stop nginx


this is the log of nginx:

2015/09/15 13:35:17 [emerg] 6034#0: duplicate upstream 
"wso2esb-481-application.esb.iotsp.it"
 in /etc/nginx/nginx.conf:27
2015/09/15 13:35:17 [emerg] 6037#0: duplicate upstream 
"wso2esb-481-application.esb.iotsp.it"
 in /etc/nginx/nginx.conf:27

This is the nginx.conf after extension modifications:

events {
worker_connections  1024;
}

http {
server_names_hash_bucket_size 128;
upstream 
wso2esb-481-application.esb.iotsp.it
 {
server 192.168.0.60:8243;
}

server {
listen 8243 ssl;
server_name 
wso2esb-481-application.esb.iotsp.it;
location / {
 

Re: [Dev] Strange Error in WSO2 Private Paas 4.1.2

2015-09-17 Thread Reka Thirunavukkarasu
Hi Marco,

This is regarding the jira https://wso2.org/jira/browse/PAAS-238.

It seems that your hostname in the cartridge definition of esb worker and
manager are same. I suspect the same upstream got generated in the niginx
due to that. We usually provide different hostname for different cartridges
since we will need to access them using that.

Thanks for pointing out the issue. I have fixed the ESB cartridges samples
to have correct hostnames for all the IaaS now. Please refer [1] for the
openstack IaaS.

In case, if you have already set the hostnames differently, can you share
us with your cartridge definition?

[1]
https://github.com/wso2/product-private-paas/tree/master/samples/cartridges/openstack/wso2esb-481

Thanks,
Reka

On Thu, Sep 17, 2015 at 6:17 PM, Anuruddha Liyanarachchi <
anurudd...@wso2.com> wrote:

>
> -- Forwarded message --
> From: Monaco Marco 
> Date: Tue, Sep 15, 2015 at 11:42 PM
> Subject: RE: Strange Error in WSO2 Private Paas 4.1.2
> To: Imesh Gunaratne 
> Cc: Anuruddha Liyanarachchi , WSO2 Developers' List <
> dev@wso2.org>
>
>
> Hi Imesh.
>
> Done: https://wso2.org/jira/browse/PAAS-238
>
> Please, try to send update to ma.mon...@almaviva.it.
>
> Thanks,
>
> Marco
> --
> *Da:* Imesh Gunaratne [im...@wso2.com]
> *Inviato:* martedì 15 settembre 2015 18.23
>
> *A:* Monaco Marco
> *Cc:* Anuruddha Liyanarachchi; WSO2 Developers' List
> *Oggetto:* Re: Strange Error in WSO2 Private Paas 4.1.2
>
> Hi Marco,
>
> On Tue, Sep 15, 2015 at 7:13 PM, Monaco Marco  wrote:
>
>>
>>
>> This is the log of nginx-extension:
>> 2015-09-15 13:35:17,905 [-] [pool-1-thread-2] ERROR Nginx Could not start
>> nginx instance
>> 2015-09-15 13:35:17,906 [-] [pool-1-thread-2] ERROR LoadBalancerExtension
>> Could not start load balancer
>> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
>> java.lang.RuntimeException: Command execution failed:
>> nginx: [emerg] duplicate upstream "wso2esb-481-application.esb.iotsp.it"
>> in /etc/nginx/nginx.conf:27
>>
>
> This looks like a bug in the nginx extension. It would be great if you can
> report this in JIRA with the details to reproduce. We will fix this ASAP.
>
> Thanks
>
> On Tue, Sep 15, 2015 at 7:13 PM, Monaco Marco 
> wrote:
>
>> Hi Imesh,
>>
>> Your suggestion worked as a charme, now seems working fine, but we'are
>> still facing problems with LB.
>>
>> If PPAAS try to spawn several instances of same cartridge the nginx fails
>> configuration.
>>
>> This is the scenario: esb manager (min 1 instance, max 1 instance) + esb
>> worker (min 2 instance, max 5 instances).
>>
>> When PPAAS deploy the 2nd worker cartridge, nginx extension modify
>> configuration and nginx stop working beacuse of several upstream that goes
>> in conflict.
>>
>> This is the log of nginx-extension:
>> 2015-09-15 13:35:17,905 [-] [pool-1-thread-2] ERROR Nginx Could not start
>> nginx instance
>> 2015-09-15 13:35:17,906 [-] [pool-1-thread-2] ERROR LoadBalancerExtension
>> Could not start load balancer
>> org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException:
>> java.lang.RuntimeException: Command execution failed:
>> nginx: [emerg] duplicate upstream "wso2esb-481-application.esb.iotsp.it"
>> in /etc/nginx/nginx.conf:27
>>
>> at org.apache.stratos.nginx.extension.Nginx.start(Nginx.java:91)
>> at
>> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.configureAndStart(LoadBalancerExtension.java:247)
>> at
>> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension.access$100(LoadBalancerExtension.java:46)
>> at
>> org.apache.stratos.load.balancer.extension.api.LoadBalancerExtension$1.onEvent(LoadBalancerExtension.java:184)
>> at
>> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
>> at java.util.Observable.notifyObservers(Observable.java:159)
>> at
>> org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
>> at
>> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor.process(CompleteTopologyMessageProcessor.java:69)
>> at
>> org.apache.stratos.messaging.message.processor.MessageProcessorChain.process(MessageProcessorChain.java:61)
>> at
>> org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator.run(TopologyEventMessageDelegator.java:73)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: java.lang.RuntimeException: Command execution failed:
>> nginx: [emerg] duplicate upstream "wso2esb-481-application.esb.iotsp.it"
>> in /etc/nginx/nginx.conf:27
>>
>> at
>> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUt

Re: [Dev] Do we have direct way to upload images?

2015-09-17 Thread Sajith Ariyarathna
Hi Nifras,

request.getFile("myFile") does not represent a physical file, rather it
represent a stream to the uploaded file. Hence you cannot "move" it using
.move("...") function. If you want to save the uploaded file, then use the
following code snippet.

var uploadedFile = request.getFile("myFile");
var savedFile = new File("/path/to/save/location/" +
uploadedFile.getName());
savedFile.open('w');
savedFile.write(uploadedFile.getStream());
savedFile.close();


Thanks.

On Thu, Sep 10, 2015 at 2:41 PM, NIFRAS ISMAIL 
wrote:

> Hi All,
> Do we upload images to the server directly using Jaggery JS?
> http://stackoverflow.com/a/32497617/2672566
>
> Regards.
> *M. Nifras Ismail*
> [image: LinkedIn] 
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Sajith Ariyarathna
Software Engineer; WSO2, Inc.;  http://wso2.com/
mobile: +94 77 6602284, +94 71 3951048
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Log Error with SolrClient when parsing date

2015-09-17 Thread Ajith Vitharana
Hi Jorge,

This is known is [1] , as a workaround set you system locale to English.

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

-Ajith

On Mon, Sep 14, 2015 at 10:50 AM, Jorge  wrote:

> Hi folks,
> In WSO2 DAS BETA 2 and in WSO2 ESB 4.9.0 I see this error in console:
>
>
> [2015-09-14 10:46:34,239] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,239] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,242] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,244] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,246] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,249] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,248] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,250] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,248] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,252] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,248] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,248] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,248] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,256] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,247] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,246] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,258] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,258] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,257] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,257] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,256] ERROR
> {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Error when passing
> date to create solr date format.java.text.ParseException: Unparseable date:
> "Mon Sep 14 10:45:53 EDT 2015"
> [2015-09-14 10:46:34,255] ERROR
> {org.wso2.carbon.registry.indexing.solr.Solr

Re: [Dev] Do we have direct way to upload images?

2015-09-17 Thread NIFRAS ISMAIL
Hi Sajith,
Thank you for the guide.
So we can add multiple files upload from this stream.

Regards.
*M. Nifras Ismail*
[image: LinkedIn] 



On Fri, Sep 18, 2015 at 12:32 AM, Sajith Ariyarathna 
wrote:

> Hi Nifras,
>
> request.getFile("myFile") does not represent a physical file, rather it
> represent a stream to the uploaded file. Hence you cannot "move" it using
> .move("...") function. If you want to save the uploaded file, then use
> the following code snippet.
>
> var uploadedFile = request.getFile("myFile");
> var savedFile = new File("/path/to/save/location/" +
> uploadedFile.getName());
> savedFile.open('w');
> savedFile.write(uploadedFile.getStream());
> savedFile.close();
>
>
> Thanks.
>
> On Thu, Sep 10, 2015 at 2:41 PM, NIFRAS ISMAIL 
> wrote:
>
>> Hi All,
>> Do we upload images to the server directly using Jaggery JS?
>> http://stackoverflow.com/a/32497617/2672566
>>
>> Regards.
>> *M. Nifras Ismail*
>> [image: LinkedIn] 
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sajith Ariyarathna
> Software Engineer; WSO2, Inc.;  http://wso2.com/
> mobile: +94 77 6602284, +94 71 3951048
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Vote] Release WSO2 Carbon Kernel 4.4.2 RC1

2015-09-17 Thread Kasun Indrasiri
We found that following fixes were missing in latest kernel release while
doing ESB 4.9.
Any plans to include them in this release.

https://wso2.org/jira/browse/CARBON-14807
https://wso2.org/jira/browse/CARBON-14959
https://wso2.org/jira/browse/CARBON-14764
https://wso2.org/jira/browse/CARBON-15248
https://wso2.org/jira/browse/CARBON-15141
https://wso2.org/jira/browse/CARBON-15223
https://wso2.org/jira/browse/CARBON-15184
https://wso2.org/jira/browse/CARBON-14730
https://wso2.org/jira/browse/CARBON-15248

On Thu, Sep 17, 2015 at 6:55 PM, Manuri Amaya Perera 
wrote:

> Hi Devs,
>
> WSO2 Carbon Kernel 4.4.2 RC1 Release Vote.
>
> This release fixes the following issues:
> https://wso2.org/jira/issues/?filter=12396
>
> Please download and test your products with kernel 4.4.2 RC1 and vote.
> Vote will be open for 72 hours or as longer as needed.
>
> *​Source and binary distribution files:*
> http://svn.wso2.org/repos/wso2/people/sameera/work/carbon-4.4.2
>
> *Maven staging repository:*
> http://maven.wso2.org/nexus/content/repositories/orgwso2carbon-109/
> 
>
> *The tag to be voted upon:*
> https://github.com/wso2/carbon4-kernel/tree/v4.4.2-rc1
>
>
> [ ] Broken - do not release (explain why)
> [ ] Stable - go ahead and release
>
>
> Thank you
> Carbon Team
>
> ​
>
> --
>
> *Manuri Amaya Perera*
>
> *Software Engineer*
>
> *WSO2 Inc.*
>
> *Blog: http://manuriamayaperera.blogspot.com
> *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Kasun Indrasiri
Software Architect
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

cell: +94 77 556 5206
Blog : http://kasunpanorama.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CEP over Out-of-Order Data Streams

2015-09-17 Thread Miyuru Dayarathna
Hi Suho,

I fixed all the issues mentioned during the code review and pushed the
modifications to GitHub.

-- 
Thanks,
Miyuru Dayarathna
Senior Technical Lead
Mobile: +94713527783
Blog: http://miyurublog.blogspot.com

On Thu, Sep 17, 2015 at 10:20 PM, Sriskandarajah Suhothayan 
wrote:

> Thanks for the pull request there are some comments on the code please fix
> them
>
> Thanks
> Suho
>
> On Thu, Sep 17, 2015 at 4:56 PM, Miyuru Dayarathna 
> wrote:
>
>> Hi Suho,
>>
>> Today's afternoon I merged the out-of-order handler (OOH) code to Siddhi
>> and created a pull request. It comprises of a simple test case [2
>> ]
>> which is described in [3
>> ].
>> I tested the code with DEBS 2015 Grand Challenge's taxi trips data set [1
>> ] as well. I used the
>> small 2 million events data set in the tests. Since the events in the
>> original data set were in sorted order, I introduced a delay to certain
>> events in the event stream before sending them to the OOH (Shown in green
>> color highlighting in [4
>> ]).
>> The results are listed in [4
>> ].
>> The OOH reorders event streams in both example scenarios except for few
>> glitches. For 100 events case there was one unordered event output by OOH
>> (Highlighted in yellow color in [4
>> ]).
>> I am investigating solutions for such unordered events output by OOH.
>> However, a similar situation has been described in Figure 2 of [3
>> ]
>> as well. Another notable observation is that considerable amount of events
>> were buffered in the OOH while the extension was running. In certain cases
>> (as shown in [4
>> ])
>> there were about 41 events buffered in OOH. Hence, both the test cases
>> ended up outputting lesser number of events than what is input to OOH
>> because the remaining set of events were buffered inside the OOH when the
>> test case terminated. This is expected behavior of a buffer based
>> out-of-order handler. Next, I will continue experiments with full data sets
>> of DEBS 2013 and 2015 data sets and observe the characteristics of OOH
>> buffer for different out-of-order scenarios.
>>
>> [1] http://www.debs2015.org/call-grand-challenge.html
>>
>> [2]
>> https://github.com/miyurud/siddhi/blob/master/modules/siddhi-extensions/ooh/src/test/java/org/wso2/siddhi/extension/ooh/KSlackExtensionTestCase.java
>>
>> [3]
>> https://drive.google.com/a/wso2.com/file/d/0B8UIlB9H3rv_THpoRi0xTFFERVE/view?usp=sharing
>>
>> [4]
>> https://docs.google.com/a/wso2.com/spreadsheets/d/1xYGJoNfCSQTv1KsAuPNYsSSFqOEpn8gqCZy35L8GDmo/edit?usp=sharing
>>
>> --
>> Thanks,
>> Miyuru Dayarathna
>> Senior Technical Lead
>> Mobile: +94713527783
>> Blog: http://miyurublog.blogspot.com
>>
>> On Wed, Sep 16, 2015 at 11:10 PM, Sriskandarajah Suhothayan <
>> s...@wso2.com> wrote:
>>
>>> Hi Miyuru
>>>
>>> Any update on this ?
>>>
>>> Suho
>>>
>>> On Tue, Sep 8, 2015 at 7:58 PM, Miyuru Dayarathna 
>>> wrote:
>>>
 Hi Suho,

 Ok, I will work on that.

 --
 Thanks,
 Miyuru Dayarathna
 Senior Technical Lead
 Mobile: +94713527783
 Blog: http://miyurublog.blogspot.com

 On Tue, Sep 8, 2015 at 5:38 PM, Sriskandarajah Suhothayan <
 s...@wso2.com> wrote:

> Can you merge this code to siddhi and send a pull we will be able to
> add this to the release
>
> Suho
>
> On Tue, Sep 8, 2015 at 5:17 PM, Miyuru Dayarathna 
> wrote:
>
>> Hi Suho,
>>
>> I have completed developing the K-Slack extension for Siddhi and I
>> have hosted the code in [1 ].
>> I have tested the KSlackExtension class [2
>> ]
>> using a test scenario described in [3
>> ]
>> and I have verified the correctness of the implementation. The test case 
>> is
>> accessible from [4
>> 

[Dev] [DEV] How to change the title and favicon of the page by editing a ES extension.

2015-09-17 Thread Thushara Ranawaka
Hi ES team,

How to do the $subject. Currently we use something like this as title
WSO2 Governance Center - Publisher | WSO2 Enterprise Store
Publisher
How to get rid of it and add a new title to the page? I try this by adding
title tag to the header.hbs but it didn't override the original title tag.
Looks like we need to remove it from this page[1] since we cant override
exiting title and favicon. I created a jira[2] for this. Please advice.

[1] -
https://github.com/wso2/carbon-store/blob/master/apps/publisher/themes/default/pages/single-col-fluid.hbs
[2] - https://wso2.org/jira/browse/STORE-1107
-- 
Thanks,
Thushara Kasun Ranawaka
Software Engineer
WSO2 Inc.; 
lean.enterprise.middleware
Mobile : *+94 (0) 773438949*
*thusha...@wso2.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Getting failure during release:perform operation in ESB 490 M7

2015-09-17 Thread Nirmal Fernando
I think the correct approach should be; mvn release:perform -Darguments="-D
clean.skip=true"

On Thu, Mar 5, 2015 at 7:37 PM, Harsha Kumara  wrote:

> Hi Chanaka,
>
> I think the above exception also encountered in SS release also. Please
> refer "[SS-1.5.0-RC1 Release] Release:perform fails due to a non-existing
> directory"
>
> The suggestion given by the Kishanthan as follow.
>
> Check whether you have maven-clean-plugin defined in this module or its
> parent? If yes, remove that from the build and try again.
>
> Seems the integration/pom.xml has the clean plugin.
>
> Thanks,
> Harsha
>
> On Thu, Mar 5, 2015 at 6:56 PM, Chanaka Fernando 
> wrote:
>
>> Hi Devs,
>>
>> I am getting the below error during the release:perform operation of the
>> ESB 490 M7. Did anybody faced a similar issue before?
>>
>> [INFO] [INFO] WSO2 ESB - Aggregator Module ...
>> SUCCESS [  5.254 s]
>> [INFO] [INFO] WSO2 ESB - Styles Parent ...
>> SUCCESS [  0.461 s]
>> [INFO] [INFO] WSO2 ESB - Styles ..
>> SUCCESS [ 11.103 s]
>> [INFO] [INFO] WSO2 ESB - Samples Parent ..
>> SUCCESS [  0.387 s]
>> [INFO] [INFO] WSO2 ESB - Samples .
>> SUCCESS [01:50 min]
>> [INFO] [INFO] WSO2 ESB - Features Parent .
>> SUCCESS [  0.540 s]
>> [INFO] [INFO] WSO2 ESB - Features Aggregator Module ..
>> SUCCESS [  0.457 s]
>> [INFO] [INFO] WSO2 ESB - Styles Features .
>> SUCCESS [  8.485 s]
>> [INFO] [INFO] WSO2 ESB - Samples Features 
>> SUCCESS [ 46.188 s]
>> [INFO] [INFO] WSO2 ESB - P2 Profile Generation ...
>> SUCCESS [01:12 min]
>> [INFO] [INFO] WSO2 ESB - Distribution 
>> SUCCESS [  01:53 h]
>> [INFO] [INFO] WSO2 ESB - Integration Parent ..
>> SUCCESS [  0.619 s]
>> [INFO] [INFO] integration-test-common 
>> SUCCESS [  8.673 s]
>> [INFO] [INFO] ESB Integration Test Admin Clients .
>> FAILURE [  4.971 s]
>> [INFO] [INFO] ESB Integration Test UI Pages .. SKIPPED
>> [INFO] [INFO] ESB Integration Test Common Utils .. SKIPPED
>> [INFO] [INFO] ESB Integration Extensions . SKIPPED
>> [INFO] [INFO] ESB Test Service Module  SKIPPED
>> [INFO] [INFO] ESB test Module-Transport .. SKIPPED
>> [INFO] [INFO] ESB test Module-Service  SKIPPED
>> [INFO] [INFO] ESB test Module-mediator-1 . SKIPPED
>> [INFO] [INFO] ESB test Module-mediator-2 . SKIPPED
>> [INFO] [INFO] ESB test Module - Test Patches . SKIPPED
>> [INFO] [INFO] ESB test Module - Sample ... SKIPPED
>> [INFO] [INFO] Integration Test Reporting . SKIPPED
>> [INFO] [INFO] ESB test Module - Sample ... SKIPPED
>> [INFO] [INFO]
>> 
>> [INFO] [INFO] BUILD FAILURE
>> [INFO] [INFO]
>> 
>> [INFO] [INFO] Total time: 01:58 h
>> [INFO] [INFO] Finished at: 2015-03-05T18:43:24+05:30
>> [INFO] [INFO] Final Memory: 107M/929M
>> [INFO] [INFO]
>> 
>> [INFO] [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-source-plugin:2.4:jar (attach-sources) on
>> project admin-clients: Error adding directory to source archive.
>> /home/wso2builder/ESB490-M7/product-esb/target/checkout/modules/integration/test-common/admin-clients/target/maven-shared-archive-resources
>> isn't a directory. -> [Help 1]
>> [INFO] [ERROR]
>> [INFO] [ERROR] To see the full stack trace of the errors, re-run Maven
>> with the -e switch.
>> [INFO] [ERROR] Re-run Maven using the -X switch to enable full debug
>> logging.
>> [INFO] [ERROR]
>> [INFO] [ERROR] For more information about the errors and possible
>> solutions, please read the following articles:
>> [INFO] [ERROR] [Help 1]
>> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>> [INFO] [ERROR]
>> [INFO] [ERROR] After correcting the problems, you can resume the build
>> with the command
>> [INFO] [ERROR]   mvn  -rf :admin-clients
>> [INFO]
>> 
>> [INFO] Reactor Summary:
>> [INFO]
>> [INFO] WSO2 ESB - Aggregator Module ... FAILURE [
>> 02:06 h]
>> [INFO] WSO2 ESB - Styles Parent ... SKIPPED
>> [INFO] WSO2 ESB - Styles .. SKIPPED
>> [INFO] WSO2 ESB - Samples Parent .. SKIPPED
>> [INFO] WSO2 ESB - Samples . SKIPPED
>> [INFO] WSO2 ESB - Features Parent .

Re: [Dev] UpdateScopes method deletes all Scopes of an API when API is updated

2015-09-17 Thread Nuwan Dias
Adding Jo

On Thu, Sep 17, 2015 at 5:27 PM, Harshan Liyanage  wrote:

> Hi,
>
> We have a requirement to automatically publish APIs when the EMM server
> starts-up. We need to also add the scopes to APIs when its get published.
> For that we are calling addAPI method if its a new API or updateAPI method
> if that API already exists (in APIProvider implementation).
>
> This is working fine in the first server start-up. But when I restart the
> EMM server all the added scopes to an API is lost from related database
> tables. After analyzing the issue I've found out that the updateScopes
> method in [1] deletes all existing scopes of an API and then adding the
> updated scopes to the API using URI templates (api.getUriTemplates()). But
> in addAPI method, it uses api.getScopes() to add the scope data to the
> database. If I change the line
> "addScopes(api.getUriTemplates(),apiId,tenantId);" to
> "addScopes(api.getScopes(),apiId,tenantId);" this functionality works fine.
> So is there a specific reason to populate scopes of a updated API using
> api.getUriTemplates()?
>
> public void updateScopes(API api, int tenantId) throws
> APIManagementException {
>
> Connection connection = null;
> PreparedStatement prepStmt = null;
> int apiId = -1;
> String deleteScopes = "DELETE FROM IDN_OAUTH2_SCOPE WHERE SCOPE_ID IN (
> SELECT SCOPE_ID FROM AM_API_SCOPES WHERE API_ID = ? )";
> try {
>
> connection = APIMgtDBUtil.getConnection();
>
> connection.setAutoCommit(false);
>
> apiId = getAPIID(api.getId(),connection);
>
> if (apiId == -1) {
>
> //application addition has failed
>
> return;
>
> }
>
> prepStmt = connection.prepareStatement(deleteScopes);
>
> prepStmt.setInt(1,apiId);
>
> prepStmt.execute();
>
> prepStmt.close();
>
> connection.commit();
>
> } catch (SQLException e) {
>
> handleException("Error while deleting Scopes for API : " +
> api.getId().toString(), e);
>
> } finally {
>
> APIMgtDBUtil.closeAllConnections(prepStmt, connection, null);
>
> }
> //addScopes(api.getScopes(),apiId,tenantId);
> addScopes(api.getUriTemplates(),apiId,tenantId);
>
> }
>
> [1].
> https://github.com/wso2/carbon-apimgt/blob/435163dd0f60058d8cfecbb0c4230984f0882fb6/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java
>
> Thanks,
>
> Harshan Liyanage
> Software Engineer
> Mobile: *+94724423048*
> Email: hars...@wso2.com
> Blog : http://harshanliyanage.blogspot.com/
> *WSO2, Inc. :** wso2.com *
> lean.enterprise.middleware.
>



-- 
Nuwan Dias

Technical Lead - WSO2, Inc. http://wso2.com
email : nuw...@wso2.com
Phone : +94 777 775 729
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [VOTE] Release WSO2 ML 1.0.0 RC1

2015-09-17 Thread Nirmal Fernando
Hi Devs,

This is the first release candidate of WSO2 ML 1.0.0.

This release fixes the following issues:

ML-1.0.0-FixedIssues 

Please download, test and vote. Vote will be open for 72 hours or as needed.

*Binary distribution files:*
Product:
https://github.com/wso2/product-ml/releases/download/v1.0.0-rc1/wso2ml-1.0.0.zip

P2 repository:
https://github.com/wso2/product-ml/releases/download/v1.0.0-rc1/p2-repo.zip

*Maven staging repo:*
http://maven.wso2.org/nexus/content/repositories/orgwso2ml-120/

*The tag to be voted upon:*
https://github.com/wso2/product-ml/tree/v1.0.0-rc1

[ ] Broken - do not release (explain why)
[ ] Stable - go ahead and release

Thanks and Regards,
~ WSO2 Machine Learner Team ~

-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] UpdateScopes method deletes all Scopes of an API when API is updated

2015-09-17 Thread Prabath Abeysekera
On Fri, Sep 18, 2015 at 9:25 AM, Nuwan Dias  wrote:

> Adding Jo
>
> On Thu, Sep 17, 2015 at 5:27 PM, Harshan Liyanage 
> wrote:
>
>> Hi,
>>
>> We have a requirement to automatically publish APIs when the EMM server
>> starts-up. We need to also add the scopes to APIs when its get published.
>> For that we are calling addAPI method if its a new API or updateAPI method
>> if that API already exists (in APIProvider implementation).
>>
>> This is working fine in the first server start-up. But when I restart the
>> EMM server all the added scopes to an API is lost from related database
>> tables. After analyzing the issue I've found out that the updateScopes
>> method in [1] deletes all existing scopes of an API and then adding the
>> updated scopes to the API using URI templates (api.getUriTemplates()). But
>> in addAPI method, it uses api.getScopes() to add the scope data to the
>> database. If I change the line
>> "addScopes(api.getUriTemplates(),apiId,tenantId);" to
>> "addScopes(api.getScopes(),apiId,tenantId);" this functionality works fine.
>> So is there a specific reason to populate scopes of a updated API using
>> api.getUriTemplates()?
>>
>
Well, IMO, if there's some change introduced to the "resources" as part of
the "update" event, then it might make sense to remove scopes, etc just to
make sure that the changes introduced wouldn't make it possible for people
who are not intended to have access to those, get access to them. If not,
this looks like a bug.


>
>> public void updateScopes(API api, int tenantId) throws
>> APIManagementException {
>>
>> Connection connection = null;
>> PreparedStatement prepStmt = null;
>> int apiId = -1;
>> String deleteScopes = "DELETE FROM IDN_OAUTH2_SCOPE WHERE SCOPE_ID IN (
>> SELECT SCOPE_ID FROM AM_API_SCOPES WHERE API_ID = ? )";
>> try {
>>
>> connection = APIMgtDBUtil.getConnection();
>>
>> connection.setAutoCommit(false);
>>
>> apiId = getAPIID(api.getId(),connection);
>>
>> if (apiId == -1) {
>>
>> //application addition has failed
>>
>> return;
>>
>> }
>>
>> prepStmt = connection.prepareStatement(deleteScopes);
>>
>> prepStmt.setInt(1,apiId);
>>
>> prepStmt.execute();
>>
>> prepStmt.close();
>>
>>
BTW, the above line seems redundant and inappropriate as prepStmt is anyway
closed in the finally block. ;). Also, there seem to be a few formatting
issues as well, which need to be fixed. ;)


> connection.commit();
>>
>> } catch (SQLException e) {
>>
>> handleException("Error while deleting Scopes for API : " +
>> api.getId().toString(), e);
>>
>> } finally {
>>
>> APIMgtDBUtil.closeAllConnections(prepStmt, connection, null);
>>
>> }
>> //addScopes(api.getScopes(),apiId,tenantId);
>> addScopes(api.getUriTemplates(),apiId,tenantId);
>>
>> }
>>
>> [1].
>> https://github.com/wso2/carbon-apimgt/blob/435163dd0f60058d8cfecbb0c4230984f0882fb6/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java
>>
>> Thanks,
>>
>> Harshan Liyanage
>> Software Engineer
>> Mobile: *+94724423048*
>> Email: hars...@wso2.com
>> Blog : http://harshanliyanage.blogspot.com/
>> *WSO2, Inc. :** wso2.com *
>> lean.enterprise.middleware.
>>
>
>
>
> --
> Nuwan Dias
>
> Technical Lead - WSO2, Inc. http://wso2.com
> email : nuw...@wso2.com
> Phone : +94 777 775 729
>


Cheers,
Prabath
-- 
Prabath Abeysekara
Technical Lead
WSO2 Inc.
Email: praba...@wso2.com
Mobile: +94774171471
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Do we have direct way to upload images?

2015-09-17 Thread Sajith Ariyarathna
Hi Nifras,

You can get multiple uploaded-files inside your Jaggery code using
request.getAllFiles() function. e.g.

var files = request.getAllFiles();   // returns  map
for(var name in files) {

if(files.hasOwnProperty(name)) {

var file = files[name];

// do something with file

}

}


Thanks.

On Fri, Sep 18, 2015 at 7:08 AM, NIFRAS ISMAIL 
wrote:

> Hi Sajith,
> Thank you for the guide.
> So we can add multiple files upload from this stream.
>
> Regards.
> *M. Nifras Ismail*
> [image: LinkedIn] 
>
>
>
> On Fri, Sep 18, 2015 at 12:32 AM, Sajith Ariyarathna 
> wrote:
>
>> Hi Nifras,
>>
>> request.getFile("myFile") does not represent a physical file, rather it
>> represent a stream to the uploaded file. Hence you cannot "move" it using
>> .move("...") function. If you want to save the uploaded file, then use
>> the following code snippet.
>>
>> var uploadedFile = request.getFile("myFile");
>> var savedFile = new File("/path/to/save/location/" +
>> uploadedFile.getName());
>> savedFile.open('w');
>> savedFile.write(uploadedFile.getStream());
>> savedFile.close();
>>
>>
>> Thanks.
>>
>> On Thu, Sep 10, 2015 at 2:41 PM, NIFRAS ISMAIL 
>> wrote:
>>
>>> Hi All,
>>> Do we upload images to the server directly using Jaggery JS?
>>> http://stackoverflow.com/a/32497617/2672566
>>>
>>> Regards.
>>> *M. Nifras Ismail*
>>> [image: LinkedIn] 
>>>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Sajith Ariyarathna
>> Software Engineer; WSO2, Inc.;  http://wso2.com/
>> mobile: +94 77 6602284, +94 71 3951048
>>
>
>


-- 
Sajith Ariyarathna
Software Engineer; WSO2, Inc.;  http://wso2.com/
mobile: +94 77 6602284, +94 71 3951048
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [CEP 3.1.0] Syncing failed when becoming a Passive Node for tenant

2015-09-17 Thread Tishan Dahanayakage
Hi Anuruddha,

As discussed offline issue is with window.restoreState((Object[]) data[0]);
line. Underlying window implementation(SchedulerSiddhiQueue) is expecting a
object[] for its restore method and cast its first element
to LinkedBlockingQueue. But we are sending first element itself again after
sending object[] earlier. So having only window.restoreState(data); will
work fine.

Thanks
Tishan

On Thu, Sep 17, 2015 at 11:08 PM, Imesh Gunaratne  wrote:

> On Thu, Sep 17, 2015 at 9:44 AM, Sriskandarajah Suhothayan 
>  wrote:
>
>> have you properly migrated SecondDerivativeFinderWindowProcessor to new
>> siddhi version. the bug is there.
>>
>> I also doubt this, it looks like this error has been raised by the
> following method in SecondDerivativeFinderWindowProcessor:
>
> @Override
> protected void restoreState(Object[] data) {
> window.restoreState(data);
> window.restoreState((Object[]) data[0]);
> oldEventList = ((ArrayList) data[1]);
> newEventList = ((ArrayList) data[2]);
> window.reSchedule();
> }
>
> @Anuruddha: Will us be able to debug this method in the second CEP node
> and see the type of the data object being passed? It would be better if we
> can also get siddhi source code attached.
>
> Other question is do we need to migrate this logic?
>
> On Thu, Sep 17, 2015 at 9:44 AM, Sriskandarajah Suhothayan 
> wrote:
>
>> have you properly migrated SecondDerivativeFinderWindowProcessor to new
>> siddhi version. the bug is there.
>>
>> Suho
>>
>> On Thu, Sep 17, 2015 at 9:32 AM, Anuruddha Liyanarachchi <
>> anurudd...@wso2.com> wrote:
>>
>>> Hi Ramindu,
>>>
>>> Please find the CEP artefacts that is being used [1].
>>> Please note that the node starts first is not throwing any error.
>>>
>>> [1]
>>> https://drive.google.com/a/wso2.com/file/d/0Bw0NgSFZG5YkWUZybUoxbzM0TTg/view?usp=sharing
>>> 
>>>
>>> On Wed, Sep 16, 2015 at 10:34 PM, Sriskandarajah Suhothayan <
>>> s...@wso2.com> wrote:
>>>
 From the logs it looks like its an issue in
 SecondDerivativeFinderWindowProcessor check the getting and restoring the
 state part.

 Suho

 On Wed, Sep 16, 2015 at 10:16 PM, Ramindu De Silva 
 wrote:

> Hi Anuruddha,
>
> Is it possible to send me the artefacts you used for this scenario, so
> that i can reproduce and debug and see whats causing this issue.
>
> Best Regards,
>
> On Wed, Sep 16, 2015 at 7:30 PM, Anuruddha Liyanarachchi <
> anurudd...@wso2.com> wrote:
>
>> Hi,
>>
>> I created CEP HA cluster with Deployment for full-active-active mode
>> as per [1].
>> I am seeing following error when starting the 2nd member.
>> I have also attached execution plan [2].
>>
>> What is causing this issue ?
>>
>> [2015-09-16 13:22:38,191] ERROR - {HAManager}  Syncing failed when
>> becoming a Passive Node for tenant:-1234
>> on:SecondDerivativeOfRequestsInFlightFinder execution plan
>> java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
>> java.util.concurrent.LinkedBlockingQueue
>> at
>> org.wso2.siddhi.core.util.collection.queue.SiddhiQueue.restoreState(SiddhiQueue.java:48)
>> at
>> org.apache.stratos.cep.extension.SecondDerivativeFinderWindowProcessor.restoreState(SecondDerivativeFinderWindowProcessor.java:229)
>> at
>> org.wso2.siddhi.core.query.processor.window.WindowProcessor.restore(WindowProcessor.java:113)
>> at
>> org.wso2.siddhi.core.snapshot.SnapshotService.restore(SnapshotService.java:70)
>> at org.wso2.siddhi.core.SiddhiManager.restore(SiddhiManager.java:443)
>> at
>> org.wso2.carbon.event.processor.core.internal.ha.HAManager.becomePassive(HAManager.java:161)
>> at
>> org.wso2.carbon.event.processor.core.internal.ha.HAManager.tryChangeState(HAManager.java:111)
>> at
>> org.wso2.carbon.event.processor.core.internal.ha.HAManager.init(HAManager.java:97)
>> at
>> org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService.addExecutionPlanConfiguration(CarbonEventProcessorService.java:358)
>> at
>> org.wso2.carbon.event.processor.core.EventProcessorDeployer.processDeploy(EventProcessorDeployer.java:138)
>> at
>> org.wso2.carbon.event.processor.core.internal.util.EventProcessorConfigurationFilesystemInvoker.reload(EventProcessorConfigurationFilesystemInvoker.java:86)
>> at
>> org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService.activateInactiveExecutionPlanConfigurations(CarbonEventProcessorService.java:749)
>> at
>> org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService.notifyServiceAvailability(CarbonEventProcessorService.java:530)
>> at
>> org.wso2.carbon.event.processor.core.internal.ds.EventProcessorServiceDS.setHazelcastInstance(EventProcessorServiceDS.java:102)
>> at sun.reflect.NativeMetho

Re: [Dev] [DEV] [CEP] Integrating ML extension in CEP distributed mode setup

2015-09-17 Thread Manorama Perera
Hi Sashika,

The doc [1] is now updated with the steps to update the storm dependency
jar.

[1]
https://docs.wso2.com/display/CEP400/Predictive+Analytics+with+WSO2+Machine+Learner

Thanks.

On Thu, Sep 17, 2015 at 11:10 PM, Nirmal Fernando  wrote:

> Hi Suho,
>
> Mano started to work on a document on this.
>
> On Thu, Sep 17, 2015 at 11:06 PM, Sriskandarajah Suhothayan  > wrote:
>
>>
>>
>> On Thu, Sep 17, 2015 at 8:55 PM, Sashika Wijesinghe 
>> wrote:
>>
>>> Hi All,
>>>
>>> I want to test how ML extension can be integrated with CEP storm
>>> distributed cluster. So for that I have set up CEP with a manager node and
>>> a worker node. And installed ML features using p2-repository in manager
>>> node. Then deployed an event flow in CEP manager node and send events to
>>> the receiver in worker node. Then I observed " No extension exist for
>>> StreamFunctionExtension{namespace='ml'}  in execution plan
>>> "ExecutionPlanML" in worker node.
>>>
>>
>>> To overcome this issue, I have started worker node without
>>> "-DworkerNode=true" argument and installed ML features in worker node as
>>> well. Then restart the entire cluster (worker started with
>>> -DworkerNode=true) and send events to the worker node. But events are not
>>> logged in worker node (logger publisher is used).
>>>
>>> Further I have tested the same flow in standalone CEP pack according to
>>> the instructions given in [1]
>>> 
>>> , and it works as expected.
>>> [1]
>>> https://docs.wso2.com/display/CEP400/Predictive+Analytics+with+WSO2+Machine+Learner
>>>
>>>
>>> Please help me to clarify below issues
>>>
>>> 1) When we setup a storm distributed cluster and installed a feature in
>>> manager node, isn't there any way of synchronizing that feature details
>>> with worker node rather than installing the same features in worker node?
>>>
>>> No this is not supported in WSO2 Servers, need to install in all nodes.
>>
>>
>>> 2) Even after I installed the feature in worker node I didn't get any
>>> events. What can be the possible reasons for that?
>>>
>>> Since there are no documentation on how to set up the ML extension in
>>> CEP storm distribute cluster , it would be better to update the documents
>>> with relevant details.
>>>
>>> We have to also update the storm dependency jar, @ML forks can you
>> update the docs with the storm story too?
>>
>> Regards
>> Suho
>>
>>
>>> Appreciate your help on this matter.
>>>
>>> Thanks
>>>
>>> --
>>>
>>> *Sashika WijesingheSoftware Engineer - QA Team*
>>> Mobile : +94 (0) 774537487
>>> sash...@wso2.com
>>>
>>
>>
>>
>> --
>>
>> *S. Suhothayan*
>> Technical Lead & Team Lead of WSO2 Complex Event Processor
>> *WSO2 Inc. *http://wso2.com
>> * *
>> lean . enterprise . middleware
>>
>>
>> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
>> http://suhothayan.blogspot.com/ twitter:
>> http://twitter.com/suhothayan  | linked-in:
>> http://lk.linkedin.com/in/suhothayan *
>>
>
>
>
> --
>
> Thanks & regards,
> Nirmal
>
> Team Lead - WSO2 Machine Learner
> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
> Mobile: +94715779733
> Blog: http://nirmalfdo.blogspot.com/
>
>
>


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


Re: [Dev] UpdateScopes method deletes all Scopes of an API when API is updated

2015-09-17 Thread Joseph Fonseka
Hi Harshan

How do you add/update APIs do you use are jaggery APIs or do you invoke
OSGi services. If you are using jaggery APIs can you send the request
payload.



Thanks
Jo



On Fri, Sep 18, 2015 at 9:35 AM, Prabath Abeysekera 
wrote:

>
> On Fri, Sep 18, 2015 at 9:25 AM, Nuwan Dias  wrote:
>
>> Adding Jo
>>
>> On Thu, Sep 17, 2015 at 5:27 PM, Harshan Liyanage 
>> wrote:
>>
>>> Hi,
>>>
>>> We have a requirement to automatically publish APIs when the EMM server
>>> starts-up. We need to also add the scopes to APIs when its get published.
>>> For that we are calling addAPI method if its a new API or updateAPI method
>>> if that API already exists (in APIProvider implementation).
>>>
>>> This is working fine in the first server start-up. But when I restart
>>> the EMM server all the added scopes to an API is lost from related database
>>> tables. After analyzing the issue I've found out that the updateScopes
>>> method in [1] deletes all existing scopes of an API and then adding the
>>> updated scopes to the API using URI templates (api.getUriTemplates()). But
>>> in addAPI method, it uses api.getScopes() to add the scope data to the
>>> database. If I change the line
>>> "addScopes(api.getUriTemplates(),apiId,tenantId);" to
>>> "addScopes(api.getScopes(),apiId,tenantId);" this functionality works fine.
>>> So is there a specific reason to populate scopes of a updated API using
>>> api.getUriTemplates()?
>>>
>>
> Well, IMO, if there's some change introduced to the "resources" as part of
> the "update" event, then it might make sense to remove scopes, etc just to
> make sure that the changes introduced wouldn't make it possible for people
> who are not intended to have access to those, get access to them. If not,
> this looks like a bug.
>
>
>>
>>> public void updateScopes(API api, int tenantId) throws
>>> APIManagementException {
>>>
>>> Connection connection = null;
>>> PreparedStatement prepStmt = null;
>>> int apiId = -1;
>>> String deleteScopes = "DELETE FROM IDN_OAUTH2_SCOPE WHERE SCOPE_ID IN (
>>> SELECT SCOPE_ID FROM AM_API_SCOPES WHERE API_ID = ? )";
>>> try {
>>>
>>> connection = APIMgtDBUtil.getConnection();
>>>
>>> connection.setAutoCommit(false);
>>>
>>> apiId = getAPIID(api.getId(),connection);
>>>
>>> if (apiId == -1) {
>>>
>>> //application addition has failed
>>>
>>> return;
>>>
>>> }
>>>
>>> prepStmt = connection.prepareStatement(deleteScopes);
>>>
>>> prepStmt.setInt(1,apiId);
>>>
>>> prepStmt.execute();
>>>
>>> prepStmt.close();
>>>
>>>
> BTW, the above line seems redundant and inappropriate as prepStmt is
> anyway closed in the finally block. ;). Also, there seem to be a few
> formatting issues as well, which need to be fixed. ;)
>
>
>> connection.commit();
>>>
>>> } catch (SQLException e) {
>>>
>>> handleException("Error while deleting Scopes for API : " +
>>> api.getId().toString(), e);
>>>
>>> } finally {
>>>
>>> APIMgtDBUtil.closeAllConnections(prepStmt, connection, null);
>>>
>>> }
>>> //addScopes(api.getScopes(),apiId,tenantId);
>>> addScopes(api.getUriTemplates(),apiId,tenantId);
>>>
>>> }
>>>
>>> [1].
>>> https://github.com/wso2/carbon-apimgt/blob/435163dd0f60058d8cfecbb0c4230984f0882fb6/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java
>>>
>>> Thanks,
>>>
>>> Harshan Liyanage
>>> Software Engineer
>>> Mobile: *+94724423048*
>>> Email: hars...@wso2.com
>>> Blog : http://harshanliyanage.blogspot.com/
>>> *WSO2, Inc. :** wso2.com *
>>> lean.enterprise.middleware.
>>>
>>
>>
>>
>> --
>> Nuwan Dias
>>
>> Technical Lead - WSO2, Inc. http://wso2.com
>> email : nuw...@wso2.com
>> Phone : +94 777 775 729
>>
>
>
> Cheers,
> Prabath
> --
> Prabath Abeysekara
> Technical Lead
> WSO2 Inc.
> Email: praba...@wso2.com
> Mobile: +94774171471
>



-- 

-- 
*Joseph Fonseka*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 772 512 430
skype: jpfonseka

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


[Dev] [Identity]Remote User Store Giving an Error

2015-09-17 Thread Sachith Punchihewa
Hello Identity Team,

I was trying adding a secondary remote user store and get the following
error when try to access the user management in carbon console.Any
Particular  reason for this behavior ?


*Configuration :*
​
*Error and Logs :*

[2015-09-18 10:15:07,428] ERROR
> {org.wso2.carbon.user.mgt.ui.UserAdminClient} -  The input stream for an
> incoming message is null.
> org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException:
> UserAdminUserAdminException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at java.lang.Class.newInstance(Class.java:383)
> at
> org.wso2.carbon.user.mgt.stub.UserAdminStub.getUserRealmInfo(UserAdminStub.java:2041)
> at
> org.wso2.carbon.user.mgt.ui.UserAdminClient.getUserRealmInfo(UserAdminClient.java:164)
> at org.apache.jsp.userstore.index_jsp._jspService(index_jsp.java:210)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
> at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at
> org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
> at
> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at
> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
> at
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
> at
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
> at
> org.eclipse.equinox.http.servlet.internal.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:37)
> at
> org.eclipse.equinox.http.helper.ContextPathServletAdaptor$RequestDispatcherAdaptor.include(ContextPathServletAdaptor.java:369)
> at
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
> at
> org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:688)
> at
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:682)
> at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.apache.tiles.jsp.context.JspUtil.doInclude(JspUtil.java:87)
> at
> org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:88)
> at
> org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82)
> at
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:465)
> at
> org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:140)
> at
> org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:117)
> at
> org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:171)
> at
> org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:75)
> at
> org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:80)
> at
> org.apache.jsp.admin.layout.template_jsp._jspx_meth_tiles_005finsertAttribute_005f7(template_jsp.java:640)
> at
> org.apache.jsp.admin.layout.template_jsp._jspService(template_jsp.java:356)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at org.

Re: [Dev] UpdateScopes method deletes all Scopes of an API when API is updated

2015-09-17 Thread Harshan Liyanage
Hi Joe,

We are using publishAPI method in [1] to publish APIs. For that we are
populating the API object (org.wso2.carbon.apimgt.api.model) using the
custom parameters defined in web.xml of jax-rs webapp. When constructing
the API object we populate the scopes property with "Scope" objects.

[1].
https://github.com/wso2/carbon-device-mgt/blob/master/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java

Thanks,

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

On Fri, Sep 18, 2015 at 10:53 AM, Joseph Fonseka  wrote:

> Hi Harshan
>
> How do you add/update APIs do you use are jaggery APIs or do you invoke
> OSGi services. If you are using jaggery APIs can you send the request
> payload.
>
>
>
> Thanks
> Jo
>
>
>
> On Fri, Sep 18, 2015 at 9:35 AM, Prabath Abeysekera 
> wrote:
>
>>
>> On Fri, Sep 18, 2015 at 9:25 AM, Nuwan Dias  wrote:
>>
>>> Adding Jo
>>>
>>> On Thu, Sep 17, 2015 at 5:27 PM, Harshan Liyanage 
>>> wrote:
>>>
 Hi,

 We have a requirement to automatically publish APIs when the EMM server
 starts-up. We need to also add the scopes to APIs when its get published.
 For that we are calling addAPI method if its a new API or updateAPI method
 if that API already exists (in APIProvider implementation).

 This is working fine in the first server start-up. But when I restart
 the EMM server all the added scopes to an API is lost from related database
 tables. After analyzing the issue I've found out that the updateScopes
 method in [1] deletes all existing scopes of an API and then adding the
 updated scopes to the API using URI templates (api.getUriTemplates()). But
 in addAPI method, it uses api.getScopes() to add the scope data to the
 database. If I change the line
 "addScopes(api.getUriTemplates(),apiId,tenantId);" to
 "addScopes(api.getScopes(),apiId,tenantId);" this functionality works fine.
 So is there a specific reason to populate scopes of a updated API using
 api.getUriTemplates()?

>>>
>> Well, IMO, if there's some change introduced to the "resources" as part
>> of the "update" event, then it might make sense to remove scopes, etc just
>> to make sure that the changes introduced wouldn't make it possible for
>> people who are not intended to have access to those, get access to them. If
>> not, this looks like a bug.
>>
>>
>>>
 public void updateScopes(API api, int tenantId) throws
 APIManagementException {

 Connection connection = null;
 PreparedStatement prepStmt = null;
 int apiId = -1;
 String deleteScopes = "DELETE FROM IDN_OAUTH2_SCOPE WHERE SCOPE_ID IN (
 SELECT SCOPE_ID FROM AM_API_SCOPES WHERE API_ID = ? )";
 try {

 connection = APIMgtDBUtil.getConnection();

 connection.setAutoCommit(false);

 apiId = getAPIID(api.getId(),connection);

 if (apiId == -1) {

 //application addition has failed

 return;

 }

 prepStmt = connection.prepareStatement(deleteScopes);

 prepStmt.setInt(1,apiId);

 prepStmt.execute();

 prepStmt.close();


>> BTW, the above line seems redundant and inappropriate as prepStmt is
>> anyway closed in the finally block. ;). Also, there seem to be a few
>> formatting issues as well, which need to be fixed. ;)
>>
>>
>>> connection.commit();

 } catch (SQLException e) {

 handleException("Error while deleting Scopes for API : " +
 api.getId().toString(), e);

 } finally {

 APIMgtDBUtil.closeAllConnections(prepStmt, connection, null);

 }
 //addScopes(api.getScopes(),apiId,tenantId);
 addScopes(api.getUriTemplates(),apiId,tenantId);

 }

 [1].
 https://github.com/wso2/carbon-apimgt/blob/435163dd0f60058d8cfecbb0c4230984f0882fb6/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java

 Thanks,

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

>>>
>>>
>>>
>>> --
>>> Nuwan Dias
>>>
>>> Technical Lead - WSO2, Inc. http://wso2.com
>>> email : nuw...@wso2.com
>>> Phone : +94 777 775 729
>>>
>>
>>
>> Cheers,
>> Prabath
>> --
>> Prabath Abeysekara
>> Technical Lead
>> WSO2 Inc.
>> Email: praba...@wso2.com
>> Mobile: +94774171471
>>
>
>
>
> --
>
> --
> *Joseph Fonseka*
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 772 512 430
> skype: jpfonseka
>
> * *
>
>
___
Dev mailing list
Dev@wso2.org
http:

Re: [Dev] Clarifications on CEP

2015-09-17 Thread Chathurika De Silva
Hi Suho

In a multi tenancy environment, with the increment of tenants how does the
supervisor slots behave? As in do they increment with the number of
tenants?

Best Regards
Erandi



On Mon, Sep 14, 2015 at 12:32 PM, Manorama Perera  wrote:

> Yes, this is because ML uses carbon.analytics 1.0.3-SNAPSHOT which
> requires carbon.analytics.common 5.0.2-SNAPSHOT version, but CEP uses
> carbon.analytics.common 5.0.1.
>
> We can change the carbon.analytics.common version to 5.0.1 in ML once DAS
> team do the required version changes in carbon.analytics.
>
> Thanks.
>
> On Mon, Sep 14, 2015 at 11:53 AM, Nirmal Fernando  wrote:
>
>> Thanks Sashika, I think this is due to recent version upgrades.
>>
>> @Mano could you please check?
>>
>> On Mon, Sep 14, 2015 at 11:30 AM, Sashika Wijesinghe 
>> wrote:
>>
>>> Hi Nirmal,
>>>
>>> I tried to install 'Machine learner core' feature in a fresh CEP pack
>>> (13th September Jenkins pack) , but couldn't continue installation due to
>>> below issue.
>>>
>>> Cannot complete the install because of a conflicting dependency.
>>> Software being installed: WSO2 Carbon - Machine Learner Core Feature
>>> 1.0.1.SNAPSHOT (org.wso2.carbon.ml.core.feature.group 1.0.1.SNAPSHOT)
>>> Software currently installed: WSO2 Carbon - Event Publisher Feature 5.0.1
>>> (org.wso2.carbon.event.publisher.feature.group 5.0.1) Only one of the
>>> following can be installed at once: WSO2 Carbon - Event Output Email
>>> Adapter Server Feature 5.0.1
>>> (org.wso2.carbon.event.output.adapter.email.server.feature.jar 5.0.1) WSO2
>>> Carbon - Event Output Email Adapter Server Feature 5.0.2.SNAPSHOT
>>> (org.wso2.carbon.event.output.adapter.email.server.feature.jar
>>> 5.0.2.SNAPSHOT) Cannot satisfy dependency: From: WSO2 Carbon - Event Output
>>> Email Adapter Server Feature 5.0.1
>>> (org.wso2.carbon.event.output.adapter.email.server.feature.group 5.0.1) To:
>>> org.wso2.carbon.event.output.adapter.email.server.feature.jar [5.0.1]
>>> Cannot satisfy dependency: From: WSO2 Carbon - Event Output Email Adapter
>>> Server Feature 5.0.2.SNAPSHOT
>>> (org.wso2.carbon.event.output.adapter.email.server.feature.group
>>> 5.0.2.SNAPSHOT) To:
>>> org.wso2.carbon.event.output.adapter.email.server.feature.jar
>>> [5.0.2.SNAPSHOT] Cannot satisfy dependency: From: WSO2 Carbon - Event
>>> Publisher Output Adapter Feature 5.0.1
>>> (org.wso2.carbon.event.output.adapter.feature.group 5.0.1) To:
>>> org.wso2.carbon.event.output.adapter.email.server.feature.group [5.0.1]
>>> Cannot satisfy dependency: From: WSO2 Carbon - Event Publisher Feature
>>> 5.0.1 (org.wso2.carbon.event.publisher.feature.group 5.0.1) To:
>>> org.wso2.carbon.event.output.adapter.feature.group [5.0.1] Cannot satisfy
>>> dependency: From: WSO2 Carbon - Machine Learner Core Feature 1.0.1.SNAPSHOT
>>> (org.wso2.carbon.ml.core.feature.group 1.0.1.SNAPSHOT) To:
>>> org.wso2.carbon.event.output.adapter.email.server.feature.group
>>> [5.0.2.SNAPSHOT,5.1.0)
>>>
>>> Appreciate your help on this matter.
>>>
>>> Thanks.
>>>
>>> On Mon, Sep 14, 2015 at 10:02 AM, Nirmal Fernando 
>>> wrote:
>>>
 Shared the ML p2-repo with Sashika.

 On Sun, Sep 13, 2015 at 10:40 PM, Shavantha Weerasinghe <
 shavan...@wso2.com> wrote:

> Hi Sashika
>
> I got the p2 from lasantha last week will share tomorrow
> On Sep 12, 2015 10:24 PM, "Sashika Wijesinghe" 
> wrote:
>
>> Hi All,
>>
>> May I know the location to download P2 repository to add ML features
>> for CEP?
>>
>> Thanks
>>
>> On Wed, Sep 9, 2015 at 12:02 PM, Sashika Wijesinghe > > wrote:
>>
>>> Hi Lasantha,
>>>
>>> Thanks for the clarification.
>>>
>>> In the documentation it has mentioned that '-DworkerNode=true"
>>> argument will deactivate the UI bundle, So I thought there should not be
>>> any UI component when a user tried to access to the worker node.
>>> And I felt its good if we are not enabling the login page. because
>>> when I tried to login to the CEP using worker node I got '*login
>>> failed*' error message.
>>>
>>> Thanks & Regards,
>>>
>>> On Wed, Sep 9, 2015 at 11:21 AM, Lasantha Fernando <
>>> lasan...@wso2.com> wrote:
>>>
 Hi Sashika,

 Yes that is the usual behaviour for WSO2 servers when started with
 worker node true. The login page will be visible, but you won't be 
 allowed
 to login.

 Thanks,

 On 9 September 2015 at 11:16, Sashika Wijesinghe 
 wrote:

> Hi Suho/Lasantha,
>
> I'm working on CEP distributed mode set up. When a worker node is
> started using "-DworkerNode=true" argument, I expected that UI of the
> worker node should not be visible. However CEP login page is visible 
> when
> started with -DworkerNode=true argument, but can't access to CEP, 
> because
> login functionality is not