Re: [Dev] How to add a SCIM user to secondary userstore

2015-07-24 Thread Udara Liyanage
Hi,

I will apply SP and try again.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ESB490] We are observing a lot of UI issues related to Servlet API

2015-07-24 Thread Chanaka Fernando
Hi Kishanthan,

Thanks for heads up. Actually these components were using the dynamic
import package feature due to some historical reasons. We will use the
specific versions in the future as you have mentioned.

Thanks,
Chanaka

On Fri, Jul 24, 2015 at 5:38 PM, Kishanthan Thangarajah  wrote:

>
>
> On Fri, Jul 24, 2015 at 3:44 PM, Chanaka Fernando 
> wrote:
>
>> Hi Devs,
>>
>> In the latest ESB 490 packs, we have observed several mediator UIs are
>> throwing the following exceptions[1] related to javax.servlet API. This
>> issue is reported in [2] and [3]. This issue is related to package imports.
>>
>> When I debug from the OsgiConsole, I found that the javax.servlet package
>> is imported through a dependency and it has the following versions.
>>
>> javax.servlet; version="[3.0.0,4.0.0)"
>> javax.servlet.http; version="[3.0.0,4.0.0)"
>>
>
> Did you have these versions specified in your bundles (check the MANIFEST
> file and confirm)? What change(s) caused the bundles to wire to the above
> version?
>
> From 4.2.0 to 4.4.0 we did not change the version exported for the above
> servlet packages, rather we changed the implementation (from eclipse to
> tomcat).
>
> *4.2.0*
>
> osgi> p javax.servlet.http
>
> javax.servlet.http; version="2.6.0"
>
> *4.4.0*
>
> osgi> p javax.servlet.http
>
> javax.servlet.http; version="2.6.0"
>
>
>>
>>
>> But we only have version 2.6.0 at the runtime. I have already fixed this
>> issue by explicitly importing these two packages in the pom file of the
>> relevant UI bundle like below.
>>
>> javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
>> javax.servlet;version="${imp.pkg.version.javax.servlet}",
>>
>
> It is always good to have the versions specified (i.e the version range)
> for package imports. All these times you may have been depending on the
> dynamic import package feature.
>
>>
>>
>>
>> But the concern is that we need to do this is for each and every mediator
>> UI pom file which fails due to this exception (we have 3 already). Is there
>> a better way to tackle this issue?
>>
>> [1]
>>
>> [2015-07-24 15:07:30,544] ERROR - ApplicationDispatcher Servlet.service() 
>> for servlet bridgeservlet threw exception
>> java.lang.NoClassDefFoundError: javax/servlet/ServletConfig
>>  at 
>> org.wso2.carbon.mediator.dblookup.DBLookupMediatorClient.getInstance(DBLookupMediatorClient.java:61)
>>  at 
>> org.apache.jsp.dblookup_002dmediator.edit_002dmediator_jsp._jspService(edit_002dmediator_jsp.java:181)
>>  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>>  at 
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
>>  at 
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
>>  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>>  at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
>>  at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>>  at 
>> org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
>>  at 
>> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>>  at 
>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>>  at 
>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>>  at 
>> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>>  at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>>  at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>  at 
>> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
>>  at 
>> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
>>  at 
>> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
>>  at 
>> org.eclipse.equinox.http.servlet.internal.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:37)
>>  at 
>> org.eclipse.equinox.http.helper.ContextPathServletAdaptor$RequestDispatcherAdaptor.include(ContextPathServletAdaptor.java:369)
>>  at 
>> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
>>
>>
>> [2] https://wso2.org/jira/browse/ESBJAVA-3958
>>
>> [3] https://wso2.org/jira/browse/ESBJAVA-3950
>>
>>
>> Thanks,
>> Chanaka
>> --
>> --
>> Chanaka Fernando
>> Senior Technical Lead
>> WSO2, Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 773337238
>> Blog : http://soatu

Re: [Dev] Unable to call JAX-RS using Jaggery post method

2015-07-24 Thread Manuranga Perera
for future referenc,
CFX expects data in URL not in post body, even when it's a post method.

fixed it that way

On Sat, Jul 25, 2015 at 1:28 AM, Charitha Goonetilleke 
wrote:

> Hi,
>
> I tried with following method:
>
> post(endPoint, data, "text");
>
> it is calling to JAX-RS but parameters become null inside the JAX-RS.
>
>
> On Sat, Jul 25, 2015 at 1:21 AM, Manuranga Perera  wrote:
>
>> instead of json try text
>>
>>
>> --
>> With regards,
>> *Manu*ranga Perera.
>>
>> phone : 071 7 70 20 50
>> mail : m...@wso2.com
>>
>
>
>
> --
> *Charitha Goonetilleke*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 77 751 3669 <%2B94777513669>
> Twitter:@CharithaWs , fb: charithag
> , linkedin: charithag
> 
>



-- 
With regards,
*Manu*ranga Perera.

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


Re: [Dev] Web-Deployment order in an OSGI execution flow

2015-07-24 Thread Ruwan Abeykoon
Hi Ayoob,

I am not sure this answers your question.
However I observed following duplicate exports in your bundle. Please try
to remove one of them manually and check.

javax.xml.soap; version="0.0.0"
javax.xml.soap; version="1.0.0"

org.apache.ws.security.handler;
version="1.5.11.wso2v9"
org.apache.ws.security.handler; version="1.5.11.wso2v9"


osgi>
osgi> p javax.xml.soap
javax.xml.soap; version="0.0.0"
  org.eclipse.core.expressions_3.4.500.v20130515-1343 [78] imports
  org.eclipse.core.runtime_3.9.0.v20130326-1255 [80] imports
  org.wso2.carbon.p2.touchpoint_4.4.0 [290] imports
  tomcat_7.0.59.wso2v1 [390] imports
javax.xml.soap; version="1.0.0"
  axis2_1.6.1.wso2v12 [14] imports
  org.wso2.carbon.apimgt.core_1.4.0 [154] imports
  spring.framework_3.2.9.wso2v1 [387] imports
  wss4j_1.5.11.wso2v10 [401] imports
  wss4j_1.5.11.wso2v9 [402] imports
osgi>
osgi>
osgi>
osgi> p org.apache.ws.security.handler
org.apache.ws.security.handler;
version="1.5.11.wso2v9"
  org.wso2.carbon.security.mgt_4.4.0 [331] imports
  rampart-core_1.6.1.wso2v14 [377] imports
  rampart-trust_1.6.1.wso2v14 [379] imports
org.apache.ws.security.handler; version="1.5.11.wso2v9"
osgi>

Cheers,
Ruwan

On Fri, Jul 24, 2015 at 3:22 PM, Ayyoob Hamza  wrote:

> Hi All,
> In Carbon, when the webdeployer features are installed, will the web apps
> be deployed after all the osgi's are activated or will they run soon after
> the tomcat is activated ?.
> Is there a such a order ?
>
> Thanks,
> *Ayyoob Hamza*
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

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

email: ruw...@wso2.com
phone:(+94) 39736
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 Identity Server 5.1.0 Milestone 4 Released!

2015-07-24 Thread Darshana Gunawardana
WSO2 Identity Server 5.1.0 Milestone 4 Released!
Date: 25th July 2015The WSO2 Identity Server team is pleased to announce
the 4th Milestone of WSO2 Identity Server 5.1.0. You can download this
distribution from https://github.com/wso2/product-is/releases/tag/v5.1.0-m4

Following list [1] contains all bug fixes and improvements available with
this milestone. We encourage you to report issues, improvements and feature
requests regarding WSO2 Identity Server through the public WSO2 Identity
Server JIRA 

~ The WSO2 Identity Server Team ~



[1] Release Notes - WSO2 Identity Server - Version 5.1.0-M4

Bug

   - [IDENTITY-343 ] - Multiple
   User Profiles feature is broken in IS 5.0.0
   - [IDENTITY-383 ] - Clicking
   the 'Cancel' button on the approval stage of OpenID, does not redirect to
   the application
   - [IDENTITY-688 ] - Normal
   admin user can view Super admin users via Super admin role
   - [IDENTITY-838 ] -
   Inconsistencies in password validation between Self Sign Up and Admin
   created users
   - [IDENTITY-896 ] - Invalid
   error message for secondary domain users password change "Ask Password from
   user"
   - [IDENTITY-946 ] - Add new
   Role appears when all user stores read only
   - [IDENTITY-1071 ] - Expiry
   Times were managed at multiple places prior to IS 5.0.0
   - [IDENTITY-1081 ] - Bouncy
   Castle cannot be found by OpenSAML.
   - [IDENTITY-1555 ] - Error
   starting the server with informix db
   - [IDENTITY-1608 ] -
   Highlighted area should be a tick box when applying OTP, user get confused
   when there is a text box.
   - [IDENTITY-1615 ] - Unable
   to login to carbon console as a tenant while using a shared JDBC user store
   - [IDENTITY-1770 ] - When
   assigning roles, if a user clicks on a Back button it will not refresh the
   assigned roles frame
   - [IDENTITY-1805 ] - A user
   in a secondary user store having admin privileges, should not be able to
   delete own secondary user store
   - [IDENTITY-1887 ] - Not
   able to un-assign last user from a group using SCIM Rest operation
   - [IDENTITY-1982 ] -
   [intermittent]java.lang.SecurityException: Key Store with a name : <>.jks does not exist exception thrown when loading the tenant
   - [IDENTITY-2100 ] - Single
   log out is broken in WSO2 carbon products.
   - [IDENTITY-2281 ] -
   "passwordHashMethod" property name in the default user-mgt.xml is incorrect.
   - [IDENTITY-2318 ] - Message
   displayed when adding the same role twice to an user, can be improved
   - [IDENTITY-2514 ] - When
   configuring Google as federated authenticator, the username should have to
   enable as email. Otherwise following exception throws.
   - [IDENTITY-2526 ] - INFO
   log : "Already added Signed-Up for the OpenId null" when signing up users
   - [IDENTITY-2533 ] - Issues
   with Authentication framework and SAML2 SSO
   - [IDENTITY-2541 ] - Issue
   with Dashboard and Facebook login
   - [IDENTITY-2554 ] - When
   having multiple user stores if the primary user store has
   "ReadGroups=false" then user roles are not shown for all the user stores
   - [IDENTITY-2564 ] -
   [IS][APIM] When users are created via "UserAdmin" service, they cannot be
   locked or unlocked via "UserIdentityManagementAdminService" service
   - [IDENTITY-2590 ] - Tenant
   separation is not applied on OAuth applications
   - [IDENTITY-2619 ] - Logout
   in Tenancy doesn't work if it use Entity Id to specify tenant
   - [IDENTITY-2677 ] - Error
   adding IdP from file when empty ProvisioningConnecterConfigs given
   - [IDENTITY-2734 ] - User is
   getting created though the required claim mapping is not configured
   - [IDENTITY-2772 ] -
   Intermittent issue durin

Re: [Dev] Unable to call JAX-RS using Jaggery post method

2015-07-24 Thread Charitha Goonetilleke
Hi,

I tried with following method:

post(endPoint, data, "text");

it is calling to JAX-RS but parameters become null inside the JAX-RS.


On Sat, Jul 25, 2015 at 1:21 AM, Manuranga Perera  wrote:

> instead of json try text
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



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

mobile: +94 77 751 3669 <%2B94777513669>
Twitter:@CharithaWs , fb: charithag
, linkedin: charithag

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


Re: [Dev] Unable to call JAX-RS using Jaggery post method

2015-07-24 Thread Manuranga Perera
instead of json try text


-- 
With regards,
*Manu*ranga Perera.

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


[Dev] Unable to call JAX-RS using Jaggery post method

2015-07-24 Thread Charitha Goonetilleke
Hi,

I have implemented JAX-RS service and all endpoints are working fine. I
have tested them with Advance REST client.

But when I tried to access it from post method in jaggery, my jaggery code
throws following error and service isn't call. However all get/delete
methods are working fine.

[2015-07-25 01:03:40,598] ERROR
{org.jaggeryjs.jaggery.core.manager.WebAppManager} -
 org.mozilla.javascript.WrappedException: Wrapped
java.lang.NullPointerException (<>/META-INF/scripts/http.js#17)
org.jaggeryjs.scriptengine.exceptions.ScriptException:
org.mozilla.javascript.WrappedException: Wrapped
java.lang.NullPointerException (<>/META-INF/scripts/http.js#17)
at
org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at
org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:587)
at
org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:507)
at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:378)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
at
org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticatorFrameworkValve.invoke(WebappAuthenticatorFrameworkValve.java:40)
at
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.mozilla.javascript.WrappedException: Wrapped
java.lang.NullPointerException (<>/META-INF/scripts/http.js#17)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
at
org.jaggeryjs.rhino.<>.META_INF.scripts.c0._c_anonymous_2(<>/META-INF/scripts/http.js:17)
at
org.jaggeryjs.rhino.<>.META_INF.scripts.c0.call(<>/META-INF/scr

Re: [Dev] Please review and merge

2015-07-24 Thread Johann Nallathamby
https://wso2.org/jira/browse/IDENTITY-3166

On Fri, Jul 24, 2015 at 10:15 PM, Aruna Karunarathna  wrote:

>
>
> On Fri, Jul 24, 2015 at 8:18 PM, Godwin Amila Shrimal 
> wrote:
>
>> Hi,
>>
>> Please review and commit PR [1]
>>
>> [1] https://github.com/wso2/carbon4-kernel/pull/333
>>
>
> Hi Godwin,
>
> Can you point me to the public jira for this issue? can't seems to find
> the related jira.
>
> Regards,
> Aruna\
>
>>
>>
>> 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
>>
>>
>
>
> --
>
> *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
>
>



-- 
Thanks & Regards,

*Johann Dilantha Nallathamby*
Technical Lead & Product Lead of WSO2 Identity Server
Integration Technologies Team
WSO2, Inc.
lean.enterprise.middleware

Mobile - *+9476950*
Blog - *http://nallaa.wordpress.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fix for ESBJAVA-3956

2015-07-24 Thread Chanaka Fernando
Hi Shakila,

I have tried to reproduce the issue in the latest ESB pack without your fix
and I couldn't reproduce. Please confirm with the latest pack that do we
really need to fix this issue or not.

Thanks,
Chanaka

On Fri, Jul 24, 2015 at 10:20 PM, Shakila Sivagnanarajah 
wrote:

> Please review and merge the PR [1] for  $Subject.
>
> [1] https://github.com/wso2/carbon-mediation/pull/314
> 
> .
>
> Thank you
> --
> Shakila Sivagnanarajah
> Associate Software Engineer
> Mobile :+94 (0) 770 760240
> shak...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
--
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
Wordpress:http://chanakaudaya.wordpress.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Fix for ESBJAVA-2536

2015-07-24 Thread Shakila Sivagnanarajah
Hi Malaka,

Please review and merge the PR [1] for $Subject.

[1] https://github.com/wso2/carbon-mediation/pull/321


Thank you

-- 
Shakila Sivagnanarajah
Associate Software Engineer
Mobile :+94 (0) 770 760240
shak...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Please review and merge

2015-07-24 Thread Aruna Karunarathna
On Fri, Jul 24, 2015 at 8:18 PM, Godwin Amila Shrimal 
wrote:

> Hi,
>
> Please review and commit PR [1]
>
> [1] https://github.com/wso2/carbon4-kernel/pull/333
>

Hi Godwin,

Can you point me to the public jira for this issue? can't seems to find the
related jira.

Regards,
Aruna\

>
>
> 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
>
>


-- 

*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] Fix for ESBJAVA-3956

2015-07-24 Thread Shakila Sivagnanarajah
Please review and merge the PR [1] for  $Subject.

[1] https://github.com/wso2/carbon-mediation/pull/314

.

Thank you
-- 
Shakila Sivagnanarajah
Associate Software Engineer
Mobile :+94 (0) 770 760240
shak...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] IS Error while adding a user

2015-07-24 Thread Udara Liyanage
Hi,

Following error message is displayed when a user is added. Claims are
mapped as mentioned in the doc

[2015-07-24 13:46:59,662] ERROR
{org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager} -  Profile
information could not be updated in ApacheDS LDAP user store
javax.naming.directory.SchemaViolationException: [LDAP: error code 67 -
20B1: UpdErr: DSID-030F0AE8, problem 6004 (CANT_ON_RDN), data 0
]; remaining name 'CN=udara'
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3098)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3013)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2820)
at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1391)
at
com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDirContext.java:235)
at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:147)
at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:136)
at
org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.doSetUserClaimValues(ReadWriteLDAPUserStoreManager.java:774)
at
org.wso2.carbon.user.core.common.AbstractUserStoreManager.setUserClaimValues(AbstractUserStoreManager.java:863)
at
org.wso2.carbon.identity.scim.common.listener.SCIMUserOperationListener.doPostAddUser(SCIMUserOperationListener.java:116)
at
org.wso2.carbon.user.core.common.AbstractUserStoreManager.addUser(AbstractUserStoreManager.java:1074)
at
org.wso2.carbon.user.core.common.AbstractUserStoreManager.addUser(AbstractUserStoreManager.java:1050)
at org.wso2.carbon.user.mgt.UserRealmProxy.addUser(UserRealmProxy.java:258)
at org.wso2.carbon.user.mgt.UserAdmin.addUser(UserAdmin.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
at
org.wso2.carbon.server.admin.privilegedaction.PrivilegedActionMessageReceiver.invokeBusinessLogic(PrivilegedActionMessageReceiver.java:85)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:169)
at
org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:82)
at
org.wso2.carbon.core.transports.local.CarbonLocalTransportSender.finalizeSendWithToAddress(CarbonLocalTransportSender.java:45)
at
org.apache.axis2.transport.local.LocalTransportSender.invoke(LocalTransportSender.java:77)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:398)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:224)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at
org.wso2.carbon.user.mgt.stub.UserAdminStub.addUser(UserAdminStub.java:1330)
at
org.wso2.carbon.user.mgt.ui.UserAdminClient.addUser(UserAdminClient.java:87)
at
org.apache.jsp.user.add_002dfinish_jsp._jspService(add_002dfinish_jsp.java:132)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:161)
at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:36)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

[Dev] Please review and merge

2015-07-24 Thread Godwin Amila Shrimal
Hi,

Please review and commit PR [1]

[1] https://github.com/wso2/carbon4-kernel/pull/333

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] [ESB490] We are observing a lot of UI issues related to Servlet API

2015-07-24 Thread Kishanthan Thangarajah
On Fri, Jul 24, 2015 at 3:44 PM, Chanaka Fernando  wrote:

> Hi Devs,
>
> In the latest ESB 490 packs, we have observed several mediator UIs are
> throwing the following exceptions[1] related to javax.servlet API. This
> issue is reported in [2] and [3]. This issue is related to package imports.
>
> When I debug from the OsgiConsole, I found that the javax.servlet package
> is imported through a dependency and it has the following versions.
>
> javax.servlet; version="[3.0.0,4.0.0)"
> javax.servlet.http; version="[3.0.0,4.0.0)"
>

Did you have these versions specified in your bundles (check the MANIFEST
file and confirm)? What change(s) caused the bundles to wire to the above
version?

>From 4.2.0 to 4.4.0 we did not change the version exported for the above
servlet packages, rather we changed the implementation (from eclipse to
tomcat).

*4.2.0*

osgi> p javax.servlet.http

javax.servlet.http; version="2.6.0"

*4.4.0*

osgi> p javax.servlet.http

javax.servlet.http; version="2.6.0"


>
>
> But we only have version 2.6.0 at the runtime. I have already fixed this
> issue by explicitly importing these two packages in the pom file of the
> relevant UI bundle like below.
>
> javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
> javax.servlet;version="${imp.pkg.version.javax.servlet}",
>

It is always good to have the versions specified (i.e the version range)
for package imports. All these times you may have been depending on the
dynamic import package feature.

>
>
>
> But the concern is that we need to do this is for each and every mediator
> UI pom file which fails due to this exception (we have 3 already). Is there
> a better way to tackle this issue?
>
> [1]
>
> [2015-07-24 15:07:30,544] ERROR - ApplicationDispatcher Servlet.service() for 
> servlet bridgeservlet threw exception
> java.lang.NoClassDefFoundError: javax/servlet/ServletConfig
>   at 
> org.wso2.carbon.mediator.dblookup.DBLookupMediatorClient.getInstance(DBLookupMediatorClient.java:61)
>   at 
> org.apache.jsp.dblookup_002dmediator.edit_002dmediator_jsp._jspService(edit_002dmediator_jsp.java:181)
>   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>   at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
>   at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
>   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>   at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
>   at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>   at 
> org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
>   at 
> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>   at 
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>   at 
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>   at 
> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>   at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>   at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>   at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
>   at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
>   at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
>   at 
> org.eclipse.equinox.http.servlet.internal.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:37)
>   at 
> org.eclipse.equinox.http.helper.ContextPathServletAdaptor$RequestDispatcherAdaptor.include(ContextPathServletAdaptor.java:369)
>   at 
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
>
>
> [2] https://wso2.org/jira/browse/ESBJAVA-3958
>
> [3] https://wso2.org/jira/browse/ESBJAVA-3950
>
>
> Thanks,
> Chanaka
> --
> --
> 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
> Wordpress:http://chanakaudaya.wordpress.com
>
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Kishanthan Thangarajah*
Associate Technical Lead,
Platform Technologies Team,
WSO2, In

Re: [Dev] [App Factory] UX/UI Incorporation

2015-07-24 Thread Dakshika Jayathilaka
Hi All,

We have added another page to git.

4. database_permission_listing.html


Regards,

*Dakshika Jayathilaka*
PMC Member & Committer of Apache Stratos
Senior Software Engineer
WSO2, Inc.
lean.enterprise.middleware
0771100911

On Fri, Jul 17, 2015 at 6:03 PM, Dakshika Jayathilaka 
wrote:

> Hi All,
>
> We have added few other pages into git.
>
> 1. database_initial.html
> 
> 2. database_initial_listing.html
> 
> 3. database_new.html
> 
>
> Regards,
>
> *Dakshika Jayathilaka*
> PMC Member & Committer of Apache Stratos
> Senior Software Engineer
> WSO2, Inc.
> lean.enterprise.middleware
> 0771100911
>
> On Tue, Jul 14, 2015 at 10:10 AM, Dakshika Jayathilaka 
> wrote:
>
>> Hi All,
>>
>> We have added  content loading methods to
>> cloud_app_details_initial_content_load.html
>> 
>> .
>> you can select any div and call 'show'/ 'hide' method.
>>
>> *Sample: *
>>
>> *$('selector').loading('show/hide');*
>>
>> *Preview: *
>>
>>
>> https://cdn.rawgit.com/wso2-dev-ux/product-cloud/master/Markup/cloud_app_details_initial_content_load.html
>>
>> Regards,
>>
>> *Dakshika Jayathilaka*
>> PMC Member & Committer of Apache Stratos
>> Senior Software Engineer
>> WSO2, Inc.
>> lean.enterprise.middleware
>> 0771100911
>>
>> On Mon, Jul 13, 2015 at 5:00 PM, Mahesh Chinthaka 
>> wrote:
>>
>>> adding RoshanD. He is doing  009_cloud_app_details_initial.html
>>> 
>>>  page.
>>>
>>> On Mon, Jul 13, 2015 at 3:53 PM, Dakshika Jayathilaka >> > wrote:
>>>
 Hi All,

 We have added notification updates on below pages.

 1.  form_notification.html
 

 2. block type notification - 009_cloud_app_details_initial.html
 

 please be kind enough to merge above changes.

 Regards,

 *Dakshika Jayathilaka*
 PMC Member & Committer of Apache Stratos
 Senior Software Engineer
 WSO2, Inc.
 lean.enterprise.middleware
 0771100911

 On Wed, Jul 8, 2015 at 6:19 PM, Dakshika Jayathilaka >>> > wrote:

> Hi All,
>
> We have added application notification pane to overview
> page(009_cloud_app_details_initial.html). please check.
>
>
> https://raw.githubusercontent.com/wso2-dev-ux/product-cloud/master/Markup/009_cloud_app_details_initial.html
>
> Regards,
>
> *Dakshika Jayathilaka*
> PMC Member & Committer of Apache Stratos
> Senior Software Engineer
> WSO2, Inc.
> lean.enterprise.middleware
> 0771100911
>
> On Wed, Jul 8, 2015 at 10:50 AM, Mahesh Chinthaka 
> wrote:
>
>> Hi Dakshika ,
>>
>> I remember the wireframes. Actually 2 things,
>>
>> 1. Where can I find the markup for issues_initial_blank page
>> (Actually for the button "Report an Issue")?
>> 2. Last time when I took a git pull (before sending my last mail)
>> create issue button was not there in the issues_initial page. Now its 
>> there
>> :) thank you.
>>
>>
>> On Wed, Jul 8, 2015 at 6:19 AM, Dakshika Jayathilaka <
>> daksh...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> this is the updated listing page..
>>>
>>>
>>> https://cdn.rawgit.com/wso2-dev-ux/product-cloud/master/Markup/issues_initial.html
>>>
>>> Regards,
>>>
>>> *Dakshika Jayathilaka*
>>> PMC Member & Committer of Apache Stratos
>>> Senior Software Engineer
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>> 0771100911
>>>
>>> On Wed, Jul 8, 2015 at 6:15 AM, Dakshika Jayathilaka <
>>> daksh...@wso2.com> wrote:
>>>
 Hi Mahesh,

 Its already there..(issues_initial_blank) seems you missed
 important points that we discussed on the meeting.. :). I have attached
 wireframes for further reference. please be kind enough to check. We
 usually update markup pages everyday. so please take pull and continue 
 your
 work.

 Regards,

 *Dakshika Jayathilaka*
 PMC Member & Committer of Apache Stratos
 Senior Software Engineer
 WSO2, Inc.
 lean.enterprise.middleware
 0771100911

 On Tue, Jul 7, 2015 at 7:00 PM, Mahesh Chinthaka 
 wrote:

>>

Re: [Dev] Error when generating/refreshing keys in APIM 1.9.0

2015-07-24 Thread Amalka Subasinghe
HI,

I had configured revoke api url incorrectly.
Thanks Amilad for helping to fix this.

Thanks

On Fri, Jul 24, 2015 at 4:56 PM, Harsha Kumara  wrote:

> Hi Amalka,
>
> When you new creating application, Is this coming during first click of
> generate token? I think your first attempt is failed and you get this when
> you click it for the second time?
>
> Thanks,
> Harsha
>
> On Fri, Jul 24, 2015 at 4:40 PM, Amalka Subasinghe 
> wrote:
>
>> I'm getting this error when I create new application and try to generate
>> keys as well
>>
>> On Fri, Jul 24, 2015 at 4:33 PM, Roshan Wijesena  wrote:
>>
>>> Yes, As Uvindra said there will be a duplicate record in 
>>> AM_APPLICATION_REGISTRATION
>>> table.. Is it possible to delete your APIM application and try again ?
>>>
>>> On Fri, Jul 24, 2015 at 4:31 PM, Uvindra Dias Jayasinha <
>>> uvin...@wso2.com> wrote:
>>>
 According to the exception seems there is a duplicate entry value when
 trying to insert into AM_APPLICATION_REGISTRATION table. Seems that the
 same Application is getting registered multiple times. Can you let us know
 the exacts steps you are following?

 On 24 July 2015 at 16:13, Amalka Subasinghe  wrote:

> Hi,
>
> I'm upgrading API Manager to 1.9.0 in App Factory setup.
>
> When generating/refreshing keys I'm getting following exception.
> I removed consumer key from AM_APPLICATION_KEY_MAPPING and try to
> generate the key again -> but the exception is still throwing
>
> Any idea about this?
>
> TID: [0] [AM] [2015-07-24 10:23:06,385]  INFO
> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
> -
> generateApplicationKey
> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
> TID: [0] [AM] [2015-07-24 10:23:06,389]  INFO
> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
> -  -store.getApplicationKey-
> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
> TID: [0] [AM] [2015-07-24 10:23:06,469] ERROR
> {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO} -  Error occurred while
> creating an Application Registration Entry for Application :
> DefaultApplication {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO}
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
> Duplicate entry '1-1-PRODUCTION' for key 'SUBSCRIBER_ID'
> 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 com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
> at com.mysql.jdbc.Util.getInstance(Util.java:386)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
> at
> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379)
> at
> org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.createApplicationRegistrationEntry(ApiMgtDAO.java:308)
> at
> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete(ApplicationRegistrationSimpleWorkflowExecutor.java:80)
> at
> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.execute(ApplicationRegistrationSimpleWorkflowExecutor.java:58)
> at
> org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalForApplicationRegistration(APIConsumerImpl.java:2179)
> at
> org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.requestApprovalForApplicationRegistration(UserAwareAPIConsumer.java:34)
> at
> org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_getApplicationKey(APIStoreHostObject.java:751)
> 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.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
> at
> org.mozilla.javascript.Func

Re: [Dev] Error when generating/refreshing keys in APIM 1.9.0

2015-07-24 Thread Harsha Kumara
Hi Amalka,

When you new creating application, Is this coming during first click of
generate token? I think your first attempt is failed and you get this when
you click it for the second time?

Thanks,
Harsha

On Fri, Jul 24, 2015 at 4:40 PM, Amalka Subasinghe  wrote:

> I'm getting this error when I create new application and try to generate
> keys as well
>
> On Fri, Jul 24, 2015 at 4:33 PM, Roshan Wijesena  wrote:
>
>> Yes, As Uvindra said there will be a duplicate record in 
>> AM_APPLICATION_REGISTRATION
>> table.. Is it possible to delete your APIM application and try again ?
>>
>> On Fri, Jul 24, 2015 at 4:31 PM, Uvindra Dias Jayasinha > > wrote:
>>
>>> According to the exception seems there is a duplicate entry value when
>>> trying to insert into AM_APPLICATION_REGISTRATION table. Seems that the
>>> same Application is getting registered multiple times. Can you let us know
>>> the exacts steps you are following?
>>>
>>> On 24 July 2015 at 16:13, Amalka Subasinghe  wrote:
>>>
 Hi,

 I'm upgrading API Manager to 1.9.0 in App Factory setup.

 When generating/refreshing keys I'm getting following exception.
 I removed consumer key from AM_APPLICATION_KEY_MAPPING and try to
 generate the key again -> but the exception is still throwing

 Any idea about this?

 TID: [0] [AM] [2015-07-24 10:23:06,385]  INFO
 {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
 -
 generateApplicationKey
 {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
 TID: [0] [AM] [2015-07-24 10:23:06,389]  INFO
 {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
 -  -store.getApplicationKey-
 {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
 TID: [0] [AM] [2015-07-24 10:23:06,469] ERROR
 {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO} -  Error occurred while
 creating an Application Registration Entry for Application :
 DefaultApplication {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO}
 com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
 Duplicate entry '1-1-PRODUCTION' for key 'SUBSCRIBER_ID'
 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 com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at com.mysql.jdbc.Util.getInstance(Util.java:386)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
 at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825)
 at
 com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
 at
 com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379)
 at
 org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.createApplicationRegistrationEntry(ApiMgtDAO.java:308)
 at
 org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete(ApplicationRegistrationSimpleWorkflowExecutor.java:80)
 at
 org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.execute(ApplicationRegistrationSimpleWorkflowExecutor.java:58)
 at
 org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalForApplicationRegistration(APIConsumerImpl.java:2179)
 at
 org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.requestApprovalForApplicationRegistration(UserAwareAPIConsumer.java:34)
 at
 org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_getApplicationKey(APIStoreHostObject.java:751)
 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.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
 at
 org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
 at
 org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
 at
 org.jaggeryjs.rhino.store.modules.subscription.c2._c_anonymous_2(/store/modules/subscription/key.jag:41)
 at
 org.jagger

Re: [Dev] Error when generating/refreshing keys in APIM 1.9.0

2015-07-24 Thread Amalka Subasinghe
I'm getting this error when I create new application and try to generate
keys as well

On Fri, Jul 24, 2015 at 4:33 PM, Roshan Wijesena  wrote:

> Yes, As Uvindra said there will be a duplicate record in 
> AM_APPLICATION_REGISTRATION
> table.. Is it possible to delete your APIM application and try again ?
>
> On Fri, Jul 24, 2015 at 4:31 PM, Uvindra Dias Jayasinha 
> wrote:
>
>> According to the exception seems there is a duplicate entry value when
>> trying to insert into AM_APPLICATION_REGISTRATION table. Seems that the
>> same Application is getting registered multiple times. Can you let us know
>> the exacts steps you are following?
>>
>> On 24 July 2015 at 16:13, Amalka Subasinghe  wrote:
>>
>>> Hi,
>>>
>>> I'm upgrading API Manager to 1.9.0 in App Factory setup.
>>>
>>> When generating/refreshing keys I'm getting following exception.
>>> I removed consumer key from AM_APPLICATION_KEY_MAPPING and try to
>>> generate the key again -> but the exception is still throwing
>>>
>>> Any idea about this?
>>>
>>> TID: [0] [AM] [2015-07-24 10:23:06,385]  INFO
>>> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
>>> -
>>> generateApplicationKey
>>> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
>>> TID: [0] [AM] [2015-07-24 10:23:06,389]  INFO
>>> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
>>> -  -store.getApplicationKey-
>>> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
>>> TID: [0] [AM] [2015-07-24 10:23:06,469] ERROR
>>> {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO} -  Error occurred while
>>> creating an Application Registration Entry for Application :
>>> DefaultApplication {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO}
>>> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
>>> Duplicate entry '1-1-PRODUCTION' for key 'SUBSCRIBER_ID'
>>> 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 com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>>> at com.mysql.jdbc.Util.getInstance(Util.java:386)
>>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)
>>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
>>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
>>> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
>>> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
>>> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825)
>>> at
>>> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
>>> at
>>> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379)
>>> at
>>> org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.createApplicationRegistrationEntry(ApiMgtDAO.java:308)
>>> at
>>> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete(ApplicationRegistrationSimpleWorkflowExecutor.java:80)
>>> at
>>> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.execute(ApplicationRegistrationSimpleWorkflowExecutor.java:58)
>>> at
>>> org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalForApplicationRegistration(APIConsumerImpl.java:2179)
>>> at
>>> org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.requestApprovalForApplicationRegistration(UserAwareAPIConsumer.java:34)
>>> at
>>> org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_getApplicationKey(APIStoreHostObject.java:751)
>>> 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.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
>>> at
>>> org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
>>> at
>>> org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
>>> at
>>> org.jaggeryjs.rhino.store.modules.subscription.c2._c_anonymous_2(/store/modules/subscription/key.jag:41)
>>> at
>>> org.jaggeryjs.rhino.store.modules.subscription.c2.call(/store/modules/subscription/key.jag)
>>> at
>>> org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
>>> at
>>> org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
>>> at
>>> org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
>>> at
>>> org.mo

Re: [Dev] Error when generating/refreshing keys in APIM 1.9.0

2015-07-24 Thread Roshan Wijesena
Yes, As Uvindra said there will be a duplicate record in
AM_APPLICATION_REGISTRATION
table.. Is it possible to delete your APIM application and try again ?

On Fri, Jul 24, 2015 at 4:31 PM, Uvindra Dias Jayasinha 
wrote:

> According to the exception seems there is a duplicate entry value when
> trying to insert into AM_APPLICATION_REGISTRATION table. Seems that the
> same Application is getting registered multiple times. Can you let us know
> the exacts steps you are following?
>
> On 24 July 2015 at 16:13, Amalka Subasinghe  wrote:
>
>> Hi,
>>
>> I'm upgrading API Manager to 1.9.0 in App Factory setup.
>>
>> When generating/refreshing keys I'm getting following exception.
>> I removed consumer key from AM_APPLICATION_KEY_MAPPING and try to
>> generate the key again -> but the exception is still throwing
>>
>> Any idea about this?
>>
>> TID: [0] [AM] [2015-07-24 10:23:06,385]  INFO
>> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
>> -
>> generateApplicationKey
>> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
>> TID: [0] [AM] [2015-07-24 10:23:06,389]  INFO
>> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
>> -  -store.getApplicationKey-
>> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
>> TID: [0] [AM] [2015-07-24 10:23:06,469] ERROR
>> {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO} -  Error occurred while
>> creating an Application Registration Entry for Application :
>> DefaultApplication {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO}
>> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
>> Duplicate entry '1-1-PRODUCTION' for key 'SUBSCRIBER_ID'
>> 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 com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>> at com.mysql.jdbc.Util.getInstance(Util.java:386)
>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)
>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
>> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
>> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
>> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825)
>> at
>> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
>> at
>> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379)
>> at
>> org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.createApplicationRegistrationEntry(ApiMgtDAO.java:308)
>> at
>> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete(ApplicationRegistrationSimpleWorkflowExecutor.java:80)
>> at
>> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.execute(ApplicationRegistrationSimpleWorkflowExecutor.java:58)
>> at
>> org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalForApplicationRegistration(APIConsumerImpl.java:2179)
>> at
>> org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.requestApprovalForApplicationRegistration(UserAwareAPIConsumer.java:34)
>> at
>> org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_getApplicationKey(APIStoreHostObject.java:751)
>> 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.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
>> at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
>> at
>> org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
>> at
>> org.jaggeryjs.rhino.store.modules.subscription.c2._c_anonymous_2(/store/modules/subscription/key.jag:41)
>> at
>> org.jaggeryjs.rhino.store.modules.subscription.c2.call(/store/modules/subscription/key.jag)
>> at
>> org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
>> at
>> org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
>> at
>> org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
>> at
>> org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
>> at
>> org.jaggeryjs.rhino.store.modules.subscription.c0._c_anonymous_9(/store/modules/subscription/module.jag:32)
>> at
>> org.jaggeryjs.rhino.store.modules.subscription.c0

Re: [Dev] Error when generating/refreshing keys in APIM 1.9.0

2015-07-24 Thread Uvindra Dias Jayasinha
According to the exception seems there is a duplicate entry value when
trying to insert into AM_APPLICATION_REGISTRATION table. Seems that the
same Application is getting registered multiple times. Can you let us know
the exacts steps you are following?

On 24 July 2015 at 16:13, Amalka Subasinghe  wrote:

> Hi,
>
> I'm upgrading API Manager to 1.9.0 in App Factory setup.
>
> When generating/refreshing keys I'm getting following exception.
> I removed consumer key from AM_APPLICATION_KEY_MAPPING and try to generate
> the key again -> but the exception is still throwing
>
> Any idea about this?
>
> TID: [0] [AM] [2015-07-24 10:23:06,385]  INFO
> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
> -
> generateApplicationKey
> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
> TID: [0] [AM] [2015-07-24 10:23:06,389]  INFO
> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
> -  -store.getApplicationKey-
> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
> TID: [0] [AM] [2015-07-24 10:23:06,469] ERROR
> {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO} -  Error occurred while
> creating an Application Registration Entry for Application :
> DefaultApplication {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO}
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
> Duplicate entry '1-1-PRODUCTION' for key 'SUBSCRIBER_ID'
> 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 com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
> at com.mysql.jdbc.Util.getInstance(Util.java:386)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
> at
> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379)
> at
> org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.createApplicationRegistrationEntry(ApiMgtDAO.java:308)
> at
> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete(ApplicationRegistrationSimpleWorkflowExecutor.java:80)
> at
> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.execute(ApplicationRegistrationSimpleWorkflowExecutor.java:58)
> at
> org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalForApplicationRegistration(APIConsumerImpl.java:2179)
> at
> org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.requestApprovalForApplicationRegistration(UserAwareAPIConsumer.java:34)
> at
> org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_getApplicationKey(APIStoreHostObject.java:751)
> 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.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
> at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
> at
> org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
> at
> org.jaggeryjs.rhino.store.modules.subscription.c2._c_anonymous_2(/store/modules/subscription/key.jag:41)
> at
> org.jaggeryjs.rhino.store.modules.subscription.c2.call(/store/modules/subscription/key.jag)
> at
> org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
> at
> org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
> at
> org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
> at
> org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
> at
> org.jaggeryjs.rhino.store.modules.subscription.c0._c_anonymous_9(/store/modules/subscription/module.jag:32)
> at
> org.jaggeryjs.rhino.store.modules.subscription.c0.call(/store/modules/subscription/module.jag)
> at
> org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
> at
> org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0._c_anonymous_1(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag:240)
> a

Re: [Dev] [DEV] java.lang.IllegalStateException: Trying to set the domain from 1 to 2

2015-07-24 Thread Supun Malinga
Merged.

thanks,

On Fri, Jul 24, 2015 at 2:03 PM, Supun Malinga  wrote:

> Great!
> Thanks for the fixes Malaka..
> Will build and merge this.
>
> p.s.
> I checked with Malaka and he has tested the scenario after the CC
> modifications.
>
> thanks,
>
> On Fri, Jul 24, 2015 at 1:56 PM, Malaka Silva  wrote:
>
>> Updated pls check.
>>
>> On Fri, Jul 24, 2015 at 12:43 PM, Supun Malinga  wrote:
>>
>>> Thanks Malaka. I added few comments on code formatting. Could you pls
>>> update ?
>>>
>>> On Fri, Jul 24, 2015 at 12:33 PM, Malaka Silva  wrote:
>>>
 Hi All,

 Please review and merge the revised fix.

 https://github.com/wso2/carbon4-kernel/pull/327

 Pls note:
 I have only used following since it'll resolve the tenant id internally.

 privilegedCarbonContext.setTenantDomain(tenantDomain, true);

 On Fri, Jul 24, 2015 at 12:31 PM, Malaka Silva  wrote:

> Hi All,
>
> Please review and merge the revised fix.
>
> https://github.com/wso2/carbon4-kernel/pull/327
>
> On Fri, Jul 24, 2015 at 9:52 AM, Malaka Silva  wrote:
>
>> Well we get the required info from the url and that logic is inside
>> and cannot bring to the startup.
>>
>> On Fri, Jul 24, 2015 at 9:29 AM, Supun Malinga 
>> wrote:
>>
>>> Hi Malaka,
>>>
>>> Fix looks better now.. Can you also check why the tenant domain is
>>> not set when starting the tenant flow ?. Please see below on how to use
>>> CC..
>>>
>>> https://docs.wso2.com/display/Carbon420/CarbonContext+API#CarbonContextAPI-Switchingtenantflows
>>>
>>> thanks,
>>>
>>> On Thu, Jul 23, 2015 at 8:49 PM, Malaka Silva 
>>> wrote:
>>>
 Hi All,

 Please review and merge the revised fix.

 [1] https://github.com/wso2/carbon4-kernel/pull/325

 On Thu, Jul 23, 2015 at 4:46 PM, Supun Malinga 
 wrote:

> Hi,
>
> We (Azeez, Sameera & me) had a chat on this. Seems
> in MultitenantMessageReceiver it has violated the usage of
> PrivilegedCarbonContext usages. Usually we should do
> PrivilegedCarbonContext.getThreadLocalCarbonContext() 
> startTenantFlow(),
> PrivilegedCarbonContext.getThreadLocalCarbonContext().
> endTenantFlow()  and put the required logic in between. Then it
> should not be required to call
> PrivilegedCarbonContext.destroyCurrentContext().
>
> We need to properly fix this in MultitenantMessageReceiver.. There
> are several places MultitenantMessageReceiver has done the same 
> mistake.
>
> However we are so close the kernel 4.4.1 RC and we might not have
> enough time to do this. How should we proceed ?.
>
> thanks,
>
> On Thu, Jul 23, 2015 at 9:20 AM, Malaka Silva 
> wrote:
>
>> thx
>>
>> On Thu, Jul 23, 2015 at 8:54 AM, Supun Malinga 
>> wrote:
>>
>>> Hi,
>>>
>>> The fix seems appropriate. Will discuss with the team further
>>> and merge this today..
>>> For the integration tests, is there no way to verify the fix
>>> without doing load requests ?.
>>>
>>> thanks,
>>>
>>> On Wed, Jul 22, 2015 at 1:39 PM, Supun Malinga 
>>> wrote:
>>>
 Hi Malaka,

 Can you point out the place where its being set in message
 context ?. Basically I want to understand why we cannot destroy 
 the context
 at that level (after the usage of CC is done).

 thanks,

 On Tue, Jul 21, 2015 at 8:10 PM, Malaka Silva 
 wrote:

> Hi Supun,
>
> This issue can only be reproduced if you do a load test
> parallel with two or more tenants.
>
> Here tenant domain is set with the value from message context.
> This fix will clean the thread context before setting the new 
> context.
>
> On Tue, Jul 21, 2015 at 7:45 PM, Supun Malinga <
> sup...@wso2.com> wrote:
>
>> Hi Malaka,
>>
>> Can you explain the fix you have done pls ?. We need to
>> understand that the fix is the optimal one.
>>
>> Also do we have integration tests for the fix in kernel or
>> ESB level ?. Please note it is better if we can have a test case 
>> for this
>> in kernel itself.
>>
>> thanks,
>>
>> On Tue, Jul 21, 2015 at 4:33 PM, Malaka Silva <
>> mal...@wso2.com> wrote:
>>
>>> Hi Carbon Team,
>>>
>>> Please review a

[Dev] Error when generating/refreshing keys in APIM 1.9.0

2015-07-24 Thread Amalka Subasinghe
Hi,

I'm upgrading API Manager to 1.9.0 in App Factory setup.

When generating/refreshing keys I'm getting following exception.
I removed consumer key from AM_APPLICATION_KEY_MAPPING and try to generate
the key again -> but the exception is still throwing

Any idea about this?

TID: [0] [AM] [2015-07-24 10:23:06,385]  INFO
{JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
-
generateApplicationKey
{JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
TID: [0] [AM] [2015-07-24 10:23:06,389]  INFO
{JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
-  -store.getApplicationKey-
{JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag}
TID: [0] [AM] [2015-07-24 10:23:06,469] ERROR
{org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO} -  Error occurred while
creating an Application Registration Entry for Application :
DefaultApplication {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO}
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
Duplicate entry '1-1-PRODUCTION' for key 'SUBSCRIBER_ID'
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 com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379)
at
org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.createApplicationRegistrationEntry(ApiMgtDAO.java:308)
at
org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete(ApplicationRegistrationSimpleWorkflowExecutor.java:80)
at
org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.execute(ApplicationRegistrationSimpleWorkflowExecutor.java:58)
at
org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalForApplicationRegistration(APIConsumerImpl.java:2179)
at
org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.requestApprovalForApplicationRegistration(UserAwareAPIConsumer.java:34)
at
org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_getApplicationKey(APIStoreHostObject.java:751)
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.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at
org.jaggeryjs.rhino.store.modules.subscription.c2._c_anonymous_2(/store/modules/subscription/key.jag:41)
at
org.jaggeryjs.rhino.store.modules.subscription.c2.call(/store/modules/subscription/key.jag)
at
org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
at
org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at
org.jaggeryjs.rhino.store.modules.subscription.c0._c_anonymous_9(/store/modules/subscription/module.jag:32)
at
org.jaggeryjs.rhino.store.modules.subscription.c0.call(/store/modules/subscription/module.jag)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at
org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0._c_anonymous_1(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag:240)
at
org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0.call(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
at
org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0._c_script_0(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag:3)
at
org.jaggeryjs.rhino.store.site.blocks.subscription.subscriptio

[Dev] [ESB490] We are observing a lot of UI issues related to Servlet API

2015-07-24 Thread Chanaka Fernando
Hi Devs,

In the latest ESB 490 packs, we have observed several mediator UIs are
throwing the following exceptions[1] related to javax.servlet API. This
issue is reported in [2] and [3]. This issue is related to package imports.

When I debug from the OsgiConsole, I found that the javax.servlet package
is imported through a dependency and it has the following versions.

javax.servlet; version="[3.0.0,4.0.0)"
javax.servlet.http; version="[3.0.0,4.0.0)"


But we only have version 2.6.0 at the runtime. I have already fixed this
issue by explicitly importing these two packages in the pom file of the
relevant UI bundle like below.

javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
javax.servlet;version="${imp.pkg.version.javax.servlet}",


But the concern is that we need to do this is for each and every mediator
UI pom file which fails due to this exception (we have 3 already). Is there
a better way to tackle this issue?

[1]

[2015-07-24 15:07:30,544] ERROR - ApplicationDispatcher
Servlet.service() for servlet bridgeservlet threw exception
java.lang.NoClassDefFoundError: javax/servlet/ServletConfig
at 
org.wso2.carbon.mediator.dblookup.DBLookupMediatorClient.getInstance(DBLookupMediatorClient.java:61)
at 
org.apache.jsp.dblookup_002dmediator.edit_002dmediator_jsp._jspService(edit_002dmediator_jsp.java:181)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at 
org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
at 
org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at 
org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at 
org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at 
org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
at 
org.eclipse.equinox.http.servlet.internal.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:37)
at 
org.eclipse.equinox.http.helper.ContextPathServletAdaptor$RequestDispatcherAdaptor.include(ContextPathServletAdaptor.java:369)
at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)


[2] https://wso2.org/jira/browse/ESBJAVA-3958

[3] https://wso2.org/jira/browse/ESBJAVA-3950


Thanks,
Chanaka
-- 
--
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
Wordpress:http://chanakaudaya.wordpress.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Web-Deployment order in an OSGI execution flow

2015-07-24 Thread Ayyoob Hamza
Hi All,
In Carbon, when the webdeployer features are installed, will the web apps
be deployed after all the osgi's are activated or will they run soon after
the tomcat is activated ?.
Is there a such a order ?

Thanks,
*Ayyoob Hamza*
*Software Engineer*
WSO2 Inc.; http://wso2.com
email: ayy...@wso2.com cell: +94 77 1681010 <%2B94%2077%207779495>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to handle REST_URL_POSTFIX property when Query Parameter values are defined

2015-07-24 Thread Uvindra Dias Jayasinha
I found the following on SO[1] which is the exact same problem we are
discussing here. The solution for it provided here[2]. So is this the way
we should go about it? We can adjust our velocity_template to generate the
synapse config conditionally. That way no need to do any changes to
publisher and the fix will be seamless from a user perspective.


[1]
http://stackoverflow.com/questions/19978652/wso2-esb-http-endpoint-uri-parameters
[2]
http://stackoverflow.com/questions/19774923/wso2-esb-4-7-0-api-url-mapping

On 24 July 2015 at 14:49, Uvindra Dias Jayasinha  wrote:

> Ok so from what you saying is that even though we are setting that
> attribute at resource level it is not getting considered at endpoint level.
> So have been doing things incorrectly? How is the correct way of achieving
> this functionality with synapse?
>
> On 24 July 2015 at 14:46, Isuru Udana  wrote:
>
>> It's related to the API Resource not to the HTTP Endpoint.
>>
>> Please note that there is no relationship between how we define resource
>> url (whether it is url-template or url-mapping) with the HTTP Endpoint url.
>> And we can't even introduce a such relationship.
>>
>>
>>
>> On Fri, Jul 24, 2015 at 2:41 PM, Uvindra Dias Jayasinha > > wrote:
>>
>>> Im referring to the attribute in the* * tag, that how we are
>>> triggering the different functionalities
>>>
>>> On 24 July 2015 at 14:39, Isuru Udana  wrote:
>>>
 In both scenarios you can see, HTTP Endpoint contains an url-template.

 

  http://ws.cdyne.com/phoneverify/phoneverify.asmx?name={uri.var.name}"/>

   

  

  http://ws.cdyne.com/phoneverify/phoneverify.asmx"/>

   

 On Fri, Jul 24, 2015 at 2:35 PM, Uvindra Dias Jayasinha <
 uvin...@wso2.com> wrote:

> Attached are two synpase files generated with API Manager for the
> above use cases. Ok end of the day we need to support both attributes, its
> critical to API Manager functionality. Do you agree that from a functional
> perspective our expectation is correct? Because there is nothing to stop
> someone from writing an API in this manner.
>
> On 24 July 2015 at 14:23, Isuru Udana  wrote:
>
>>
>>
>> On Fri, Jul 24, 2015 at 2:10 PM, Uvindra Dias Jayasinha <
>> uvin...@wso2.com> wrote:
>>
>>> In our velocity template we are conditionally deciding when the
>>> url-mapping attribute or uri-template attribute should be used in the
>>> synapse config generated for each API, eher is the velocity template 
>>> logic,
>>>
>>> #if($resource.getUriTemplate().contains("{") ||
>>> ($resource.getUriTemplate().contains("*") &&
>>> !$resource.getUriTemplate().endsWith("/*")))
>>> *uri-template=*"$resource.getUriTemplate()"
>>> #else
>>> *url-mapping=*"$resource.getUriTemplate()"
>>> #end
>>>
>>> So we are specifying this attribute based on API Managers requirement
>>> . The synapse engine does not consider this as invalid so we expect
>>> that the synapse engine should honour the attribute defined.
>>>
>> HTTP Endpoint in synapse doesn't support url-mapping attribute. Can
>> you post a sample generated API Config with this ?
>>
>>>
>>> So we need the functionality of both the uri-template and
>>> url-mapping attributes for our HTTP endpoint based APIs, but not at the
>>> same time obviously. Its either one or the other for a given resource.
>>>
>> There is no relationship between API resources and HTTP endpoint
>>
>>> By specifying these two attributes we are already implying that we
>>> are expecting different functionality(the user expects the same). So 
>>> its a
>>> bit difficult justifying having to manually set this from the publisher.
>>>
>>> WDYT?
>>>
>> +1. If we can handle this automatically without a user interaction,
>> that's the best way to handle it. And we need to consider the impact of 
>> the
>> changes (config migration issues, etc.)
>>
>>>
>>> On 24 July 2015 at 13:45, Isuru Udana  wrote:
>>>
 Hi Uvindra,

 I think the correct approach is to completely remove
 REST_URL_POSTFIX getting appended for HTTP Endpoint. And append only 
 if the
 user configure to do so.
 Initially we implemented HTTP Endpoint in that way. But somehow
 implementation has changed now.
 I am not sure whether we are too late to revert to the original
 implementation now.

 If we cannot revert back,
 For ESB, we can simply remove the REST_URL_POSTFIX from the config
 and for AM, we need a easy way to do that from UI.

 On Fri, Jul 24, 2015 at 1:31 PM, Uvindra Dias Jayasinha <
 uvin...@wso2.com> wrote:

> We

[Dev] ESB product pom.xml

2015-07-24 Thread Imesh Gunaratne
Hi Devs,

I can see a property with the name "stratos.version" in the ESB product
pom.xml [1], are we still using any of the Stratos components in the ESB?

[1] https://github.com/wso2/product-esb/blob/master/pom.xml#L192

Thanks

-- 
*Imesh Gunaratne*
Senior Technical Lead
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057
W: http://imesh.gunaratne.org
Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to handle REST_URL_POSTFIX property when Query Parameter values are defined

2015-07-24 Thread Uvindra Dias Jayasinha
Ok so from what you saying is that even though we are setting that
attribute at resource level it is not getting considered at endpoint level.
So have been doing things incorrectly? How is the correct way of achieving
this functionality with synapse?

On 24 July 2015 at 14:46, Isuru Udana  wrote:

> It's related to the API Resource not to the HTTP Endpoint.
>
> Please note that there is no relationship between how we define resource
> url (whether it is url-template or url-mapping) with the HTTP Endpoint url.
> And we can't even introduce a such relationship.
>
>
>
> On Fri, Jul 24, 2015 at 2:41 PM, Uvindra Dias Jayasinha 
> wrote:
>
>> Im referring to the attribute in the* * tag, that how we are
>> triggering the different functionalities
>>
>> On 24 July 2015 at 14:39, Isuru Udana  wrote:
>>
>>> In both scenarios you can see, HTTP Endpoint contains an url-template.
>>>
>>> 
>>>
>>>  http://ws.cdyne.com/phoneverify/phoneverify.asmx?name={uri.var.name}"/>
>>>
>>>   
>>>
>>>  
>>>
>>>  http://ws.cdyne.com/phoneverify/phoneverify.asmx"/>
>>>
>>>   
>>>
>>> On Fri, Jul 24, 2015 at 2:35 PM, Uvindra Dias Jayasinha <
>>> uvin...@wso2.com> wrote:
>>>
 Attached are two synpase files generated with API Manager for the above
 use cases. Ok end of the day we need to support both attributes, its
 critical to API Manager functionality. Do you agree that from a functional
 perspective our expectation is correct? Because there is nothing to stop
 someone from writing an API in this manner.

 On 24 July 2015 at 14:23, Isuru Udana  wrote:

>
>
> On Fri, Jul 24, 2015 at 2:10 PM, Uvindra Dias Jayasinha <
> uvin...@wso2.com> wrote:
>
>> In our velocity template we are conditionally deciding when the
>> url-mapping attribute or uri-template attribute should be used in the
>> synapse config generated for each API, eher is the velocity template 
>> logic,
>>
>> #if($resource.getUriTemplate().contains("{") ||
>> ($resource.getUriTemplate().contains("*") &&
>> !$resource.getUriTemplate().endsWith("/*")))
>> *uri-template=*"$resource.getUriTemplate()"
>> #else
>> *url-mapping=*"$resource.getUriTemplate()"
>> #end
>>
>> So we are specifying this attribute based on API Managers requirement
>> . The synapse engine does not consider this as invalid so we expect
>> that the synapse engine should honour the attribute defined.
>>
> HTTP Endpoint in synapse doesn't support url-mapping attribute. Can
> you post a sample generated API Config with this ?
>
>>
>> So we need the functionality of both the uri-template and url-mapping
>> attributes for our HTTP endpoint based APIs, but not at the same time
>> obviously. Its either one or the other for a given resource.
>>
> There is no relationship between API resources and HTTP endpoint
>
>> By specifying these two attributes we are already implying that we
>> are expecting different functionality(the user expects the same). So its 
>> a
>> bit difficult justifying having to manually set this from the publisher.
>>
>> WDYT?
>>
> +1. If we can handle this automatically without a user interaction,
> that's the best way to handle it. And we need to consider the impact of 
> the
> changes (config migration issues, etc.)
>
>>
>> On 24 July 2015 at 13:45, Isuru Udana  wrote:
>>
>>> Hi Uvindra,
>>>
>>> I think the correct approach is to completely remove
>>> REST_URL_POSTFIX getting appended for HTTP Endpoint. And append only if 
>>> the
>>> user configure to do so.
>>> Initially we implemented HTTP Endpoint in that way. But somehow
>>> implementation has changed now.
>>> I am not sure whether we are too late to revert to the original
>>> implementation now.
>>>
>>> If we cannot revert back,
>>> For ESB, we can simply remove the REST_URL_POSTFIX from the config
>>> and for AM, we need a easy way to do that from UI.
>>>
>>> On Fri, Jul 24, 2015 at 1:31 PM, Uvindra Dias Jayasinha <
>>> uvin...@wso2.com> wrote:
>>>
 We need to come up with $subject.

 The issue related to this has been highlighted in [1]

 The REST_URL_POSTFIX property appends the url-mapping of a given
 resource to the end of the api endpoint in synapse. This is applied by
 synapse for all APIs that are defined.

 For example,

 *API URL* - http://localhost:8280/noPathParam/1.0/
 *Endpoint URL* - http://localhost:8281/sampleAPI
 *GET Resource(url-mapping)* - somepath

 Now invoking the above GET resource of the API,

GET
 http://localhost:8280/noPathParam/1.0/somepath

>>>

Re: [Dev] How to handle REST_URL_POSTFIX property when Query Parameter values are defined

2015-07-24 Thread Isuru Udana
It's related to the API Resource not to the HTTP Endpoint.

Please note that there is no relationship between how we define resource
url (whether it is url-template or url-mapping) with the HTTP Endpoint url.
And we can't even introduce a such relationship.



On Fri, Jul 24, 2015 at 2:41 PM, Uvindra Dias Jayasinha 
wrote:

> Im referring to the attribute in the* * tag, that how we are
> triggering the different functionalities
>
> On 24 July 2015 at 14:39, Isuru Udana  wrote:
>
>> In both scenarios you can see, HTTP Endpoint contains an url-template.
>>
>> 
>>
>>  http://ws.cdyne.com/phoneverify/phoneverify.asmx?name={uri.var.name}"/>
>>
>>   
>>
>>  
>>
>>  http://ws.cdyne.com/phoneverify/phoneverify.asmx"/>
>>
>>   
>>
>> On Fri, Jul 24, 2015 at 2:35 PM, Uvindra Dias Jayasinha > > wrote:
>>
>>> Attached are two synpase files generated with API Manager for the above
>>> use cases. Ok end of the day we need to support both attributes, its
>>> critical to API Manager functionality. Do you agree that from a functional
>>> perspective our expectation is correct? Because there is nothing to stop
>>> someone from writing an API in this manner.
>>>
>>> On 24 July 2015 at 14:23, Isuru Udana  wrote:
>>>


 On Fri, Jul 24, 2015 at 2:10 PM, Uvindra Dias Jayasinha <
 uvin...@wso2.com> wrote:

> In our velocity template we are conditionally deciding when the
> url-mapping attribute or uri-template attribute should be used in the
> synapse config generated for each API, eher is the velocity template 
> logic,
>
> #if($resource.getUriTemplate().contains("{") ||
> ($resource.getUriTemplate().contains("*") &&
> !$resource.getUriTemplate().endsWith("/*")))
> *uri-template=*"$resource.getUriTemplate()"
> #else
> *url-mapping=*"$resource.getUriTemplate()"
> #end
>
> So we are specifying this attribute based on API Managers requirement.
> The synapse engine does not consider this as invalid so we expect that the
> synapse engine should honour the attribute defined.
>
 HTTP Endpoint in synapse doesn't support url-mapping attribute. Can you
 post a sample generated API Config with this ?

>
> So we need the functionality of both the uri-template and url-mapping
> attributes for our HTTP endpoint based APIs, but not at the same time
> obviously. Its either one or the other for a given resource.
>
 There is no relationship between API resources and HTTP endpoint

> By specifying these two attributes we are already implying that we are
> expecting different functionality(the user expects the same). So its a bit
> difficult justifying having to manually set this from the publisher.
>
> WDYT?
>
 +1. If we can handle this automatically without a user interaction,
 that's the best way to handle it. And we need to consider the impact of the
 changes (config migration issues, etc.)

>
> On 24 July 2015 at 13:45, Isuru Udana  wrote:
>
>> Hi Uvindra,
>>
>> I think the correct approach is to completely remove REST_URL_POSTFIX
>> getting appended for HTTP Endpoint. And append only if the user configure
>> to do so.
>> Initially we implemented HTTP Endpoint in that way. But somehow
>> implementation has changed now.
>> I am not sure whether we are too late to revert to the original
>> implementation now.
>>
>> If we cannot revert back,
>> For ESB, we can simply remove the REST_URL_POSTFIX from the config
>> and for AM, we need a easy way to do that from UI.
>>
>> On Fri, Jul 24, 2015 at 1:31 PM, Uvindra Dias Jayasinha <
>> uvin...@wso2.com> wrote:
>>
>>> We need to come up with $subject.
>>>
>>> The issue related to this has been highlighted in [1]
>>>
>>> The REST_URL_POSTFIX property appends the url-mapping of a given
>>> resource to the end of the api endpoint in synapse. This is applied by
>>> synapse for all APIs that are defined.
>>>
>>> For example,
>>>
>>> *API URL* - http://localhost:8280/noPathParam/1.0/
>>> *Endpoint URL* - http://localhost:8281/sampleAPI
>>> *GET Resource(url-mapping)* - somepath
>>>
>>> Now invoking the above GET resource of the API,
>>>
>>>GET
>>> http://localhost:8280/noPathParam/1.0/somepath
>>>
>>> will translate to,
>>>
>>> GET http://localhost:8281/sampleAPI/somepath
>>>
>>>
>>>
>>> The problem happens when there are Query Parameters. Since resource
>>> url-mapping or uri-template attribute is getting appended by default to 
>>> the
>>> end of the URL, it is getting added after the Query Parameter, as 
>>> follows,
>>>
>>>
>>> *API URL* - http://localhost:8280/pathParam/1.0/
>>> 

Re: [Dev] How to handle REST_URL_POSTFIX property when Query Parameter values are defined

2015-07-24 Thread Uvindra Dias Jayasinha
Im referring to the attribute in the* * tag, that how we are
triggering the different functionalities

On 24 July 2015 at 14:39, Isuru Udana  wrote:

> In both scenarios you can see, HTTP Endpoint contains an url-template.
>
> 
>
>  http://ws.cdyne.com/phoneverify/phoneverify.asmx?name={uri.var.name}"/>
>
>   
>
>  
>
>  http://ws.cdyne.com/phoneverify/phoneverify.asmx"/>
>
>   
>
> On Fri, Jul 24, 2015 at 2:35 PM, Uvindra Dias Jayasinha 
> wrote:
>
>> Attached are two synpase files generated with API Manager for the above
>> use cases. Ok end of the day we need to support both attributes, its
>> critical to API Manager functionality. Do you agree that from a functional
>> perspective our expectation is correct? Because there is nothing to stop
>> someone from writing an API in this manner.
>>
>> On 24 July 2015 at 14:23, Isuru Udana  wrote:
>>
>>>
>>>
>>> On Fri, Jul 24, 2015 at 2:10 PM, Uvindra Dias Jayasinha <
>>> uvin...@wso2.com> wrote:
>>>
 In our velocity template we are conditionally deciding when the
 url-mapping attribute or uri-template attribute should be used in the
 synapse config generated for each API, eher is the velocity template logic,

 #if($resource.getUriTemplate().contains("{") ||
 ($resource.getUriTemplate().contains("*") &&
 !$resource.getUriTemplate().endsWith("/*")))
 *uri-template=*"$resource.getUriTemplate()"
 #else
 *url-mapping=*"$resource.getUriTemplate()"
 #end

 So we are specifying this attribute based on API Managers requirement.
 The synapse engine does not consider this as invalid so we expect that the
 synapse engine should honour the attribute defined.

>>> HTTP Endpoint in synapse doesn't support url-mapping attribute. Can you
>>> post a sample generated API Config with this ?
>>>

 So we need the functionality of both the uri-template and url-mapping
 attributes for our HTTP endpoint based APIs, but not at the same time
 obviously. Its either one or the other for a given resource.

>>> There is no relationship between API resources and HTTP endpoint
>>>
 By specifying these two attributes we are already implying that we are
 expecting different functionality(the user expects the same). So its a bit
 difficult justifying having to manually set this from the publisher.

 WDYT?

>>> +1. If we can handle this automatically without a user interaction,
>>> that's the best way to handle it. And we need to consider the impact of the
>>> changes (config migration issues, etc.)
>>>

 On 24 July 2015 at 13:45, Isuru Udana  wrote:

> Hi Uvindra,
>
> I think the correct approach is to completely remove REST_URL_POSTFIX
> getting appended for HTTP Endpoint. And append only if the user configure
> to do so.
> Initially we implemented HTTP Endpoint in that way. But somehow
> implementation has changed now.
> I am not sure whether we are too late to revert to the original
> implementation now.
>
> If we cannot revert back,
> For ESB, we can simply remove the REST_URL_POSTFIX from the config and
> for AM, we need a easy way to do that from UI.
>
> On Fri, Jul 24, 2015 at 1:31 PM, Uvindra Dias Jayasinha <
> uvin...@wso2.com> wrote:
>
>> We need to come up with $subject.
>>
>> The issue related to this has been highlighted in [1]
>>
>> The REST_URL_POSTFIX property appends the url-mapping of a given
>> resource to the end of the api endpoint in synapse. This is applied by
>> synapse for all APIs that are defined.
>>
>> For example,
>>
>> *API URL* - http://localhost:8280/noPathParam/1.0/
>> *Endpoint URL* - http://localhost:8281/sampleAPI
>> *GET Resource(url-mapping)* - somepath
>>
>> Now invoking the above GET resource of the API,
>>
>>GET http://localhost:8280/noPathParam/1.0/somepath
>>
>> will translate to,
>>
>> GET http://localhost:8281/sampleAPI/somepath
>>
>>
>>
>> The problem happens when there are Query Parameters. Since resource
>> url-mapping or uri-template attribute is getting appended by default to 
>> the
>> end of the URL, it is getting added after the Query Parameter, as 
>> follows,
>>
>>
>> *API URL* - http://localhost:8280/pathParam/1.0/
>> *Endpoint URL* - http://localhost:8281/sampleAPI?name={uri.var.name}
>> *GET Resource(url-template)* - {name}
>>
>> Now invoking the above GET resource of the API
>>
>>GET http://localhost:8280/pathParam/1.0/somename
>>
>>
>> will translate to,
>>
>> GET http://localhost:8281/sampleAPI?name=
>> *somename/somename*
>>
>> instead of the expected,
>>
>>

Re: [Dev] How to handle REST_URL_POSTFIX property when Query Parameter values are defined

2015-07-24 Thread Isuru Udana
In both scenarios you can see, HTTP Endpoint contains an url-template.



 http://ws.cdyne.com/phoneverify/phoneverify.asmx?name={uri.var.name}"/>

  

 

 http://ws.cdyne.com/phoneverify/phoneverify.asmx"/>

  

On Fri, Jul 24, 2015 at 2:35 PM, Uvindra Dias Jayasinha 
wrote:

> Attached are two synpase files generated with API Manager for the above
> use cases. Ok end of the day we need to support both attributes, its
> critical to API Manager functionality. Do you agree that from a functional
> perspective our expectation is correct? Because there is nothing to stop
> someone from writing an API in this manner.
>
> On 24 July 2015 at 14:23, Isuru Udana  wrote:
>
>>
>>
>> On Fri, Jul 24, 2015 at 2:10 PM, Uvindra Dias Jayasinha > > wrote:
>>
>>> In our velocity template we are conditionally deciding when the
>>> url-mapping attribute or uri-template attribute should be used in the
>>> synapse config generated for each API, eher is the velocity template logic,
>>>
>>> #if($resource.getUriTemplate().contains("{") ||
>>> ($resource.getUriTemplate().contains("*") &&
>>> !$resource.getUriTemplate().endsWith("/*")))
>>> *uri-template=*"$resource.getUriTemplate()"
>>> #else
>>> *url-mapping=*"$resource.getUriTemplate()"
>>> #end
>>>
>>> So we are specifying this attribute based on API Managers requirement.
>>> The synapse engine does not consider this as invalid so we expect that the
>>> synapse engine should honour the attribute defined.
>>>
>> HTTP Endpoint in synapse doesn't support url-mapping attribute. Can you
>> post a sample generated API Config with this ?
>>
>>>
>>> So we need the functionality of both the uri-template and url-mapping
>>> attributes for our HTTP endpoint based APIs, but not at the same time
>>> obviously. Its either one or the other for a given resource.
>>>
>> There is no relationship between API resources and HTTP endpoint
>>
>>> By specifying these two attributes we are already implying that we are
>>> expecting different functionality(the user expects the same). So its a bit
>>> difficult justifying having to manually set this from the publisher.
>>>
>>> WDYT?
>>>
>> +1. If we can handle this automatically without a user interaction,
>> that's the best way to handle it. And we need to consider the impact of the
>> changes (config migration issues, etc.)
>>
>>>
>>> On 24 July 2015 at 13:45, Isuru Udana  wrote:
>>>
 Hi Uvindra,

 I think the correct approach is to completely remove REST_URL_POSTFIX
 getting appended for HTTP Endpoint. And append only if the user configure
 to do so.
 Initially we implemented HTTP Endpoint in that way. But somehow
 implementation has changed now.
 I am not sure whether we are too late to revert to the original
 implementation now.

 If we cannot revert back,
 For ESB, we can simply remove the REST_URL_POSTFIX from the config and
 for AM, we need a easy way to do that from UI.

 On Fri, Jul 24, 2015 at 1:31 PM, Uvindra Dias Jayasinha <
 uvin...@wso2.com> wrote:

> We need to come up with $subject.
>
> The issue related to this has been highlighted in [1]
>
> The REST_URL_POSTFIX property appends the url-mapping of a given
> resource to the end of the api endpoint in synapse. This is applied by
> synapse for all APIs that are defined.
>
> For example,
>
> *API URL* - http://localhost:8280/noPathParam/1.0/
> *Endpoint URL* - http://localhost:8281/sampleAPI
> *GET Resource(url-mapping)* - somepath
>
> Now invoking the above GET resource of the API,
>
>GET http://localhost:8280/noPathParam/1.0/somepath
>
> will translate to,
>
> GET http://localhost:8281/sampleAPI/somepath
>
>
>
> The problem happens when there are Query Parameters. Since resource
> url-mapping or uri-template attribute is getting appended by default to 
> the
> end of the URL, it is getting added after the Query Parameter, as follows,
>
>
> *API URL* - http://localhost:8280/pathParam/1.0/
> *Endpoint URL* - http://localhost:8281/sampleAPI?name={uri.var.name}
> *GET Resource(url-template)* - {name}
>
> Now invoking the above GET resource of the API
>
>GET http://localhost:8280/pathParam/1.0/somename
>
>
> will translate to,
>
> GET http://localhost:8281/sampleAPI?name=
> *somename/somename*
>
> instead of the expected,
>
> GET http://localhost:8281/sampleAPI?name=somename
>
>
> So the problem here is that synapse treats both url-mapping and
> url-template resources the same way. What should happen is that the
> REST_URL_POSTFIX property should only be considered if the url-mapping
> attribute is specified *a

Re: [Dev] How to handle REST_URL_POSTFIX property when Query Parameter values are defined

2015-07-24 Thread Uvindra Dias Jayasinha
Attached are two synpase files generated with API Manager for the above use
cases. Ok end of the day we need to support both attributes, its critical
to API Manager functionality. Do you agree that from a functional
perspective our expectation is correct? Because there is nothing to stop
someone from writing an API in this manner.

On 24 July 2015 at 14:23, Isuru Udana  wrote:

>
>
> On Fri, Jul 24, 2015 at 2:10 PM, Uvindra Dias Jayasinha 
> wrote:
>
>> In our velocity template we are conditionally deciding when the
>> url-mapping attribute or uri-template attribute should be used in the
>> synapse config generated for each API, eher is the velocity template logic,
>>
>> #if($resource.getUriTemplate().contains("{") ||
>> ($resource.getUriTemplate().contains("*") &&
>> !$resource.getUriTemplate().endsWith("/*")))
>> *uri-template=*"$resource.getUriTemplate()"
>> #else
>> *url-mapping=*"$resource.getUriTemplate()"
>> #end
>>
>> So we are specifying this attribute based on API Managers requirement.
>> The synapse engine does not consider this as invalid so we expect that the
>> synapse engine should honour the attribute defined.
>>
> HTTP Endpoint in synapse doesn't support url-mapping attribute. Can you
> post a sample generated API Config with this ?
>
>>
>> So we need the functionality of both the uri-template and url-mapping
>> attributes for our HTTP endpoint based APIs, but not at the same time
>> obviously. Its either one or the other for a given resource.
>>
> There is no relationship between API resources and HTTP endpoint
>
>> By specifying these two attributes we are already implying that we are
>> expecting different functionality(the user expects the same). So its a bit
>> difficult justifying having to manually set this from the publisher.
>>
>> WDYT?
>>
> +1. If we can handle this automatically without a user interaction, that's
> the best way to handle it. And we need to consider the impact of the
> changes (config migration issues, etc.)
>
>>
>> On 24 July 2015 at 13:45, Isuru Udana  wrote:
>>
>>> Hi Uvindra,
>>>
>>> I think the correct approach is to completely remove REST_URL_POSTFIX
>>> getting appended for HTTP Endpoint. And append only if the user configure
>>> to do so.
>>> Initially we implemented HTTP Endpoint in that way. But somehow
>>> implementation has changed now.
>>> I am not sure whether we are too late to revert to the original
>>> implementation now.
>>>
>>> If we cannot revert back,
>>> For ESB, we can simply remove the REST_URL_POSTFIX from the config and
>>> for AM, we need a easy way to do that from UI.
>>>
>>> On Fri, Jul 24, 2015 at 1:31 PM, Uvindra Dias Jayasinha <
>>> uvin...@wso2.com> wrote:
>>>
 We need to come up with $subject.

 The issue related to this has been highlighted in [1]

 The REST_URL_POSTFIX property appends the url-mapping of a given
 resource to the end of the api endpoint in synapse. This is applied by
 synapse for all APIs that are defined.

 For example,

 *API URL* - http://localhost:8280/noPathParam/1.0/
 *Endpoint URL* - http://localhost:8281/sampleAPI
 *GET Resource(url-mapping)* - somepath

 Now invoking the above GET resource of the API,

GET http://localhost:8280/noPathParam/1.0/somepath

 will translate to,

 GET http://localhost:8281/sampleAPI/somepath



 The problem happens when there are Query Parameters. Since resource
 url-mapping or uri-template attribute is getting appended by default to the
 end of the URL, it is getting added after the Query Parameter, as follows,


 *API URL* - http://localhost:8280/pathParam/1.0/
 *Endpoint URL* - http://localhost:8281/sampleAPI?name={uri.var.name}
 *GET Resource(url-template)* - {name}

 Now invoking the above GET resource of the API

GET http://localhost:8280/pathParam/1.0/somename


 will translate to,

 GET http://localhost:8281/sampleAPI?name=
 *somename/somename*

 instead of the expected,

 GET http://localhost:8281/sampleAPI?name=somename


 So the problem here is that synapse treats both url-mapping and
 url-template resources the same way. What should happen is that the
 REST_URL_POSTFIX property should only be considered if the url-mapping
 attribute is specified *and not when uri-template attribute exists*.

>>> There is no url mapping involved with HTTP endpoint (only url template
>>> is there). And there is no relationship between API resources and HTTP
>>> Endpoint.
>>>
>>> Thanks.
>>>


 So can we get this fixed at synapse level? We believe this is the
 correct place to solve this issue


 [1] https://wso2.org/jira/browse/APIMANAGER-4002

 --
 Regards,
 Uvindra

 Mobile: 33962

Re: [Dev] How to handle REST_URL_POSTFIX property when Query Parameter values are defined

2015-07-24 Thread Isuru Udana
On Fri, Jul 24, 2015 at 2:10 PM, Uvindra Dias Jayasinha 
wrote:

> In our velocity template we are conditionally deciding when the
> url-mapping attribute or uri-template attribute should be used in the
> synapse config generated for each API, eher is the velocity template logic,
>
> #if($resource.getUriTemplate().contains("{") ||
> ($resource.getUriTemplate().contains("*") &&
> !$resource.getUriTemplate().endsWith("/*")))
> *uri-template=*"$resource.getUriTemplate()"
> #else
> *url-mapping=*"$resource.getUriTemplate()"
> #end
>
> So we are specifying this attribute based on API Managers requirement.
> The synapse engine does not consider this as invalid so we expect that the
> synapse engine should honour the attribute defined.
>
HTTP Endpoint in synapse doesn't support url-mapping attribute. Can you
post a sample generated API Config with this ?

>
> So we need the functionality of both the uri-template and url-mapping
> attributes for our HTTP endpoint based APIs, but not at the same time
> obviously. Its either one or the other for a given resource.
>
There is no relationship between API resources and HTTP endpoint

> By specifying these two attributes we are already implying that we are
> expecting different functionality(the user expects the same). So its a bit
> difficult justifying having to manually set this from the publisher.
>
> WDYT?
>
+1. If we can handle this automatically without a user interaction, that's
the best way to handle it. And we need to consider the impact of the
changes (config migration issues, etc.)

>
> On 24 July 2015 at 13:45, Isuru Udana  wrote:
>
>> Hi Uvindra,
>>
>> I think the correct approach is to completely remove REST_URL_POSTFIX
>> getting appended for HTTP Endpoint. And append only if the user configure
>> to do so.
>> Initially we implemented HTTP Endpoint in that way. But somehow
>> implementation has changed now.
>> I am not sure whether we are too late to revert to the original
>> implementation now.
>>
>> If we cannot revert back,
>> For ESB, we can simply remove the REST_URL_POSTFIX from the config and
>> for AM, we need a easy way to do that from UI.
>>
>> On Fri, Jul 24, 2015 at 1:31 PM, Uvindra Dias Jayasinha > > wrote:
>>
>>> We need to come up with $subject.
>>>
>>> The issue related to this has been highlighted in [1]
>>>
>>> The REST_URL_POSTFIX property appends the url-mapping of a given
>>> resource to the end of the api endpoint in synapse. This is applied by
>>> synapse for all APIs that are defined.
>>>
>>> For example,
>>>
>>> *API URL* - http://localhost:8280/noPathParam/1.0/
>>> *Endpoint URL* - http://localhost:8281/sampleAPI
>>> *GET Resource(url-mapping)* - somepath
>>>
>>> Now invoking the above GET resource of the API,
>>>
>>>GET http://localhost:8280/noPathParam/1.0/somepath
>>>
>>> will translate to,
>>>
>>> GET http://localhost:8281/sampleAPI/somepath
>>>
>>>
>>>
>>> The problem happens when there are Query Parameters. Since resource
>>> url-mapping or uri-template attribute is getting appended by default to the
>>> end of the URL, it is getting added after the Query Parameter, as follows,
>>>
>>>
>>> *API URL* - http://localhost:8280/pathParam/1.0/
>>> *Endpoint URL* - http://localhost:8281/sampleAPI?name={uri.var.name}
>>> *GET Resource(url-template)* - {name}
>>>
>>> Now invoking the above GET resource of the API
>>>
>>>GET http://localhost:8280/pathParam/1.0/somename
>>>
>>>
>>> will translate to,
>>>
>>> GET http://localhost:8281/sampleAPI?name=
>>> *somename/somename*
>>>
>>> instead of the expected,
>>>
>>> GET http://localhost:8281/sampleAPI?name=somename
>>>
>>>
>>> So the problem here is that synapse treats both url-mapping and
>>> url-template resources the same way. What should happen is that the
>>> REST_URL_POSTFIX property should only be considered if the url-mapping
>>> attribute is specified *and not when uri-template attribute exists*.
>>>
>> There is no url mapping involved with HTTP endpoint (only url template is
>> there). And there is no relationship between API resources and HTTP
>> Endpoint.
>>
>> Thanks.
>>
>>>
>>>
>>> So can we get this fixed at synapse level? We believe this is the
>>> correct place to solve this issue
>>>
>>>
>>> [1] https://wso2.org/jira/browse/APIMANAGER-4002
>>>
>>> --
>>> Regards,
>>> Uvindra
>>>
>>> Mobile: 33962
>>>
>>
>>
>>
>> --
>> *Isuru Udana*
>> Associate Technical Lead
>> WSO2 Inc.; http://wso2.com
>> email: isu...@wso2.com cell: +94 77 3791887
>> blog: http://mytecheye.blogspot.com/
>>
>
>
>
> --
> Regards,
> Uvindra
>
> Mobile: 33962
>



-- 
*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


[Dev] Please review and merge PR Test case for IDENTITY-3327

2015-07-24 Thread Kasun Bandara
Hi,

Please $Subject the PR [1] as the Test case for the Public JIRA [2].

[1] https://github.com/wso2/product-is/pull/156

[2] https://wso2.org/jira/browse/IDENTITY-3327

Thanks,
Kasun Bandara

-- 
Kasun Bandara
*Software Engineer*
Mobile : +94 (0) 718 338 360
<%2B94%20%280%29%20773%20451194>
kas...@wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ES] Database Support Issues for ES 2.0

2015-07-24 Thread Chandana Napagoda
On Fri, Jul 24, 2015 at 12:29 PM, Manuranga Perera  wrote:

> Hi Nadeesha,
>
> https://wso2.org/jira/browse/STORE-829
> https://wso2.org/jira/browse/STORE-918
> https://wso2.org/jira/browse/STORE-904
>
> have to be re-tested whit new IS dependency update. I'll provide a pack
> today for this.
>
> https://wso2.org/jira/browse/STORE-765
>
> is also fixed. need to retest
>
>
> I am not suer about https://wso2.org/jira/browse/STORE-908
>
>
> Hi Manu,

> Hi Greg Team
> Is https://wso2.org/jira/browse/STORE-908 a know bug in GReg side ? or is
> this something we have to solve.
>

It's doesn't look like a registry related issue.

Regards,
Chandana
>
>
>
> On Fri, Jul 24, 2015 at 12:05 PM, Nadeesha Meegoda 
> wrote:
>
>> Hi all,
>>
>> What are the supported databases for ES 2.0? Currently only the h2
>> default,Mysql, Mariadb databases are supported. Oracle, MSsql, POSTGRESQL
>> have script errors and DB2 is not supported by ES. Oracle and MSsql has
>> startup issues.
>>
>> Please refer the database support issues in [1],[2],[3],[4]
>>
>> [1] https://wso2.org/jira/browse/STORE-765
>> [2] https://wso2.org/jira/browse/STORE-829
>> [3] https://wso2.org/jira/browse/STORE-918
>> [4] https://wso2.org/jira/browse/STORE-908
>>
>> Please let us the reasons for not supporting DB2. If there are any other
>> databases ES supports please let us know.
>>
>>
>> Thanks
>> Nadeesha
>> --
>> *Nadeesha Meegoda*
>> Software Engineer - QA
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>> email : nadees...@wso2.com
>> mobile: +94783639540
>> <%2B94%2077%202273555>
>>
>
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



-- 
*Chandana Napagoda*
Senior Software Engineer
WSO2 Inc. - http://wso2.org

*Email  :  chand...@wso2.com **Mobile : +94718169299*

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


Re: [Dev] How to handle REST_URL_POSTFIX property when Query Parameter values are defined

2015-07-24 Thread Uvindra Dias Jayasinha
In our velocity template we are conditionally deciding when the url-mapping
attribute or uri-template attribute should be used in the synapse config
generated for each API, eher is the velocity template logic,

#if($resource.getUriTemplate().contains("{") ||
($resource.getUriTemplate().contains("*") &&
!$resource.getUriTemplate().endsWith("/*")))
*uri-template=*"$resource.getUriTemplate()"
#else
*url-mapping=*"$resource.getUriTemplate()"
#end

So we are specifying this attribute based on API Managers requirement. The
synapse engine does not consider this as invalid so we expect that the
synapse engine should honour the attribute defined.

So we need the functionality of both the uri-template and url-mapping
attributes for our HTTP endpoint based APIs, but not at the same time
obviously. Its either one or the other for a given resource. By specifying
these two attributes we are already implying that we are expecting
different functionality(the user expects the same). So its a bit difficult
justifying having to manually set this from the publisher.

WDYT?

On 24 July 2015 at 13:45, Isuru Udana  wrote:

> Hi Uvindra,
>
> I think the correct approach is to completely remove REST_URL_POSTFIX
> getting appended for HTTP Endpoint. And append only if the user configure
> to do so.
> Initially we implemented HTTP Endpoint in that way. But somehow
> implementation has changed now.
> I am not sure whether we are too late to revert to the original
> implementation now.
>
> If we cannot revert back,
> For ESB, we can simply remove the REST_URL_POSTFIX from the config and for
> AM, we need a easy way to do that from UI.
>
> On Fri, Jul 24, 2015 at 1:31 PM, Uvindra Dias Jayasinha 
> wrote:
>
>> We need to come up with $subject.
>>
>> The issue related to this has been highlighted in [1]
>>
>> The REST_URL_POSTFIX property appends the url-mapping of a given resource
>> to the end of the api endpoint in synapse. This is applied by synapse for
>> all APIs that are defined.
>>
>> For example,
>>
>> *API URL* - http://localhost:8280/noPathParam/1.0/
>> *Endpoint URL* - http://localhost:8281/sampleAPI
>> *GET Resource(url-mapping)* - somepath
>>
>> Now invoking the above GET resource of the API,
>>
>>GET http://localhost:8280/noPathParam/1.0/somepath
>>
>> will translate to,
>>
>> GET http://localhost:8281/sampleAPI/somepath
>>
>>
>>
>> The problem happens when there are Query Parameters. Since resource
>> url-mapping or uri-template attribute is getting appended by default to the
>> end of the URL, it is getting added after the Query Parameter, as follows,
>>
>>
>> *API URL* - http://localhost:8280/pathParam/1.0/
>> *Endpoint URL* - http://localhost:8281/sampleAPI?name={uri.var.name}
>> *GET Resource(url-template)* - {name}
>>
>> Now invoking the above GET resource of the API
>>
>>GET http://localhost:8280/pathParam/1.0/somename
>>
>>
>> will translate to,
>>
>> GET http://localhost:8281/sampleAPI?name=
>> *somename/somename*
>>
>> instead of the expected,
>>
>> GET http://localhost:8281/sampleAPI?name=somename
>>
>>
>> So the problem here is that synapse treats both url-mapping and
>> url-template resources the same way. What should happen is that the
>> REST_URL_POSTFIX property should only be considered if the url-mapping
>> attribute is specified *and not when uri-template attribute exists*.
>>
> There is no url mapping involved with HTTP endpoint (only url template is
> there). And there is no relationship between API resources and HTTP
> Endpoint.
>
> Thanks.
>
>>
>>
>> So can we get this fixed at synapse level? We believe this is the correct
>> place to solve this issue
>>
>>
>> [1] https://wso2.org/jira/browse/APIMANAGER-4002
>>
>> --
>> Regards,
>> Uvindra
>>
>> Mobile: 33962
>>
>
>
>
> --
> *Isuru Udana*
> Associate Technical Lead
> WSO2 Inc.; http://wso2.com
> email: isu...@wso2.com cell: +94 77 3791887
> blog: http://mytecheye.blogspot.com/
>



-- 
Regards,
Uvindra

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


Re: [Dev] [DEV] java.lang.IllegalStateException: Trying to set the domain from 1 to 2

2015-07-24 Thread Supun Malinga
Great!
Thanks for the fixes Malaka..
Will build and merge this.

p.s.
I checked with Malaka and he has tested the scenario after the CC
modifications.

thanks,

On Fri, Jul 24, 2015 at 1:56 PM, Malaka Silva  wrote:

> Updated pls check.
>
> On Fri, Jul 24, 2015 at 12:43 PM, Supun Malinga  wrote:
>
>> Thanks Malaka. I added few comments on code formatting. Could you pls
>> update ?
>>
>> On Fri, Jul 24, 2015 at 12:33 PM, Malaka Silva  wrote:
>>
>>> Hi All,
>>>
>>> Please review and merge the revised fix.
>>>
>>> https://github.com/wso2/carbon4-kernel/pull/327
>>>
>>> Pls note:
>>> I have only used following since it'll resolve the tenant id internally.
>>>
>>> privilegedCarbonContext.setTenantDomain(tenantDomain, true);
>>>
>>> On Fri, Jul 24, 2015 at 12:31 PM, Malaka Silva  wrote:
>>>
 Hi All,

 Please review and merge the revised fix.

 https://github.com/wso2/carbon4-kernel/pull/327

 On Fri, Jul 24, 2015 at 9:52 AM, Malaka Silva  wrote:

> Well we get the required info from the url and that logic is inside
> and cannot bring to the startup.
>
> On Fri, Jul 24, 2015 at 9:29 AM, Supun Malinga 
> wrote:
>
>> Hi Malaka,
>>
>> Fix looks better now.. Can you also check why the tenant domain is
>> not set when starting the tenant flow ?. Please see below on how to use
>> CC..
>>
>> https://docs.wso2.com/display/Carbon420/CarbonContext+API#CarbonContextAPI-Switchingtenantflows
>>
>> thanks,
>>
>> On Thu, Jul 23, 2015 at 8:49 PM, Malaka Silva 
>> wrote:
>>
>>> Hi All,
>>>
>>> Please review and merge the revised fix.
>>>
>>> [1] https://github.com/wso2/carbon4-kernel/pull/325
>>>
>>> On Thu, Jul 23, 2015 at 4:46 PM, Supun Malinga 
>>> wrote:
>>>
 Hi,

 We (Azeez, Sameera & me) had a chat on this. Seems
 in MultitenantMessageReceiver it has violated the usage of
 PrivilegedCarbonContext usages. Usually we should do
 PrivilegedCarbonContext.getThreadLocalCarbonContext() 
 startTenantFlow(),
 PrivilegedCarbonContext.getThreadLocalCarbonContext().
 endTenantFlow()  and put the required logic in between. Then it
 should not be required to call
 PrivilegedCarbonContext.destroyCurrentContext().

 We need to properly fix this in MultitenantMessageReceiver.. There
 are several places MultitenantMessageReceiver has done the same 
 mistake.

 However we are so close the kernel 4.4.1 RC and we might not have
 enough time to do this. How should we proceed ?.

 thanks,

 On Thu, Jul 23, 2015 at 9:20 AM, Malaka Silva 
 wrote:

> thx
>
> On Thu, Jul 23, 2015 at 8:54 AM, Supun Malinga 
> wrote:
>
>> Hi,
>>
>> The fix seems appropriate. Will discuss with the team further and
>> merge this today..
>> For the integration tests, is there no way to verify the fix
>> without doing load requests ?.
>>
>> thanks,
>>
>> On Wed, Jul 22, 2015 at 1:39 PM, Supun Malinga 
>> wrote:
>>
>>> Hi Malaka,
>>>
>>> Can you point out the place where its being set in message
>>> context ?. Basically I want to understand why we cannot destroy the 
>>> context
>>> at that level (after the usage of CC is done).
>>>
>>> thanks,
>>>
>>> On Tue, Jul 21, 2015 at 8:10 PM, Malaka Silva 
>>> wrote:
>>>
 Hi Supun,

 This issue can only be reproduced if you do a load test
 parallel with two or more tenants.

 Here tenant domain is set with the value from message context.
 This fix will clean the thread context before setting the new 
 context.

 On Tue, Jul 21, 2015 at 7:45 PM, Supun Malinga >>> > wrote:

> Hi Malaka,
>
> Can you explain the fix you have done pls ?. We need to
> understand that the fix is the optimal one.
>
> Also do we have integration tests for the fix in kernel or ESB
> level ?. Please note it is better if we can have a test case for 
> this in
> kernel itself.
>
> thanks,
>
> On Tue, Jul 21, 2015 at 4:33 PM, Malaka Silva  > wrote:
>
>> Hi Carbon Team,
>>
>> Please review and merge this before the next release.
>>
>> On Tue, Jul 21, 2015 at 4:29 PM, Malaka Silva <
>> mal...@wso2.com> wrote:
>>
>>> Any update on this?
>>>
>>> On Mon, Jul 13, 2015 at 10:35 AM

Re: [Dev] [DEV] java.lang.IllegalStateException: Trying to set the domain from 1 to 2

2015-07-24 Thread Malaka Silva
Updated pls check.

On Fri, Jul 24, 2015 at 12:43 PM, Supun Malinga  wrote:

> Thanks Malaka. I added few comments on code formatting. Could you pls
> update ?
>
> On Fri, Jul 24, 2015 at 12:33 PM, Malaka Silva  wrote:
>
>> Hi All,
>>
>> Please review and merge the revised fix.
>>
>> https://github.com/wso2/carbon4-kernel/pull/327
>>
>> Pls note:
>> I have only used following since it'll resolve the tenant id internally.
>>
>> privilegedCarbonContext.setTenantDomain(tenantDomain, true);
>>
>> On Fri, Jul 24, 2015 at 12:31 PM, Malaka Silva  wrote:
>>
>>> Hi All,
>>>
>>> Please review and merge the revised fix.
>>>
>>> https://github.com/wso2/carbon4-kernel/pull/327
>>>
>>> On Fri, Jul 24, 2015 at 9:52 AM, Malaka Silva  wrote:
>>>
 Well we get the required info from the url and that logic is inside and
 cannot bring to the startup.

 On Fri, Jul 24, 2015 at 9:29 AM, Supun Malinga  wrote:

> Hi Malaka,
>
> Fix looks better now.. Can you also check why the tenant domain is not
> set when starting the tenant flow ?. Please see below on how to use CC..
>
> https://docs.wso2.com/display/Carbon420/CarbonContext+API#CarbonContextAPI-Switchingtenantflows
>
> thanks,
>
> On Thu, Jul 23, 2015 at 8:49 PM, Malaka Silva  wrote:
>
>> Hi All,
>>
>> Please review and merge the revised fix.
>>
>> [1] https://github.com/wso2/carbon4-kernel/pull/325
>>
>> On Thu, Jul 23, 2015 at 4:46 PM, Supun Malinga 
>> wrote:
>>
>>> Hi,
>>>
>>> We (Azeez, Sameera & me) had a chat on this. Seems
>>> in MultitenantMessageReceiver it has violated the usage of
>>> PrivilegedCarbonContext usages. Usually we should do
>>> PrivilegedCarbonContext.getThreadLocalCarbonContext() startTenantFlow(),
>>> PrivilegedCarbonContext.getThreadLocalCarbonContext().
>>> endTenantFlow()  and put the required logic in between. Then it
>>> should not be required to call
>>> PrivilegedCarbonContext.destroyCurrentContext().
>>>
>>> We need to properly fix this in MultitenantMessageReceiver.. There
>>> are several places MultitenantMessageReceiver has done the same mistake.
>>>
>>> However we are so close the kernel 4.4.1 RC and we might not have
>>> enough time to do this. How should we proceed ?.
>>>
>>> thanks,
>>>
>>> On Thu, Jul 23, 2015 at 9:20 AM, Malaka Silva 
>>> wrote:
>>>
 thx

 On Thu, Jul 23, 2015 at 8:54 AM, Supun Malinga 
 wrote:

> Hi,
>
> The fix seems appropriate. Will discuss with the team further and
> merge this today..
> For the integration tests, is there no way to verify the fix
> without doing load requests ?.
>
> thanks,
>
> On Wed, Jul 22, 2015 at 1:39 PM, Supun Malinga 
> wrote:
>
>> Hi Malaka,
>>
>> Can you point out the place where its being set in message
>> context ?. Basically I want to understand why we cannot destroy the 
>> context
>> at that level (after the usage of CC is done).
>>
>> thanks,
>>
>> On Tue, Jul 21, 2015 at 8:10 PM, Malaka Silva 
>> wrote:
>>
>>> Hi Supun,
>>>
>>> This issue can only be reproduced if you do a load test parallel
>>> with two or more tenants.
>>>
>>> Here tenant domain is set with the value from message context.
>>> This fix will clean the thread context before setting the new 
>>> context.
>>>
>>> On Tue, Jul 21, 2015 at 7:45 PM, Supun Malinga 
>>> wrote:
>>>
 Hi Malaka,

 Can you explain the fix you have done pls ?. We need to
 understand that the fix is the optimal one.

 Also do we have integration tests for the fix in kernel or ESB
 level ?. Please note it is better if we can have a test case for 
 this in
 kernel itself.

 thanks,

 On Tue, Jul 21, 2015 at 4:33 PM, Malaka Silva 
 wrote:

> Hi Carbon Team,
>
> Please review and merge this before the next release.
>
> On Tue, Jul 21, 2015 at 4:29 PM, Malaka Silva  > wrote:
>
>> Any update on this?
>>
>> On Mon, Jul 13, 2015 at 10:35 AM, Malaka Silva <
>> mal...@wso2.com> wrote:
>>
>>> Hi Carbon Team,
>>>
>>> Any update on this?
>>>
>>> On Thu, Jul 2, 2015 at 12:11 PM, Malaka Silva <
>>> mal...@wso2.com> wrote:
>>>
 Hi Carbon Team,

 I have reproduced the issue and have done a fix.

Re: [Dev] How to handle REST_URL_POSTFIX property when Query Parameter values are defined

2015-07-24 Thread Isuru Udana
Hi Uvindra,

I think the correct approach is to completely remove REST_URL_POSTFIX
getting appended for HTTP Endpoint. And append only if the user configure
to do so.
Initially we implemented HTTP Endpoint in that way. But somehow
implementation has changed now.
I am not sure whether we are too late to revert to the original
implementation now.

If we cannot revert back,
For ESB, we can simply remove the REST_URL_POSTFIX from the config and for
AM, we need a easy way to do that from UI.

On Fri, Jul 24, 2015 at 1:31 PM, Uvindra Dias Jayasinha 
wrote:

> We need to come up with $subject.
>
> The issue related to this has been highlighted in [1]
>
> The REST_URL_POSTFIX property appends the url-mapping of a given resource
> to the end of the api endpoint in synapse. This is applied by synapse for
> all APIs that are defined.
>
> For example,
>
> *API URL* - http://localhost:8280/noPathParam/1.0/
> *Endpoint URL* - http://localhost:8281/sampleAPI
> *GET Resource(url-mapping)* - somepath
>
> Now invoking the above GET resource of the API,
>
>GET http://localhost:8280/noPathParam/1.0/somepath
>
> will translate to,
>
> GET http://localhost:8281/sampleAPI/somepath
>
>
>
> The problem happens when there are Query Parameters. Since resource
> url-mapping or uri-template attribute is getting appended by default to the
> end of the URL, it is getting added after the Query Parameter, as follows,
>
>
> *API URL* - http://localhost:8280/pathParam/1.0/
> *Endpoint URL* - http://localhost:8281/sampleAPI?name={uri.var.name}
> *GET Resource(url-template)* - {name}
>
> Now invoking the above GET resource of the API
>
>GET http://localhost:8280/pathParam/1.0/somename
>
>
> will translate to,
>
> GET http://localhost:8281/sampleAPI?name=
> *somename/somename*
>
> instead of the expected,
>
> GET http://localhost:8281/sampleAPI?name=somename
>
>
> So the problem here is that synapse treats both url-mapping and
> url-template resources the same way. What should happen is that the
> REST_URL_POSTFIX property should only be considered if the url-mapping
> attribute is specified *and not when uri-template attribute exists*.
>
There is no url mapping involved with HTTP endpoint (only url template is
there). And there is no relationship between API resources and HTTP
Endpoint.

Thanks.

>
>
> So can we get this fixed at synapse level? We believe this is the correct
> place to solve this issue
>
>
> [1] https://wso2.org/jira/browse/APIMANAGER-4002
>
> --
> Regards,
> Uvindra
>
> Mobile: 33962
>



-- 
*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


[Dev] How to handle REST_URL_POSTFIX property when Query Parameter values are defined

2015-07-24 Thread Uvindra Dias Jayasinha
We need to come up with $subject.

The issue related to this has been highlighted in [1]

The REST_URL_POSTFIX property appends the url-mapping of a given resource
to the end of the api endpoint in synapse. This is applied by synapse for
all APIs that are defined.

For example,

*API URL* - http://localhost:8280/noPathParam/1.0/
*Endpoint URL* - http://localhost:8281/sampleAPI
*GET Resource(url-mapping)* - somepath

Now invoking the above GET resource of the API,

   GET http://localhost:8280/noPathParam/1.0/somepath

will translate to,

GET http://localhost:8281/sampleAPI/somepath



The problem happens when there are Query Parameters. Since resource
url-mapping or uri-template attribute is getting appended by default to the
end of the URL, it is getting added after the Query Parameter, as follows,


*API URL* - http://localhost:8280/pathParam/1.0/
*Endpoint URL* - http://localhost:8281/sampleAPI?name={uri.var.name}
*GET Resource(url-template)* - {name}

Now invoking the above GET resource of the API

   GET http://localhost:8280/pathParam/1.0/somename


will translate to,

GET http://localhost:8281/sampleAPI?name=
*somename/somename*

instead of the expected,

GET http://localhost:8281/sampleAPI?name=somename


So the problem here is that synapse treats both url-mapping and
url-template resources the same way. What should happen is that the
REST_URL_POSTFIX property should only be considered if the url-mapping
attribute is specified *and not when uri-template attribute exists*.


So can we get this fixed at synapse level? We believe this is the correct
place to solve this issue


[1] https://wso2.org/jira/browse/APIMANAGER-4002

-- 
Regards,
Uvindra

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


Re: [Dev] wso2 siddhi CEP integration with storm

2015-07-24 Thread Lasantha Fernando
[Adding WSO2 dev list]

Hi Huizhi,

It is great to hear that you are using Siddhi for your usecase!.

Siddhi 3.0.0-SNAPSHOT version available in master branch [1] can be used
with Storm. Currently Siddhi is on 3.0.0 and we have not yet created Siddhi
3.1.0 version.

Can you try out with Siddhi-3.0.0-SNAPSHOT and see if string matching works
properly for you? Please note that Siddhi-3.0.0 uses string extension
instead of the in-built isMatch function [2].

Siddhi 3.0.0 should work with Storm without any issue. We are using
Siddhi-3.0.0 in our Storm-WSO2 CEP integration scenarios as well. If you
are getting any errors when trying to run Siddhi-3.0.0 within Storm, can
you describe those issues in our dev list? We might be able to help you
resolve those issues since we have already tested Siddhi-3.0.0 with Storm.

[1] https://github.com/wso2/siddhi
[2] https://docs.wso2.com/display/CEP400/Siddhi+Extensions

Thanks,
Lasantha

On 23 July 2015 at 22:33, Huizhi Lu  wrote:

> Hello Lasantha,
>
> We are using siddhi CEP. Once we tried to use siddhi 3.0 but there were
> conflicts with storm so I downgraded it to siddhi 2.2.0. And now it seems
> that siddhi 2.2.0 does not support backslash '\' in isMatch function.
>
> Does siddhi 3.1.0 support backslash '\'? And also are there conflicts with
> storm?
>
> I am looking forward to your confirmation so that we will see if we can
> upgrade siddhi to 3.1.0
>
> Thanks a lot!
>
>
> Regards,
> -Huizhi
>



-- 
*Lasantha Fernando*
Senior Software Engineer - Data Technologies Team
WSO2 Inc. http://wso2.com

email: lasan...@wso2.com
mobile: (+94) 71 5247551
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] java.lang.IllegalStateException: Trying to set the domain from 1 to 2

2015-07-24 Thread Supun Malinga
Thanks Malaka. I added few comments on code formatting. Could you pls
update ?

On Fri, Jul 24, 2015 at 12:33 PM, Malaka Silva  wrote:

> Hi All,
>
> Please review and merge the revised fix.
>
> https://github.com/wso2/carbon4-kernel/pull/327
>
> Pls note:
> I have only used following since it'll resolve the tenant id internally.
>
> privilegedCarbonContext.setTenantDomain(tenantDomain, true);
>
> On Fri, Jul 24, 2015 at 12:31 PM, Malaka Silva  wrote:
>
>> Hi All,
>>
>> Please review and merge the revised fix.
>>
>> https://github.com/wso2/carbon4-kernel/pull/327
>>
>> On Fri, Jul 24, 2015 at 9:52 AM, Malaka Silva  wrote:
>>
>>> Well we get the required info from the url and that logic is inside and
>>> cannot bring to the startup.
>>>
>>> On Fri, Jul 24, 2015 at 9:29 AM, Supun Malinga  wrote:
>>>
 Hi Malaka,

 Fix looks better now.. Can you also check why the tenant domain is not
 set when starting the tenant flow ?. Please see below on how to use CC..

 https://docs.wso2.com/display/Carbon420/CarbonContext+API#CarbonContextAPI-Switchingtenantflows

 thanks,

 On Thu, Jul 23, 2015 at 8:49 PM, Malaka Silva  wrote:

> Hi All,
>
> Please review and merge the revised fix.
>
> [1] https://github.com/wso2/carbon4-kernel/pull/325
>
> On Thu, Jul 23, 2015 at 4:46 PM, Supun Malinga 
> wrote:
>
>> Hi,
>>
>> We (Azeez, Sameera & me) had a chat on this. Seems
>> in MultitenantMessageReceiver it has violated the usage of
>> PrivilegedCarbonContext usages. Usually we should do
>> PrivilegedCarbonContext.getThreadLocalCarbonContext() startTenantFlow(),
>> PrivilegedCarbonContext.getThreadLocalCarbonContext().
>> endTenantFlow()  and put the required logic in between. Then it
>> should not be required to call
>> PrivilegedCarbonContext.destroyCurrentContext().
>>
>> We need to properly fix this in MultitenantMessageReceiver.. There
>> are several places MultitenantMessageReceiver has done the same mistake.
>>
>> However we are so close the kernel 4.4.1 RC and we might not have
>> enough time to do this. How should we proceed ?.
>>
>> thanks,
>>
>> On Thu, Jul 23, 2015 at 9:20 AM, Malaka Silva 
>> wrote:
>>
>>> thx
>>>
>>> On Thu, Jul 23, 2015 at 8:54 AM, Supun Malinga 
>>> wrote:
>>>
 Hi,

 The fix seems appropriate. Will discuss with the team further and
 merge this today..
 For the integration tests, is there no way to verify the fix
 without doing load requests ?.

 thanks,

 On Wed, Jul 22, 2015 at 1:39 PM, Supun Malinga 
 wrote:

> Hi Malaka,
>
> Can you point out the place where its being set in message context
> ?. Basically I want to understand why we cannot destroy the context 
> at that
> level (after the usage of CC is done).
>
> thanks,
>
> On Tue, Jul 21, 2015 at 8:10 PM, Malaka Silva 
> wrote:
>
>> Hi Supun,
>>
>> This issue can only be reproduced if you do a load test parallel
>> with two or more tenants.
>>
>> Here tenant domain is set with the value from message context.
>> This fix will clean the thread context before setting the new 
>> context.
>>
>> On Tue, Jul 21, 2015 at 7:45 PM, Supun Malinga 
>> wrote:
>>
>>> Hi Malaka,
>>>
>>> Can you explain the fix you have done pls ?. We need to
>>> understand that the fix is the optimal one.
>>>
>>> Also do we have integration tests for the fix in kernel or ESB
>>> level ?. Please note it is better if we can have a test case for 
>>> this in
>>> kernel itself.
>>>
>>> thanks,
>>>
>>> On Tue, Jul 21, 2015 at 4:33 PM, Malaka Silva 
>>> wrote:
>>>
 Hi Carbon Team,

 Please review and merge this before the next release.

 On Tue, Jul 21, 2015 at 4:29 PM, Malaka Silva 
 wrote:

> Any update on this?
>
> On Mon, Jul 13, 2015 at 10:35 AM, Malaka Silva <
> mal...@wso2.com> wrote:
>
>> Hi Carbon Team,
>>
>> Any update on this?
>>
>> On Thu, Jul 2, 2015 at 12:11 PM, Malaka Silva <
>> mal...@wso2.com> wrote:
>>
>>> Hi Carbon Team,
>>>
>>> I have reproduced the issue and have done a fix.
>>>
>>> Please review and merge.
>>>
>>> Related jira's [1] and [2]. Fix with [3]
>>>
>>> [1] https://wso2.org/jira/browse/ESBJAVA-3801
>>> [2] https://wso2.or

Re: [Dev] [DEV] java.lang.IllegalStateException: Trying to set the domain from 1 to 2

2015-07-24 Thread Malaka Silva
Hi All,

Please review and merge the revised fix.

https://github.com/wso2/carbon4-kernel/pull/327

Pls note:
I have only used following since it'll resolve the tenant id internally.

privilegedCarbonContext.setTenantDomain(tenantDomain, true);

On Fri, Jul 24, 2015 at 12:31 PM, Malaka Silva  wrote:

> Hi All,
>
> Please review and merge the revised fix.
>
> https://github.com/wso2/carbon4-kernel/pull/327
>
> On Fri, Jul 24, 2015 at 9:52 AM, Malaka Silva  wrote:
>
>> Well we get the required info from the url and that logic is inside and
>> cannot bring to the startup.
>>
>> On Fri, Jul 24, 2015 at 9:29 AM, Supun Malinga  wrote:
>>
>>> Hi Malaka,
>>>
>>> Fix looks better now.. Can you also check why the tenant domain is not
>>> set when starting the tenant flow ?. Please see below on how to use CC..
>>>
>>> https://docs.wso2.com/display/Carbon420/CarbonContext+API#CarbonContextAPI-Switchingtenantflows
>>>
>>> thanks,
>>>
>>> On Thu, Jul 23, 2015 at 8:49 PM, Malaka Silva  wrote:
>>>
 Hi All,

 Please review and merge the revised fix.

 [1] https://github.com/wso2/carbon4-kernel/pull/325

 On Thu, Jul 23, 2015 at 4:46 PM, Supun Malinga  wrote:

> Hi,
>
> We (Azeez, Sameera & me) had a chat on this. Seems
> in MultitenantMessageReceiver it has violated the usage of
> PrivilegedCarbonContext usages. Usually we should do
> PrivilegedCarbonContext.getThreadLocalCarbonContext() startTenantFlow(),
> PrivilegedCarbonContext.getThreadLocalCarbonContext().
> endTenantFlow()  and put the required logic in between. Then it should
> not be required to call PrivilegedCarbonContext.destroyCurrentContext().
>
> We need to properly fix this in MultitenantMessageReceiver.. There are
> several places MultitenantMessageReceiver has done the same mistake.
>
> However we are so close the kernel 4.4.1 RC and we might not have
> enough time to do this. How should we proceed ?.
>
> thanks,
>
> On Thu, Jul 23, 2015 at 9:20 AM, Malaka Silva  wrote:
>
>> thx
>>
>> On Thu, Jul 23, 2015 at 8:54 AM, Supun Malinga 
>> wrote:
>>
>>> Hi,
>>>
>>> The fix seems appropriate. Will discuss with the team further and
>>> merge this today..
>>> For the integration tests, is there no way to verify the fix without
>>> doing load requests ?.
>>>
>>> thanks,
>>>
>>> On Wed, Jul 22, 2015 at 1:39 PM, Supun Malinga 
>>> wrote:
>>>
 Hi Malaka,

 Can you point out the place where its being set in message context
 ?. Basically I want to understand why we cannot destroy the context at 
 that
 level (after the usage of CC is done).

 thanks,

 On Tue, Jul 21, 2015 at 8:10 PM, Malaka Silva 
 wrote:

> Hi Supun,
>
> This issue can only be reproduced if you do a load test parallel
> with two or more tenants.
>
> Here tenant domain is set with the value from message context.
> This fix will clean the thread context before setting the new context.
>
> On Tue, Jul 21, 2015 at 7:45 PM, Supun Malinga 
> wrote:
>
>> Hi Malaka,
>>
>> Can you explain the fix you have done pls ?. We need to
>> understand that the fix is the optimal one.
>>
>> Also do we have integration tests for the fix in kernel or ESB
>> level ?. Please note it is better if we can have a test case for 
>> this in
>> kernel itself.
>>
>> thanks,
>>
>> On Tue, Jul 21, 2015 at 4:33 PM, Malaka Silva 
>> wrote:
>>
>>> Hi Carbon Team,
>>>
>>> Please review and merge this before the next release.
>>>
>>> On Tue, Jul 21, 2015 at 4:29 PM, Malaka Silva 
>>> wrote:
>>>
 Any update on this?

 On Mon, Jul 13, 2015 at 10:35 AM, Malaka Silva >>> > wrote:

> Hi Carbon Team,
>
> Any update on this?
>
> On Thu, Jul 2, 2015 at 12:11 PM, Malaka Silva  > wrote:
>
>> Hi Carbon Team,
>>
>> I have reproduced the issue and have done a fix.
>>
>> Please review and merge.
>>
>> Related jira's [1] and [2]. Fix with [3]
>>
>> [1] https://wso2.org/jira/browse/ESBJAVA-3801
>> [2] https://wso2.org/jira/browse/CARBON-15294
>> [3] https://github.com/wso2/carbon4-kernel/pull/264
>>
>> 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

Re: [Dev] [DEV] java.lang.IllegalStateException: Trying to set the domain from 1 to 2

2015-07-24 Thread Malaka Silva
Hi All,

Please review and merge the revised fix.

https://github.com/wso2/carbon4-kernel/pull/327

On Fri, Jul 24, 2015 at 9:52 AM, Malaka Silva  wrote:

> Well we get the required info from the url and that logic is inside and
> cannot bring to the startup.
>
> On Fri, Jul 24, 2015 at 9:29 AM, Supun Malinga  wrote:
>
>> Hi Malaka,
>>
>> Fix looks better now.. Can you also check why the tenant domain is not
>> set when starting the tenant flow ?. Please see below on how to use CC..
>>
>> https://docs.wso2.com/display/Carbon420/CarbonContext+API#CarbonContextAPI-Switchingtenantflows
>>
>> thanks,
>>
>> On Thu, Jul 23, 2015 at 8:49 PM, Malaka Silva  wrote:
>>
>>> Hi All,
>>>
>>> Please review and merge the revised fix.
>>>
>>> [1] https://github.com/wso2/carbon4-kernel/pull/325
>>>
>>> On Thu, Jul 23, 2015 at 4:46 PM, Supun Malinga  wrote:
>>>
 Hi,

 We (Azeez, Sameera & me) had a chat on this. Seems
 in MultitenantMessageReceiver it has violated the usage of
 PrivilegedCarbonContext usages. Usually we should do
 PrivilegedCarbonContext.getThreadLocalCarbonContext() startTenantFlow(),
 PrivilegedCarbonContext.getThreadLocalCarbonContext().
 endTenantFlow()  and put the required logic in between. Then it should
 not be required to call PrivilegedCarbonContext.destroyCurrentContext().

 We need to properly fix this in MultitenantMessageReceiver.. There are
 several places MultitenantMessageReceiver has done the same mistake.

 However we are so close the kernel 4.4.1 RC and we might not have
 enough time to do this. How should we proceed ?.

 thanks,

 On Thu, Jul 23, 2015 at 9:20 AM, Malaka Silva  wrote:

> thx
>
> On Thu, Jul 23, 2015 at 8:54 AM, Supun Malinga 
> wrote:
>
>> Hi,
>>
>> The fix seems appropriate. Will discuss with the team further and
>> merge this today..
>> For the integration tests, is there no way to verify the fix without
>> doing load requests ?.
>>
>> thanks,
>>
>> On Wed, Jul 22, 2015 at 1:39 PM, Supun Malinga 
>> wrote:
>>
>>> Hi Malaka,
>>>
>>> Can you point out the place where its being set in message context
>>> ?. Basically I want to understand why we cannot destroy the context at 
>>> that
>>> level (after the usage of CC is done).
>>>
>>> thanks,
>>>
>>> On Tue, Jul 21, 2015 at 8:10 PM, Malaka Silva 
>>> wrote:
>>>
 Hi Supun,

 This issue can only be reproduced if you do a load test parallel
 with two or more tenants.

 Here tenant domain is set with the value from message context. This
 fix will clean the thread context before setting the new context.

 On Tue, Jul 21, 2015 at 7:45 PM, Supun Malinga 
 wrote:

> Hi Malaka,
>
> Can you explain the fix you have done pls ?. We need to understand
> that the fix is the optimal one.
>
> Also do we have integration tests for the fix in kernel or ESB
> level ?. Please note it is better if we can have a test case for this 
> in
> kernel itself.
>
> thanks,
>
> On Tue, Jul 21, 2015 at 4:33 PM, Malaka Silva 
> wrote:
>
>> Hi Carbon Team,
>>
>> Please review and merge this before the next release.
>>
>> On Tue, Jul 21, 2015 at 4:29 PM, Malaka Silva 
>> wrote:
>>
>>> Any update on this?
>>>
>>> On Mon, Jul 13, 2015 at 10:35 AM, Malaka Silva 
>>> wrote:
>>>
 Hi Carbon Team,

 Any update on this?

 On Thu, Jul 2, 2015 at 12:11 PM, Malaka Silva 
 wrote:

> Hi Carbon Team,
>
> I have reproduced the issue and have done a fix.
>
> Please review and merge.
>
> Related jira's [1] and [2]. Fix with [3]
>
> [1] https://wso2.org/jira/browse/ESBJAVA-3801
> [2] https://wso2.org/jira/browse/CARBON-15294
> [3] https://github.com/wso2/carbon4-kernel/pull/264
>
> 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 fut

Re: [Dev] [ES] Database Support Issues for ES 2.0

2015-07-24 Thread Manuranga Perera
Hi Nadeesha,

https://wso2.org/jira/browse/STORE-829
https://wso2.org/jira/browse/STORE-918
https://wso2.org/jira/browse/STORE-904

have to be re-tested whit new IS dependency update. I'll provide a pack
today for this.

https://wso2.org/jira/browse/STORE-765

is also fixed. need to retest


I am not suer about https://wso2.org/jira/browse/STORE-908


Hi Greg Team
Is https://wso2.org/jira/browse/STORE-908 a know bug in GReg side ? or is
this something we have to solve.


On Fri, Jul 24, 2015 at 12:05 PM, Nadeesha Meegoda 
wrote:

> Hi all,
>
> What are the supported databases for ES 2.0? Currently only the h2
> default,Mysql, Mariadb databases are supported. Oracle, MSsql, POSTGRESQL
> have script errors and DB2 is not supported by ES. Oracle and MSsql has
> startup issues.
>
> Please refer the database support issues in [1],[2],[3],[4]
>
> [1] https://wso2.org/jira/browse/STORE-765
> [2] https://wso2.org/jira/browse/STORE-829
> [3] https://wso2.org/jira/browse/STORE-918
> [4] https://wso2.org/jira/browse/STORE-908
>
> Please let us the reasons for not supporting DB2. If there are any other
> databases ES supports please let us know.
>
>
> Thanks
> Nadeesha
> --
> *Nadeesha Meegoda*
> Software Engineer - QA
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
> email : nadees...@wso2.com
> mobile: +94783639540
> <%2B94%2077%202273555>
>



-- 
With regards,
*Manu*ranga Perera.

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