[Dev] Error in wso2 apim 2.1.0 kubernetes deployment in google container engine

2017-09-27 Thread Ayeshmantha Perera
Hi all,

As mentioned in the kubernetes artifacts deployment documentation [1] we
have built the base image and deployed k8 artifacts with the pattern 1.
Although artifacts got deployed without an error at deployment time, and
the analytics dashboard is accessible via :
https://wso2apim-analytics/carbon  the API manager is not working as
expected.
When going through the logs in wso2-apim-worker and wso2-api-manager-worker
pods, we can see below error:

[2017-09-28 06:21:53,224] FATAL - ServiceBusInitializer Couldn't initialize
the ESB...
org.apache.synapse.SynapseException: The synapse.xml location
././repository/deployment/server/synapse-configs/default doesn't exist
at
org.apache.synapse.SynapseControllerFactory.handleFatal(SynapseControllerFactory.java:121)
at
org.apache.synapse.SynapseControllerFactory.validatePath(SynapseControllerFactory.java:113)
at
org.apache.synapse.SynapseControllerFactory.validate(SynapseControllerFactory.java:88)
at
org.apache.synapse.SynapseControllerFactory.createSynapseController(SynapseControllerFactory.java:44)
at org.apache.synapse.ServerManager.init(ServerManager.java:103)
at
org.wso2.carbon.mediation.initializer.ServiceBusInitializer.initESB(ServiceBusInitializer.java:451)
at
org.wso2.carbon.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:196)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)

We also ran the apim-kubernetes:2.1.0 docker image in the deployed VM
instance, and it starts up without above error, so we think this is
something related to the kubernetes artifacts.

Appreciate if someone can help us to resolve this deployment issue.

Regards,
Ayeshmantha

[1] https://github.com/wso2/kubernetes-apim/tree/v2.1.0-1
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Updates on Android for work - COSU mode

2017-09-27 Thread Imesh Chandrasiri
Hi Dakshika,

Sure, will do the needful.

On Thu, Sep 28, 2017 at 9:22 AM, Dakshika Jayathilaka 
wrote:

> @imesh: Can you arrange a UX review for this?
>
> Regards,
>
> *Dakshika Jayathilaka*
> PMC Member & Committer of Apache Stratos
> Associate Technical Lead
> WSO2, Inc.
> lean.enterprise.middleware
> 0771100911
>
> On Sat, Sep 23, 2017 at 9:13 AM, Lahiru Madushanka 
> wrote:
>
>> Hi all,
>>
>> As per now following operation are working in COSU mode
>>
>> 1) Install new application
>> 2) Ring
>> 3) Device Lock
>> 4) Location
>> 5) Clear Password
>> 6) Mute
>> 7) Message
>> 8) Change lock code
>> 9) Wipe data
>>
>> However *Device lock* and *change lock code* operations are not used
>> since device not get locked in COSU mode. We can forcefully unpin the agent
>> app , lock the device and check whether those operations are applied.
>>
>>- There was a bug causing agent app to unpin unexpectedly, which is
>>fixed now.
>>- New icon added to indicate a new kiosk app is being installed.
>>Which disappears after installation completed.
>>- We add an indicator icon to show when device is plugged since there
>>wasn't any indicator to show that.
>>- Operations which spawn new activities ( Ring and Message ) are
>>changed (only for COSU mode ) now since we cannot spawn new activities
>>without unpinning the Agent app. So new they are shown in dialogs instead
>>of new activities.
>>
>> Next steps :-
>>
>>- Implementing special operations like change brightness , volume
>>- User story review to again verify the changes suggested in the
>>previous review.
>>- UI review + update
>>
>> Please find the attached screenshots
>>
>> Thanks
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "WSO2 IoT Team Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to iot-group+unsubscr...@wso2.com.
>> For more options, visit https://groups.google.com/a/wso2.com/d/optout.
>>
>
>


-- 
*Thanks and Best Regards,*
Imesh Ashandimal Chandrasiri
*Software Engineer*
WSO2, Inc.
lean . enterprise . middleware
*E:* ime...@wso2.com | *P:* 0716519187


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


Re: [Dev] How to catch an error from the REST Task in the BPMN

2017-09-27 Thread Manorama Perera
Hi Thomas,

When a failure occurs in a REST task, a BPMN error with error code
"RestInvokeError" will be thrown.
This error can be caught using an Error Boundary Event associated with the
REST service task.

You can find an example of using this in the article[1].

[1] http://wso2.com/library/articles/2016/04/article-how-
to-model-bpmn-business-processes-with-wso2-business-process-server/

Thanks,
Manorama.

On Wed, Sep 27, 2017 at 8:04 PM, Thomas LEGRAND <
thomas.legr...@versusmind.eu> wrote:

> Hello there,
>
> I would like to catch an error from the REST task in my process. Actually,
> my distant web service returns a 404 with an empty body if no result was
> found. If something was found, I map an element from the returned JSON into
> a variable and that works.
>
> In the case of my 404, I have a NPE and I would like to catch it to be
> able to continue the process but I don't know how to do because the
> ErrorBoundaryEvent I attached does not work at all.
>
> Can you help me, please?
>
> Regards,
>
> Thomas
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


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


Re: [Dev] How to catch an error from the REST Task in the BPMN

2017-09-27 Thread Sudharma Subasinghe
Hi Thomas,

You can add ErrorBoundaryEvent with error code as* "RestInvokeError"*.
Please refer [1] as an example.

[1]
http://wso2.com/library/articles/2016/04/article-how-to-model-bpmn-business-processes-with-wso2-business-process-server/#error

Thanks
Sudharma

On Wed, Sep 27, 2017 at 8:04 PM, Thomas LEGRAND <
thomas.legr...@versusmind.eu> wrote:

> Hello there,
>
> I would like to catch an error from the REST task in my process. Actually,
> my distant web service returns a 404 with an empty body if no result was
> found. If something was found, I map an element from the returned JSON into
> a variable and that works.
>
> In the case of my 404, I have a NPE and I would like to catch it to be
> able to continue the process but I don't know how to do because the
> ErrorBoundaryEvent I attached does not work at all.
>
> Can you help me, please?
>
> Regards,
>
> Thomas
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Sudharma Subasinghe,
Software Engineer,
WSO2 Inc.
Email: sudhar...@wso2.com 
Mobile : +94 710 565 157 <%2B94%20718%20210%20200>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Updates on Android for work - COSU mode

2017-09-27 Thread Dakshika Jayathilaka
@imesh: Can you arrange a UX review for this?

Regards,

*Dakshika Jayathilaka*
PMC Member & Committer of Apache Stratos
Associate Technical Lead
WSO2, Inc.
lean.enterprise.middleware
0771100911

On Sat, Sep 23, 2017 at 9:13 AM, Lahiru Madushanka 
wrote:

> Hi all,
>
> As per now following operation are working in COSU mode
>
> 1) Install new application
> 2) Ring
> 3) Device Lock
> 4) Location
> 5) Clear Password
> 6) Mute
> 7) Message
> 8) Change lock code
> 9) Wipe data
>
> However *Device lock* and *change lock code* operations are not used
> since device not get locked in COSU mode. We can forcefully unpin the agent
> app , lock the device and check whether those operations are applied.
>
>- There was a bug causing agent app to unpin unexpectedly, which is
>fixed now.
>- New icon added to indicate a new kiosk app is being installed. Which
>disappears after installation completed.
>- We add an indicator icon to show when device is plugged since there
>wasn't any indicator to show that.
>- Operations which spawn new activities ( Ring and Message ) are
>changed (only for COSU mode ) now since we cannot spawn new activities
>without unpinning the Agent app. So new they are shown in dialogs instead
>of new activities.
>
> Next steps :-
>
>- Implementing special operations like change brightness , volume
>- User story review to again verify the changes suggested in the
>previous review.
>- UI review + update
>
> Please find the attached screenshots
>
> Thanks
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "WSO2 IoT Team Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to iot-group+unsubscr...@wso2.com.
> For more options, visit https://groups.google.com/a/wso2.com/d/optout.
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How to catch an error from the REST Task in the BPMN

2017-09-27 Thread Thomas LEGRAND
Hello there,

I would like to catch an error from the REST task in my process. Actually,
my distant web service returns a 404 with an empty body if no result was
found. If something was found, I map an element from the returned JSON into
a variable and that works.

In the case of my 404, I have a NPE and I would like to catch it to be able
to continue the process but I don't know how to do because the
ErrorBoundaryEvent I attached does not work at all.

Can you help me, please?

Regards,

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


Re: [Dev] [Siddhi] non-matched or expired events in pattern query

2017-09-27 Thread Gobinath
Hi,

If you can use Siddhi 4 snapshot release, it can be done using the new
feature 'Absent Pattern' added to Siddhi 4. The query to detect the events
that do not match the condition within 10 seconds is given below:

from every e1=publisher -> not subscriber[e1.pid == pid] for 10 sec
select e1.pid
insert into not_completed_jobs_in_time;

The above query waits for 10 seconds from the arrival of every publisher
event and if there is no subscriber event with an id satisfying the
condition arrived within that waiting period, the id of the publisher event
will be inserted into the not_completed_jobs_in_time stream.

I guess the official document for Siddhi 4 is under construction. So you
can find more details about absent pattern at [1]

Still, Siddhi 4 is not production ready so I wonder whether you can use
this feature or not.

[1]
http://www.javahelps.com/2017/08/detect-absence-of-events-wso2-siddhi.html




On Tue, Sep 26, 2017 at 10:05 PM, Jayesh Senjaliya 
wrote:

> Hi Grainier,
>
> ya, i came across that example page, but i think that does not work in my
> use-case which is as follow.
>
> i have a publish event followed by multiple subscribe event for the same
> publish job.
> now i want to catch if certain jobs (publish -> subscribe) has been
> finished with 10 sec.
> I have all the registered jobs in db table, which i use to gather all the
> required publish-subscribe job events.
>
> define table jobTable( pid string, sid string);
> define stream pubStream (pid int, status string);
> define stream subStream (pid int, sid int, status string);
>
> -- this will get all the publish-> subscribe jobs events as master list
> from pubStream as p join jobTable as t
> on p.pid == t.pid
> select p.pid, t.sid insert into allPSJobs;
>
> -- this is where i need to do intersection where if subStream event is
> seen within 2 sec then remove that from master list ( allPSJobs ) if not
> include that in not_completed_jobs_in_time
>
> from every ( a=allPSJobs ) -> s= subStream[sid == a.sid and pid==a.pid ]
> within 2 sec
> select s.pid, s.sid insert into completed_jobs_in_time;
>
>
> hope that make sense from what i am trying to do.
>
> Thanks
> Jayesh
>
>
>
>
>
>
>
>
>
>
>
> On Mon, Sep 25, 2017 at 8:39 AM, Grainier Perera 
> wrote:
>
>> Hi Jay,
>>
>> You can try something similar to this to get non-matched events during
>> last 10 secs; You can find some documentation on this as well; link
>> 
>>
>>
>>
>>> define stream publisher (pid string, time string);
>>> define stream subscriber (pid string, sid string, time string);
>>
>>
>>> from publisher#window.time(10 sec)
>>> select *
>>> insert expired events into expired_publisher;
>>
>>
>>> from every pub=publisher -> sub=subscriber[pub.pid == pid] or
>>> exp=expired_publisher[pub.pid == pid]
>>> select pub.pid as pid, pub.time as time, sub.pid as subPid
>>> insert into filter_stream;
>>
>>
>>> from filter_stream [(subPid is null)]
>>> select pid, time
>>> insert into not_seen_in_last_10_sec_events;
>>
>>
>> Moreover, I didn't get what you meant by "also is there a way to perform
>> intersection of events based on grouping or time window ?" can you please
>> elaborate on this?
>>
>> Regards,
>>
>> On Mon, Sep 25, 2017 at 11:02 AM, Jayesh Senjaliya 
>> wrote:
>>
>>> Hi,
>>>
>>> is there a way to get events that didnt match within the given time
>>> frame.
>>>
>>> for example:
>>>
>>> define stream publisher (pid string, time string);
>>> define stream subscriber (pid string, sid string, time string);
>>>
>>> from every (e1=publisher) -> e2=subscriber[e1.pid == pid]
>>> within 10 sec
>>> select e1.pid, e2.sid
>>> insert into seen_in_last_10_sec_events;
>>>
>>>
>>> so if i have matching event above, i will see it in
>>> seen_in_last_10_sec_events, but is there a way to get all events or non
>>> matched events during that last 10 seconds from publisher or subscriber ?
>>>
>>> also is there a way to perform intersection of events based on grouping
>>> or time window ?
>>>
>>>
>>> Thanks
>>> Jay
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Grainier Perera
>> Senior Software Engineer
>> Mobile : +94716122384 <+94%2071%20612%202384>
>> WSO2 Inc. | http://wso2.com
>> lean.enterprise.middleware
>>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Gobinath** Loganathan*
Graduate Student,
Electrical and Computer Engineering,
Western University.
Email  : slgobin...@gmail.com
Blog: javahelps.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Custom authentication error message in APIM

2017-09-27 Thread vivekkumar
auth_handler.xml
  

Here is attached file. After this getting deployed. I am still getting
following response 

{
"fault": {
"code": 900901,
"message": "Invalid Credentials",
"description": "Access failure for API: /fps/v1, version: v1 status:
(900901) - Invalid Credentials. Make sure you have given the correct access
token"
}
}



--
Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Development-f3.html
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 Carbon Kernel 5.2.0 Released !!!

2017-09-27 Thread Thusitha Thilina Dayaratne
*WSO2 Carbon Kernel 5.2.0 - Released !!!*


We are pleased to announce the release of WSO2 Carbon Kernel 5.2.0. The
source and tag location for this release are available here
.

WSO2 Carbon Kernel 5.2.0 is the core of the next-generation WSO2 Carbon
platform. We have completely rearchitected Carbon Kernel from the ground up
with the latest technologies and patterns. Additionally, the Carbon Kernel
is now a lightweight, general-purpose OSGi runtime specializing in hosting
servers, providing key functionality for server developers. The result is a
streamlined and even more powerful middleware platform than ever before.

This release of the WSO2 Carbon Kernel includes the following key features. For
further details please see the documentation
.


Key Features

   - Java 8 Support
   - Carbon Component Startup Order Resolver
   - Carbon Tools - Jar To Bundle Converter and Dropins Installer
   - Equipped with Eclipse Luna SR2 OSGi Framework
   - Dropins Support for OSGi Ready Bundles
   - Carbon Launcher
   - Centralized Logging Framework with Log4j 2.0 as the Backend
   - Pluggable Runtime Management
   - OSGi Test Framework
   - Audit Log Mechanism
   - JMX support
   - Carbon Context API
   - Centralized Config Management

*Known Issues*

   - WSO2 Carbon Kernel 5.2.0 - Known Issues
   

How To Contribute

You can find more instructions on how to contribute on our documentation

site.

If you have any suggestions or are interested in Carbon Kernel 5.2.0
discussions, you can join the dev@wso2.org or architect...@wso2.org mailing
lists.
Reporting Issues

We encourage you to report issues, documentation errors regarding WSO2
Carbon Kernel 5.2.0 through the public issue tracking system
.


Thanks,

WSO2 Platform Team
-- 
Thusitha Dayaratne
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

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

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