Re: [Dev] [App Cloud] Reproduce the intermittent Malformed JSON Exception when calling tier api

2016-06-19 Thread Ishara Cooray
Hi Sabra,

i think you get this error because you get an invalid json (empty string or
null) from the tierapi for subscription plans details.

First thing you can do is try returning an empty string from their and
check whether you can re produce it. And thencheck the db for the existence
of data. If the data are there then check whether database connections are
properly handled.

Regards,


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

On Fri, Jun 17, 2016 at 8:59 PM, Kasun De Silva  wrote:

> Better add some debug logs to the tier and print this Malformed Json too,
> in such cases. SO that you can Identify whats going on.
>
> On Fri, Jun 17, 2016 at 3:45 AM, Sabra Ossen  wrote:
>
>> Hi Kasun,
>>
>> The issue arises when we try to create a new app or version from the ui
>> or rest api, specifically at the point of accessing the tier api. But since
>> this issue occurs intermittently by including proper logging in the tier
>> api and returning proper json responses we will be able to identify the
>> real reason when such an issue occurs.
>>
>> Thanks and Regards.
>>
>>
>> On Sat, Jun 11, 2016 at 2:35 AM, Kasun De Silva  wrote:
>>
>>> ​Did you try create version from rest api? Can we do a load test to the
>>> rest api and see?
>>>
>>
>>
>>
>> --
>> *Sabra Ossen*
>> *Software Engineer*
>> Email: sa...@wso2.com
>> Mobile: +94 767 837356
>>
>
>
>
> --
> *Kasun de Silva*
> Senior Software Engineer
>
> WSO2 Inc *. *|* E*mail : kas...@wso2.com | Mobile: +94
> 77 794 4260
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [App Cloud] Reproduce the intermittent Malformed JSON Exception when calling tier api

2016-06-17 Thread Kasun De Silva
Better add some debug logs to the tier and print this Malformed Json too,
in such cases. SO that you can Identify whats going on.

On Fri, Jun 17, 2016 at 3:45 AM, Sabra Ossen  wrote:

> Hi Kasun,
>
> The issue arises when we try to create a new app or version from the ui or
> rest api, specifically at the point of accessing the tier api. But since
> this issue occurs intermittently by including proper logging in the tier
> api and returning proper json responses we will be able to identify the
> real reason when such an issue occurs.
>
> Thanks and Regards.
>
>
> On Sat, Jun 11, 2016 at 2:35 AM, Kasun De Silva  wrote:
>
>> ​Did you try create version from rest api? Can we do a load test to the
>> rest api and see?
>>
>
>
>
> --
> *Sabra Ossen*
> *Software Engineer*
> Email: sa...@wso2.com
> Mobile: +94 767 837356
>



-- 
*Kasun de Silva*
Senior Software Engineer

WSO2 Inc *. *|* E*mail : kas...@wso2.com | Mobile: +94 77
794 4260
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [App Cloud] Reproduce the intermittent Malformed JSON Exception when calling tier api

2016-06-17 Thread Sabra Ossen
Hi Kasun,

The issue arises when we try to create a new app or version from the ui or
rest api, specifically at the point of accessing the tier api. But since
this issue occurs intermittently by including proper logging in the tier
api and returning proper json responses we will be able to identify the
real reason when such an issue occurs.

Thanks and Regards.


On Sat, Jun 11, 2016 at 2:35 AM, Kasun De Silva  wrote:

> ​Did you try create version from rest api? Can we do a load test to the
> rest api and see?
>



-- 
*Sabra Ossen*
*Software Engineer*
Email: sa...@wso2.com
Mobile: +94 767 837356
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [App Cloud] Reproduce the intermittent Malformed JSON Exception when calling tier api

2016-06-10 Thread Kasun De Silva
​Did you try create version from rest api? Can we do a load test to the
rest api and see?
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [App Cloud] Reproduce the intermittent Malformed JSON Exception when calling tier api

2016-06-09 Thread Sabra Ossen
Hi All,

Regarding jira mentioned in [1] I investigated the logs and was able to
identify that the issue is from tier API which we call to get details on
subscription plans.

The stack trace is as follows.

org.mozilla.javascript.WrappedException: Wrapped
com.google.gson.JsonSyntaxException:
com.google.gson.stream.MalformedJsonException: Expected EOF at line 1
column 27 (http#17) {org.jaggeryjs.jaggery.core.manager.WebAppManager}
org.jaggeryjs.scriptengine.exceptions.ScriptException:
org.mozilla.javascript.WrappedException: Wrapped
com.google.gson.JsonSyntaxException:
com.google.gson.stream.MalformedJsonException: Expected EOF at line 1
column 27 (http#17) at
org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:575)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at
org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:432)
at org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.wso2.carbon.ui.valve.XSSValve.invoke(XSSValve.java:118) at
org.wso2.carbon.ui.valve.CSRFValve.invoke(CSRFValve.java:72) at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
at
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
at
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatSessionReplicationValve.invoke(CarbonTomcatSessionReplicationValve.java:39)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:333)
at
org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:219)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745) Caused by:
org.mozilla.javascript.WrappedException: Wrapped
com.google.gson.JsonSyntaxException:
com.google.gson.stream.MalformedJsonException: Expected EOF at line 1
column 27 (http#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.mozilla.javascript.gen.http_6._c_anonymous_2(http:17) at
org.mozilla.javascript.gen.http_6.call(http) at
org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63) at
org.mozilla.javascript.gen.http_6._c_anonymous_5(http:195) at
org.mozilla.javascript.gen.http_6.call(http) at