[Dev] [DEV][Patch Automation][APIM] How to retrieve a perticualt log from a Class using LogViewerClient?

2015-10-08 Thread Abimaran Kugathasan
Hi,

I want to get a log from a perticular class. I have used LogViewerClient.
Please check my below code snaps.

I need to get the below log.

[2015-10-08 12:35:38,966]  WARN - TimeoutHandler Expiring message ID :
> urn:uuid:354104e6-eea7-41fd-88c7-de19d0b5a27f; dropping message after
> timeout of : 10 seconds



// Initialized the client

LogViewerClient logViewerClient = new
LogViewerClient(amServer.getBackEndUrl(),
amServer.getSessionCookie());

// Calling it with parameters

LogEvent[] timeoutLogs = logViewerClient.getLogs("WARN",
"TimeoutHandler", "", "AM");

This returns empty array.


I could get the system logs through below method.

LogEvent[] logEvents = logViewerClient.getAllSystemLogs();


How can I get above mention log?


-- 

Thanks
Abimaran Kugathasan

Software Engineer | WSO2 Inc
Data & APIs Technologies Team
Mobile : +94 773922820


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


[Dev] [C5] Product materialize issue after upgrading OSGi bundles to equinox-SDK-Mars.1

2015-10-08 Thread Aruna Karunarathna
Hi all,

I tried to upgrade the OSGi bundles of the C5 to the latest version and
getting the following error [1]. Seems like the signed algorithm is not
found by the eclipse plugin.

Any insights regarding this issue?..


[1].
[INFO] Command line:
/bin/sh -c cd
/home/aruna/wso2/development/github/carbon-kernel/distribution &&
/home/aruna/software/java/jdk1.8.0_20/jre/bin/java -jar
/home/aruna/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110725-1610.jar
-nosplash -application org.eclipse.equinox.p2.publisher.ProductPublisher
-metadataRepository
file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/p2-repo
-artifactRepository
file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/p2-repo
-productFile
/home/aruna/wso2/development/github/carbon-kernel/distribution/carbon.product
-executables
/home/aruna/wso2/development/github/carbon-kernel/distribution/target/org.eclipse.equinox.executable_3.5.0.v20110530-7P7NFUFFLWUl76mart
-publishArtifacts -configs gtk.linux.x86 -flavor tooling -append
Generating metadata for ..
Generation completed with success [0 seconds].
[INFO]
[INFO] --- carbon-p2-plugin:1.5.4:materialize-product (materialize-product)
@ wso2carbon-kernel ---
[INFO] Command line:
/bin/sh -c cd
/home/aruna/wso2/development/github/carbon-kernel/distribution &&
/home/aruna/software/java/jdk1.8.0_20/jre/bin/java -jar
/home/aruna/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110725-1610.jar
-nosplash -application org.eclipse.equinox.p2.director -metadataRepository
file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/p2-repo
-artifactRepository
file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/p2-repo
-installIU carbon.product.id -profileProperties
org.eclipse.update.install.features=true -profile profile/default
-bundlepool
file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/WSO2Carbon
-shared
file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/WSO2Carbon/p2
-destination
file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/WSO2Carbon/profile/default
-p2.os linux -p2.ws gtk -p2.arch x86 -roaming
Installing carbon.product.id 5.0.0.SNAPSHOT.
Installation failed.
An error occurred while collecting items to be installed
 session context was:(profile=profile/default,
phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=,
action=).
 Problems downloading artifact:
osgi.bundle,org.eclipse.osgi,3.10.101.v20150820-1432.
  Error reading signed content:/tmp/signatureFile3272465265474111050.jar
*Caused by:   java.security.NoSuchAlgorithmException: An error occurred
while processing the signatures for the file:
/tmp/signatureFile3272465265474111050.jar*
*Caused by:   java.security.NoSuchAlgorithmException: No algorithm found
for 2.16.840.1.101.3.4.2.1*
Application failed, log file location:
/home/aruna/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/configuration/1444286315504.log

[INFO]

[INFO] Reactor Summary:
[INFO]
[INFO] WSO2 Carbon Kernel - Parent Pom ... SUCCESS
[3:43.305s]
[INFO] WSO2 Carbon Kernel - Launcher . SUCCESS
[1:36.482s]
[INFO] WSO2 Carbon Kernel - Core . SUCCESS [34.145s]
[INFO] WSO2 Carbon Kernel - Transport  SUCCESS [44.071s]
[INFO] WSO2 Carbon Kernel - Features Parent .. SUCCESS [1.057s]
[INFO] WSO2 Carbon Kernel - Carbon Server Feature  SUCCESS [47.714s]
[INFO] WSO2 Carbon Kernel - Carbon Runtime Feature ... SUCCESS [52.441s]
[INFO] WSO2 Carbon Kernel - Distribution . FAILURE [27.403s]
[INFO]

[INFO] BUILD FAILURE
[INFO]



-- 

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


[Dev] [DEV][ESB][Connector] Issue with empty response

2015-10-08 Thread Jay
Hi All,

When i developing ESB connector for Microsoft PowerBI there is a  method
which returning empty response with the Content-Type:
application/octet-stream. And it is throwing following exception. I have
tried with following message formatters/builders and none of them are
working properly and giving the same exception.






--- Synapse configuration -

http://ws.apache.org/ns/synapse";>
   
   
   
   
  
  
  
  
 
{
"rows":$1
}
 
 

 
  
  
 

 
  
  
  
  
  
  
  
  
  
   


 Wire log 

[2015-10-08 13:29:41,525] DEBUG - headers http-outgoing-4 << HTTP/1.1 200 OK
[2015-10-08 13:29:41,525] DEBUG - headers http-outgoing-4 << Cache-Control:
no-store, must-revalidate, no-cache
[2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 << Content-Length:
0
[2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 << Content-Type:
application/octet-stream
[2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 <<
Content-Encoding: gzip
[2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 << Server:
Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
[2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 <<
Strict-Transport-Security: max-age=31536000; includeSubDoma
ins
[2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 <<
X-Frame-Options: deny
[2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 <<
X-Content-Type-Options: nosniff
[2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 << RequestId:
bdd8f6ca-fc26-43d3-8943-2e3a08b276e1
[2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 << Date: Thu, 08
Oct 2015 07:59:40 GMT
[2015-10-08 13:29:41,532] ERROR - RelayUtils Error while building
Passthrough stream
java.io.EOFException
at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:264)
at
java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:254)
at
java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:163)
at java.util.zip.GZIPInputStream.(GZIPInputStream.java:78)
at java.util.zip.GZIPInputStream.(GZIPInputStream.java:90)
at
org.apache.axis2.transport.http.HTTPTransportUtils.handleGZip(HTTPTransportUtils.java:257)
at
org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:95)

at
org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133)
at
org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
at
org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:154)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:252)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironme
nt.java:655)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:242)
at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:500)
at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:243)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[2015-10-08 13:29:41,536] ERROR - TemplateMediator Error while building
message
org.apache.axis2.AxisFault: Error while building Passthrough stream
at
org.apache.synapse.transport.passthru.util.RelayUtils.handleException(RelayUtils.java:283)
at
org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:142)
at
org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
at
org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:154)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:252)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironme
nt.java:655)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:242)
at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.j

Re: [Dev] Sending custom responses in automation test

2015-10-08 Thread Senduran Balasubramaniyam
Hi Nuwan,

Thank you,
I verified the scenario by creating a mock response in mocky.io, So I was
under impression of creating the service in remote server. didn't really
think of a axis2 service or another mock proxy.

Thanks again,
Senduran

On Wed, Oct 7, 2015 at 11:11 AM, Nuwan Wimalasekara  wrote:

> Hi Senduran,
>
> You can simply create another proxy service or API to send the empty body
> response with 202 status code. if not you can create a axis2 service which
> return the response as you expected and deploy it on ESB or axis2 server.
>
> Thanks,
> Nuwanw
>
> On Wed, Oct 7, 2015 at 10:20 AM, Senduran Balasubramaniyam <
> sendu...@wso2.com> wrote:
>
>> Hi Krishantha,
>>
>> Following are the steps I followed to verify the scenario.
>>
>>- Created a mock service to respond with status code 202, empty body
>>with content-type text/html
>>- Invoked the service from ESB and added a log full after calling the
>>endpoint
>>
>> since there is a content type available ESB will try to build the message
>> but since the message body is empty it will throw an exception
>>
>> Thanks
>> Senduran
>>
>> On Wed, Oct 7, 2015 at 10:11 AM, Krishantha Samaraweera <
>> krishan...@wso2.com> wrote:
>>
>>> Hi Senduran,
>>>
>>> Can you list the steps that you have followed to verify the scenario
>>> manually.
>>>
>>> Thanks,
>>> Krishantha.
>>>
>>> On Tue, Oct 6, 2015 at 10:05 AM, Senduran Balasubramaniyam <
>>> sendu...@wso2.com> wrote:
>>>
 Hi Krishantha,

 I need to write a test for ESB where my proxy service should receive
 some custom responses.
 For example
 Empty body with status code 202 and content type text/html.
 Could you please guide me to do this

 Thank you
 Senduran

 --
 *Senduran *
 Software Engineer,
 WSO2, Inc.;  http://wso2.com/ 
 Mobile: +94 77 952 6548

>>>
>>>
>>>
>>> --
>>> Krishantha Samaraweera
>>> Senior Technical Lead - Test Automation
>>> Mobile: +94 77 7759918
>>> WSO2, Inc.; http://wso2.com/
>>> lean . enterprise . middleware.
>>>
>>
>>
>>
>> --
>> *Senduran *
>> Software Engineer,
>> WSO2, Inc.;  http://wso2.com/ 
>> Mobile: +94 77 952 6548
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Nuwan Wimalasekara
> Senior Software Engineer - Test Automation
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> phone: +94 71 668 4620
>
>
>
>


-- 
*Senduran *
Software Engineer,
WSO2, Inc.;  http://wso2.com/ 
Mobile: +94 77 952 6548
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][ESB][Connector] Issue with empty response

2015-10-08 Thread Malaka Silva
Hi,

Can you please share the wire logs.

On Thu, Oct 8, 2015 at 1:00 PM, Jay  wrote:

> Hi All,
>
> When i developing ESB connector for Microsoft PowerBI there is a  method
> which returning empty response with the Content-Type:
> application/octet-stream. And it is throwing following exception. I have
> tried with following message formatters/builders and none of them are
> working properly and giving the same exception.
> class="org.apache.axis2.format.BinaryBuilder"/>
>  class="org.apache.axis2.format.BinaryFormatter"/>
>
> class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
> 
> class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
>
> --- Synapse configuration -
>
> http://ws.apache.org/ns/synapse";>
>
> />
>
>
>   
>   
>   
>   
>  
> {
> "rows":$1
> }
>  
>  
> 
>  
>   
>   
>  
> 
> uri-template="{+uri.var.apiUrl}/datasets/{+uri.var.datasetId}/tables/{+uri.var.tableName}/rows"
> />
>  
>   
>/>
>
>   
>scope="transport" />
>   
>scope="transport" />
>   
>   
>
> 
>
>  Wire log 
>
> [2015-10-08 13:29:41,525] DEBUG - headers http-outgoing-4 << HTTP/1.1 200
> OK
> [2015-10-08 13:29:41,525] DEBUG - headers http-outgoing-4 << Cache-Control:
> no-store, must-revalidate, no-cache
> [2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 <<
> Content-Length:
> 0
> [2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 << Content-Type:
> application/octet-stream
> [2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 <<
> Content-Encoding: gzip
> [2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 << Server:
> Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
> [2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 <<
> Strict-Transport-Security: max-age=31536000; includeSubDoma
> ins
> [2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 <<
> X-Frame-Options: deny
> [2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 <<
> X-Content-Type-Options: nosniff
> [2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 << RequestId:
> bdd8f6ca-fc26-43d3-8943-2e3a08b276e1
> [2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 << Date: Thu, 08
> Oct 2015 07:59:40 GMT
> [2015-10-08 13:29:41,532] ERROR - RelayUtils Error while building
> Passthrough stream
> java.io.EOFException
> at
> java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:264)
> at
> java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:254)
> at
> java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:163)
> at java.util.zip.GZIPInputStream.(GZIPInputStream.java:78)
> at java.util.zip.GZIPInputStream.(GZIPInputStream.java:90)
> at
>
> org.apache.axis2.transport.http.HTTPTransportUtils.handleGZip(HTTPTransportUtils.java:257)
> at
>
> org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:95)
>
> at
>
> org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133)
> at
>
> org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
> at
>
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
> at
>
> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:154)
> at
>
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:252)
> at
>
> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironme
> nt.java:655)
> at
>
> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:242)
> at
>
> org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:500)
> at
>
> org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
> at
>
> org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:243)
> at
>
> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
> at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:744)
> [2015-10-08 13:29:41,536] ERROR - TemplateMediator Error while building
> message
> org.apache.axis2.AxisFault: Error while building Passthrough stream
> at
>
> org.apache.synapse.transport.passthru.util.RelayUtils.handleException(RelayUtils.java:283)
> at
>
> org.apache.synapse.transport.passthru.ut

Re: [Dev] [DEV][ESB][Connector] Issue with empty response

2015-10-08 Thread Rajjaz Mohammed
Hi,
can you upload your axis.xml file also becasue its seems to be like a
problem in message builder/formatter.

On Thu, Oct 8, 2015 at 2:18 PM, Malaka Silva  wrote:

> Hi,
>
> Can you please share the wire logs.
>
> On Thu, Oct 8, 2015 at 1:00 PM, Jay  wrote:
>
>> Hi All,
>>
>> When i developing ESB connector for Microsoft PowerBI there is a  method
>> which returning empty response with the Content-Type:
>> application/octet-stream. And it is throwing following exception. I have
>> tried with following message formatters/builders and none of them are
>> working properly and giving the same exception.
>> >class="org.apache.axis2.format.BinaryBuilder"/>
>> > class="org.apache.axis2.format.BinaryFormatter"/>
>>
>> >class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
>> >
>> class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
>>
>> --- Synapse configuration -
>>
>> http://ws.apache.org/ns/synapse";>
>>> />
>>> />
>>
>>
>>   
>>   
>>   
>>   
>>  
>> {
>> "rows":$1
>> }
>>  
>>  
>> 
>>  
>>   
>>   
>>  
>> >
>> uri-template="{+uri.var.apiUrl}/datasets/{+uri.var.datasetId}/tables/{+uri.var.tableName}/rows"
>> />
>>  
>>   
>>   > />
>>
>>   
>>   > scope="transport" />
>>   
>>   > scope="transport" />
>>   
>>   
>>
>> 
>>
>>  Wire log 
>>
>> [2015-10-08 13:29:41,525] DEBUG - headers http-outgoing-4 << HTTP/1.1 200
>> OK
>> [2015-10-08 13:29:41,525] DEBUG - headers http-outgoing-4 <<
>> Cache-Control:
>> no-store, must-revalidate, no-cache
>> [2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 <<
>> Content-Length:
>> 0
>> [2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 << Content-Type:
>> application/octet-stream
>> [2015-10-08 13:29:41,526] DEBUG - headers http-outgoing-4 <<
>> Content-Encoding: gzip
>> [2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 << Server:
>> Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
>> [2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 <<
>> Strict-Transport-Security: max-age=31536000; includeSubDoma
>> ins
>> [2015-10-08 13:29:41,527] DEBUG - headers http-outgoing-4 <<
>> X-Frame-Options: deny
>> [2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 <<
>> X-Content-Type-Options: nosniff
>> [2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 << RequestId:
>> bdd8f6ca-fc26-43d3-8943-2e3a08b276e1
>> [2015-10-08 13:29:41,528] DEBUG - headers http-outgoing-4 << Date: Thu, 08
>> Oct 2015 07:59:40 GMT
>> [2015-10-08 13:29:41,532] ERROR - RelayUtils Error while building
>> Passthrough stream
>> java.io.EOFException
>> at
>> java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:264)
>> at
>> java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:254)
>> at
>> java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:163)
>> at java.util.zip.GZIPInputStream.(GZIPInputStream.java:78)
>> at java.util.zip.GZIPInputStream.(GZIPInputStream.java:90)
>> at
>>
>> org.apache.axis2.transport.http.HTTPTransportUtils.handleGZip(HTTPTransportUtils.java:257)
>> at
>>
>> org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:95)
>>
>> at
>>
>> org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133)
>> at
>>
>> org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
>> at
>>
>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
>> at
>>
>> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:154)
>> at
>>
>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:252)
>> at
>>
>> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironme
>> nt.java:655)
>> at
>>
>> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:242)
>> at
>>
>> org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:500)
>> at
>>
>> org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>> at
>>
>> org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:243)
>> at
>>
>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
>> at
>>
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> at
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>> at java.lang.Thread.run(Thread

[Dev] Clarification on User Account locking in IS 5.1.0

2015-10-08 Thread Chalitha Waldeniyage
Hi Isura,

Can you please tell me,  what is the expected behavior of  setting the
"Authentication.Policy.Account.Lock.Time" property to zero.

Thanks,
Chalitha.

-- 
*Chalitha Maheshwari*
Software Engineer-QA,
WSO2 Inc.

*E-mail:* chali...@wso2.com
*Mobile: *+94710 411 112
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][Patch Automation][APIM] How to retrieve a perticualt log from a Class using LogViewerClient?

2015-10-08 Thread Abimaran Kugathasan
Any updates on this?

On Thu, Oct 8, 2015 at 12:51 PM, Abimaran Kugathasan 
wrote:

> Hi,
>
> I want to get a log from a perticular class. I have used LogViewerClient.
> Please check my below code snaps.
>
> I need to get the below log.
>
> [2015-10-08 12:35:38,966]  WARN - TimeoutHandler Expiring message ID :
>> urn:uuid:354104e6-eea7-41fd-88c7-de19d0b5a27f; dropping message after
>> timeout of : 10 seconds
>
>
>
> // Initialized the client
>
> LogViewerClient logViewerClient = new 
> LogViewerClient(amServer.getBackEndUrl(), amServer.getSessionCookie());
>
> // Calling it with parameters
>
> LogEvent[] timeoutLogs = logViewerClient.getLogs("WARN", "TimeoutHandler", 
> "", "AM");
>
> This returns empty array.
>
>
> I could get the system logs through below method.
>
> LogEvent[] logEvents = logViewerClient.getAllSystemLogs();
>
>
> How can I get above mention log?
>
>
> --
>
> Thanks
> Abimaran Kugathasan
>
> Software Engineer | WSO2 Inc
> Data & APIs Technologies Team
> Mobile : +94 773922820
>
> 
> 
>   
> 
>
>


-- 
Thanks
Abimaran Kugathasan

Software Engineer | WSO2 Inc
Data & APIs Technologies Team
Mobile : +94 773922820


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


Re: [Dev] [C5] Product materialize issue after upgrading OSGi bundles to equinox-SDK-Mars.1

2015-10-08 Thread Kishanthan Thangarajah
Could be that tycho-equinox uses an old version of the osgi runtime which
does not support these algorithms. We may have to update our p2-plugin to
use the latest tycho-equinox dependency and see.

On Thu, Oct 8, 2015 at 1:18 PM, Aruna Karunarathna  wrote:

> Hi all,
>
> I tried to upgrade the OSGi bundles of the C5 to the latest version and
> getting the following error [1]. Seems like the signed algorithm is not
> found by the eclipse plugin.
>
> Any insights regarding this issue?..
>
>
> [1].
> [INFO] Command line:
> /bin/sh -c cd
> /home/aruna/wso2/development/github/carbon-kernel/distribution &&
> /home/aruna/software/java/jdk1.8.0_20/jre/bin/java -jar
> /home/aruna/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110725-1610.jar
> -nosplash -application org.eclipse.equinox.p2.publisher.ProductPublisher
> -metadataRepository
> file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/p2-repo
> -artifactRepository
> file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/p2-repo
> -productFile
> /home/aruna/wso2/development/github/carbon-kernel/distribution/carbon.product
> -executables
> /home/aruna/wso2/development/github/carbon-kernel/distribution/target/org.eclipse.equinox.executable_3.5.0.v20110530-7P7NFUFFLWUl76mart
> -publishArtifacts -configs gtk.linux.x86 -flavor tooling -append
> Generating metadata for ..
> Generation completed with success [0 seconds].
> [INFO]
> [INFO] --- carbon-p2-plugin:1.5.4:materialize-product
> (materialize-product) @ wso2carbon-kernel ---
> [INFO] Command line:
> /bin/sh -c cd
> /home/aruna/wso2/development/github/carbon-kernel/distribution &&
> /home/aruna/software/java/jdk1.8.0_20/jre/bin/java -jar
> /home/aruna/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110725-1610.jar
> -nosplash -application org.eclipse.equinox.p2.director -metadataRepository
> file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/p2-repo
> -artifactRepository
> file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/p2-repo
> -installIU carbon.product.id -profileProperties
> org.eclipse.update.install.features=true -profile profile/default
> -bundlepool
> file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/WSO2Carbon
> -shared
> file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/WSO2Carbon/p2
> -destination
> file:/home/aruna/wso2/development/github/carbon-kernel/distribution/target/WSO2Carbon/profile/default
> -p2.os linux -p2.ws gtk -p2.arch x86 -roaming
> Installing carbon.product.id 5.0.0.SNAPSHOT.
> Installation failed.
> An error occurred while collecting items to be installed
>  session context was:(profile=profile/default,
> phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=,
> action=).
>  Problems downloading artifact:
> osgi.bundle,org.eclipse.osgi,3.10.101.v20150820-1432.
>   Error reading signed content:/tmp/signatureFile3272465265474111050.jar
> *Caused by:   java.security.NoSuchAlgorithmException: An error occurred
> while processing the signatures for the file:
> /tmp/signatureFile3272465265474111050.jar*
> *Caused by:   java.security.NoSuchAlgorithmException: No algorithm found
> for 2.16.840.1.101.3.4.2.1*
> Application failed, log file location:
> /home/aruna/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/configuration/1444286315504.log
>
> [INFO]
> 
> [INFO] Reactor Summary:
> [INFO]
> [INFO] WSO2 Carbon Kernel - Parent Pom ... SUCCESS
> [3:43.305s]
> [INFO] WSO2 Carbon Kernel - Launcher . SUCCESS
> [1:36.482s]
> [INFO] WSO2 Carbon Kernel - Core . SUCCESS
> [34.145s]
> [INFO] WSO2 Carbon Kernel - Transport  SUCCESS
> [44.071s]
> [INFO] WSO2 Carbon Kernel - Features Parent .. SUCCESS [1.057s]
> [INFO] WSO2 Carbon Kernel - Carbon Server Feature  SUCCESS
> [47.714s]
> [INFO] WSO2 Carbon Kernel - Carbon Runtime Feature ... SUCCESS
> [52.441s]
> [INFO] WSO2 Carbon Kernel - Distribution . FAILURE
> [27.403s]
> [INFO]
> 
> [INFO] BUILD FAILURE
> [INFO]
> 
>
>
> --
>
> *Aruna Sujith Karunarathna *| Software Engineer
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 9040362 | Work: +94 112145345
> Email: ar...@wso2.com | Web: www.wso2.com
>
>



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

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

[Dev] Carbon Cache Listners

2015-10-08 Thread Godwin Amila Shrimal
Hi

I need to write a cache listener to listen add/remove operations to
particular cache. Is there existing implementation for this which I can
refer ?


Thanks
Godwin

-- 
*Godwin Amila Shrimal*
Senior Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *http://lnkd.in/KUum6D *
twitter: https://twitter.com/godwinamila
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Carbon Cache Listners

2015-10-08 Thread Afkham Azeez
Yes, I can remember that someone wrote one. Can you go through the mail
archives?

On Thu, Oct 8, 2015 at 3:10 PM, Godwin Amila Shrimal 
wrote:

> Hi
>
> I need to write a cache listener to listen add/remove operations to
> particular cache. Is there existing implementation for this which I can
> refer ?
>
>
> Thanks
> Godwin
>
> --
> *Godwin Amila Shrimal*
> Senior Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *http://lnkd.in/KUum6D *
> twitter: https://twitter.com/godwinamila
>



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

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

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

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


[Dev] How to set Database Properties in Carbon Datasources

2015-10-08 Thread Isuru Perera
Hi,

With Carbon Metrics, I need to save some "double" values in the database.
Sometimes the Oracle JDBC Driver throws "Underflow" exceptions [1] when
trying to set a double to a prepared statement.

To solve that issue, I changed the database columns to "BINARY_DOUBLE
"
[2] and I want to set the property "SetFloatAndDoubleUseBinary" to true.

I tested this with a standalone app with Tomcat JDBC and it works.

import org.apache.tomcat.jdbc.pool.DataSource;
import org.apache.tomcat.jdbc.pool.PoolProperties;
...

PoolProperties p = new PoolProperties();
p.setUrl("jdbc:oracle:thin:@localhost:1521/metrics");
p.setDriverClassName("oracle.jdbc.OracleDriver");
p.setUsername("USER");
p.setPassword("PASSWD");

DataSource datasource = new DataSource();
datasource.setPoolProperties(p);


*Properties properties = new
Properties();properties.setProperty("SetFloatAndDoubleUseBinary",
"true");p.setDbProperties(properties);*

I thought there is a way to set these kinds of properties in
*-datasources.xml file. However I don't see a way to do that in
configuration [3].

I don't want to change the double values and I want to save it directly in
the database. How do we fix this?

Thanks!

Best Regards,

[1] https://wso2.org/jira/browse/MB-1271
[2]
https://docs.oracle.com/cd/E11882_01/timesten.112/e21642/types.htm#BABIGDEA
[3]
https://github.com/wso2/carbon-kernel/blob/v4.4.1/core/org.wso2.carbon.ndatasource.rdbms/src/main/java/org/wso2/carbon/ndatasource/rdbms/RDBMSConfiguration.java
-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

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


Re: [Dev] Carbon Cache Listners

2015-10-08 Thread Godwin Amila Shrimal
Hi,

Found an implementation in [1]

[1]
https://github.com/wso2/carbon-identity/blob/master/components/entitlement/org.wso2.carbon.identity.entitlement/src/main/java/org/wso2/carbon/identity/entitlement/cache/PolicyCacheUpdateListener.java

Thanks
Godwin



On Thu, Oct 8, 2015 at 3:23 PM, Afkham Azeez  wrote:

> Yes, I can remember that someone wrote one. Can you go through the mail
> archives?
>
> On Thu, Oct 8, 2015 at 3:10 PM, Godwin Amila Shrimal 
> wrote:
>
>> Hi
>>
>> I need to write a cache listener to listen add/remove operations to
>> particular cache. Is there existing implementation for this which I can
>> refer ?
>>
>>
>> Thanks
>> Godwin
>>
>> --
>> *Godwin Amila Shrimal*
>> Senior Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94772264165*
>> linkedin: *http://lnkd.in/KUum6D *
>> twitter: https://twitter.com/godwinamila
>>
>
>
>
> --
> *Afkham Azeez*
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * *
> *email: **az...@wso2.com* 
> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
> *http://blog.afkham.org* 
> *twitter: **http://twitter.com/afkham_azeez*
> 
> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
> *
>
> *Lean . Enterprise . Middleware*
>



-- 
*Godwin Amila Shrimal*
Senior Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *http://lnkd.in/KUum6D *
twitter: https://twitter.com/godwinamila
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [DEV][Automation] - How to automate the Drag-Drop Action in Test-case Using selenium

2015-10-08 Thread Rajeenthini Satkunam
Hi All,

I am currently working on writing UI test-cases using selenium for
Dashboard Server(DS)/User Engagement Server.I have a test Case which needs
to do a action that drag one element to a place and drop it in that
place(drag and drop).So I have tried the below approach to do this task.

public void testAddGadgetToDashboard() throws Exception {
webElement = getDriver().findElement(By.id(dashboardTitle));
webElement.findElement(By.cssSelector("a[href=\"dashboards/" +
dashboardTitle + "?editor=true\"]")).click();
WebElement draggable = getDriver().findElement(By.id("g1"));
WebElement to = getDriver().findElement(By.id("a"));
Actions builder = new Actions(getDriver());
Action dragAndDrop = builder.clickAndHold(draggable)
.moveToElement(to)
.release(to)
.build();
dragAndDrop.perform();

}

But I am getting an exception when running the test-case,

FAILED: testAddGadgetToDashboard
Adding gadgets to existing dashboard from dashboard server
java.lang.ClassCastException: org.wso2.ues.ui.integration.util.UESWebDriver
cannot be cast to org.openqa.selenium.interactions.HasInputDevices
at org.openqa.selenium.interactions.Actions.(Actions.java:41)
at
org.wso2.ues.ui.integration.test.dashboard.AddgadgetToDashboardtest.testAddGadgetToDashboard(AddgadgetToDashboardtest.java:86)
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:601)
at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:177)
at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at
org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:105)
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:601)
at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)

Can anyone please advice me on how this has gone wrong and Is selenium
version or Firefox version are depends on this error thrown?

Note: I am using Firefox version 27 and selenium version is automation
selenium version.
-- 

*Thank You.*

*Rajeenthini Satkunam*

*Associate Software Engineer | WSO2*


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

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


Re: [Dev] [DEV][ESB][Connector] Issue with empty response

2015-10-08 Thread Jay
Hi,

I have attached both axis configuration and wire log here with.

axis2.xml
  
log.txt   

Thanks,
Janaka



--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/DEV-ESB-Connector-Issue-with-empty-response-tp126711p126724.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 Developer Studio 3.8.0 RC 2

2015-10-08 Thread Awanthika Senarath
Hi all,

I have tested the basic functionalities related to :

*Basic Functionalities :*


   - ESB projects
   - DSS projects
   - Registry Resource projects
   - Carbon servers (remote/local) instances
   - Capp deployment/Redeployment with changes in ESB project
   - AppFactory/ Cloud perspectives
   - Maven Car deploy plugin


*New Features Added :*


   - Publisher/Foreach new mediator addition, Custom class mediator
   - Artifact Renaming
   - War file Deployment/Exploded web apps/ Automatic updating(hot
   deployment)
   - APIM perspective- artifact creation/deletion/renaming redeployment
   with changes
   - Carbon 4.4.0 based servers


All functionalities are functioning satisfactorily and have no blockers
were observed on testing, +1

Regards
Awanthika Senarath
Software Engineer, WSO2 Inc.
Mobile: +94717681791
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] (ESBJAVA-3183) Could it affect the endpoints defined in two different APIs

2015-10-08 Thread Pamod Sylvester
Hi ESB Team,

Based on the fix provided for [1] it seems that the issue was due to the,

getAddress() method processing from the address instance variable in the
EndpointDefinition ?

Could this also affect if multiple APIs are being invoked in parallel.
Which points to the same named endpoint. i.e

if API 1 and API 2 calls the same dynamic http endpoint EP_1, is there a
possibility where the (API 2 ) calls being duplicated and API 1 call uri
would not resolve ? AFAIU since EndpointDefinition is global to Synapse
environment rather than the context this could affect ?

[1] https://wso2.org/jira/browse/ESBJAVA-3183

Thanks,
Pamod

-- 
*Pamod Sylvester *

*WSO2 Inc.; http://wso2.com *
cell: +94 77 7779495
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 Developer Studio 3.8.0 RC 2

2015-10-08 Thread Susinda Perera
I have tested following Areas.

All inbound endpoints
All registry resources
Fixes given from 3.8.0 3.8.0-Rc and RC1



On Thu, Oct 8, 2015 at 4:43 PM, Awanthika Senarath 
wrote:

> Hi all,
>
> I have tested the basic functionalities related to :
>
> *Basic Functionalities :*
>
>
>- ESB projects
>- DSS projects
>- Registry Resource projects
>- Carbon servers (remote/local) instances
>- Capp deployment/Redeployment with changes in ESB project
>- AppFactory/ Cloud perspectives
>- Maven Car deploy plugin
>
>
> *New Features Added :*
>
>
>- Publisher/Foreach new mediator addition, Custom class mediator
>- Artifact Renaming
>- War file Deployment/Exploded web apps/ Automatic updating(hot
>deployment)
>- APIM perspective- artifact creation/deletion/renaming redeployment
>with changes
>- Carbon 4.4.0 based servers
>
>
> All functionalities are functioning satisfactorily and have no blockers
> were observed on testing, +1
>
> Regards
> Awanthika Senarath
> Software Engineer, WSO2 Inc.
> Mobile: +94717681791
>



-- 
*Susinda Perera*
Software Engineer
B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
Mobile:(+94)716049075
Blog: susinda.blogspot.com
WSO2 Inc. http://wso2.com/
Tel : 94 11 214 5345 Fax :94 11 2145300
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][Patch Automation][APIM] How to retrieve a perticualt log from a Class using LogViewerClient?

2015-10-08 Thread Waruna Perera
Hi,

Do you use in time delay in between get all logs? Please provide the full
code block. Some times in our test cases we use time out delays to get
logs.

Thanks,

Waruna

On Thu, Oct 8, 2015 at 3:08 PM, Abimaran Kugathasan 
wrote:

> Any updates on this?
>
> On Thu, Oct 8, 2015 at 12:51 PM, Abimaran Kugathasan 
> wrote:
>
>> Hi,
>>
>> I want to get a log from a perticular class. I have used LogViewerClient.
>> Please check my below code snaps.
>>
>> I need to get the below log.
>>
>> [2015-10-08 12:35:38,966]  WARN - TimeoutHandler Expiring message ID :
>>> urn:uuid:354104e6-eea7-41fd-88c7-de19d0b5a27f; dropping message after
>>> timeout of : 10 seconds
>>
>>
>>
>> // Initialized the client
>>
>> LogViewerClient logViewerClient = new 
>> LogViewerClient(amServer.getBackEndUrl(), amServer.getSessionCookie());
>>
>> // Calling it with parameters
>>
>> LogEvent[] timeoutLogs = logViewerClient.getLogs("WARN", "TimeoutHandler", 
>> "", "AM");
>>
>> This returns empty array.
>>
>>
>> I could get the system logs through below method.
>>
>> LogEvent[] logEvents = logViewerClient.getAllSystemLogs();
>>
>>
>> How can I get above mention log?
>>
>>
>> --
>>
>> Thanks
>> Abimaran Kugathasan
>>
>> Software Engineer | WSO2 Inc
>> Data & APIs Technologies Team
>> Mobile : +94 773922820
>>
>> 
>> 
>>   
>> 
>>
>>
>
>
> --
> Thanks
> Abimaran Kugathasan
>
> Software Engineer | WSO2 Inc
> Data & APIs Technologies Team
> Mobile : +94 773922820
>
> 
> 
>   
> 
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Waruna Perera
Senior Software Engineer - Test Automation
Mobile: +94 77 3867037
WSO2, Inc.; http://wso2.com/
lean . enterprise . middlewear.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][Automation] - How to automate the Drag-Drop Action in Test-case Using selenium

2015-10-08 Thread Madusanka Premaratne
Hi Rajinthini,
It seems like you have to change the test case. Did you record the test
case using selenium plugin? The best approach is write is yourself in this
kind of scenarios. You can refer to the links[1] and [2] to get an idea.
[1] -
http://stackoverflow.com/questions/14210051/how-to-automate-drag-drop-functionality-using-selenium-web-driver
[2] - http://www.toolsqa.com/selenium-webdriver/drag-drop/

Thanks,
Madusanka

On Thu, Oct 8, 2015 at 3:48 PM, Rajeenthini Satkunam 
wrote:

> Hi All,
>
> I am currently working on writing UI test-cases using selenium for
> Dashboard Server(DS)/User Engagement Server.I have a test Case which needs
> to do a action that drag one element to a place and drop it in that
> place(drag and drop).So I have tried the below approach to do this task.
>
> public void testAddGadgetToDashboard() throws Exception {
> webElement = getDriver().findElement(By.id(dashboardTitle));
> webElement.findElement(By.cssSelector("a[href=\"dashboards/" + 
> dashboardTitle + "?editor=true\"]")).click();
> WebElement draggable = getDriver().findElement(By.id("g1"));
> WebElement to = getDriver().findElement(By.id("a"));
> Actions builder = new Actions(getDriver());
> Action dragAndDrop = builder.clickAndHold(draggable)
> .moveToElement(to)
> .release(to)
> .build();
> dragAndDrop.perform();
>
> }
>
> But I am getting an exception when running the test-case,
>
> FAILED: testAddGadgetToDashboard
> Adding gadgets to existing dashboard from dashboard server
> java.lang.ClassCastException:
> org.wso2.ues.ui.integration.util.UESWebDriver cannot be cast to
> org.openqa.selenium.interactions.HasInputDevices
> at org.openqa.selenium.interactions.Actions.(Actions.java:41)
> at
> org.wso2.ues.ui.integration.test.dashboard.AddgadgetToDashboardtest.testAddGadgetToDashboard(AddgadgetToDashboardtest.java:86)
> 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:601)
> at
> org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
> at
> org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
> at org.testng.SuiteRunner.run(SuiteRunner.java:240)
> at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
> at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
> at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
> at org.testng.TestNG.run(TestNG.java:1057)
> at
> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:177)
> at
> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
> at
> org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:105)
> 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:601)
> at
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
> at
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
> at
> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
> at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
>
> Can anyone please advice me on how this has gone wrong and Is selenium
> version or Firefox version are depends on this error thrown?
>
> Note: I am using Firefox version 27 and selenium version is automation
> selenium version.
> --
>
> *Thank You.*
>
> *Rajeenthini Satkunam*
>
> *Associate Software Engineer | WSO2*
>
>
> *E:rajeenth...@wso2.com *
>
> *M :+94770832823 <%2B94770832823>   *
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Madusanka Premaratne* | Associate Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Pa

Re: [Dev] [DEV][Patch Automation][APIM] How to retrieve a perticualt log from a Class using LogViewerClient?

2015-10-08 Thread Abimaran Kugathasan
Hi Waruna,

Thanks for the reply.

No, I didn't use time delay. I have attached the class.

On Thu, Oct 8, 2015 at 4:53 PM, Waruna Perera  wrote:

> Hi,
>
> Do you use in time delay in between get all logs? Please provide the full
> code block. Some times in our test cases we use time out delays to get
> logs.
>
> Thanks,
>
> Waruna
>
> On Thu, Oct 8, 2015 at 3:08 PM, Abimaran Kugathasan 
> wrote:
>
>> Any updates on this?
>>
>> On Thu, Oct 8, 2015 at 12:51 PM, Abimaran Kugathasan 
>> wrote:
>>
>>> Hi,
>>>
>>> I want to get a log from a perticular class. I have
>>> used LogViewerClient. Please check my below code snaps.
>>>
>>> I need to get the below log.
>>>
>>> [2015-10-08 12:35:38,966]  WARN - TimeoutHandler Expiring message ID :
 urn:uuid:354104e6-eea7-41fd-88c7-de19d0b5a27f; dropping message after
 timeout of : 10 seconds
>>>
>>>
>>>
>>> // Initialized the client
>>>
>>> LogViewerClient logViewerClient = new 
>>> LogViewerClient(amServer.getBackEndUrl(), amServer.getSessionCookie());
>>>
>>> // Calling it with parameters
>>>
>>> LogEvent[] timeoutLogs = logViewerClient.getLogs("WARN", "TimeoutHandler", 
>>> "", "AM");
>>>
>>> This returns empty array.
>>>
>>>
>>> I could get the system logs through below method.
>>>
>>> LogEvent[] logEvents = logViewerClient.getAllSystemLogs();
>>>
>>>
>>> How can I get above mention log?
>>>
>>>
>>> --
>>>
>>> Thanks
>>> Abimaran Kugathasan
>>>
>>> Software Engineer | WSO2 Inc
>>> Data & APIs Technologies Team
>>> Mobile : +94 773922820
>>>
>>> 
>>> 
>>>   
>>> 
>>>
>>>
>>
>>
>> --
>> Thanks
>> Abimaran Kugathasan
>>
>> Software Engineer | WSO2 Inc
>> Data & APIs Technologies Team
>> Mobile : +94 773922820
>>
>> 
>> 
>>   
>> 
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Waruna Perera
> Senior Software Engineer - Test Automation
> Mobile: +94 77 3867037
> WSO2, Inc.; http://wso2.com/
> lean . enterprise . middlewear.
>



-- 
Thanks
Abimaran Kugathasan

Software Engineer | WSO2 Inc
Data & APIs Technologies Team
Mobile : +94 773922820


  
  
package org.wso2.carbon.am.tests;



import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.wso2.carbon.automation.api.clients.logging.LogViewerClient;
import org.wso2.carbon.automation.api.clients.logging.LoggingAdminClient;
import org.wso2.carbon.automation.api.clients.webapp.mgt.WebAppAdminClient;
import org.wso2.carbon.automation.core.ProductConstant;
import org.wso2.carbon.automation.core.utils.UserInfo;
import org.wso2.carbon.automation.core.utils.UserListCsvReader;
import org.wso2.carbon.automation.core.utils.frameworkutils.FrameworkFactory;
import org.wso2.carbon.automation.core.utils.frameworkutils.FrameworkProperties;
import org.wso2.carbon.automation.utils.as.WebApplicationDeploymentUtil;
import org.wso2.carbon.logging.view.stub.types.carbon.LogEvent;

import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

import java.net.HttpURLConnection;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;


public class ESBJAVA3530TimeoutHandlerLogMessageTestCase extends APIManagerIntegrationTestBase  {

private LogViewerClient logViewerClient;

@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();

logViewerClient = new LogViewerClient(amServer.getBackEndUrl(), amServer.getSessionCookie());
}

public void deployArrService(String backEndUrl, String sessionCookie, String serviceFilePath) throws  Exception {

WebAppAdminClient webAppAdminClient = new WebAppAdminClient(backEndUrl, sessionCookie);
webAppAdminClient.warFileUplaoder(serviceFilePath);

WebApplicationDeploymentUtil.isWebApplicationDeployed(backEndUrl, sessionCookie, "CxfRestService-1.0.0-SNAPSHOT");

}

@Test(groups = {"wso2.am"}, description = "test endpoint deployment from car file")
public void testBackendTimeoutLog() throws Exception  {
String filePath = ProductConstant.getResourceLocations(ProductConstant.AM_SERVER_NAM

Re: [Dev] [VOTE] Release WSO2 Developer Studio 3.8.0 RC 2

2015-10-08 Thread Susinda Perera
Issues found when testing inbound endpoints is listed below
https://wso2.org/jira/browse/TOOLS-3243
https://wso2.org/jira/browse/TOOLS-3244


On Thu, Oct 8, 2015 at 4:51 PM, Susinda Perera  wrote:

> I have tested following Areas.
>
> All inbound endpoints
> All registry resources
> Fixes given from 3.8.0 3.8.0-Rc and RC1
>
>
>
> On Thu, Oct 8, 2015 at 4:43 PM, Awanthika Senarath 
> wrote:
>
>> Hi all,
>>
>> I have tested the basic functionalities related to :
>>
>> *Basic Functionalities :*
>>
>>
>>- ESB projects
>>- DSS projects
>>- Registry Resource projects
>>- Carbon servers (remote/local) instances
>>- Capp deployment/Redeployment with changes in ESB project
>>- AppFactory/ Cloud perspectives
>>- Maven Car deploy plugin
>>
>>
>> *New Features Added :*
>>
>>
>>- Publisher/Foreach new mediator addition, Custom class mediator
>>- Artifact Renaming
>>- War file Deployment/Exploded web apps/ Automatic updating(hot
>>deployment)
>>- APIM perspective- artifact creation/deletion/renaming redeployment
>>with changes
>>- Carbon 4.4.0 based servers
>>
>>
>> All functionalities are functioning satisfactorily and have no blockers
>> were observed on testing, +1
>>
>> Regards
>> Awanthika Senarath
>> Software Engineer, WSO2 Inc.
>> Mobile: +94717681791
>>
>
>
>
> --
> *Susinda Perera*
> Software Engineer
> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
> Mobile:(+94)716049075
> Blog: susinda.blogspot.com
> WSO2 Inc. http://wso2.com/
> Tel : 94 11 214 5345 Fax :94 11 2145300
>
>


-- 
*Susinda Perera*
Software Engineer
B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
Mobile:(+94)716049075
Blog: susinda.blogspot.com
WSO2 Inc. http://wso2.com/
Tel : 94 11 214 5345 Fax :94 11 2145300
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Is there a way to know about sso-idp-config for publisher?

2015-10-08 Thread Lakshman Udayakantha
Hi,

I want to insert store url in governance center publisher. store url is in
sso-idp-config.xml file that can be in separate server rather than
publisher in a distributed setup. in that case how to read store url from
that config file?

Thanks

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


Re: [Dev] [DEV][Patch Automation][APIM] How to retrieve a perticualt log from a Class using LogViewerClient?

2015-10-08 Thread Waruna Perera
Hi,

getLogs is deprecated now. Can you use getRemoteLogs and see the result?

https://github.com/wso2/carbon-platform-integration-utils/blob/94f80cd6e2352ac832c40d572562407c3963ee0f/common-admin-clients/src/main/java/org/wso2/carbon/integration/common/admin/client/LogViewerClient.java

On Thu, Oct 8, 2015 at 4:58 PM, Abimaran Kugathasan 
wrote:

> Hi Waruna,
>
> Thanks for the reply.
>
> No, I didn't use time delay. I have attached the class.
>
> On Thu, Oct 8, 2015 at 4:53 PM, Waruna Perera  wrote:
>
>> Hi,
>>
>> Do you use in time delay in between get all logs? Please provide the full
>> code block. Some times in our test cases we use time out delays to get
>> logs.
>>
>> Thanks,
>>
>> Waruna
>>
>> On Thu, Oct 8, 2015 at 3:08 PM, Abimaran Kugathasan 
>> wrote:
>>
>>> Any updates on this?
>>>
>>> On Thu, Oct 8, 2015 at 12:51 PM, Abimaran Kugathasan 
>>> wrote:
>>>
 Hi,

 I want to get a log from a perticular class. I have
 used LogViewerClient. Please check my below code snaps.

 I need to get the below log.

 [2015-10-08 12:35:38,966]  WARN - TimeoutHandler Expiring message ID :
> urn:uuid:354104e6-eea7-41fd-88c7-de19d0b5a27f; dropping message after
> timeout of : 10 seconds



 // Initialized the client

 LogViewerClient logViewerClient = new 
 LogViewerClient(amServer.getBackEndUrl(), amServer.getSessionCookie());

 // Calling it with parameters

 LogEvent[] timeoutLogs = logViewerClient.getLogs("WARN", "TimeoutHandler", 
 "", "AM");

 This returns empty array.


 I could get the system logs through below method.

 LogEvent[] logEvents = logViewerClient.getAllSystemLogs();


 How can I get above mention log?


 --

 Thanks
 Abimaran Kugathasan

 Software Engineer | WSO2 Inc
 Data & APIs Technologies Team
 Mobile : +94 773922820

 
 
   
 


>>>
>>>
>>> --
>>> Thanks
>>> Abimaran Kugathasan
>>>
>>> Software Engineer | WSO2 Inc
>>> Data & APIs Technologies Team
>>> Mobile : +94 773922820
>>>
>>> 
>>> 
>>>   
>>> 
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Waruna Perera
>> Senior Software Engineer - Test Automation
>> Mobile: +94 77 3867037
>> WSO2, Inc.; http://wso2.com/
>> lean . enterprise . middlewear.
>>
>
>
>
> --
> Thanks
> Abimaran Kugathasan
>
> Software Engineer | WSO2 Inc
> Data & APIs Technologies Team
> Mobile : +94 773922820
>
> 
> 
>   
> 
>
>


-- 
Waruna Perera
Senior Software Engineer - Test Automation
Mobile: +94 77 3867037
WSO2, Inc.; http://wso2.com/
lean . enterprise . middlewear.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][Patch Automation][APIM] How to retrieve a perticualt log from a Class using LogViewerClient?

2015-10-08 Thread Abimaran Kugathasan
HI Waruna,

This is for APIM 1.6.0 which uses automation framewotk version 4.2.1.

LogViewerClient has these below methods only in that version.

getLogs(String logType, String searchKey, String domain, String serverKey),
getServiceNames(),
getAllSystemLogs(),
clearLogs()


On Thu, Oct 8, 2015 at 5:15 PM, Waruna Perera  wrote:

> Hi,
>
> getLogs is deprecated now. Can you use getRemoteLogs and see the result?
>
>
> https://github.com/wso2/carbon-platform-integration-utils/blob/94f80cd6e2352ac832c40d572562407c3963ee0f/common-admin-clients/src/main/java/org/wso2/carbon/integration/common/admin/client/LogViewerClient.java
>
> On Thu, Oct 8, 2015 at 4:58 PM, Abimaran Kugathasan 
> wrote:
>
>> Hi Waruna,
>>
>> Thanks for the reply.
>>
>> No, I didn't use time delay. I have attached the class.
>>
>> On Thu, Oct 8, 2015 at 4:53 PM, Waruna Perera  wrote:
>>
>>> Hi,
>>>
>>> Do you use in time delay in between get all logs? Please provide the
>>> full code block. Some times in our test cases we use time out delays to get
>>> logs.
>>>
>>> Thanks,
>>>
>>> Waruna
>>>
>>> On Thu, Oct 8, 2015 at 3:08 PM, Abimaran Kugathasan 
>>> wrote:
>>>
 Any updates on this?

 On Thu, Oct 8, 2015 at 12:51 PM, Abimaran Kugathasan >>> > wrote:

> Hi,
>
> I want to get a log from a perticular class. I have
> used LogViewerClient. Please check my below code snaps.
>
> I need to get the below log.
>
> [2015-10-08 12:35:38,966]  WARN - TimeoutHandler Expiring message ID :
>> urn:uuid:354104e6-eea7-41fd-88c7-de19d0b5a27f; dropping message after
>> timeout of : 10 seconds
>
>
>
> // Initialized the client
>
> LogViewerClient logViewerClient = new 
> LogViewerClient(amServer.getBackEndUrl(), amServer.getSessionCookie());
>
> // Calling it with parameters
>
> LogEvent[] timeoutLogs = logViewerClient.getLogs("WARN", 
> "TimeoutHandler", "", "AM");
>
> This returns empty array.
>
>
> I could get the system logs through below method.
>
> LogEvent[] logEvents = logViewerClient.getAllSystemLogs();
>
>
> How can I get above mention log?
>
>
> --
>
> Thanks
> Abimaran Kugathasan
>
> Software Engineer | WSO2 Inc
> Data & APIs Technologies Team
> Mobile : +94 773922820
>
> 
> 
>   
> 
>
>


 --
 Thanks
 Abimaran Kugathasan

 Software Engineer | WSO2 Inc
 Data & APIs Technologies Team
 Mobile : +94 773922820

 
 
   
 


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


>>>
>>>
>>> --
>>> Waruna Perera
>>> Senior Software Engineer - Test Automation
>>> Mobile: +94 77 3867037
>>> WSO2, Inc.; http://wso2.com/
>>> lean . enterprise . middlewear.
>>>
>>
>>
>>
>> --
>> Thanks
>> Abimaran Kugathasan
>>
>> Software Engineer | WSO2 Inc
>> Data & APIs Technologies Team
>> Mobile : +94 773922820
>>
>> 
>> 
>>   
>> 
>>
>>
>
>
> --
> Waruna Perera
> Senior Software Engineer - Test Automation
> Mobile: +94 77 3867037
> WSO2, Inc.; http://wso2.com/
> lean . enterprise . middlewear.
>



-- 
Thanks
Abimaran Kugathasan

Software Engineer | WSO2 Inc
Data & APIs Technologies Team
Mobile : +94 773922820


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


Re: [Dev] Clarification on User Account locking in IS 5.1.0

2015-10-08 Thread Isura Karunaratne
Hi Chalitha,

Account should not unlock until admin unlocks

Thanks
Isura
On Oct 8, 2015 3:08 PM, "Chalitha Waldeniyage"  wrote:

> Hi Isura,
>
> Can you please tell me,  what is the expected behavior of  setting the
> "Authentication.Policy.Account.Lock.Time" property to zero.
>
> Thanks,
> Chalitha.
>
> --
> *Chalitha Maheshwari*
> Software Engineer-QA,
> WSO2 Inc.
>
> *E-mail:* chali...@wso2.com
> *Mobile: *+94710 411 112
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS] - Unable to decrypt the SAML Assertion When Authenticating to Travelocity app

2015-10-08 Thread Nadeesha Meegoda
Hi all,

I'm continuously getting this error when assertion encryption is enabled. I
have attached the traveolcity.properties file for your reference. I can
give the travelocity.war on request.

On Sun, Oct 4, 2015 at 1:43 PM, Gayan Gunawardana  wrote:

> Hi Nadeesha,
>
> I just checked Federated SSO scenario  (product-is build 02/10/2015) you
> mentioned in the initial mail. It works fine for me except I had to replace
> commons-collections-3.1.jar with commons-collections-3.2.1.jar inside
> travelocity.com web app.
>
> Thanks,
> Gayan
>
> On Fri, Oct 2, 2015 at 9:11 PM, Nadeesha Meegoda 
> wrote:
>
>> Hi Tharindu,
>>
>> When I tested this with single IS for SAML SSO (not the federated
>> scenario) everything worked fine for super tenant. I doubt this is related
>> to the federated scenario. Please have a look and let me know.
>>
>> Thanks!
>>
>> On Fri, Oct 2, 2015 at 8:52 PM, Tharindu Edirisinghe 
>> wrote:
>>
>>> Hi Nadeesha,
>>>
>>> For super tenant, sso.agent should be able to decrypt the encrypted saml
>>> assertion. However there was an issue [1] where for a tenant, when the
>>> tenant encrypts the SAML assertion from the public certificate of the
>>> client (i.e travelocity app), then sso.agent could not decrypt the
>>> assertion because in the code, the private key of travelocity's key store
>>> was not getting picked up because of the particular method called in open
>>> saml library. This was patched sometimes back for sso.agent 1.2 version but
>>> we need to check whether the same fix got correctly merged to higher
>>> versions (i.e 1.4). Ideally this should anyway work for super tenant, but
>>> we'll check the same scenario more and let you know.
>>>
>>> [1] https://wso2.org/jira/browse/IDENTITY-3186
>>>
>>> Regards,
>>> TharinduE
>>>
>>> On Fri, Oct 2, 2015 at 3:34 PM, Nadeesha Meegoda 
>>> wrote:
>>>
 Hi Darshana,

 Yes the response is encrypted. Sending the SAML sso trace attached with
 the mail.

 @Ishara I used wso2carbon as the certificate alias since I'm using the
 default key stores and also I'm testing this in super tenant mode.  Do I
 need to import the public certificate of the private key of travelocity app
 to IS keystores in super tenant mode?

 On Fri, Oct 2, 2015 at 3:19 PM, Ishara Karunarathna 
 wrote:

> Hi Nadeesha,
>
> On Fri, Oct 2, 2015 at 3:04 PM, Darshana Gunawardana <
> darsh...@wso2.com> wrote:
>
>> Hi Nadeesha,
>>
>> Have you checked whether the assertion is encrypted in the response
>> IS send back to travelocity app?
>>
>> And please provide the SSO Trace (save as a text file and attach in
>> the mail) for the whole flow.
>>
>> Thanks,
>> Darshana
>>
>> On Fri, Oct 2, 2015 at 2:53 PM, Nadeesha Meegoda 
>> wrote:
>>
>>> Hi.
>>>
>>> I have configured the setup to Login to the Identity Server Using
>>> Another Identity Server as per the details in [1] in Super tenant mode.
>>> With the happy scenario according to the documentation this works fine. 
>>> But
>>> I have enabled some additional properties in IDP and SP used for IDP as
>>> following :
>>>
>>> *Properties enabled for Federated Authenticators* - SAML2 Web SSO
>>> Configuration
>>>
>>> 1. Enabled Assertion Encryption
>>> 2. Enable Assertion Signing
>>> 3. Enable Authentication Response Signing
>>>
>>> *Properties enabled fo SP used for IDP *
>>>
>>> 1. Enabled Assertion Encryption
>>> 2. Enabled Response Signing
>>>
>>> *Properties enabled fo SP used for travelocity app*
>>>
>>> 1. Enabled Assertion Encryption
>>>
>> What is the Certificate Alias you used here ?
> is that the public key in travelocity app ?
>
>> 2. Enabled Response Signing
>>>
>>> In the travelocity.properties file also I have enabled Assertion
>>> Encryption,Response signing and Assertion signing. I have already 
>>> imported
>>> the Identity Provider Public Certificate to IDP
>>>
>>> When I'm signing in to travelocity.com I get Unable to decrypt the
>>> SAML Assertion error and error in [2] in tomcat.
>>>
>>> Note that only enabling "assertion signing" in IDP I was
>>> successfully able to login and no error was displayed. When I enabled 
>>> the
>>> Assertion Encryption this error occurred. Why is this error occurred 
>>> when I
>>> enable this property as mentioned above?
>>>
>>> Any help regarding this is highly appreciated!
>>>
>>>
>>>
>>> [1] -
>>> https://docs.wso2.com/pages/viewpage.action?title=Login%2Bto%2Bthe%2BIdentity%2BServer%2BUsing%2BAnother%2BIdentity%2BServer&spaceKey=IS510
>>>
>>> [2] - Oct 02, 2015 2:10:47 PM
>>> org.wso2.carbon.identity.sso.agent.SSOAgentFilter doFilter
>>> SEVERE: An error has occurred
>>> org.wso2.carbon.identity.sso.agent.exception.SSOAgentException:

Re: [Dev] How to set Database Properties in Carbon Datasources

2015-10-08 Thread Anjana Fernando
Hi,

I think this functionality is not exposed from our ndatasource
RDBMSDataSourceReader implementation. We would have to put a new property
to set these "DB properties". I think, these must be the properties passed
into when creating a new connection with this [1]. @Madhawa, shall we
implement this for a future Kernel release, by adding a new section to put
these properties in the configuration.

[1]
http://docs.oracle.com/javase/7/docs/api/java/sql/DriverManager.html#getConnection(java.lang.String,%20java.util.Properties)

Cheers,
Anjana.

On Thu, Oct 8, 2015 at 3:33 PM, Isuru Perera  wrote:

> Hi,
>
> With Carbon Metrics, I need to save some "double" values in the database.
> Sometimes the Oracle JDBC Driver throws "Underflow" exceptions [1] when
> trying to set a double to a prepared statement.
>
> To solve that issue, I changed the database columns to "BINARY_DOUBLE
> "
> [2] and I want to set the property "SetFloatAndDoubleUseBinary" to true.
>
> I tested this with a standalone app with Tomcat JDBC and it works.
>
> import org.apache.tomcat.jdbc.pool.DataSource;
> import org.apache.tomcat.jdbc.pool.PoolProperties;
> ...
>
> PoolProperties p = new PoolProperties();
> p.setUrl("jdbc:oracle:thin:@localhost:1521/metrics");
> p.setDriverClassName("oracle.jdbc.OracleDriver");
> p.setUsername("USER");
> p.setPassword("PASSWD");
> 
> DataSource datasource = new DataSource();
> datasource.setPoolProperties(p);
>
>
> *Properties properties = new
> Properties();properties.setProperty("SetFloatAndDoubleUseBinary",
> "true");p.setDbProperties(properties);*
>
> I thought there is a way to set these kinds of properties in
> *-datasources.xml file. However I don't see a way to do that in
> configuration [3].
>
> I don't want to change the double values and I want to save it directly in
> the database. How do we fix this?
>
> Thanks!
>
> Best Regards,
>
> [1] https://wso2.org/jira/browse/MB-1271
> [2]
> https://docs.oracle.com/cd/E11882_01/timesten.112/e21642/types.htm#BABIGDEA
> [3]
> https://github.com/wso2/carbon-kernel/blob/v4.4.1/core/org.wso2.carbon.ndatasource.rdbms/src/main/java/org/wso2/carbon/ndatasource/rdbms/RDBMSConfiguration.java
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 
*Anjana Fernando*
Senior Technical Lead
WSO2 Inc. | http://wso2.com
lean . enterprise . middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to set Database Properties in Carbon Datasources

2015-10-08 Thread Madhawa Gunasekara
Hi Anjana,

Sure will do it.

Thanks,
Madhawa

On Thu, Oct 8, 2015 at 6:05 PM, Anjana Fernando  wrote:

> Hi,
>
> I think this functionality is not exposed from our ndatasource
> RDBMSDataSourceReader implementation. We would have to put a new property
> to set these "DB properties". I think, these must be the properties passed
> into when creating a new connection with this [1]. @Madhawa, shall we
> implement this for a future Kernel release, by adding a new section to put
> these properties in the configuration.
>
> [1]
> http://docs.oracle.com/javase/7/docs/api/java/sql/DriverManager.html#getConnection(java.lang.String,%20java.util.Properties)
>
> Cheers,
> Anjana.
>
> On Thu, Oct 8, 2015 at 3:33 PM, Isuru Perera  wrote:
>
>> Hi,
>>
>> With Carbon Metrics, I need to save some "double" values in the database.
>> Sometimes the Oracle JDBC Driver throws "Underflow" exceptions [1] when
>> trying to set a double to a prepared statement.
>>
>> To solve that issue, I changed the database columns to "BINARY_DOUBLE
>> "
>> [2] and I want to set the property "SetFloatAndDoubleUseBinary" to true.
>>
>> I tested this with a standalone app with Tomcat JDBC and it works.
>>
>> import org.apache.tomcat.jdbc.pool.DataSource;
>> import org.apache.tomcat.jdbc.pool.PoolProperties;
>> ...
>>
>> PoolProperties p = new PoolProperties();
>> p.setUrl("jdbc:oracle:thin:@localhost:1521/metrics");
>> p.setDriverClassName("oracle.jdbc.OracleDriver");
>> p.setUsername("USER");
>> p.setPassword("PASSWD");
>> 
>> DataSource datasource = new DataSource();
>> datasource.setPoolProperties(p);
>>
>>
>> *Properties properties = new
>> Properties();properties.setProperty("SetFloatAndDoubleUseBinary",
>> "true");p.setDbProperties(properties);*
>>
>> I thought there is a way to set these kinds of properties in
>> *-datasources.xml file. However I don't see a way to do that in
>> configuration [3].
>>
>> I don't want to change the double values and I want to save it directly
>> in the database. How do we fix this?
>>
>> Thanks!
>>
>> Best Regards,
>>
>> [1] https://wso2.org/jira/browse/MB-1271
>> [2]
>> https://docs.oracle.com/cd/E11882_01/timesten.112/e21642/types.htm#BABIGDEA
>> [3]
>> https://github.com/wso2/carbon-kernel/blob/v4.4.1/core/org.wso2.carbon.ndatasource.rdbms/src/main/java/org/wso2/carbon/ndatasource/rdbms/RDBMSConfiguration.java
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2 
>>
>
>
>
> --
> *Anjana Fernando*
> Senior Technical Lead
> WSO2 Inc. | http://wso2.com
> lean . enterprise . middleware
>



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

mobile: +94 719411002 <+94+719411002>
blog: *http://madhawa-gunasekara.blogspot.com
*
linkedin: *http://lk.linkedin.com/in/mgunasekara
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ESB] EmptyStackException when resuming a paused message processor

2015-10-08 Thread Chanaka Fernando
Hi All,

At last, I was able to find the root cause for this behavior. This is
actually coming from carbon-mediation code. What actually happens is that
when ESB starts with a tenant, it will not load the tenant until it
receives the first request. When It receives the first request, it will
call the MultitenantMessageReceiver.processRequest() method. Within this
method, it will call the following method.

PrivilegedCarbonContext.startTenantFlow();


This will get the ThreadLocal variable *parentContextHolderStack *and get
the stack  and push the carbonContextDataHolder object to the stack. After
this, tenant loading happens and within the initialization of the carbon
mediation registry we have the following code segment.

*org.wso2.carbon.mediation.registry.WSO2Registry.java*

/**
 *  Carbon Kernel mandates to set Threadlocal before calling anything in kernel
 */
private void setTenantInfo() {
// Preserve user name
String username =
PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
*PrivilegedCarbonContext.destroyCurrentContext();*
PrivilegedCarbonContext cc =
PrivilegedCarbonContext.getThreadLocalCarbonContext();
cc.setTenantDomain(domain);
cc.setTenantId(tenantId);
if (username != null) { // Set back the user name

PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(username);
}
}

Within the above method following line causes the issue.

PrivilegedCarbonContext.destroyCurrentContext();

When this method is called, it will reset the *parentContextHolderStack *and
the initial object push into the stack is destroyed. Then after tenant
loading, within the MultitenantMessageReceiver.processRequest() method, it
tries to end the tenant flow within finally block and try to pop the object
which it pushes early. But right now, we have a new context stack and it
will throw the emptyStackException due to that.

@Sameera/KasunG: Do we really need to use the following code segment within
the above method?


*PrivilegedCarbonContext.destroyCurrentContext();*

I saw this method called within carbon-mediation components in 3 different
locations. AFAIU, we don't need to destroy the current context when we are
accessing the ThreadLocalContext. Please share your thoughts such that we
can fix this issue. Issue is fixed when I comment out the above line :)


Thanks,
Chanaka



On Wed, Oct 7, 2015 at 5:34 PM, Chanaka Fernando  wrote:

> Hi Sameera/KasunG,
>
> I have debugged the code to find the root cause for this empty stack
> exception. This is causing several other issues at the ESB layer. What
> actually happens is that inside the
> MultitenantMessageReceiver.processRequest() method, we have the following
> code segment.
>
> try {
> PrivilegedCarbonContext.startTenantFlow();
> PrivilegedCarbonContext privilegedCarbonContext = 
> PrivilegedCarbonContext.getThreadLocalCarbonContext();
> privilegedCarbonContext.setTenantDomain(tenantDomain, true);
> // this is to prevent non-blocking transports from sending 202
> 
> mainInMsgContext.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN,
>  "SKIP");
>
> ConfigurationContext tenantConfigCtx =
>
> TenantAxisUtils.getTenantConfigurationContext(tenantDomain,
>   
>mainConfigCtx);
> if (tenantConfigCtx == null) {
> // Throw AxisFault: Tenant does not exist
> handleException(mainInMsgContext, new AxisFault("Tenant " + 
> tenantDomain +
> "  not found"));
> return;
> }
>
> if (mainInMsgContext.isDoingREST()) { // Handle REST requests
> doREST(mainInMsgContext, to, tenantDomain, tenantConfigCtx, 
> serviceAndOperation);
> } else {
> doSOAP(mainInMsgContext, tenantDomain, tenantConfigCtx, 
> serviceAndOperation);
> }
> } finally {
> PrivilegedCarbonContext.endTenantFlow();
> }
>
>
> When we are calling the endTenantFlow() method, it will go inside the
> following method within the CarbonContextDataHolder class.
>
> /**
>  * This will end the tenant flow and restore the previous CarbonContext.
>  */
> public void endTenantFlow() {
> Stack carbonContextDataHolders = 
> parentContextHolderStack.get();
> if (carbonContextDataHolders != null) {
> currentContextHolder.set(carbonContextDataHolders.pop());
> }
> }
>
>
> At the time of calling this method carbonContextDataHolders stack has
> become empty and causing the EmptyStackException. When I debug the code, I
> found that there is a scheduled task running in a different thread and
> accessing the same method frequently. This is coming from
> AbstractQuartzTaskManager class method.
>
> public void triggerComplete(Trigger trigger, JobExecutionContext 
> jobExecutionContext,
> Trigger.CompletedExecutionInstruction completedExecutionInstruction) {
> P

Re: [Dev] [ESB] EmptyStackException when resuming a paused message processor

2015-10-08 Thread Chanaka Fernando
[Adding Kishanthan]

On Thu, Oct 8, 2015 at 6:14 PM, Chanaka Fernando  wrote:

> Hi All,
>
> At last, I was able to find the root cause for this behavior. This is
> actually coming from carbon-mediation code. What actually happens is that
> when ESB starts with a tenant, it will not load the tenant until it
> receives the first request. When It receives the first request, it will
> call the MultitenantMessageReceiver.processRequest() method. Within this
> method, it will call the following method.
>
> PrivilegedCarbonContext.startTenantFlow();
>
>
> This will get the ThreadLocal variable *parentContextHolderStack *and get
> the stack  and push the carbonContextDataHolder object to the stack.
> After this, tenant loading happens and within the initialization of the
> carbon mediation registry we have the following code segment.
>
> *org.wso2.carbon.mediation.registry.WSO2Registry.java*
>
> /**
>  *  Carbon Kernel mandates to set Threadlocal before calling anything in 
> kernel
>  */
> private void setTenantInfo() {
> // Preserve user name
> String username = 
> PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
> *PrivilegedCarbonContext.destroyCurrentContext();*
> PrivilegedCarbonContext cc = 
> PrivilegedCarbonContext.getThreadLocalCarbonContext();
> cc.setTenantDomain(domain);
> cc.setTenantId(tenantId);
> if (username != null) { // Set back the user name
> 
> PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(username);
> }
> }
>
> Within the above method following line causes the issue.
>
> PrivilegedCarbonContext.destroyCurrentContext();
>
> When this method is called, it will reset the *parentContextHolderStack *and
> the initial object push into the stack is destroyed. Then after tenant
> loading, within the MultitenantMessageReceiver.processRequest() method, it
> tries to end the tenant flow within finally block and try to pop the object
> which it pushes early. But right now, we have a new context stack and it
> will throw the emptyStackException due to that.
>
> @Sameera/KasunG: Do we really need to use the following code segment
> within the above method?
>
>
> *PrivilegedCarbonContext.destroyCurrentContext();*
>
> I saw this method called within carbon-mediation components in 3 different
> locations. AFAIU, we don't need to destroy the current context when we are
> accessing the ThreadLocalContext. Please share your thoughts such that we
> can fix this issue. Issue is fixed when I comment out the above line :)
>
>
> Thanks,
> Chanaka
>
>
>
> On Wed, Oct 7, 2015 at 5:34 PM, Chanaka Fernando 
> wrote:
>
>> Hi Sameera/KasunG,
>>
>> I have debugged the code to find the root cause for this empty stack
>> exception. This is causing several other issues at the ESB layer. What
>> actually happens is that inside the
>> MultitenantMessageReceiver.processRequest() method, we have the following
>> code segment.
>>
>> try {
>> PrivilegedCarbonContext.startTenantFlow();
>> PrivilegedCarbonContext privilegedCarbonContext = 
>> PrivilegedCarbonContext.getThreadLocalCarbonContext();
>> privilegedCarbonContext.setTenantDomain(tenantDomain, true);
>> // this is to prevent non-blocking transports from sending 202
>> 
>> mainInMsgContext.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN,
>>  "SKIP");
>>
>> ConfigurationContext tenantConfigCtx =
>>
>> TenantAxisUtils.getTenantConfigurationContext(tenantDomain,
>>  
>> mainConfigCtx);
>> if (tenantConfigCtx == null) {
>> // Throw AxisFault: Tenant does not exist
>> handleException(mainInMsgContext, new AxisFault("Tenant " + 
>> tenantDomain +
>> "  not found"));
>> return;
>> }
>>
>> if (mainInMsgContext.isDoingREST()) { // Handle REST requests
>> doREST(mainInMsgContext, to, tenantDomain, tenantConfigCtx, 
>> serviceAndOperation);
>> } else {
>> doSOAP(mainInMsgContext, tenantDomain, tenantConfigCtx, 
>> serviceAndOperation);
>> }
>> } finally {
>> PrivilegedCarbonContext.endTenantFlow();
>> }
>>
>>
>> When we are calling the endTenantFlow() method, it will go inside the
>> following method within the CarbonContextDataHolder class.
>>
>> /**
>>  * This will end the tenant flow and restore the previous CarbonContext.
>>  */
>> public void endTenantFlow() {
>> Stack carbonContextDataHolders = 
>> parentContextHolderStack.get();
>> if (carbonContextDataHolders != null) {
>> currentContextHolder.set(carbonContextDataHolders.pop());
>> }
>> }
>>
>>
>> At the time of calling this method carbonContextDataHolders stack has
>> become empty and causing the EmptyStackException. When I debug the code, I
>> found that there is a scheduled task running in a different thread and
>> accessing the same

[Dev] SAML 2.0 based Single Sign-On error when trying to login into secured extension page of ES

2015-10-08 Thread Charitha Goonetilleke
Hi All,

I'm experiencing $subject after logged out. It seems, *Referer* header
value changed to https://localhost:9443/samlsso?sessionDataKey= some
how during the logout process. When I'm trying to login again, it is giving
me SAML 2.0 based Single Sign-On error. In the same time console printing
"ERROR {org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet} -
 Failed to retrieve sessionDTO from the cache for key
52ca4cfa-823c-4b4c-8462-bb59c94d1e5c".

Do you have any idea, how *Referer* header value set to that? Or if any one
know possible work around to eliminate this issue, please let me know.

Please refer the following sso trace for complete scenario.

+
GET https://localhost:9443/store/pages/groups HTTP/1.1
Host: localhost:9443
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:41.0)
Gecko/20100101 Firefox/41.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://localhost:9443/store/assets/deviceType/list
Cookie: JSESSIONID=3EE609CF217CA096FE8F9ADA74793BFE;
samlssoTokenId=5277eb7e-e3c9-46ef-b762-98dc80e7eaca;
JSESSIONID=1C3D7204305BF8D305C2B8788BE047AA;
commonAuthId=9928ae2b-89a9-41a8-aaca-ddeb9ecee7be

HTTP/?.? 200 OK
Content-Type: text/html
Transfer-Encoding: chunked
Content-Encoding: gzip
Vary: Accept-Encoding
Date: Thu, 08 Oct 2015 13:08:54 GMT
Server: WSO2 Carbon Server


+
GET 
https://localhost:9443/store/extensions/app/store-device-type/themes/store/css/navigation-custom.css
HTTP/1.1
Host: localhost:9443
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:41.0)
Gecko/20100101 Firefox/41.0
Accept: text/css,*/*;q=0.1
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://localhost:9443/store/pages/groups
Cookie: JSESSIONID=3EE609CF217CA096FE8F9ADA74793BFE;
samlssoTokenId=5277eb7e-e3c9-46ef-b762-98dc80e7eaca;
JSESSIONID=1C3D7204305BF8D305C2B8788BE047AA;
commonAuthId=9928ae2b-89a9-41a8-aaca-ddeb9ecee7be

HTTP/?.? 304 Not Modified
Etag: W/"2212-1444293524000"
Date: Thu, 08 Oct 2015 13:08:54 GMT
Server: WSO2 Carbon Server


+
GET 
https://localhost:9443/store/extensions/app/store-device-type/themes/store/js/libs/utils.js
HTTP/1.1
Host: localhost:9443
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:41.0)
Gecko/20100101 Firefox/41.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://localhost:9443/store/pages/groups
Cookie: JSESSIONID=3EE609CF217CA096FE8F9ADA74793BFE;
samlssoTokenId=5277eb7e-e3c9-46ef-b762-98dc80e7eaca;
JSESSIONID=1C3D7204305BF8D305C2B8788BE047AA;
commonAuthId=9928ae2b-89a9-41a8-aaca-ddeb9ecee7be

HTTP/?.? 304 Not Modified
Etag: W/"961-1444293524000"
Date: Thu, 08 Oct 2015 13:08:54 GMT
Server: WSO2 Carbon Server


+
GET 
https://localhost:9443/store/extensions/app/store-device-type/themes/store/js/group-listing.js
HTTP/1.1
Host: localhost:9443
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:41.0)
Gecko/20100101 Firefox/41.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://localhost:9443/store/pages/groups
Cookie: JSESSIONID=3EE609CF217CA096FE8F9ADA74793BFE;
samlssoTokenId=5277eb7e-e3c9-46ef-b762-98dc80e7eaca;
JSESSIONID=1C3D7204305BF8D305C2B8788BE047AA;
commonAuthId=9928ae2b-89a9-41a8-aaca-ddeb9ecee7be

HTTP/?.? 304 Not Modified
Etag: W/"15180-1444293524000"
Date: Thu, 08 Oct 2015 13:08:54 GMT
Server: WSO2 Carbon Server


+
GET https://localhost:9443/store/logout HTTP/1.1
Host: localhost:9443
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:41.0)
Gecko/20100101 Firefox/41.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://localhost:9443/store/pages/groups
Cookie: JSESSIONID=3EE609CF217CA096FE8F9ADA74793BFE;
samlssoTokenId=5277eb7e-e3c9-46ef-b762-98dc80e7eaca;
JSESSIONID=1C3D7204305BF8D305C2B8788BE047AA;
commonAuthId=9928ae2b-89a9-41a8-aaca-ddeb9ecee7be

HTTP/?.? 302 Found
Location: https://localhost:9443/store/pages/sso-logout
Content-Length: 0
Date: Thu, 08 Oct 2015 13:09:05 GMT
Server: WSO2 Carbon Server


+
GET https://localhost:9443/store/pages/sso-logout HTTP/1.1
Host: localhost:9443
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:41.0)
Gecko/20100101 Firefox/41.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://localhost:9443/store/pages/groups
Cookie: JSESSIONID=3EE609CF217CA096FE8F9ADA74793BFE;
samlssoTokenId=5277eb7e-e3c9-46ef-b762-98dc80e7eaca;
JSESSIONID=1C3D7204305BF8D305C2B8788BE047AA;
commonAuthId=9928ae2b-89a9-41a8-aaca-ddeb9ecee7be

HTTP/?.? 200 OK
Content-Type: text/html
Content-Length: 1640
Date: Thu, 08 Oct 2015 13:09:05 GMT
Server: WSO2 Carbon Ser

[Dev] [ESB][MB] SSL handshake Exception when try to send queue message from ESB 4.8.0 to MB 2.2.0

2015-10-08 Thread Pumudu Ruhunage
Hi All,

I was trying to send secure amqp queue messages(with ssl enabled) from ESB
to MB with  of following documentations[1][2]. Even though i can send
non-secure messages, when i try to send ssl enabled messages this
exception[3] appear on MB node.

After going through previous mails[4] we found that it will be helpful to
enable debug logs in mina transport[5] level. Following was the debug
output[6]. As per previous mails[4] issue was *unwrapHandshake(). *But we
couldn't isolate the configuration which creates unwrapHandshake.
Anyone have idea how to solve this?

[1] https://docs.wso2.com/display/MB220/Enabling+SSL+Support
[2]
http://wso2.com/library/articles/2013/03/configuring-wso2-esb-wso2-message-broker/
[3] [2015-10-08 18:07:22,231] ERROR
{org.wso2.andes.transport.network.mina.MinaNetworkHandler} -  Exception
caught by Mina
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
at org.apache.mina.filter.SSLFilter.messageReceived(SSLFilter.java:416)
at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
at
org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
at
org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageReceived(AbstractIoFilterChain.java:499)
at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
at
org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(AbstractIoFilterChain.java:293)
at
org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:228)
at
org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
at
org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
at
org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
at java.lang.Thread.run(Thread.java:695)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext
connection?
at
com.sun.net.ssl.internal.ssl.EngineInputRecord.bytesInCompletePacket(EngineInputRecord.java:151)
at
com.sun.net.ssl.internal.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:806)
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:721)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:607)
at org.apache.mina.filter.support.SSLHandler.unwrap0(SSLHandler.java:657)
at
org.apache.mina.filter.support.SSLHandler.unwrapHandshake(SSLHandler.java:613)
at org.apache.mina.filter.support.SSLHandler.handshake(SSLHandler.java:493)
at
org.apache.mina.filter.support.SSLHandler.messageReceived(SSLHandler.java:306)
at org.apache.mina.filter.SSLFilter.messageReceived(SSLFilter.java:392)
... 12 more

[4] JMS Messaging with SSL using WSO2 MB
[5] "org.wso2.andes.transport.network.mina.MinaNetworkHandler"

[6] [2015-10-08 18:06:52,225] ERROR
{org.wso2.andes.server.protocol.AMQProtocolEngine} -  IOException caught
in/10.111.5.165:53807(?, session closed implictly:
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
[2015-10-08 18:07:22,220] DEBUG
{org.wso2.andes.transport.network.mina.MinaNetworkHandler} -  Created
session: /10.111.5.165:54107 
[2015-10-08 18:07:22,227] DEBUG
{org.wso2.andes.transport.network.mina.MinaNetworkHandler} -  [/10.
111 .5.165:54107
]  doHandshake()
[2015-10-08 18:07:22,227] DEBUG
{org.wso2.andes.transport.network.mina.MinaNetworkHandler} -  [/10.
111 .5.165:54107]
handshakeStatus=NEED_UNWRAP
[2015-10-08 18:07:22,227] DEBUG
{org.wso2.andes.transport.network.mina.MinaNetworkHandler} -  [/10.
111 .5.165:54107]
*unwrapHandshake()*
[2015-10-08 18:07:22,227] DEBUG
{org.wso2.andes.transport.network.mina.MinaNetworkHandler} -  [/10.
111 .5.165:54107]
 inNetBuffer: java.nio.DirectByteBuffer[pos=0 lim=0 cap=16665]
[2015-10-08 18:07:22,227] DEBUG
{org.wso2.andes.transport.network.mina.MinaNetworkHandler} -  [/10.
111 .5.165:54107]
 appBuffer: java.nio.DirectByteBuffer[pos=0 lim=0 cap=0]
[2015-10-08 18:07:22,227] DEBUG
{org.wso2.andes.transport.network.mina.MinaNetworkHandler} -  [/10.
111 .5.165:54107]
 Unwrap res:Status = BUFFER_UNDERFLOW HandshakeStatus = NEED_UNWRAP
bytesConsumed = 0 bytesProduced = 0
[2015-10-08 18:07:22,228] DEBUG
{org.wso2.andes.transport.network.mina.MinaNetworkHandler} -  [/10.
111 .5.165:54107]
 Data Read: org.apache.mina.filter.suppor

[Dev] Custom inbound endpoint serializing issue

2015-10-08 Thread Susinda Perera
I'm using following code segment to create a InboundEndpoint  and serialize
it and get the omelement.

InboundEndpoint inboundEndpoint1 = new InboundEndpoint();
inboundEndpoint1.setName("susinda");
inboundEndpoint1.setSuspend(false);
*inboundEndpoint1.setClassImpl("org.test.MyClass");*
inboundEndpoint1.setProtocol("custom");
inboundEndpoint1.addParameter("inbound.behavior", "behaviourValue");
OMElement inboundEndpointOmElement1 =
InboundEndpointSerializer.serializeInboundEndpoint(inboundEndpoint1);

The resulted(serialized) OMElement looks like follows, Here *class*
attribute is not set

http://ws.apache.org/ns/synapse"; name="susinda"
protocol="custom" suspend="false">

behaviourValue



Correct config should contain class attribute, What is wrong here? am i
doing something wrong or is this a bug, appreciate your help on this.

Thanks
Susinda





-- 
*Susinda Perera*
Software Engineer
B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
Mobile:(+94)716049075
Blog: susinda.blogspot.com
WSO2 Inc. http://wso2.com/
Tel : 94 11 214 5345 Fax :94 11 2145300
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Custom inbound endpoint serializing issue

2015-10-08 Thread Isuru Ranawaka
Hi Susinda ,

Remove protocol attribute.If you define custom class it is not needed  to
define protocol.

thanks

On Thu, Oct 8, 2015 at 8:57 AM, Susinda Perera  wrote:

> I'm using following code segment to create a InboundEndpoint  and
> serialize it and get the omelement.
>
> InboundEndpoint inboundEndpoint1 = new InboundEndpoint();
> inboundEndpoint1.setName("susinda");
> inboundEndpoint1.setSuspend(false);
> *inboundEndpoint1.setClassImpl("org.test.MyClass");*
> inboundEndpoint1.setProtocol("custom");
> inboundEndpoint1.addParameter("inbound.behavior", "behaviourValue");
> OMElement inboundEndpointOmElement1 =
> InboundEndpointSerializer.serializeInboundEndpoint(inboundEndpoint1);
>
> The resulted(serialized) OMElement looks like follows, Here *class*
> attribute is not set
>
> http://ws.apache.org/ns/synapse"; name="susinda"
> protocol="custom" suspend="false">
> 
> behaviourValue
> 
> 
>
> Correct config should contain class attribute, What is wrong here? am i
> doing something wrong or is this a bug, appreciate your help on this.
>
> Thanks
> Susinda
>
>
>
>
>
> --
> *Susinda Perera*
> Software Engineer
> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
> Mobile:(+94)716049075
> Blog: susinda.blogspot.com
> WSO2 Inc. http://wso2.com/
> Tel : 94 11 214 5345 Fax :94 11 2145300
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Best Regards
Isuru Ranawaka
M: +94714629880
Blog : http://isurur.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to set Database Properties in Carbon Datasources

2015-10-08 Thread Isuru Perera
Created a JIRA: https://wso2.org/jira/browse/CARBON-15497

On Thu, Oct 8, 2015 at 6:13 PM, Madhawa Gunasekara 
wrote:

> Hi Anjana,
>
> Sure will do it.
>
> Thanks,
> Madhawa
>
> On Thu, Oct 8, 2015 at 6:05 PM, Anjana Fernando  wrote:
>
>> Hi,
>>
>> I think this functionality is not exposed from our ndatasource
>> RDBMSDataSourceReader implementation. We would have to put a new property
>> to set these "DB properties". I think, these must be the properties passed
>> into when creating a new connection with this [1]. @Madhawa, shall we
>> implement this for a future Kernel release, by adding a new section to put
>> these properties in the configuration.
>>
>> [1]
>> http://docs.oracle.com/javase/7/docs/api/java/sql/DriverManager.html#getConnection(java.lang.String,%20java.util.Properties)
>>
>> Cheers,
>> Anjana.
>>
>> On Thu, Oct 8, 2015 at 3:33 PM, Isuru Perera  wrote:
>>
>>> Hi,
>>>
>>> With Carbon Metrics, I need to save some "double" values in the
>>> database. Sometimes the Oracle JDBC Driver throws "Underflow" exceptions
>>> [1] when trying to set a double to a prepared statement.
>>>
>>> To solve that issue, I changed the database columns to "BINARY_DOUBLE
>>> "
>>> [2] and I want to set the property "SetFloatAndDoubleUseBinary" to true.
>>>
>>> I tested this with a standalone app with Tomcat JDBC and it works.
>>>
>>> import org.apache.tomcat.jdbc.pool.DataSource;
>>> import org.apache.tomcat.jdbc.pool.PoolProperties;
>>> ...
>>>
>>> PoolProperties p = new PoolProperties();
>>> p.setUrl("jdbc:oracle:thin:@localhost:1521/metrics");
>>> p.setDriverClassName("oracle.jdbc.OracleDriver");
>>> p.setUsername("USER");
>>> p.setPassword("PASSWD");
>>> 
>>> DataSource datasource = new DataSource();
>>> datasource.setPoolProperties(p);
>>>
>>>
>>> *Properties properties = new
>>> Properties();properties.setProperty("SetFloatAndDoubleUseBinary",
>>> "true");p.setDbProperties(properties);*
>>>
>>> I thought there is a way to set these kinds of properties in
>>> *-datasources.xml file. However I don't see a way to do that in
>>> configuration [3].
>>>
>>> I don't want to change the double values and I want to save it directly
>>> in the database. How do we fix this?
>>>
>>> Thanks!
>>>
>>> Best Regards,
>>>
>>> [1] https://wso2.org/jira/browse/MB-1271
>>> [2]
>>> https://docs.oracle.com/cd/E11882_01/timesten.112/e21642/types.htm#BABIGDEA
>>> [3]
>>> https://github.com/wso2/carbon-kernel/blob/v4.4.1/core/org.wso2.carbon.ndatasource.rdbms/src/main/java/org/wso2/carbon/ndatasource/rdbms/RDBMSConfiguration.java
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> 
>>>
>>
>>
>>
>> --
>> *Anjana Fernando*
>> Senior Technical Lead
>> WSO2 Inc. | http://wso2.com
>> lean . enterprise . middleware
>>
>
>
>
> --
> *Madhawa Gunasekara*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 719411002 <+94+719411002>
> blog: *http://madhawa-gunasekara.blogspot.com
> *
> linkedin: *http://lk.linkedin.com/in/mgunasekara
> *
>



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

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


Re: [Dev] (ESBJAVA-3183) Could it affect the endpoints defined in two different APIs

2015-10-08 Thread Isuru Udana
Hi Pamod,

If the HTTP Endpoint url-template is dynamic (which contains a parameter)
and if you use the same endpoint in two or more APIs to send the request
out from ESB, yes same issue will occur.

Thanks.

On Thu, Oct 8, 2015 at 4:16 AM, Pamod Sylvester  wrote:

> Hi ESB Team,
>
> Based on the fix provided for [1] it seems that the issue was due to the,
>
> getAddress() method processing from the address instance variable in the
> EndpointDefinition ?
>
> Could this also affect if multiple APIs are being invoked in parallel.
> Which points to the same named endpoint. i.e
>
> if API 1 and API 2 calls the same dynamic http endpoint EP_1, is there a
> possibility where the (API 2 ) calls being duplicated and API 1 call uri
> would not resolve ? AFAIU since EndpointDefinition is global to Synapse
> environment rather than the context this could affect ?
>
> [1] https://wso2.org/jira/browse/ESBJAVA-3183
>
> Thanks,
> Pamod
>
> --
> *Pamod Sylvester *
>
> *WSO2 Inc.; http://wso2.com *
> cell: +94 77 7779495
>



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


Re: [Dev] (ESBJAVA-3183) Could it affect the endpoints defined in two different APIs

2015-10-08 Thread Pamod Sylvester
Thanks Isuru for the verification!!

On Thursday, October 8, 2015, Isuru Udana  wrote:

> Hi Pamod,
>
> If the HTTP Endpoint url-template is dynamic (which contains a parameter)
> and if you use the same endpoint in two or more APIs to send the request
> out from ESB, yes same issue will occur.
>
> Thanks.
>
> On Thu, Oct 8, 2015 at 4:16 AM, Pamod Sylvester  > wrote:
>
>> Hi ESB Team,
>>
>> Based on the fix provided for [1] it seems that the issue was due to the,
>>
>> getAddress() method processing from the address instance variable in the
>> EndpointDefinition ?
>>
>> Could this also affect if multiple APIs are being invoked in parallel.
>> Which points to the same named endpoint. i.e
>>
>> if API 1 and API 2 calls the same dynamic http endpoint EP_1, is there a
>> possibility where the (API 2 ) calls being duplicated and API 1 call uri
>> would not resolve ? AFAIU since EndpointDefinition is global to Synapse
>> environment rather than the context this could affect ?
>>
>> [1] https://wso2.org/jira/browse/ESBJAVA-3183
>>
>> Thanks,
>> Pamod
>>
>> --
>> *Pamod Sylvester *
>>
>> *WSO2 Inc.; http://wso2.com *
>> cell: +94 77 7779495
>>
>
>
>
> --
> *Isuru Udana*
> Associate Technical Lead
> WSO2 Inc.; http://wso2.com
> email: isu...@wso2.com 
> cell: +94 77 3791887
> blog: http://mytecheye.blogspot.com/
>


-- 
*Pamod Sylvester *

*WSO2 Inc.; http://wso2.com *
cell: +94 77 7779495
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Clarification on User Account locking in IS 5.1.0

2015-10-08 Thread Chalitha Waldeniyage
Thanks for the information and i have another concern.

If we locked a user account which resides in the secondary user store, Does
it need to show the "unlock account" tick option in the user profile of
that user .
Currently it doesn't show in the profile and Is that the expected behavior
or is there any specific config for that.


On Thu, Oct 8, 2015 at 5:34 PM, Isura Karunaratne  wrote:

> Hi Chalitha,
>
> Account should not unlock until admin unlocks
>
> Thanks
> Isura
> On Oct 8, 2015 3:08 PM, "Chalitha Waldeniyage"  wrote:
>
>> Hi Isura,
>>
>> Can you please tell me,  what is the expected behavior of  setting the
>> "Authentication.Policy.Account.Lock.Time" property to zero.
>>
>> Thanks,
>> Chalitha.
>>
>> --
>> *Chalitha Maheshwari*
>> Software Engineer-QA,
>> WSO2 Inc.
>>
>> *E-mail:* chali...@wso2.com
>> *Mobile: *+94710 411 112
>>
>


-- 
*Chalitha Maheshwari*
Software Engineer-QA,
WSO2 Inc.

*E-mail:* chali...@wso2.com
*Mobile: *+94710 411 112
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ESB] EmptyStackException when resuming a paused message processor

2015-10-08 Thread Nuwan Dias
Hi all,

Will this be fixed in kernel 4.4.2? Its causing integration test failures
in API Manager and we would like this to be fixed soon.

Thanks,
NuwanD.

On Thu, Oct 8, 2015 at 6:22 PM, Chanaka Fernando  wrote:

> [Adding Kishanthan]
>
> On Thu, Oct 8, 2015 at 6:14 PM, Chanaka Fernando 
> wrote:
>
>> Hi All,
>>
>> At last, I was able to find the root cause for this behavior. This is
>> actually coming from carbon-mediation code. What actually happens is that
>> when ESB starts with a tenant, it will not load the tenant until it
>> receives the first request. When It receives the first request, it will
>> call the MultitenantMessageReceiver.processRequest() method. Within this
>> method, it will call the following method.
>>
>> PrivilegedCarbonContext.startTenantFlow();
>>
>>
>> This will get the ThreadLocal variable *parentContextHolderStack *and
>> get the stack  and push the carbonContextDataHolder object to the stack.
>> After this, tenant loading happens and within the initialization of the
>> carbon mediation registry we have the following code segment.
>>
>> *org.wso2.carbon.mediation.registry.WSO2Registry.java*
>>
>> /**
>>  *  Carbon Kernel mandates to set Threadlocal before calling anything in 
>> kernel
>>  */
>> private void setTenantInfo() {
>> // Preserve user name
>> String username = 
>> PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
>> *PrivilegedCarbonContext.destroyCurrentContext();*
>> PrivilegedCarbonContext cc = 
>> PrivilegedCarbonContext.getThreadLocalCarbonContext();
>> cc.setTenantDomain(domain);
>> cc.setTenantId(tenantId);
>> if (username != null) { // Set back the user name
>> 
>> PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(username);
>> }
>> }
>>
>> Within the above method following line causes the issue.
>>
>> PrivilegedCarbonContext.destroyCurrentContext();
>>
>> When this method is called, it will reset the *parentContextHolderStack *and
>> the initial object push into the stack is destroyed. Then after tenant
>> loading, within the MultitenantMessageReceiver.processRequest() method, it
>> tries to end the tenant flow within finally block and try to pop the object
>> which it pushes early. But right now, we have a new context stack and it
>> will throw the emptyStackException due to that.
>>
>> @Sameera/KasunG: Do we really need to use the following code segment
>> within the above method?
>>
>>
>> *PrivilegedCarbonContext.destroyCurrentContext();*
>>
>> I saw this method called within carbon-mediation components in 3
>> different locations. AFAIU, we don't need to destroy the current context
>> when we are accessing the ThreadLocalContext. Please share your thoughts
>> such that we can fix this issue. Issue is fixed when I comment out the
>> above line :)
>>
>>
>> Thanks,
>> Chanaka
>>
>>
>>
>> On Wed, Oct 7, 2015 at 5:34 PM, Chanaka Fernando 
>> wrote:
>>
>>> Hi Sameera/KasunG,
>>>
>>> I have debugged the code to find the root cause for this empty stack
>>> exception. This is causing several other issues at the ESB layer. What
>>> actually happens is that inside the
>>> MultitenantMessageReceiver.processRequest() method, we have the following
>>> code segment.
>>>
>>> try {
>>> PrivilegedCarbonContext.startTenantFlow();
>>> PrivilegedCarbonContext privilegedCarbonContext = 
>>> PrivilegedCarbonContext.getThreadLocalCarbonContext();
>>> privilegedCarbonContext.setTenantDomain(tenantDomain, true);
>>> // this is to prevent non-blocking transports from sending 202
>>> 
>>> mainInMsgContext.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN,
>>>  "SKIP");
>>>
>>> ConfigurationContext tenantConfigCtx =
>>>
>>> TenantAxisUtils.getTenantConfigurationContext(tenantDomain,
>>> 
>>>  mainConfigCtx);
>>> if (tenantConfigCtx == null) {
>>> // Throw AxisFault: Tenant does not exist
>>> handleException(mainInMsgContext, new AxisFault("Tenant " + 
>>> tenantDomain +
>>> "  not found"));
>>> return;
>>> }
>>>
>>> if (mainInMsgContext.isDoingREST()) { // Handle REST requests
>>> doREST(mainInMsgContext, to, tenantDomain, tenantConfigCtx, 
>>> serviceAndOperation);
>>> } else {
>>> doSOAP(mainInMsgContext, tenantDomain, tenantConfigCtx, 
>>> serviceAndOperation);
>>> }
>>> } finally {
>>> PrivilegedCarbonContext.endTenantFlow();
>>> }
>>>
>>>
>>> When we are calling the endTenantFlow() method, it will go inside the
>>> following method within the CarbonContextDataHolder class.
>>>
>>> /**
>>>  * This will end the tenant flow and restore the previous CarbonContext.
>>>  */
>>> public void endTenantFlow() {
>>> Stack carbonContextDataHolders = 
>>> parentContextHolderStack.get();
>>> if (carbonContextDataHolder

Re: [Dev] [ESB] EmptyStackException when resuming a paused message processor

2015-10-08 Thread Chanaka Fernando
Hi NuwanD,

The fix is not in kernel but in carbon-mediation. What I need is kernel
team's opinion on usage of the aforementioned method. If we can get their
input, fix is straightforward.

On Thu, Oct 8, 2015 at 9:58 PM, Nuwan Dias  wrote:

> Hi all,
>
> Will this be fixed in kernel 4.4.2? Its causing integration test failures
> in API Manager and we would like this to be fixed soon.
>
> Thanks,
> NuwanD.
>
> On Thu, Oct 8, 2015 at 6:22 PM, Chanaka Fernando 
> wrote:
>
>> [Adding Kishanthan]
>>
>> On Thu, Oct 8, 2015 at 6:14 PM, Chanaka Fernando 
>> wrote:
>>
>>> Hi All,
>>>
>>> At last, I was able to find the root cause for this behavior. This is
>>> actually coming from carbon-mediation code. What actually happens is that
>>> when ESB starts with a tenant, it will not load the tenant until it
>>> receives the first request. When It receives the first request, it will
>>> call the MultitenantMessageReceiver.processRequest() method. Within this
>>> method, it will call the following method.
>>>
>>> PrivilegedCarbonContext.startTenantFlow();
>>>
>>>
>>> This will get the ThreadLocal variable *parentContextHolderStack *and
>>> get the stack  and push the carbonContextDataHolder object to the
>>> stack. After this, tenant loading happens and within the initialization of
>>> the carbon mediation registry we have the following code segment.
>>>
>>> *org.wso2.carbon.mediation.registry.WSO2Registry.java*
>>>
>>> /**
>>>  *  Carbon Kernel mandates to set Threadlocal before calling anything in 
>>> kernel
>>>  */
>>> private void setTenantInfo() {
>>> // Preserve user name
>>> String username = 
>>> PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
>>> *PrivilegedCarbonContext.destroyCurrentContext();*
>>> PrivilegedCarbonContext cc = 
>>> PrivilegedCarbonContext.getThreadLocalCarbonContext();
>>> cc.setTenantDomain(domain);
>>> cc.setTenantId(tenantId);
>>> if (username != null) { // Set back the user name
>>> 
>>> PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(username);
>>> }
>>> }
>>>
>>> Within the above method following line causes the issue.
>>>
>>> PrivilegedCarbonContext.destroyCurrentContext();
>>>
>>> When this method is called, it will reset the *parentContextHolderStack
>>> *and the initial object push into the stack is destroyed. Then after
>>> tenant loading, within the MultitenantMessageReceiver.processRequest()
>>> method, it tries to end the tenant flow within finally block and try to pop
>>> the object which it pushes early. But right now, we have a new context
>>> stack and it will throw the emptyStackException due to that.
>>>
>>> @Sameera/KasunG: Do we really need to use the following code segment
>>> within the above method?
>>>
>>>
>>> *PrivilegedCarbonContext.destroyCurrentContext();*
>>>
>>> I saw this method called within carbon-mediation components in 3
>>> different locations. AFAIU, we don't need to destroy the current context
>>> when we are accessing the ThreadLocalContext. Please share your thoughts
>>> such that we can fix this issue. Issue is fixed when I comment out the
>>> above line :)
>>>
>>>
>>> Thanks,
>>> Chanaka
>>>
>>>
>>>
>>> On Wed, Oct 7, 2015 at 5:34 PM, Chanaka Fernando 
>>> wrote:
>>>
 Hi Sameera/KasunG,

 I have debugged the code to find the root cause for this empty stack
 exception. This is causing several other issues at the ESB layer. What
 actually happens is that inside the
 MultitenantMessageReceiver.processRequest() method, we have the following
 code segment.

 try {
 PrivilegedCarbonContext.startTenantFlow();
 PrivilegedCarbonContext privilegedCarbonContext = 
 PrivilegedCarbonContext.getThreadLocalCarbonContext();
 privilegedCarbonContext.setTenantDomain(tenantDomain, true);
 // this is to prevent non-blocking transports from sending 202
 
 mainInMsgContext.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN,
  "SKIP");

 ConfigurationContext tenantConfigCtx =

 TenantAxisUtils.getTenantConfigurationContext(tenantDomain,

   mainConfigCtx);
 if (tenantConfigCtx == null) {
 // Throw AxisFault: Tenant does not exist
 handleException(mainInMsgContext, new AxisFault("Tenant " + 
 tenantDomain +
 "  not found"));
 return;
 }

 if (mainInMsgContext.isDoingREST()) { // Handle REST requests
 doREST(mainInMsgContext, to, tenantDomain, tenantConfigCtx, 
 serviceAndOperation);
 } else {
 doSOAP(mainInMsgContext, tenantDomain, tenantConfigCtx, 
 serviceAndOperation);
 }
 } finally {
 PrivilegedCarbonContext.endTenantFlow();
 }


>>>

Re: [Dev] Custom inbound endpoint serializing issue

2015-10-08 Thread Rajjaz Mohammed
Hi,
AFAIK your setting inbound as protocol so it may not take class name. so
try without set the protocol name. check when we set inbound protocol[1]
its class name not display  and when we set custom inbound[2] there is no
protocol name

[1] https://docs.wso2.com/display/ESB490/File+Inbound+Protocol
[2] https://docs.wso2.com/display/ESB490/Custom+Inbound+Endpoint

On Thu, Oct 8, 2015 at 7:57 PM, Isuru Ranawaka  wrote:

> Hi Susinda ,
>
> Remove protocol attribute.If you define custom class it is not needed  to
> define protocol.
>
> thanks
>
> On Thu, Oct 8, 2015 at 8:57 AM, Susinda Perera  wrote:
>
>> I'm using following code segment to create a InboundEndpoint  and
>> serialize it and get the omelement.
>>
>> InboundEndpoint inboundEndpoint1 = new InboundEndpoint();
>> inboundEndpoint1.setName("susinda");
>> inboundEndpoint1.setSuspend(false);
>> *inboundEndpoint1.setClassImpl("org.test.MyClass");*
>> inboundEndpoint1.setProtocol("custom");
>> inboundEndpoint1.addParameter("inbound.behavior", "behaviourValue");
>> OMElement inboundEndpointOmElement1 =
>> InboundEndpointSerializer.serializeInboundEndpoint(inboundEndpoint1);
>>
>> The resulted(serialized) OMElement looks like follows, Here *class*
>> attribute is not set
>>
>> http://ws.apache.org/ns/synapse"; name="susinda"
>> protocol="custom" suspend="false">
>> 
>> behaviourValue
>> 
>> 
>>
>> Correct config should contain class attribute, What is wrong here? am i
>> doing something wrong or is this a bug, appreciate your help on this.
>>
>> Thanks
>> Susinda
>>
>>
>>
>>
>>
>> --
>> *Susinda Perera*
>> Software Engineer
>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
>> Mobile:(+94)716049075
>> Blog: susinda.blogspot.com
>> WSO2 Inc. http://wso2.com/
>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Best Regards
> Isuru Ranawaka
> M: +94714629880
> Blog : http://isurur.blogspot.com/
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thank you
Best Regards

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

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


Re: [Dev] Custom inbound endpoint serializing issue

2015-10-08 Thread Susinda Perera
Thanks Isuru and Rajjaz, got it solved as per your suggestions.



On Thu, Oct 8, 2015 at 11:00 PM, Rajjaz Mohammed  wrote:

> Hi,
> AFAIK your setting inbound as protocol so it may not take class name. so
> try without set the protocol name. check when we set inbound protocol[1]
> its class name not display  and when we set custom inbound[2] there is no
> protocol name
>
> [1] https://docs.wso2.com/display/ESB490/File+Inbound+Protocol
> [2] https://docs.wso2.com/display/ESB490/Custom+Inbound+Endpoint
>
> On Thu, Oct 8, 2015 at 7:57 PM, Isuru Ranawaka  wrote:
>
>> Hi Susinda ,
>>
>> Remove protocol attribute.If you define custom class it is not needed  to
>> define protocol.
>>
>> thanks
>>
>> On Thu, Oct 8, 2015 at 8:57 AM, Susinda Perera  wrote:
>>
>>> I'm using following code segment to create a InboundEndpoint  and
>>> serialize it and get the omelement.
>>>
>>> InboundEndpoint inboundEndpoint1 = new InboundEndpoint();
>>> inboundEndpoint1.setName("susinda");
>>> inboundEndpoint1.setSuspend(false);
>>> *inboundEndpoint1.setClassImpl("org.test.MyClass");*
>>> inboundEndpoint1.setProtocol("custom");
>>> inboundEndpoint1.addParameter("inbound.behavior", "behaviourValue");
>>> OMElement inboundEndpointOmElement1 =
>>> InboundEndpointSerializer.serializeInboundEndpoint(inboundEndpoint1);
>>>
>>> The resulted(serialized) OMElement looks like follows, Here *class*
>>> attribute is not set
>>>
>>> http://ws.apache.org/ns/synapse"; name="susinda"
>>> protocol="custom" suspend="false">
>>> 
>>> behaviourValue
>>> 
>>> 
>>>
>>> Correct config should contain class attribute, What is wrong here? am i
>>> doing something wrong or is this a bug, appreciate your help on this.
>>>
>>> Thanks
>>> Susinda
>>>
>>>
>>>
>>>
>>>
>>> --
>>> *Susinda Perera*
>>> Software Engineer
>>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
>>> Mobile:(+94)716049075
>>> Blog: susinda.blogspot.com
>>> WSO2 Inc. http://wso2.com/
>>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Best Regards
>> Isuru Ranawaka
>> M: +94714629880
>> Blog : http://isurur.blogspot.com/
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thank you
> Best Regards
>
> *Rajjaz HM*
> Associate Software Engineer
> WSO2 Inc. 
> lean | enterprise | middleware
> Mobile | +94752833834
> Email   | raj...@wso2.com
> LinkedIn | Blogger | WSO2 Profile
> 
>



-- 
*Susinda Perera*
Software Engineer
B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
Mobile:(+94)716049075
Blog: susinda.blogspot.com
WSO2 Inc. http://wso2.com/
Tel : 94 11 214 5345 Fax :94 11 2145300
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Carbon Cache Listners

2015-10-08 Thread Harsha Thirimanna
Hi Godwin,
Yes this scenario is working fine after fixed some issues and I tested this
in clustered environment. You can follow [1] mail thread to further
understanding about this.

[1] [E*Trade QSP] Cache entry update notification listener not functioning


*Harsha Thirimanna*
Senior Software Engineer; WSO2, Inc.; http://wso2.com
* *
*email: **hars...@wso2.com* * cell: +94 71 5186770 *
*twitter: **http://twitter.com/ *
*harshathirimannlinked-in: **http:
**//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122
*

*Lean . Enterprise . Middleware*


On Thu, Oct 8, 2015 at 3:40 PM, Godwin Amila Shrimal 
wrote:

> Hi,
>
> Found an implementation in [1]
>
> [1]
> https://github.com/wso2/carbon-identity/blob/master/components/entitlement/org.wso2.carbon.identity.entitlement/src/main/java/org/wso2/carbon/identity/entitlement/cache/PolicyCacheUpdateListener.java
>
> Thanks
> Godwin
>
>
>
> On Thu, Oct 8, 2015 at 3:23 PM, Afkham Azeez  wrote:
>
>> Yes, I can remember that someone wrote one. Can you go through the mail
>> archives?
>>
>> On Thu, Oct 8, 2015 at 3:10 PM, Godwin Amila Shrimal 
>> wrote:
>>
>>> Hi
>>>
>>> I need to write a cache listener to listen add/remove operations to
>>> particular cache. Is there existing implementation for this which I can
>>> refer ?
>>>
>>>
>>> Thanks
>>> Godwin
>>>
>>> --
>>> *Godwin Amila Shrimal*
>>> Senior Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94772264165*
>>> linkedin: *http://lnkd.in/KUum6D *
>>> twitter: https://twitter.com/godwinamila
>>>
>>
>>
>>
>> --
>> *Afkham Azeez*
>> Director of Architecture; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://www.apache.org/
>> * *
>> *email: **az...@wso2.com* 
>> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
>> *http://blog.afkham.org* 
>> *twitter: **http://twitter.com/afkham_azeez*
>> 
>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>> *
>>
>> *Lean . Enterprise . Middleware*
>>
>
>
>
> --
> *Godwin Amila Shrimal*
> Senior Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *http://lnkd.in/KUum6D *
> twitter: https://twitter.com/godwinamila
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Clarification on User Account locking in IS 5.1.0

2015-10-08 Thread Isura Karunaratne
On Thursday, October 8, 2015, Chalitha Waldeniyage 
wrote:

> Thanks for the information and i have another concern.
>
> If we locked a user account which resides in the secondary user store,
> Does it need to show the "unlock account" tick option in the user profile
> of that user .
> Currently it doesn't show in the profile and Is that the expected behavior
> or is there any specific config for that.
> It is required to enable 'supported by default' of account lock claim to
> show that option.
>

Thanks
Isura.

>
> On Thu, Oct 8, 2015 at 5:34 PM, Isura Karunaratne  > wrote:
>
>> Hi Chalitha,
>>
>> Account should not unlock until admin unlocks
>>
>> Thanks
>> Isura
>> On Oct 8, 2015 3:08 PM, "Chalitha Waldeniyage" > > wrote:
>>
>>> Hi Isura,
>>>
>>> Can you please tell me,  what is the expected behavior of  setting the
>>> "Authentication.Policy.Account.Lock.Time" property to zero.
>>>
>>> Thanks,
>>> Chalitha.
>>>
>>> --
>>> *Chalitha Maheshwari*
>>> Software Engineer-QA,
>>> WSO2 Inc.
>>>
>>> *E-mail:* chali...@wso2.com
>>> 
>>> *Mobile: *+94710 411 112
>>>
>>
>
>
> --
> *Chalitha Maheshwari*
> Software Engineer-QA,
> WSO2 Inc.
>
> *E-mail:* chali...@wso2.com
> 
> *Mobile: *+94710 411 112
>


-- 
Isura Dilhara Karunaratne
Senior Software Engineer

Mob +94 772 254 810
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DAS] DAS dashboard table-gadget column order

2015-10-08 Thread Thanuja Uruththirakodeeswaran
Hi All,

I was able to change the column order in table gadget by giving the
required columns in gadgetConfig.js file and set the columns varible inside
getColumns() in main.js file as columns = gadgetConfig.columns;

Also if want to change table column titles as we want (Ex: sometime
database table have column as 'MemberId' and in the table gadget we want it
as 'Member Id') by introducing a new property (Ex: LABEL_NAME) in
gadgetConf.js file as shown in [1] and set this property as column title as
in [2].

Complete custom table gadget can be found here [3].

[1].
https://github.com/apache/stratos/blob/stratos-4.1.x/extensions/das/metering-service/capps/stratos-metering-service/Gadget_Member_Status/Member_Status/js/gadgetconf.js

[2].
https://github.com/apache/stratos/blob/stratos-4.1.x/extensions/das/metering-service/capps/stratos-metering-service/Gadget_Member_Status/Member_Status/js/main.js#L106

[3]. 
https://github.com/apache/stratos/tree/stratos-4.1.x/extensions/das/metering-service/capps/stratos-metering-service/Gadget_Member_Status

Thanks.



On Mon, Aug 24, 2015 at 2:56 PM, Gimantha Bandara  wrote:

> Hi Dunith,
>
> Are we internally processing the columns in the schema in gadget
> generation.. Like changing the column order? Or are we simply
> iterating the columns in the schema returned by JS API  when creating
> gadgets?
>
> On 8/24/15, Thanuja Uruththirakodeeswaran  wrote:
> > Hi Gimantha,
> >
> > Is there any solution to get Table Gadget column order as Data Explorer
> > Table column order?
> >
> > Thanks.
> >
> > On Fri, Aug 14, 2015 at 8:20 PM, Thanuja Uruththirakodeeswaran <
> > thanu...@wso2.com> wrote:
> >
> >> Hi Gimantha,
> >>
> >> Yes gadget table columns are not in the order as in schema. Data
> explorer
> >> has same column order as in schema.
> >>
> >> Thanks.
> >> On 14 Aug 2015 18:18, "Gimantha Bandara"  wrote:
> >>
> >>> Columns you define in the schema, does not map to RDBMS physical
> >>> tables' columns. Are you saying that the gadget tables that you
> >>> create, do not have the column order as it is in the schema? Is it in
> >>> the same order in the Data explorer?
> >>>
> >>> On 8/14/15, Thanuja Uruththirakodeeswaran  wrote:
> >>> > Hi Gimantha,
> >>> >
> >>> > I used external HBase DB and DAS embedded H2 DB. I checked with HBase
> >>> table
> >>> > and table-gadget column order same as HBase table. I tried with H2
> >>> table,
> >>> > but I couldn't see column names as I think it was encrypted or
> >>> something.
> >>> > How can I check the column names in DAS embedded H2 database?
> >>> >
> >>> > Thanks.
> >>> >
> >>> > On Fri, Aug 14, 2015 at 1:28 PM, Gimantha Bandara  >
> >>> > wrote:
> >>> >
> >>> >> Hi Thanuja,
> >>> >> Is it same with the H2 table or only the HBase analytics table?
> >>> >>
> >>> >>
> >>> >> On Thu, Aug 13, 2015 at 6:50 PM, Thanuja Uruththirakodeeswaran <
> >>> >> thanu...@wso2.com> wrote:
> >>> >>
> >>> >>> Hi,
> >>> >>>
> >>> >>> I've persisted a event stream in event store which is a HBase
> >>> database.
> >>> >>> Then using the following query I created table in spark
> environment.
> >>> Also
> >>> >>> I
> >>> >>> used H2 database as processed store.
> >>> >>>
> >>> >>> CREATE TEMPORARY TABLE memberinfo
> >>> >>> USING CarbonAnalytics
> >>> >>> OPTIONS (tableName "MEMBER_INFO");
> >>> >>>
> >>> >>> CREATE TEMPORARY TABLE memberdetails
> >>> >>> USING CarbonAnalytics
> >>> >>> OPTIONS (tableName "MEMBER_DETAILS", schema "X STRING, Y STRING, Z
> >>> >>> STRING");
> >>> >>>
> >>> >>> INSERT OVERWRITE TABLE memberdetails select * from memberinfo;
> >>> >>>
> >>> >>> Here MEMBER_INFO - HBase database table, MEMBER_DETAILS - H2
> >>> >>> database
> >>> >>> table
> >>> >>>
> >>> >>> When I use the Data Explorer to see records in table
> >>> >>> "MEMBER_DETAILS",
> >>> >>> column order as specified in schema. But when I created a table
> >>> >>> gadget
> >>> >>> using the same table and added to dashboard, column order is not as
> >>> >>> in
> >>> >>> schema. But I think columns are in the order as in HBase database
> >>> table.
> >>> >>>
> >>> >>> What I have to do to get the columns as in schema order?
> >>> >>>
> >>> >>> Thanks.
> >>> >>>
> >>> >>> --
> >>> >>> 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
> >>> >>>
> >>> >>>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> Gimantha Bandara
> >>> >> Software Engineer
> >>> >> WSO2. Inc : http://wso2.com
> >>> >> Mobile : +94714961919
> >>> >>
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Thanuja Uruththirakodeeswaran
> >>> > Software Engineer
> >>> > WSO2 Inc.;http://wso2.com
> >>> > lean.enterprise.middleware
> >>> >
> >>> > mobile: +94 774363167
> >>> >
> >>>
> >>>
> >>> --
> >>> Gimantha Bandara
> >>> Software En

Re: [Dev] SAML 2.0 based Single Sign-On error when trying to login into secured extension page of ES

2015-10-08 Thread Charitha Goonetilleke
Hi All,

I was able to overcome this issue by
overriding sso-auth-login-controller.jag in ES with custom. Also I
specified, *ignoreReferer* parameter and *requestedPage* parameter in
redirect request which made when authorization required for extension page.
In custom sso-auth-login-controller.jag[2], I used *requestedPage* as
*relayState* of the sso request. Please refer diff[3] with original[4] for
the modifications.

@Manu,

I believe those changes[3] in sso-auth-login-controller.jag should be
applied to both sso-auth-login-controller jags, available in store and
publisher. WDYT?

[1]
https://github.com/wso2-incubator/device-cloud/commit/53bff1876de54d0a38a5e43531f2c8e38a3a6674
[2]
https://github.com/wso2-incubator/device-cloud/blob/53bff1876de54d0a38a5e43531f2c8e38a3a6674/features/iotserver-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/store/extensions/app/store-device-type/pages/sso-auth-login-controller.jag
[3] http://www.mergely.com/31XzH1zo/
[4]
https://github.com/wso2/carbon-store/blob/a994f4973dbd9728fc5532dbeed3ae029aa79a0f/apps/store/extensions/app/store-common/pages/sso-auth-login-controller.jag

On Thu, Oct 8, 2015 at 6:49 PM, Charitha Goonetilleke 
wrote:

> Hi All,
>
> I'm experiencing $subject after logged out. It seems, *Referer* header
> value changed to https://localhost:9443/samlsso?sessionDataKey= some
> how during the logout process. When I'm trying to login again, it is giving
> me SAML 2.0 based Single Sign-On error. In the same time console printing
> "ERROR {org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet} -
>  Failed to retrieve sessionDTO from the cache for key
> 52ca4cfa-823c-4b4c-8462-bb59c94d1e5c".
>
> Do you have any idea, how *Referer* header value set to that? Or if any
> one know possible work around to eliminate this issue, please let me know.
>
> Please refer the following sso trace for complete scenario.
>
> +
> GET https://localhost:9443/store/pages/groups HTTP/1.1
> Host: localhost:9443
> User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:41.0) Gecko/20100101 
> Firefox/41.0
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Language: en-US,en;q=0.5
> Accept-Encoding: gzip, deflate
> Referer: https://localhost:9443/store/assets/deviceType/list
> Cookie: JSESSIONID=3EE609CF217CA096FE8F9ADA74793BFE; 
> samlssoTokenId=5277eb7e-e3c9-46ef-b762-98dc80e7eaca; 
> JSESSIONID=1C3D7204305BF8D305C2B8788BE047AA; 
> commonAuthId=9928ae2b-89a9-41a8-aaca-ddeb9ecee7be
>
> HTTP/?.? 200 OK
> Content-Type: text/html
> Transfer-Encoding: chunked
> Content-Encoding: gzip
> Vary: Accept-Encoding
> Date: Thu, 08 Oct 2015 13:08:54 GMT
> Server: WSO2 Carbon Server
>
>
> +
> GET 
> https://localhost:9443/store/extensions/app/store-device-type/themes/store/css/navigation-custom.css
>  HTTP/1.1
> Host: localhost:9443
> User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:41.0) Gecko/20100101 
> Firefox/41.0
> Accept: text/css,*/*;q=0.1
> Accept-Language: en-US,en;q=0.5
> Accept-Encoding: gzip, deflate
> Referer: https://localhost:9443/store/pages/groups
> Cookie: JSESSIONID=3EE609CF217CA096FE8F9ADA74793BFE; 
> samlssoTokenId=5277eb7e-e3c9-46ef-b762-98dc80e7eaca; 
> JSESSIONID=1C3D7204305BF8D305C2B8788BE047AA; 
> commonAuthId=9928ae2b-89a9-41a8-aaca-ddeb9ecee7be
>
> HTTP/?.? 304 Not Modified
> Etag: W/"2212-1444293524000"
> Date: Thu, 08 Oct 2015 13:08:54 GMT
> Server: WSO2 Carbon Server
>
>
> +
> GET 
> https://localhost:9443/store/extensions/app/store-device-type/themes/store/js/libs/utils.js
>  HTTP/1.1
> Host: localhost:9443
> User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:41.0) Gecko/20100101 
> Firefox/41.0
> Accept: */*
> Accept-Language: en-US,en;q=0.5
> Accept-Encoding: gzip, deflate
> Referer: https://localhost:9443/store/pages/groups
> Cookie: JSESSIONID=3EE609CF217CA096FE8F9ADA74793BFE; 
> samlssoTokenId=5277eb7e-e3c9-46ef-b762-98dc80e7eaca; 
> JSESSIONID=1C3D7204305BF8D305C2B8788BE047AA; 
> commonAuthId=9928ae2b-89a9-41a8-aaca-ddeb9ecee7be
>
> HTTP/?.? 304 Not Modified
> Etag: W/"961-1444293524000"
> Date: Thu, 08 Oct 2015 13:08:54 GMT
> Server: WSO2 Carbon Server
>
>
> +
> GET 
> https://localhost:9443/store/extensions/app/store-device-type/themes/store/js/group-listing.js
>  HTTP/1.1
> Host: localhost:9443
> User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:41.0) Gecko/20100101 
> Firefox/41.0
> Accept: */*
> Accept-Language: en-US,en;q=0.5
> Accept-Encoding: gzip, deflate
> Referer: https://localhost:9443/store/pages/groups
> Cookie: JSESSIONID=3EE609CF217CA096FE8F9ADA74793BFE; 
> samlssoTokenId=5277eb7e-e3c9-46ef-b762-98dc80e7eaca; 
> JSESSIONID=1C3D7204305BF8D305C2B8788BE047AA; 
> commonAuthId=9928ae2b-89a9-41a8-aaca-ddeb9ecee7be
>
> HTTP/?.? 304 Not Modified
> Etag: W/"15180-1444293524000"
> Date: Thu, 08 Oct 2015 13:08:54 GMT
> Server: WSO2 Carbon Server
>
>
> +++

Re: [Dev] [VOTE] Release WSO2 Developer Studio 3.8.0 RC 2

2015-10-08 Thread Nuwan Pallewela
I have tested the following areas,
App server tools
ESB Basic Functionalities
Registry Basic Functionalities
Carbon servers instances
BRS drl file importing
Capp deployment

And found following issues
https://wso2.org/jira/browse/TOOLS-3235
https://wso2.org/jira/browse/TOOLS-3236
https://wso2.org/jira/browse/TOOLS-3237
https://wso2.org/jira/browse/TOOLS-3238

Thanks,
Nuwan

On Thu, Oct 8, 2015 at 5:00 PM, Susinda Perera  wrote:

> Issues found when testing inbound endpoints is listed below
> https://wso2.org/jira/browse/TOOLS-3243
> https://wso2.org/jira/browse/TOOLS-3244
>
>
> On Thu, Oct 8, 2015 at 4:51 PM, Susinda Perera  wrote:
>
>> I have tested following Areas.
>>
>> All inbound endpoints
>> All registry resources
>> Fixes given from 3.8.0 3.8.0-Rc and RC1
>>
>>
>>
>> On Thu, Oct 8, 2015 at 4:43 PM, Awanthika Senarath 
>> wrote:
>>
>>> Hi all,
>>>
>>> I have tested the basic functionalities related to :
>>>
>>> *Basic Functionalities :*
>>>
>>>
>>>- ESB projects
>>>- DSS projects
>>>- Registry Resource projects
>>>- Carbon servers (remote/local) instances
>>>- Capp deployment/Redeployment with changes in ESB project
>>>- AppFactory/ Cloud perspectives
>>>- Maven Car deploy plugin
>>>
>>>
>>> *New Features Added :*
>>>
>>>
>>>- Publisher/Foreach new mediator addition, Custom class mediator
>>>- Artifact Renaming
>>>- War file Deployment/Exploded web apps/ Automatic updating(hot
>>>deployment)
>>>- APIM perspective- artifact creation/deletion/renaming redeployment
>>>with changes
>>>- Carbon 4.4.0 based servers
>>>
>>>
>>> All functionalities are functioning satisfactorily and have no blockers
>>> were observed on testing, +1
>>>
>>> Regards
>>> Awanthika Senarath
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94717681791
>>>
>>
>>
>>
>> --
>> *Susinda Perera*
>> Software Engineer
>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
>> Mobile:(+94)716049075
>> Blog: susinda.blogspot.com
>> WSO2 Inc. http://wso2.com/
>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>
>>
>
>
> --
> *Susinda Perera*
> Software Engineer
> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
> Mobile:(+94)716049075
> Blog: susinda.blogspot.com
> WSO2 Inc. http://wso2.com/
> Tel : 94 11 214 5345 Fax :94 11 2145300
>
>


-- 
--

*Nuwan Chamara Pallewela*


*Software Engineer*

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

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


Re: [Dev] [DEV][Patch Automation][APIM] How to retrieve a perticualt log from a Class using LogViewerClient?

2015-10-08 Thread Saneth Dharmakeerthi
Hi Abimaran,

If you run this test case on DEBUG mode and execute the bellow line
LogEvent[] timeoutLogs = logViewerClient.getLogs("WARN", "TimeoutHandler",
"", "AM");
Do you get the needed information.(execute this few times, and check
whether you get the log ) ?


IF this happens, you have to implement the log reading task inside a loop.
You have to try several time keeping small thread sleeps until you get the
needed log information. Put a max wait time to the loop as a threshold.




Thanks and Best Regards,

Saneth Dharmakeerthi
Senior Software Engineer
WSO2, Inc.
Mobile: +94772325511

On Thu, Oct 8, 2015 at 5:24 PM, Abimaran Kugathasan 
wrote:

> HI Waruna,
>
> This is for APIM 1.6.0 which uses automation framewotk version 4.2.1.
>
> LogViewerClient has these below methods only in that version.
>
> getLogs(String logType, String searchKey, String domain, String
> serverKey),
> getServiceNames(),
> getAllSystemLogs(),
> clearLogs()
>
>
> On Thu, Oct 8, 2015 at 5:15 PM, Waruna Perera  wrote:
>
>> Hi,
>>
>> getLogs is deprecated now. Can you use getRemoteLogs and see the result?
>>
>>
>> https://github.com/wso2/carbon-platform-integration-utils/blob/94f80cd6e2352ac832c40d572562407c3963ee0f/common-admin-clients/src/main/java/org/wso2/carbon/integration/common/admin/client/LogViewerClient.java
>>
>> On Thu, Oct 8, 2015 at 4:58 PM, Abimaran Kugathasan 
>> wrote:
>>
>>> Hi Waruna,
>>>
>>> Thanks for the reply.
>>>
>>> No, I didn't use time delay. I have attached the class.
>>>
>>> On Thu, Oct 8, 2015 at 4:53 PM, Waruna Perera  wrote:
>>>
 Hi,

 Do you use in time delay in between get all logs? Please provide the
 full code block. Some times in our test cases we use time out delays to get
 logs.

 Thanks,

 Waruna

 On Thu, Oct 8, 2015 at 3:08 PM, Abimaran Kugathasan 
 wrote:

> Any updates on this?
>
> On Thu, Oct 8, 2015 at 12:51 PM, Abimaran Kugathasan <
> abima...@wso2.com> wrote:
>
>> Hi,
>>
>> I want to get a log from a perticular class. I have
>> used LogViewerClient. Please check my below code snaps.
>>
>> I need to get the below log.
>>
>> [2015-10-08 12:35:38,966]  WARN - TimeoutHandler Expiring message ID
>>> : urn:uuid:354104e6-eea7-41fd-88c7-de19d0b5a27f; dropping message after
>>> timeout of : 10 seconds
>>
>>
>>
>> // Initialized the client
>>
>> LogViewerClient logViewerClient = new 
>> LogViewerClient(amServer.getBackEndUrl(), amServer.getSessionCookie());
>>
>> // Calling it with parameters
>>
>> LogEvent[] timeoutLogs = logViewerClient.getLogs("WARN", 
>> "TimeoutHandler", "", "AM");
>>
>> This returns empty array.
>>
>>
>> I could get the system logs through below method.
>>
>> LogEvent[] logEvents = logViewerClient.getAllSystemLogs();
>>
>>
>> How can I get above mention log?
>>
>>
>> --
>>
>> Thanks
>> Abimaran Kugathasan
>>
>> Software Engineer | WSO2 Inc
>> Data & APIs Technologies Team
>> Mobile : +94 773922820
>>
>> 
>> 
>>   
>>   
>>
>>
>
>
> --
> Thanks
> Abimaran Kugathasan
>
> Software Engineer | WSO2 Inc
> Data & APIs Technologies Team
> Mobile : +94 773922820
>
> 
> 
>   
> 
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Waruna Perera
 Senior Software Engineer - Test Automation
 Mobile: +94 77 3867037
 WSO2, Inc.; http://wso2.com/
 lean . enterprise . middlewear.

>>>
>>>
>>>
>>> --
>>> Thanks
>>> Abimaran Kugathasan
>>>
>>> Software Engineer | WSO2 Inc
>>> Data & APIs Technologies Team
>>> Mobile : +94 773922820
>>>
>>> 
>>> 
>>>   
>>> 
>>>
>>>
>>
>>
>> --
>> Waruna Perera
>> Senior Software Engineer - Test Automation
>> Mobile: +94 77 3867037
>> WSO2, Inc.; http://wso2.com/
>> lean . enterprise . middlewear.
>>
>
>
>
> --
> Thanks
> Abimaran Kugathasan
>
> Software Engineer | WSO2 Inc
> Data & APIs Technologies Team
> Mobile : +94 773922820
>
> 
> 
>   
> 
>
>
> ___
> Dev m

Re: [Dev] [Private PaaS] API Manager template module seems be messed up

2015-10-08 Thread Rajkumar Rajaratnam
Hi Imesh,

Sorry for the late response. Here is the JIRA [1].

[1] https://wso2.org/jira/browse/PPC-7

Thanks,
Raj.

On Tue, Sep 22, 2015 at 9:48 PM, Imesh Gunaratne  wrote:

> Hi Raj,
>
> Can you please report a JIRA for this with the relevant information?
>
> Thanks
>
> On Wed, Sep 16, 2015 at 12:55 PM, Rajkumar Rajaratnam 
> wrote:
>
>> Hi Guys,
>>
>> Have we fixed the two issues discussed in this thread? If not, better to
>> track it via a JIRA.
>>
>> Thanks,
>> Raj.
>>
>> On Thu, Sep 10, 2015 at 4:53 PM, Pubudu Gunatilaka 
>> wrote:
>>
>>> Hi,
>>>
>>> +1 for this approach
>>>
>>> What we initially thought was to list down all the parameters in the
>>> module.ini file which are not default values. User can either override
>>> those values from environment variables or use the module.ini file.
>>>
>>> Thank you!
>>>
>>> On Thu, Sep 10, 2015 at 10:16 AM, Rajkumar Rajaratnam <
>>> rajkum...@wso2.com> wrote:
>>>
 What I meant is, why don't we do this?

 if CONFIG_PARAM_LOCAL_MEMBER_HOST is set {
 {{ CONFIG_PARAM_LOCAL_MEMBER_HOST
 }}
 } else {
 127.0.0.1
 }

 Thanks.

 On Thu, Sep 10, 2015 at 3:59 PM, Rajkumar Rajaratnam <
 rajkum...@wso2.com> wrote:

> Any reason to treat the following config parameters differently, than
> other config parameters?
>
> CONFIG_PARAM_CLUSTERING=false
> CONFIG_PARAM_DOMAIN=wso2.carbon.domain
> CONFIG_PARAM_WKA_MEMBERS=[127.0.0.1:4000]
> CONFIG_PARAM_LOCAL_MEMBER_HOST=127.0.0.1
> CONFIG_PARAM_LOCAL_MEMBER_PORT=4000
> CONFIG_PARAM_PORT_OFFSET=0
> CONFIG_PARAM_MB_PORT=61616
> CONFIG_PARAM_EMBEDDED_LDAP=true
>
> These are enabled in module.ini file by default, where as other
> parameters are disabled. And the default values of these config elements
> are removed from templates files and moved to module.ini.
>
> This is not consistent with other config parameters. Because of this,
> we always have to pass these parameters to configurator, even though we
> don't need to override the default ones.
>
> By accident, I commented out all the config parameters from module.ini
> and I have passed only the needed parameters to the configurator as
> environment variables via puppet. I ended up with some issues since I
> haven't pass the above parameters as environment variables (even though I
> don't want to override the default ones!). So isn't good if leave the
> default values in the template files itself? This way, we don't have
> explicitly pass the default values, just like other config parameters.
>
> wdyt?
>
> Thanks,
> Raj.
>
> On Tue, Sep 8, 2015 at 1:19 AM, Rajkumar Rajaratnam <
> rajkum...@wso2.com> wrote:
>
>>
>>
>> On Tue, Sep 8, 2015 at 1:16 AM, Reka Thirunavukkarasu 
>> wrote:
>>
>>> Hi Raj,
>>>
>>> Yah..Seems some old reference is there in the
>>> master-datasources.xml.template which will not affect the 
>>> configurations,
>>> if the parameters are defined correctly in the cartridge definition. 
>>> Please
>>> ignore the section with CONFIG_PARAM_CONFIG_DB_APIM_URL.
>>>
>>> Please refer [1] for the sample configuration. We will clean this in
>>> the immediate next release(beta)..
>>>
>>
>> ​+1. Not a blocker or urgent. ​
>>
>>
>>>
>>> [1]
>>> https://github.com/wso2/product-private-paas/blob/master/samples/cartridges/ec2/wso2am-190/wso2am-190-gw-manager.json
>>>
>>> Thanks,
>>> Reka
>>>
>>> On Mon, Sep 7, 2015 at 6:19 PM, Rajkumar Rajaratnam <
>>> rajkum...@wso2.com> wrote:
>>>
 Hi,

 I think API Manager's master-datasources.xml.template is messed up.
 For example, same db username/password parameter is used for all the
 databases and jdbc/WSO2REG_DB is defined twice with two different
 if-checks, why?

 Please check and fix [1]. Please check other modules also.

 [1]
 https://github.com/wso2/product-private-paas/blob/master/cartridges/templates-modules/wso2am-1.9.0/templates/repository/conf/datasources/master-datasources.xml.template

 Thanks,
 Raj.

 --
 Rajkumar Rajaratnam
 Committer & PMC Member, Apache Stratos
 Software Engineer, WSO2

 Mobile : +94777568639
 Blog : rajkumarr.com
 ​​


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


>>>
>>>
>>> --
>>> Reka Thirunavukkarasu
>>> Senior Software Engineer,
>>> WSO2, Inc.:http://wso2.com,
>>> Mobile: +94776442007
>>>
>>>
>>>
>>
>>
>> --
>> Rajkumar Rajaratnam
>> Committer & PMC Member, Apache Stratos
>> Softwar

Re: [Dev] [AF] Maven war plugin packs undeclared jars into the artifact

2015-10-08 Thread Manjula Rathnayake
Hi Kasun,

+1 on the suggested solution. Can you please provide the maven plugin
configuration when we have jars that are not defined as dependencies?

thank you.

On Wed, Oct 7, 2015 at 5:50 PM, Kasun De Silva  wrote:

> I'm currently working on [1], and the issue can be describe as below.
>
> AF/AppCloud provides maven webapp archetype with preconfigured maven war
> plugin, and we'll get following archetype structure,
>
> ├── pom.xml
> ├── src
> │   └── main
> │   ├── resources
> │   └── webapp
> │   ├── index.jsp
> │   ├── META-INF
> │   └── WEB-INF
> │   ├── classes
> │   ├── lib
> │   └── web.xml
> └── target
> ├── classes
> ├── sample_app.war
> └── surefire
>
> Executing following steps will reproduce the issue against the above app,
>
> 1. Add a dependency to the pom.xml and build it. Check the war file and
> you will see the jar there.
> 2. Change the version of above dependency. Lets assume previous version is
> 1.0.0 and new one is 2.0.0. Build again.
> 3. When you check the built war file, you will see both versions inside it.
>
> The reason for this behavior is, with the maven war plugin, there is a
> webapp folder created. When we build the app, there is a *WEB-INF/lib* 
> directory
> created inside that one and the jars (dependencies) are copied to it.
>
> └── WEB-INF
> │   ├── classes
> │   ├── lib
> │   │   └── dependancy-1.0.0.jar
> │   └── web.xml
>
> After executing the second step,
>
> └── WEB-INF
> │   ├── classes
> │   ├── lib
> │   │   ├── dependancy-1.0.0.jar
> │   │   └── dependancy-2.0.0.jar
> │   └── web.xml
>
> When we rebuild (even with a maven clean install), those jars are not
> getting cleaned and new jars are added.
>
> Even when we remove these dependancies from pom.xml this jars will still
> exists and will result in adding unnecessary jars into the artifact.
>
> A possible solution would be we can add a maven clean plugin and clean the
> content on the *WEB-INF/lib *directory while doing the mvn:clean.
>
> But what if the user has other libraries and other content which are not
> added by maven dependencies and still required.  In that case we
> can exclude [2] those in maven clean plugin.
>
> WDYT about the this solution ? Or are there any possible solutions to
> prevent this behavior ?
>
>
>
> [1] https://wso2.org/jira/browse/APPFAC-3482
>
>
> Thanks,
> Kasun
>
> *Kasun de Silva*
> Software Engineer | *WSO2 Inc.*; http://wso2.com
> lean.enterprise.middleware
>
> email   : kas...@wso2.com
> mobile : +94 77 794 4260
>
>


-- 
Manjula Rathnayaka
Associate Technical Lead
WSO2, Inc.
Mobile:+94 77 743 1987
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [AF] Clarification on tenant creation workflow configuration.

2015-10-08 Thread Lahiru Manohara
Hi All,

In Appfactory, user can configure either default workflow (in jvm) or
external workflow (BPS server) from the appfactory.xml file within
following element.


 
 
https://process.appfactory.private.wso2.com:9543/services/

 
 
 org.wso2.carbon.appfactory.core.workflow.TenantCreationExternalWorkflowExecutor
 


But in case user forget to configure a class inside the "Property" element,
null value is getting. Current implementation this was handled by giving a
warning and assigning default workflow.

 if (StringUtils.isBlank(executorClass)) {
executorClass = WorkflowConstant.DEFAULT_WORKFLOW_CLASS;
String message = "The executor class is not define in
appfactory.xml because default workflow is "
+ "executing. The default workflow class is : " +
executorClass;
log.warn(message);
}

Is this approach confusing the user? WDYT ?

Thanks
-- 
Best regards,

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


[Dev] Single tenant concurrent application creation fails for more than 10 apps

2015-10-08 Thread Aiyadurai Rajeevan
Hi All,

I have been doing a load test on WSO2 AppFactory where I'm trying to create
15 apps in 15 threads with a rampup period of 10sec.(There is not if we
increase the ramup period)

I was able to create ~5 apps and the rest app creation failed due to s2git
repo not synced for the next application push. So we implemented a pull and
rebase before push if its failed in the first push try, With this solution
we could able to create minimum of 10 application in each try. The rest of
the apps are failing because of below fact.

Say 11th application being pushed(not commited), at the same time 12th
application get pull of the tenant repo space, So it will not have 11th
application's update. Now 11th push has been completed and  now 12th
application push failing as it doesn't have the updated tenant repo space.

So I tried to synchronized the remote repo URL and noticed the success
application creation went down further (6 or 7 application success). Anyhow
synchronizing is not a good approach as this will reduce the performance.

Any suggestions to overcome this issue would be much appreciated.

Thanks & Regards,
S.A.Rajeevan
Software Engineer WSO2 Inc
E-Mail: rajeev...@wso2.com | Mobile : +94776411636
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AF] Maven war plugin packs undeclared jars into the artifact

2015-10-08 Thread Kasun De Silva
Hi Manjula,

In that case we can configure maven clean plugin as follows, please notice
the exlcude section.

  
maven-clean-plugin
2.6.1

  

  src/main/webapp/WEB-INF/lib/
  false
*  *
***/additional-library.jar*
*  *

  

  


And this not applicable only to jars, we can exclude any of the content in
lib directory as user prefers.

Thanks,
Kasun

*Kasun de Silva*
Software Engineer | *WSO2 Inc.*; http://wso2.com
lean.enterprise.middleware

email   : kas...@wso2.com
mobile : +94 77 794 4260


On Fri, Oct 9, 2015 at 10:43 AM, Manjula Rathnayake 
wrote:

> Hi Kasun,
>
> +1 on the suggested solution. Can you please provide the maven plugin
> configuration when we have jars that are not defined as dependencies?
>
> thank you.
>
> On Wed, Oct 7, 2015 at 5:50 PM, Kasun De Silva  wrote:
>
>> I'm currently working on [1], and the issue can be describe as below.
>>
>> AF/AppCloud provides maven webapp archetype with preconfigured maven war
>> plugin, and we'll get following archetype structure,
>>
>> ├── pom.xml
>> ├── src
>> │   └── main
>> │   ├── resources
>> │   └── webapp
>> │   ├── index.jsp
>> │   ├── META-INF
>> │   └── WEB-INF
>> │   ├── classes
>> │   ├── lib
>> │   └── web.xml
>> └── target
>> ├── classes
>> ├── sample_app.war
>> └── surefire
>>
>> Executing following steps will reproduce the issue against the above app,
>>
>> 1. Add a dependency to the pom.xml and build it. Check the war file and
>> you will see the jar there.
>> 2. Change the version of above dependency. Lets assume previous version
>> is 1.0.0 and new one is 2.0.0. Build again.
>> 3. When you check the built war file, you will see both versions inside
>> it.
>>
>> The reason for this behavior is, with the maven war plugin, there is a
>> webapp folder created. When we build the app, there is a *WEB-INF/lib* 
>> directory
>> created inside that one and the jars (dependencies) are copied to it.
>>
>> └── WEB-INF
>> │   ├── classes
>> │   ├── lib
>> │   │   └── dependancy-1.0.0.jar
>> │   └── web.xml
>>
>> After executing the second step,
>>
>> └── WEB-INF
>> │   ├── classes
>> │   ├── lib
>> │   │   ├── dependancy-1.0.0.jar
>> │   │   └── dependancy-2.0.0.jar
>> │   └── web.xml
>>
>> When we rebuild (even with a maven clean install), those jars are not
>> getting cleaned and new jars are added.
>>
>> Even when we remove these dependancies from pom.xml this jars will still
>> exists and will result in adding unnecessary jars into the artifact.
>>
>> A possible solution would be we can add a maven clean plugin and clean
>> the content on the *WEB-INF/lib *directory while doing the mvn:clean.
>>
>> But what if the user has other libraries and other content which are not
>> added by maven dependencies and still required.  In that case we
>> can exclude [2] those in maven clean plugin.
>>
>> WDYT about the this solution ? Or are there any possible solutions to
>> prevent this behavior ?
>>
>>
>>
>> [1] https://wso2.org/jira/browse/APPFAC-3482
>>
>>
>> Thanks,
>> Kasun
>>
>> *Kasun de Silva*
>> Software Engineer | *WSO2 Inc.*; http://wso2.com
>> lean.enterprise.middleware
>>
>> email   : kas...@wso2.com
>> mobile : +94 77 794 4260
>>
>>
>
>
> --
> Manjula Rathnayaka
> Associate Technical Lead
> WSO2, Inc.
> Mobile:+94 77 743 1987
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AF] Clarification on tenant creation workflow configuration.

2015-10-08 Thread Samith Dassanayake
Hi Lahiru,

I'm +1 for the above approach.  But If you are proceeding with the above
approach, you have to provide the workflow type in the warn message as
well. On the other hand since this is a mandatory field, It is better to
add detailed description about this field in appfactory.xml as a comment.

Regards,
Samith

On Fri, Oct 9, 2015 at 10:48 AM, Lahiru Manohara  wrote:

> Hi All,
>
> In Appfactory, user can configure either default workflow (in jvm) or
> external workflow (BPS server) from the appfactory.xml file within
> following element.
>
> 
>  
>  
> 
> https://process.appfactory.private.wso2.com:9543/services/
>  
>  
>   name="ClassName">org.wso2.carbon.appfactory.core.workflow.TenantCreationExternalWorkflowExecutor
>  
> 
>
> But in case user forget to configure a class inside the "Property"
> element, null value is getting. Current implementation this was handled by
> giving a warning and assigning default workflow.
>
>  if (StringUtils.isBlank(executorClass)) {
> executorClass = WorkflowConstant.DEFAULT_WORKFLOW_CLASS;
> String message = "The executor class is not define in
> appfactory.xml because default workflow is "
> + "executing. The default workflow class is : " +
> executorClass;
> log.warn(message);
> }
>
> Is this approach confusing the user? WDYT ?
>
> Thanks
> --
> Best regards,
>
> *Lahiru Manohara*
> *Software Engineer*
> Mobile: +94716561576
> WSO2 Inc. | http://wso2.com
> lean.enterprise.middleware
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Best Regards

Samith Dassanayake
Software Engineer | Cloud TG
WSO2, Inc. | http://wso2.com
lean. enterprise. middleware

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


Re: [Dev] [AF] Clarification on tenant creation workflow configuration.

2015-10-08 Thread Manjula Rathnayake
Hi all,

+1 with proper comments in appfactory.xml mentioning the usage, default
implementation, if nothing is configured, the warning message etc.

thank you.

On Fri, Oct 9, 2015 at 11:04 AM, Samith Dassanayake  wrote:

> Hi Lahiru,
>
> I'm +1 for the above approach.  But If you are proceeding with the above
> approach, you have to provide the workflow type in the warn message as
> well. On the other hand since this is a mandatory field, It is better to
> add detailed description about this field in appfactory.xml as a comment.
>
> Regards,
> Samith
>
> On Fri, Oct 9, 2015 at 10:48 AM, Lahiru Manohara 
> wrote:
>
>> Hi All,
>>
>> In Appfactory, user can configure either default workflow (in jvm) or
>> external workflow (BPS server) from the appfactory.xml file within
>> following element.
>>
>> 
>>  
>>  
>> 
>> https://process.appfactory.private.wso2.com:9543/services/
>>  
>>  
>>  > name="ClassName">org.wso2.carbon.appfactory.core.workflow.TenantCreationExternalWorkflowExecutor
>>  
>> 
>>
>> But in case user forget to configure a class inside the "Property"
>> element, null value is getting. Current implementation this was handled by
>> giving a warning and assigning default workflow.
>>
>>  if (StringUtils.isBlank(executorClass)) {
>> executorClass = WorkflowConstant.DEFAULT_WORKFLOW_CLASS;
>> String message = "The executor class is not define in
>> appfactory.xml because default workflow is "
>> + "executing. The default workflow class is : " +
>> executorClass;
>> log.warn(message);
>> }
>>
>> Is this approach confusing the user? WDYT ?
>>
>> Thanks
>> --
>> Best regards,
>>
>> *Lahiru Manohara*
>> *Software Engineer*
>> Mobile: +94716561576
>> WSO2 Inc. | http://wso2.com
>> lean.enterprise.middleware
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Best Regards
>
> Samith Dassanayake
> Software Engineer | Cloud TG
> WSO2, Inc. | http://wso2.com
> lean. enterprise. middleware
>
> Mobile : +947 76207351
> Blog : buddycode.blogspot.com
>



-- 
Manjula Rathnayaka
Associate Technical Lead
WSO2, Inc.
Mobile:+94 77 743 1987
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AF] Clarification on tenant creation workflow configuration.

2015-10-08 Thread Mahesh Chinthaka
Hi Lahiru,

This seems perfectly fine for me as well. So +1
If you put the selected default class in the log message, that would be
more convenient for the user.

Thanks

On Fri, Oct 9, 2015 at 11:04 AM, Samith Dassanayake  wrote:

> Hi Lahiru,
>
> I'm +1 for the above approach.  But If you are proceeding with the above
> approach, you have to provide the workflow type in the warn message as
> well. On the other hand since this is a mandatory field, It is better to
> add detailed description about this field in appfactory.xml as a comment.
>
> Regards,
> Samith
>
> On Fri, Oct 9, 2015 at 10:48 AM, Lahiru Manohara 
> wrote:
>
>> Hi All,
>>
>> In Appfactory, user can configure either default workflow (in jvm) or
>> external workflow (BPS server) from the appfactory.xml file within
>> following element.
>>
>> 
>>  
>>  
>> 
>> https://process.appfactory.private.wso2.com:9543/services/
>>  
>>  
>>  > name="ClassName">org.wso2.carbon.appfactory.core.workflow.TenantCreationExternalWorkflowExecutor
>>  
>> 
>>
>> But in case user forget to configure a class inside the "Property"
>> element, null value is getting. Current implementation this was handled by
>> giving a warning and assigning default workflow.
>>
>>  if (StringUtils.isBlank(executorClass)) {
>> executorClass = WorkflowConstant.DEFAULT_WORKFLOW_CLASS;
>> String message = "The executor class is not define in
>> appfactory.xml because default workflow is "
>> + "executing. The default workflow class is : " +
>> executorClass;
>> log.warn(message);
>> }
>>
>> Is this approach confusing the user? WDYT ?
>>
>> Thanks
>> --
>> Best regards,
>>
>> *Lahiru Manohara*
>> *Software Engineer*
>> Mobile: +94716561576
>> WSO2 Inc. | http://wso2.com
>> lean.enterprise.middleware
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Best Regards
>
> Samith Dassanayake
> Software Engineer | Cloud TG
> WSO2, Inc. | http://wso2.com
> lean. enterprise. middleware
>
> Mobile : +947 76207351
> Blog : buddycode.blogspot.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Inbound endpoint default values

2015-10-08 Thread Susinda Perera
[+ Dev group]

On Fri, Oct 9, 2015 at 11:21 AM, Susinda Perera  wrote:

> ESB team,
>
> Could you please suggest the default values for the (bolded parameters)
> following inbound endpoints. I came up with following values, is this
> values OK?
>
>suspend="false" xmlns="http://ws.apache.org/ns/synapse";>
>   
> polling
>   
> 
>
> http://ws.apache.org/ns/synapse";>
>   
> *100*
> true
> true
>* zookeeperConnect*
> *http://group.id>">sampleGroupID*
> application/xml
> highlevel
> *sampleTopic*
> 0
> false
> smallest
> false
> roundrobin
> zookeeper
> false
>   
> 
>
>
> http://ws.apache.org/ns/synapse";>
>   
> true
> true
> * name="rabbitmq.connection.factory">connection_factory*
> *http://rabbitmq.server.host.name>">loclahost*
> *5672*
> *http://rabbitmq.server.user.name>">admin*
> *admin*
> *http://rabbitmq.queue.name>">queue_name*
> *http://rabbitmq.exchange.name>">excahnge_name*
>   
>
>
>
> --
> *Susinda Perera*
> Software Engineer
> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
> Mobile:(+94)716049075
> Blog: susinda.blogspot.com
> WSO2 Inc. http://wso2.com/
> Tel : 94 11 214 5345 Fax :94 11 2145300
>
>


-- 
*Susinda Perera*
Software Engineer
B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
Mobile:(+94)716049075
Blog: susinda.blogspot.com
WSO2 Inc. http://wso2.com/
Tel : 94 11 214 5345 Fax :94 11 2145300
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Inbound endpoint default values

2015-10-08 Thread Chanaka Fernando
Hi Kathees/Maheeka,

Can you comment on kafka and rabbitmq related params?

@Susinda: For the custom inbound parameter, we can use the same approach
which we are using for custom class mediators and custom scheduled tasks.

On Fri, Oct 9, 2015 at 11:23 AM, Susinda Perera  wrote:

> [+ Dev group]
>
> On Fri, Oct 9, 2015 at 11:21 AM, Susinda Perera  wrote:
>
>> ESB team,
>>
>> Could you please suggest the default values for the (bolded parameters)
>> following inbound endpoints. I came up with following values, is this
>> values OK?
>>
>> >   suspend="false" xmlns="http://ws.apache.org/ns/synapse";>
>>   
>> polling
>>   
>> 
>>
>> http://ws.apache.org/ns/synapse";>
>>   
>> *100*
>> true
>> true
>>* zookeeperConnect*
>> *http://group.id>">sampleGroupID*
>> application/xml
>> highlevel
>> *sampleTopic*
>> 0
>> false
>> smallest
>> false
>> roundrobin
>> zookeeper
>> false
>>   
>> 
>>
>>
>> http://ws.apache.org/ns/synapse";>
>>   
>> true
>> true
>> *> name="rabbitmq.connection.factory">connection_factory*
>> *http://rabbitmq.server.host.name>">loclahost*
>> *5672*
>> *http://rabbitmq.server.user.name>">admin*
>> *admin*
>> *http://rabbitmq.queue.name>">queue_name*
>> *http://rabbitmq.exchange.name>">excahnge_name*
>>   
>>
>>
>>
>> --
>> *Susinda Perera*
>> Software Engineer
>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
>> Mobile:(+94)716049075
>> Blog: susinda.blogspot.com
>> WSO2 Inc. http://wso2.com/
>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>
>>
>
>
> --
> *Susinda Perera*
> Software Engineer
> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
> Mobile:(+94)716049075
> Blog: susinda.blogspot.com
> WSO2 Inc. http://wso2.com/
> Tel : 94 11 214 5345 Fax :94 11 2145300
>
>


-- 
--
Chanaka Fernando
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][ESB][Connector] Issue with empty response

2015-10-08 Thread Malaka Silva
Hi Carbon Team,

I guess we are taking about the same issues mentioned in [1]

Seems like the fix mentioned is in [2]. However in latest code found the
fix [3]

AFAIK the original fix is correct.

[1] https://wso2.org/jira/browse/ESBJAVA-2575

[2]
+ if(in.available() != 0) {

-in = new GZIPInputStream(in);
+in = new GZIPInputStream(in);
+}

[3]
https://github.com/wso2/wso2-axis2/commit/b1267c53fc9d246e0a0e404e2699d44e41ea131b

On Thu, Oct 8, 2015 at 3:45 PM, Jay  wrote:

> Hi,
>
> I have attached both axis configuration and wire log here with.
>
> axis2.xml
> 
> log.txt 
>
> Thanks,
> Janaka
>
>
>
> --
> View this message in context:
> http://wso2-oxygen-tank.10903.n7.nabble.com/DEV-ESB-Connector-Issue-with-empty-response-tp126711p126724.html
> Sent from the WSO2 Development mailing list archive at Nabble.com.
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/


Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Inbound endpoint default values

2015-10-08 Thread Susinda Perera
@ chanaka : Like in scheduled tasks do you have a already available custom
class for this, if not what would be the class name which would likely to
have.


On Fri, Oct 9, 2015 at 11:26 AM, Chanaka Fernando  wrote:

> Hi Kathees/Maheeka,
>
> Can you comment on kafka and rabbitmq related params?
>
> @Susinda: For the custom inbound parameter, we can use the same approach
> which we are using for custom class mediators and custom scheduled tasks.
>
> On Fri, Oct 9, 2015 at 11:23 AM, Susinda Perera  wrote:
>
>> [+ Dev group]
>>
>> On Fri, Oct 9, 2015 at 11:21 AM, Susinda Perera  wrote:
>>
>>> ESB team,
>>>
>>> Could you please suggest the default values for the (bolded parameters)
>>> following inbound endpoints. I came up with following values, is this
>>> values OK?
>>>
>>> >>   suspend="false" xmlns="http://ws.apache.org/ns/synapse";>
>>>   
>>> polling
>>>   
>>> 
>>>
>>> http://ws.apache.org/ns/synapse";>
>>>   
>>> *100*
>>> true
>>> true
>>>* zookeeperConnect*
>>> *http://group.id>">sampleGroupID*
>>> application/xml
>>> highlevel
>>> *sampleTopic*
>>> 0
>>> false
>>> smallest
>>> false
>>> >> name="partition.assignment.strategy">roundrobin
>>> zookeeper
>>> false
>>>   
>>> 
>>>
>>>
>>> >> xmlns="http://ws.apache.org/ns/synapse";>
>>>   
>>> true
>>> true
>>> *>> name="rabbitmq.connection.factory">connection_factory*
>>> *http://rabbitmq.server.host.name>">loclahost*
>>> *5672*
>>> *http://rabbitmq.server.user.name>">admin*
>>> *admin*
>>> *http://rabbitmq.queue.name>">queue_name*
>>> *http://rabbitmq.exchange.name>">excahnge_name*
>>>   
>>>
>>>
>>>
>>> --
>>> *Susinda Perera*
>>> Software Engineer
>>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
>>> Mobile:(+94)716049075
>>> Blog: susinda.blogspot.com
>>> WSO2 Inc. http://wso2.com/
>>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>>
>>>
>>
>>
>> --
>> *Susinda Perera*
>> Software Engineer
>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
>> Mobile:(+94)716049075
>> Blog: susinda.blogspot.com
>> WSO2 Inc. http://wso2.com/
>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>
>>
>
>
> --
> --
> Chanaka Fernando
> Senior Technical Lead
> WSO2, Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 773337238
> Blog : http://soatutorials.blogspot.com
> LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
> Twitter:https://twitter.com/chanakaudaya
>
>
>
>
>


-- 
*Susinda Perera*
Software Engineer
B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
Mobile:(+94)716049075
Blog: susinda.blogspot.com
WSO2 Inc. http://wso2.com/
Tel : 94 11 214 5345 Fax :94 11 2145300
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [IS] - [Federated Setup - Openid-connect as IDP and SAML as SP] - Custom Claims are not sent in Response

2015-10-08 Thread Nadeesha Meegoda
Hi IS team,

I setup the federated setup for the above scenario and added custom claims
mapped with wso2 claims. Resource in [1] to get the claims supported by
Google OpenID-connect

"claims_supported": [
  "aud",
  "email",
  "email_verified",
  "exp",
  "family_name",
  "given_name",
  "iat",
  "iss",
  "locale",
  "name",
  "picture",
  "sub"
 ]

Steps
1. Added "email" custom claim and mapped it to wso2 email address claim in
IDP
2. Added Requested claims for wso2 email address claim in the SP
3. Enabled "Include Attributes in the Response Always"  in SP

After configuring all these, still I don't seem to get the claims in
response. Any idea about this? Sending Requested claims worked for us with
federated scenario (SAML to SAML with two IS and Facebook as IDP to SAML)


Also what is the reason to show a auto generated number stream as
authenticated google username in authentication response and also as logged
in user for travelocity? Refer the attachment.

105510008867410463807


[1] - https://developers.google.com/identity/protocols/OpenIDConnect?hl=en


Thanks!

-- 
*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] Inbound endpoint default values

2015-10-08 Thread Chanaka Fernando
Hi Susinda,

You can use something like "org.wso2.sample.inbound.customClass" as we have
used in the class mediators here [1].

[1]
https://docs.wso2.com/display/DVS371/Creating+ESB+Artifacts#CreatingESBArtifacts-Creatingamediator

On Fri, Oct 9, 2015 at 11:30 AM, Susinda Perera  wrote:

> @ chanaka : Like in scheduled tasks do you have a already available custom
> class for this, if not what would be the class name which would likely to
> have.
>
>
> On Fri, Oct 9, 2015 at 11:26 AM, Chanaka Fernando 
> wrote:
>
>> Hi Kathees/Maheeka,
>>
>> Can you comment on kafka and rabbitmq related params?
>>
>> @Susinda: For the custom inbound parameter, we can use the same approach
>> which we are using for custom class mediators and custom scheduled tasks.
>>
>> On Fri, Oct 9, 2015 at 11:23 AM, Susinda Perera  wrote:
>>
>>> [+ Dev group]
>>>
>>> On Fri, Oct 9, 2015 at 11:21 AM, Susinda Perera 
>>> wrote:
>>>
 ESB team,

 Could you please suggest the default values for the (bolded parameters)
 following inbound endpoints. I came up with following values, is this
 values OK?

 >>>   suspend="false" xmlns="http://ws.apache.org/ns/synapse";>
   
 polling
   
 

 http://ws.apache.org/ns/synapse";>
   
 *100*
 true
 true
* zookeeperConnect*
 *http://group.id>">sampleGroupID*
 application/xml
 highlevel
 *sampleTopic*
 0
 false
 smallest
 false
 >>> name="partition.assignment.strategy">roundrobin
 zookeeper
 false
   
 


 >>> xmlns="http://ws.apache.org/ns/synapse";>
   
 true
 true
 *>>> name="rabbitmq.connection.factory">connection_factory*
 *http://rabbitmq.server.host.name>">loclahost*
 *5672*
 *http://rabbitmq.server.user.name>">admin*
 *admin*
 *http://rabbitmq.queue.name>">queue_name*
 *http://rabbitmq.exchange.name>">excahnge_name*
   



 --
 *Susinda Perera*
 Software Engineer
 B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
 Mobile:(+94)716049075
 Blog: susinda.blogspot.com
 WSO2 Inc. http://wso2.com/
 Tel : 94 11 214 5345 Fax :94 11 2145300


>>>
>>>
>>> --
>>> *Susinda Perera*
>>> Software Engineer
>>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
>>> Mobile:(+94)716049075
>>> Blog: susinda.blogspot.com
>>> WSO2 Inc. http://wso2.com/
>>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>>
>>>
>>
>>
>> --
>> --
>> Chanaka Fernando
>> Senior Technical Lead
>> WSO2, Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 773337238
>> Blog : http://soatutorials.blogspot.com
>> LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
>> Twitter:https://twitter.com/chanakaudaya
>>
>>
>>
>>
>>
>
>
> --
> *Susinda Perera*
> Software Engineer
> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
> Mobile:(+94)716049075
> Blog: susinda.blogspot.com
> WSO2 Inc. http://wso2.com/
> Tel : 94 11 214 5345 Fax :94 11 2145300
>
>


-- 
--
Chanaka Fernando
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [DEV][Automation] Unable to upload a file using Selenium

2015-10-08 Thread Lasantha Samarakoon
Hi all,

I am working in Selenium based UI automation testing for the UES. In the
scenario which I am working on, I need to upload an image when I click on a
button. The code for the functionality as follows.

*HTML:*



   
...

Edit
...
 


*Javascript:*

(function() {
var initBanner = function() {

// clicking the edit button will trigger the click event of
the input[type=file] field and opens the file browser
$('.ues-banner-placeholder').on('click', '#btn-edit-banner',
function(e) {$('#file-banner').click();
});
// once the value of the input[type=file] field changed,
do some processing
document.getElementById('file-banner').addEventListener('change',
function (e) {
...
});
...
}

initBanner();   
...
})();


Here when I tried to automate the functionality using Selenium, seems like
it cannot manipulate the file browser. Instead they are suggesting to
inject the path of the file directly into the input[type=file] field as
below.

driver.findElement(By.id("file-banner")).sendKeys(Keys.DELETE);
driver.findElement(By.id("file-banner")).sendKeys(pathToFile);


But this works only when the form field is visible. While it is hidden,
Selenium gives the following exception.

org.openqa.selenium.ElementNotVisibleException: Element is not currently
visible and so may not be interacted with
Command duration or timeout: 30.07 seconds
Build info: version: '2.43.0', revision:
'accb3003b9fb8f7cae30f9669b4c594a065396a6', time: '2014-09-09 22:22:51'
System info: host: 'lasanthas-Latitude-E6540', ip: '127.0.1.1', os.name:
'Linux', os.arch: 'amd64', os.version: '3.13.0-24-generic', java.version:
'1.7.0_80'
Session ID: 4f035f7f-f554-4206-a94c-5b0f79d5d0a5
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true,
cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox,
handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true,
nativeEvents=false, rotatable=false, locationContextEnabled=true,
applicationCacheEnabled=true, takesScreenshot=true, version=28.0}]
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
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at
org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:268)
at
org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:89)
at
org.wso2.ues.ui.integration.test.dashboard.BannerTest.testCreateDashboard(BannerTest.java:190)
at
org.wso2.ues.ui.integration.test.dashboard.BannerTest.testRunner(BannerTest.java:94)
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.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:177)
at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at
org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:105)
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.re

Re: [Dev] [IS] - [Federated Setup - Openid-connect as IDP and SAML as SP] - Custom Claims are not sent in Response

2015-10-08 Thread Hasanthi Purnima Dissanayake
Hi Nadeesha,

We could reproduce the scenario. Please raise a Jira for this. The number
you are getting in the travelocity app is the numeric id associated with
the email account. If we don't set a Subject Claim URI this will get as the
default value. We will fix it as to display the email address as the
default one when we don't set a  Subject Claim URI.

Thanks

Hasanthi Dissanayake

Software Engineer | WSO2

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

On Fri, Oct 9, 2015 at 11:31 AM, Nadeesha Meegoda 
wrote:

> Hi IS team,
>
> I setup the federated setup for the above scenario and added custom claims
> mapped with wso2 claims. Resource in [1] to get the claims supported by
> Google OpenID-connect
>
> "claims_supported": [
>   "aud",
>   "email",
>   "email_verified",
>   "exp",
>   "family_name",
>   "given_name",
>   "iat",
>   "iss",
>   "locale",
>   "name",
>   "picture",
>   "sub"
>  ]
>
> Steps
> 1. Added "email" custom claim and mapped it to wso2 email address claim in
> IDP
> 2. Added Requested claims for wso2 email address claim in the SP
> 3. Enabled "Include Attributes in the Response Always"  in SP
>
> After configuring all these, still I don't seem to get the claims in
> response. Any idea about this? Sending Requested claims worked for us with
> federated scenario (SAML to SAML with two IS and Facebook as IDP to SAML)
>
>
> Also what is the reason to show a auto generated number stream as
> authenticated google username in authentication response and also as logged
> in user for travelocity? Refer the attachment.
>
>  Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">105510008867410463807
>
>
> [1] - https://developers.google.com/identity/protocols/OpenIDConnect?hl=en
>
>
> Thanks!
>
> --
> *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] [IS] - [Federated Setup - Openid-connect as IDP and SAML as SP] - Custom Claims are not sent in Response

2015-10-08 Thread Nadeesha Meegoda
Thanks Hasanthi.

On Fri, Oct 9, 2015 at 11:59 AM, Hasanthi Purnima Dissanayake <
hasan...@wso2.com> wrote:

> Hi Nadeesha,
>
> We could reproduce the scenario. Please raise a Jira for this. The number
> you are getting in the travelocity app is the numeric id associated with
> the email account. If we don't set a Subject Claim URI this will get as the
> default value. We will fix it as to display the email address as the
> default one when we don't set a  Subject Claim URI.
>
> Thanks
>
> Hasanthi Dissanayake
>
> Software Engineer | WSO2
>
> E: hasan...@wso2.com 
> M :0718407133| http://wso2.com 
>
> On Fri, Oct 9, 2015 at 11:31 AM, Nadeesha Meegoda 
> wrote:
>
>> Hi IS team,
>>
>> I setup the federated setup for the above scenario and added custom
>> claims mapped with wso2 claims. Resource in [1] to get the claims supported
>> by Google OpenID-connect
>>
>> "claims_supported": [
>>   "aud",
>>   "email",
>>   "email_verified",
>>   "exp",
>>   "family_name",
>>   "given_name",
>>   "iat",
>>   "iss",
>>   "locale",
>>   "name",
>>   "picture",
>>   "sub"
>>  ]
>>
>> Steps
>> 1. Added "email" custom claim and mapped it to wso2 email address claim
>> in IDP
>> 2. Added Requested claims for wso2 email address claim in the SP
>> 3. Enabled "Include Attributes in the Response Always"  in SP
>>
>> After configuring all these, still I don't seem to get the claims in
>> response. Any idea about this? Sending Requested claims worked for us with
>> federated scenario (SAML to SAML with two IS and Facebook as IDP to SAML)
>>
>>
>> Also what is the reason to show a auto generated number stream as
>> authenticated google username in authentication response and also as logged
>> in user for travelocity? Refer the attachment.
>>
>> > Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">105510008867410463807
>>
>>
>> [1] -
>> https://developers.google.com/identity/protocols/OpenIDConnect?hl=en
>>
>>
>> Thanks!
>>
>> --
>> *Nadeesha Meegoda*
>> Software Engineer - QA
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>> email : nadees...@wso2.com
>> mobile: +94783639540
>> <%2B94%2077%202273555>
>>
>
>


-- 
*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] [IS][APIM] Error when Updating User Profile for APIM 1.8.0 with identity-mgt feature installed

2015-10-08 Thread Chamalee De Silva
hi all,

I wanted to install the IS identity-mgt features in APIM 1.8.0 to configure
the IS feature Recovery with Notification [1] in APIM.

I have added the repository *http://dist.wso2.org/p2/carbon/releases/4.2.0/
  *and installed Account
Recovery and Credential Management 4.2.0 feature in APIM. But I haven't
installed the Self Registration feature.

And then I have configured APIM to have Recover with Notification Feature
as mentioned in [1].

Then  I created a user. But when I update the user profile of the user I
get the following error.

Can anyone explain why this error occurs?

I could do this successfully in IS. But for APIM I get this error.


[2015-10-09 11:59:49,874] ERROR - RPCInOnlyMessageReceiver Exception
occurred while trying to invoke service method setUserProfile
java.lang.StackOverflowError
at
org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:529)
at
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:259)
at
org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:571)
at
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:259)
at
org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:571)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:533)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:568)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getClone(CarbonContextDataHolder.java:417)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:546)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:568)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getClone(CarbonContextDataHolder.java:417)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:546)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:546)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:568)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getClone(CarbonContextDataHolder.java:417)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:546)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:568)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getClone(CarbonContextDataHolder.java:417)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:546)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:568)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getClone(CarbonContextDataHolder.java:417)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:546)
at
org.wso2.carbon.context.internal.CarbonContextDataHolder.getCurrentCarbonContextHolder(CarbonContextDataHolder.java:568)
[2015-10-09 11:59:50,033] ERROR - UserProfileCient
org.apache.axis2.AxisFault: unknown

[1] https://docs.wso2.com/display/IS500/Recover+with+Notification





-- 
Thanks & Regards,

*Chamalee De Silva*
Software Engineer
*WS**O2* Inc. .:http://wso2.com

Office   :- *+94 11 2145345 <%2B94%2011%202145345>*
mobile  :- *+94 7 <%2B94%2077%202782039>1 4315942*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 Developer Studio 3.8.0 RC 2

2015-10-08 Thread Malaka Silva
Tested connectors with ESB and found the following minor issue.

https://wso2.org/jira/browse/TOOLS-3249

On Fri, Oct 9, 2015 at 7:49 AM, Nuwan Pallewela  wrote:

> I have tested the following areas,
> App server tools
> ESB Basic Functionalities
> Registry Basic Functionalities
> Carbon servers instances
> BRS drl file importing
> Capp deployment
>
> And found following issues
> https://wso2.org/jira/browse/TOOLS-3235
> https://wso2.org/jira/browse/TOOLS-3236
> https://wso2.org/jira/browse/TOOLS-3237
> https://wso2.org/jira/browse/TOOLS-3238
>
> Thanks,
> Nuwan
>
> On Thu, Oct 8, 2015 at 5:00 PM, Susinda Perera  wrote:
>
>> Issues found when testing inbound endpoints is listed below
>> https://wso2.org/jira/browse/TOOLS-3243
>> https://wso2.org/jira/browse/TOOLS-3244
>>
>>
>> On Thu, Oct 8, 2015 at 4:51 PM, Susinda Perera  wrote:
>>
>>> I have tested following Areas.
>>>
>>> All inbound endpoints
>>> All registry resources
>>> Fixes given from 3.8.0 3.8.0-Rc and RC1
>>>
>>>
>>>
>>> On Thu, Oct 8, 2015 at 4:43 PM, Awanthika Senarath 
>>> wrote:
>>>
 Hi all,

 I have tested the basic functionalities related to :

 *Basic Functionalities :*


- ESB projects
- DSS projects
- Registry Resource projects
- Carbon servers (remote/local) instances
- Capp deployment/Redeployment with changes in ESB project
- AppFactory/ Cloud perspectives
- Maven Car deploy plugin


 *New Features Added :*


- Publisher/Foreach new mediator addition, Custom class mediator
- Artifact Renaming
- War file Deployment/Exploded web apps/ Automatic updating(hot
deployment)
- APIM perspective- artifact creation/deletion/renaming
redeployment with changes
- Carbon 4.4.0 based servers


 All functionalities are functioning satisfactorily and have no blockers
 were observed on testing, +1

 Regards
 Awanthika Senarath
 Software Engineer, WSO2 Inc.
 Mobile: +94717681791

>>>
>>>
>>>
>>> --
>>> *Susinda Perera*
>>> Software Engineer
>>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
>>> Mobile:(+94)716049075
>>> Blog: susinda.blogspot.com
>>> WSO2 Inc. http://wso2.com/
>>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>>
>>>
>>
>>
>> --
>> *Susinda Perera*
>> Software Engineer
>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
>> Mobile:(+94)716049075
>> Blog: susinda.blogspot.com
>> WSO2 Inc. http://wso2.com/
>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>
>>
>
>
> --
> --
>
> *Nuwan Chamara Pallewela*
>
>
> *Software Engineer*
>
> *WSO2, Inc. *http://wso2.com
> *lean . enterprise . middleware*
>
> Email   *nuw...@wso2.com *
> Mobile  *+94719079739 <%2B94719079739>@*
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/


Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB][IS] Issue when adding permissions to a role from permission tree

2015-10-08 Thread Dilini Gunatilake
Hi Damith,

First of all, I want to clarify what Omindu mentioned regarding his
statement "Only the super admin can create a role with Admin permission".

In this case I created the new role from a user with default admin role.
Default 'admin' role in the sense, the role that is assigned to the primary
super admin user (admin/admin). Refer [1]. I believe a user with this
'admin' role can do anything the primary super admin can do.

I also tried out the same use case from a user with super admin permission.
Permission assigned as in [2]. In both cases, I couldn't create a role with
just admin permission.

Considering these facts, can we conclude only the primary super admin
(admin/admin) can create roles with Admin permissions?

Secondly, although the aggregate of children does not constitute the parent
according to the implementation, isn't the behaviour in the functionality
the same? If we select all the child permissions we allow to create the
role and if we select only parent Admin permission which assigns exactly
the same set of permissions, we don't allow to create the role. This
behaviour is contradicting to each other from user's perspective. Isn't it?

Regards,
Dilini

[1]

​
[2]

​


On Thu, Oct 8, 2015 at 11:42 AM, Damith Senanayake  wrote:

> Since this is the expected behavior and not a bug, I guess we can resolve
> the JIRA [1].
>
> [1] - https://wso2.org/jira/browse/IDENTITY-3758
>
> On Thu, Oct 8, 2015 at 11:40 AM, Damith Senanayake 
> wrote:
>
>> Hi Dilini,
>>
>> Suppose you have selected all children of a parent permission is selected
>> (in this case "permissions/admin/configure, permissions/admin/monitor,
>> permissions/admin/login, permissions/admin/manage"). However if you add a
>> fifth child (say "permissions/admin/backup"), that is not assigned to that
>> particular role, whereas if you have selected "permissions/admin", the new
>> permissions will be implicitly added.
>>
>> Since the aggregate of children does not constitute the parent in our
>> permission model, selecting the parent and selecting all its children nodes
>> are two different scenarios, hence this is the expected behavior.
>>
>> HTH,
>>
>> On Tue, Oct 6, 2015 at 9:59 AM, Dilini Gunatilake 
>> wrote:
>>
>>> Hi Omindu,
>>>
>>> What is the difference of giving all the child permissions and parent
>>> admin permission? Is there any difference in the functionality?
>>>
>>> Regards,
>>> Dilini
>>>
>>> On Tue, Oct 6, 2015 at 12:19 AM, Omindu Rathnaweera 
>>> wrote:
>>>
 Hi Dilini,

 Only the super admin can create a role with Admin permission, hence the
 exception in your first scenario. In your second scenario, you are giving
 all the child permissions which is different from giving the parent Admin
 permission.

 Have a look at the first few lines at *UserRealmProxy::addRole *[1]
 method. In the first scenario, the list of permissions passed to the
 addRole method includes "/permission/admin" (Since 'Admin Permissions' is
 selected) while the second scenario doesn't. In the addRole method, if the
 "/permission/admin" is included in the list of permissions, an exception is
 thrown. So this should be the expected behavior.


 [1] -
 https://github.com/wso2/carbon-identity/blob/master/components/user-mgt/org.wso2.carbon.user.mgt/src/main/java/org/wso2/carbon/user/mgt/UserRealmProxy.java#L869

 Regards,
 Omindu.


 On Mon, Oct 5, 2015 at 6:05 PM, Dilini Gunatilake 
 wrote:

> Hi IS team,
>
> I tried to create a new role logged in from a user with default admin
> role in MB 3.0.0-ALPHA. When I give permissions as in [1] I get an error 
> as
> in [2] and couldn't create the role. Please find the full stack trace
> attached.
>
> But, if I assign permissions as in [3], I can successfully create the
> role. Is this due to a permission issue in the UI?
>
> [1]
>
> ​ [2]
>
> ​
>
> [3]
>
> ​Thank you.
> Regards,
>
> --
>
> *Dilini GunatilakeSoftware Engineer - QA Team*
> Mobile : +94 (0) 771 162518
> dili...@wso2.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "WSO2 Engineering Group" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to engineering-group+unsubscr...@wso2.com.
> For more options, visit https://groups.google.com/a/wso2.com/d/optout.
>



 --
 Omindu Rathnaweera
 Software Engineer, WSO2 Inc.
 Mobile: +94 771 197 211

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