Re: [Dev] Error in AM 2.0 gateway

2016-08-25 Thread Bhathiya Jayasekara
On Thu, Aug 25, 2016 at 4:45 PM, Supun Malinga  wrote:

>
>
> On Thu, Aug 25, 2016 at 4:34 PM, Harsha Kumara  wrote:
>
>> Hi Supun,
>>
>> Did you setup the cluster with old throttling implementation? If it's
>> with new throttling implementation, please check your key manager
>> configuration.  Basically gateway try to fetch initial block conditions
>> details from the key manager.
>>
>
> I know. Found by debugging :). Replied in the SO as well..
>

That SO deployment was strange. It has been done for a demo, and they said
they don't have a key manager at all. Hence the error. :)

Thanks,
Bhathiya


>
>> Thanks,
>> Harsha
>>
>> On Thu, Aug 25, 2016 at 3:58 PM, Abimaran Kugathasan 
>> wrote:
>>
>>> Hi Supun,
>>>
>>> Same issue was reported here [1] as well, Can you try what Bhathiya has
>>> responded or separate Key Manager from Store?
>>>
>>> [1] : http://stackoverflow.com/questions/39101064/error-on-api-m
>>> anager-2-0-0-gateway-worker-on-start-up
>>>
>>> On Mon, Aug 22, 2016 at 12:50 PM, Supun Malinga  wrote:
>>>
 Diagram :
 ​
  am-2.0-pattern-4.png
 
 ​

 On Mon, Aug 22, 2016 at 12:47 PM, Supun Malinga 
 wrote:

> Hi,
>
> Getting the following exception in gateway worker. Any idea what could
> be causing this ?.
> This is in a distributed cluster with store and KM in same node.
> I can provide any configurations required..
>
> ​
>  am-2.0-pattern-4
> 
> ​
>
>
> gateway-worker | [2016-08-16 09:35:09,422]  INFO - API Destroying
> API: _WSO2AMTokenAPI_
> gateway-worker | [2016-08-16 09:35:09,426]  INFO - API
> Initializing API: _WSO2AMUserInfoAPI_
> gateway-worker | [2016-08-16 09:35:09,426]  INFO -
> DependencyTracker API : _WSO2AMUserInfoAPI_ was updated from the Synapse
> configuration successfully
> gateway-worker | [2016-08-16 09:35:09,426]  INFO - APIDeployer
> API: _WSO2AMUserInfoAPI_ has been updated from the file:
> /mnt/wso2am-2.0.0/repository/deployment/server/synapse-confi
> gs/default/api/_UserInfoAPI_.xml
> gateway-worker | [2016-08-16 09:35:11,427]  INFO - API Destroying
> API: _WSO2AMUserInfoAPI_
> gateway-worker | [2016-08-16 09:35:25,783] ERROR -
> KeyTemplateRetriever Exception when retrieving throttling data from remote
> endpoint
> gateway-worker | Unexpected character (<) at position 0.
> gateway-worker | at org.json.simple.parser.Yylex.yylex(Unknown
> Source)
> gateway-worker | at 
> org.json.simple.parser.JSONParser.nextToken(Unknown
> Source)
> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
> Source)
> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
> Source)
> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
> Source)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.KeyTemplateRetriever.retrieveKeyTemplateDat
> a(KeyTemplateRetriever.java:100)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
> bService(KeyTemplateRetriever.java:111)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriev
> er.java:54)
> gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
> gateway-worker | at java.util.TimerThread.run(Timer.java:505)
> gateway-worker | Exception in thread "Timer-6"
> java.lang.NullPointerException
> gateway-worker | at java.util.Arrays$ArrayList. it>(Arrays.java:2842)
> gateway-worker | at java.util.Arrays.asList(Arrays.java:2828)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
> bService(KeyTemplateRetriever.java:111)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriev
> er.java:54)
> gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
> gateway-worker | at java.util.TimerThread.run(Timer.java:505)
> gateway-worker | Exception in thread "Timer-5"
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
> Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
> gateway-worker | at com.google.gson.internal.bind.
> ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdap
> terFactory.java:221)
> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:861)
> gateway-worker  

Re: [Dev] Error in AM 2.0 gateway

2016-08-25 Thread Supun Malinga
On Thu, Aug 25, 2016 at 4:34 PM, Harsha Kumara  wrote:

> Hi Supun,
>
> Did you setup the cluster with old throttling implementation? If it's with
> new throttling implementation, please check your key manager
> configuration.  Basically gateway try to fetch initial block conditions
> details from the key manager.
>

I know. Found by debugging :). Replied in the SO as well..

>
> Thanks,
> Harsha
>
> On Thu, Aug 25, 2016 at 3:58 PM, Abimaran Kugathasan 
> wrote:
>
>> Hi Supun,
>>
>> Same issue was reported here [1] as well, Can you try what Bhathiya has
>> responded or separate Key Manager from Store?
>>
>> [1] : http://stackoverflow.com/questions/39101064/error-on-api-
>> manager-2-0-0-gateway-worker-on-start-up
>>
>> On Mon, Aug 22, 2016 at 12:50 PM, Supun Malinga  wrote:
>>
>>> Diagram :
>>> ​
>>>  am-2.0-pattern-4.png
>>> 
>>> ​
>>>
>>> On Mon, Aug 22, 2016 at 12:47 PM, Supun Malinga  wrote:
>>>
 Hi,

 Getting the following exception in gateway worker. Any idea what could
 be causing this ?.
 This is in a distributed cluster with store and KM in same node.
 I can provide any configurations required..

 ​
  am-2.0-pattern-4
 
 ​


 gateway-worker | [2016-08-16 09:35:09,422]  INFO - API Destroying
 API: _WSO2AMTokenAPI_
 gateway-worker | [2016-08-16 09:35:09,426]  INFO - API Initializing
 API: _WSO2AMUserInfoAPI_
 gateway-worker | [2016-08-16 09:35:09,426]  INFO -
 DependencyTracker API : _WSO2AMUserInfoAPI_ was updated from the Synapse
 configuration successfully
 gateway-worker | [2016-08-16 09:35:09,426]  INFO - APIDeployer API:
 _WSO2AMUserInfoAPI_ has been updated from the file:
 /mnt/wso2am-2.0.0/repository/deployment/server/synapse-confi
 gs/default/api/_UserInfoAPI_.xml
 gateway-worker | [2016-08-16 09:35:11,427]  INFO - API Destroying
 API: _WSO2AMUserInfoAPI_
 gateway-worker | [2016-08-16 09:35:25,783] ERROR -
 KeyTemplateRetriever Exception when retrieving throttling data from remote
 endpoint
 gateway-worker | Unexpected character (<) at position 0.
 gateway-worker | at org.json.simple.parser.Yylex.yylex(Unknown
 Source)
 gateway-worker | at org.json.simple.parser.JSONParser.nextToken(Unknown
 Source)
 gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
 Source)
 gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
 Source)
 gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
 Source)
 gateway-worker | at org.wso2.carbon.apimgt.gateway
 .throttling.util.KeyTemplateRetriever.retrieveKeyTemplateDat
 a(KeyTemplateRetriever.java:100)
 gateway-worker | at org.wso2.carbon.apimgt.gateway
 .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
 bService(KeyTemplateRetriever.java:111)
 gateway-worker | at org.wso2.carbon.apimgt.gateway
 .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
 gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
 gateway-worker | at java.util.TimerThread.run(Timer.java:505)
 gateway-worker | Exception in thread "Timer-6"
 java.lang.NullPointerException
 gateway-worker | at java.util.Arrays$ArrayList.>>> it>(Arrays.java:2842)
 gateway-worker | at java.util.Arrays.asList(Arrays.java:2828)
 gateway-worker | at org.wso2.carbon.apimgt.gateway
 .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
 bService(KeyTemplateRetriever.java:111)
 gateway-worker | at org.wso2.carbon.apimgt.gateway
 .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
 gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
 gateway-worker | at java.util.TimerThread.run(Timer.java:505)
 gateway-worker | Exception in thread "Timer-5"
 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
 Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
 gateway-worker | at com.google.gson.internal.bind.
 ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdap
 terFactory.java:221)
 gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:861)
 gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:826)
 gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:775)
 gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:747)
 gateway-worker | at org.wso2.carbon.apimgt.gateway
 .throttling.util.BlockingConditionRetriever.retrieveBlockCon
 

Re: [Dev] Error in AM 2.0 gateway

2016-08-25 Thread Supun Malinga
Hi,

Actually I resolved the issue. It was due to throttle data war not been
deployed at the time server try to retrieve data. Fix was done by delaying
server starting time + depsync improvements (deleting apps from workers to
reduce startup time and avoid redeployment when depsync kick in).

On Thu, Aug 25, 2016 at 4:34 PM, Harsha Kumara  wrote:

> Hi Supun,
>
> Did you setup the cluster with old throttling implementation? If it's with
> new throttling implementation, please check your key manager
> configuration.  Basically gateway try to fetch initial block conditions
> details from the key manager.
>
> Thanks,
> Harsha
>
> On Thu, Aug 25, 2016 at 3:58 PM, Abimaran Kugathasan 
> wrote:
>
>> Hi Supun,
>>
>> Same issue was reported here [1] as well, Can you try what Bhathiya has
>> responded or separate Key Manager from Store?
>>
>> [1] : http://stackoverflow.com/questions/39101064/error-on-api-
>> manager-2-0-0-gateway-worker-on-start-up
>>
>> On Mon, Aug 22, 2016 at 12:50 PM, Supun Malinga  wrote:
>>
>>> Diagram :
>>> ​
>>>  am-2.0-pattern-4.png
>>> 
>>> ​
>>>
>>> On Mon, Aug 22, 2016 at 12:47 PM, Supun Malinga  wrote:
>>>
 Hi,

 Getting the following exception in gateway worker. Any idea what could
 be causing this ?.
 This is in a distributed cluster with store and KM in same node.
 I can provide any configurations required..

 ​
  am-2.0-pattern-4
 
 ​


 gateway-worker | [2016-08-16 09:35:09,422]  INFO - API Destroying
 API: _WSO2AMTokenAPI_
 gateway-worker | [2016-08-16 09:35:09,426]  INFO - API Initializing
 API: _WSO2AMUserInfoAPI_
 gateway-worker | [2016-08-16 09:35:09,426]  INFO -
 DependencyTracker API : _WSO2AMUserInfoAPI_ was updated from the Synapse
 configuration successfully
 gateway-worker | [2016-08-16 09:35:09,426]  INFO - APIDeployer API:
 _WSO2AMUserInfoAPI_ has been updated from the file:
 /mnt/wso2am-2.0.0/repository/deployment/server/synapse-confi
 gs/default/api/_UserInfoAPI_.xml
 gateway-worker | [2016-08-16 09:35:11,427]  INFO - API Destroying
 API: _WSO2AMUserInfoAPI_
 gateway-worker | [2016-08-16 09:35:25,783] ERROR -
 KeyTemplateRetriever Exception when retrieving throttling data from remote
 endpoint
 gateway-worker | Unexpected character (<) at position 0.
 gateway-worker | at org.json.simple.parser.Yylex.yylex(Unknown
 Source)
 gateway-worker | at org.json.simple.parser.JSONParser.nextToken(Unknown
 Source)
 gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
 Source)
 gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
 Source)
 gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
 Source)
 gateway-worker | at org.wso2.carbon.apimgt.gateway
 .throttling.util.KeyTemplateRetriever.retrieveKeyTemplateDat
 a(KeyTemplateRetriever.java:100)
 gateway-worker | at org.wso2.carbon.apimgt.gateway
 .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
 bService(KeyTemplateRetriever.java:111)
 gateway-worker | at org.wso2.carbon.apimgt.gateway
 .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
 gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
 gateway-worker | at java.util.TimerThread.run(Timer.java:505)
 gateway-worker | Exception in thread "Timer-6"
 java.lang.NullPointerException
 gateway-worker | at java.util.Arrays$ArrayList.>>> it>(Arrays.java:2842)
 gateway-worker | at java.util.Arrays.asList(Arrays.java:2828)
 gateway-worker | at org.wso2.carbon.apimgt.gateway
 .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
 bService(KeyTemplateRetriever.java:111)
 gateway-worker | at org.wso2.carbon.apimgt.gateway
 .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
 gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
 gateway-worker | at java.util.TimerThread.run(Timer.java:505)
 gateway-worker | Exception in thread "Timer-5"
 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
 Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
 gateway-worker | at com.google.gson.internal.bind.
 ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdap
 terFactory.java:221)
 gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:861)
 gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:826)
 gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:775)
 

Re: [Dev] Error in AM 2.0 gateway

2016-08-25 Thread Harsha Kumara
Hi Supun,

Did you setup the cluster with old throttling implementation? If it's with
new throttling implementation, please check your key manager
configuration.  Basically gateway try to fetch initial block conditions
details from the key manager.

Thanks,
Harsha

On Thu, Aug 25, 2016 at 3:58 PM, Abimaran Kugathasan 
wrote:

> Hi Supun,
>
> Same issue was reported here [1] as well, Can you try what Bhathiya has
> responded or separate Key Manager from Store?
>
> [1] : http://stackoverflow.com/questions/39101064/error-on-
> api-manager-2-0-0-gateway-worker-on-start-up
>
> On Mon, Aug 22, 2016 at 12:50 PM, Supun Malinga  wrote:
>
>> Diagram :
>> ​
>>  am-2.0-pattern-4.png
>> 
>> ​
>>
>> On Mon, Aug 22, 2016 at 12:47 PM, Supun Malinga  wrote:
>>
>>> Hi,
>>>
>>> Getting the following exception in gateway worker. Any idea what could
>>> be causing this ?.
>>> This is in a distributed cluster with store and KM in same node.
>>> I can provide any configurations required..
>>>
>>> ​
>>>  am-2.0-pattern-4
>>> 
>>> ​
>>>
>>>
>>> gateway-worker | [2016-08-16 09:35:09,422]  INFO - API Destroying
>>> API: _WSO2AMTokenAPI_
>>> gateway-worker | [2016-08-16 09:35:09,426]  INFO - API Initializing
>>> API: _WSO2AMUserInfoAPI_
>>> gateway-worker | [2016-08-16 09:35:09,426]  INFO - DependencyTracker
>>> API : _WSO2AMUserInfoAPI_ was updated from the Synapse configuration
>>> successfully
>>> gateway-worker | [2016-08-16 09:35:09,426]  INFO - APIDeployer API:
>>> _WSO2AMUserInfoAPI_ has been updated from the file:
>>> /mnt/wso2am-2.0.0/repository/deployment/server/synapse-confi
>>> gs/default/api/_UserInfoAPI_.xml
>>> gateway-worker | [2016-08-16 09:35:11,427]  INFO - API Destroying
>>> API: _WSO2AMUserInfoAPI_
>>> gateway-worker | [2016-08-16 09:35:25,783] ERROR -
>>> KeyTemplateRetriever Exception when retrieving throttling data from remote
>>> endpoint
>>> gateway-worker | Unexpected character (<) at position 0.
>>> gateway-worker | at org.json.simple.parser.Yylex.yylex(Unknown
>>> Source)
>>> gateway-worker | at org.json.simple.parser.JSONParser.nextToken(Unknown
>>> Source)
>>> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
>>> Source)
>>> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
>>> Source)
>>> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
>>> Source)
>>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>>> .throttling.util.KeyTemplateRetriever.retrieveKeyTemplateDat
>>> a(KeyTemplateRetriever.java:100)
>>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>>> .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
>>> bService(KeyTemplateRetriever.java:111)
>>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>>> .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
>>> gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
>>> gateway-worker | at java.util.TimerThread.run(Timer.java:505)
>>> gateway-worker | Exception in thread "Timer-6"
>>> java.lang.NullPointerException
>>> gateway-worker | at java.util.Arrays$ArrayList.>> it>(Arrays.java:2842)
>>> gateway-worker | at java.util.Arrays.asList(Arrays.java:2828)
>>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>>> .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
>>> bService(KeyTemplateRetriever.java:111)
>>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>>> .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
>>> gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
>>> gateway-worker | at java.util.TimerThread.run(Timer.java:505)
>>> gateway-worker | Exception in thread "Timer-5"
>>> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
>>> Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
>>> gateway-worker | at com.google.gson.internal.bind.
>>> ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdap
>>> terFactory.java:221)
>>> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:861)
>>> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:826)
>>> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:775)
>>> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:747)
>>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>>> .throttling.util.BlockingConditionRetriever.retrieveBlockCon
>>> ditionsData(BlockingConditionRetriever.java:96)
>>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>>> .throttling.util.BlockingConditionRetriever.loadBlockingCond
>>> itionsFromWebService(BlockingConditionRetriever.java:105)
>>> gateway-worker | at 

Re: [Dev] Error in AM 2.0 gateway

2016-08-25 Thread Abimaran Kugathasan
Hi Supun,

Same issue was reported here [1] as well, Can you try what Bhathiya has
responded or separate Key Manager from Store?

[1] :
http://stackoverflow.com/questions/39101064/error-on-api-manager-2-0-0-gateway-worker-on-start-up

On Mon, Aug 22, 2016 at 12:50 PM, Supun Malinga  wrote:

> Diagram :
> ​
>  am-2.0-pattern-4.png
> 
> ​
>
> On Mon, Aug 22, 2016 at 12:47 PM, Supun Malinga  wrote:
>
>> Hi,
>>
>> Getting the following exception in gateway worker. Any idea what could be
>> causing this ?.
>> This is in a distributed cluster with store and KM in same node.
>> I can provide any configurations required..
>>
>> ​
>>  am-2.0-pattern-4
>> 
>> ​
>>
>>
>> gateway-worker | [2016-08-16 09:35:09,422]  INFO - API Destroying
>> API: _WSO2AMTokenAPI_
>> gateway-worker | [2016-08-16 09:35:09,426]  INFO - API Initializing
>> API: _WSO2AMUserInfoAPI_
>> gateway-worker | [2016-08-16 09:35:09,426]  INFO - DependencyTracker
>> API : _WSO2AMUserInfoAPI_ was updated from the Synapse configuration
>> successfully
>> gateway-worker | [2016-08-16 09:35:09,426]  INFO - APIDeployer API:
>> _WSO2AMUserInfoAPI_ has been updated from the file:
>> /mnt/wso2am-2.0.0/repository/deployment/server/synapse-confi
>> gs/default/api/_UserInfoAPI_.xml
>> gateway-worker | [2016-08-16 09:35:11,427]  INFO - API Destroying
>> API: _WSO2AMUserInfoAPI_
>> gateway-worker | [2016-08-16 09:35:25,783] ERROR -
>> KeyTemplateRetriever Exception when retrieving throttling data from remote
>> endpoint
>> gateway-worker | Unexpected character (<) at position 0.
>> gateway-worker | at org.json.simple.parser.Yylex.yylex(Unknown
>> Source)
>> gateway-worker | at org.json.simple.parser.JSONParser.nextToken(Unknown
>> Source)
>> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
>> Source)
>> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
>> Source)
>> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
>> Source)
>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>> .throttling.util.KeyTemplateRetriever.retrieveKeyTemplateDat
>> a(KeyTemplateRetriever.java:100)
>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>> .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
>> bService(KeyTemplateRetriever.java:111)
>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>> .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
>> gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
>> gateway-worker | at java.util.TimerThread.run(Timer.java:505)
>> gateway-worker | Exception in thread "Timer-6"
>> java.lang.NullPointerException
>> gateway-worker | at java.util.Arrays$ArrayList.> it>(Arrays.java:2842)
>> gateway-worker | at java.util.Arrays.asList(Arrays.java:2828)
>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>> .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
>> bService(KeyTemplateRetriever.java:111)
>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>> .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
>> gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
>> gateway-worker | at java.util.TimerThread.run(Timer.java:505)
>> gateway-worker | Exception in thread "Timer-5"
>> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
>> Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
>> gateway-worker | at com.google.gson.internal.bind.
>> ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdap
>> terFactory.java:221)
>> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:861)
>> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:826)
>> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:775)
>> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:747)
>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>> .throttling.util.BlockingConditionRetriever.retrieveBlockCon
>> ditionsData(BlockingConditionRetriever.java:96)
>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>> .throttling.util.BlockingConditionRetriever.loadBlockingCond
>> itionsFromWebService(BlockingConditionRetriever.java:105)
>> gateway-worker | at org.wso2.carbon.apimgt.gateway
>> .throttling.util.BlockingConditionRetriever.run(BlockingCond
>> itionRetriever.java:51)
>> gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
>> gateway-worker | at java.util.TimerThread.run(Timer.java:505)
>> gateway-worker | Caused by: java.lang.IllegalStateException:
>> Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
>> gateway-worker | at com.google.gson.stream.JsonRea
>> 

Re: [Dev] Error in AM 2.0 gateway

2016-08-22 Thread Supun Malinga
Diagram :
​
 am-2.0-pattern-4.png

​

On Mon, Aug 22, 2016 at 12:47 PM, Supun Malinga  wrote:

> Hi,
>
> Getting the following exception in gateway worker. Any idea what could be
> causing this ?.
> This is in a distributed cluster with store and KM in same node.
> I can provide any configurations required..
>
> ​
>  am-2.0-pattern-4
> 
> ​
>
>
> gateway-worker | [2016-08-16 09:35:09,422]  INFO - API Destroying API:
> _WSO2AMTokenAPI_
> gateway-worker | [2016-08-16 09:35:09,426]  INFO - API Initializing
> API: _WSO2AMUserInfoAPI_
> gateway-worker | [2016-08-16 09:35:09,426]  INFO - DependencyTracker
> API : _WSO2AMUserInfoAPI_ was updated from the Synapse configuration
> successfully
> gateway-worker | [2016-08-16 09:35:09,426]  INFO - APIDeployer API:
> _WSO2AMUserInfoAPI_ has been updated from the file:
> /mnt/wso2am-2.0.0/repository/deployment/server/synapse-confi
> gs/default/api/_UserInfoAPI_.xml
> gateway-worker | [2016-08-16 09:35:11,427]  INFO - API Destroying API:
> _WSO2AMUserInfoAPI_
> gateway-worker | [2016-08-16 09:35:25,783] ERROR -
> KeyTemplateRetriever Exception when retrieving throttling data from remote
> endpoint
> gateway-worker | Unexpected character (<) at position 0.
> gateway-worker | at org.json.simple.parser.Yylex.yylex(Unknown Source)
> gateway-worker | at org.json.simple.parser.JSONParser.nextToken(Unknown
> Source)
> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
> Source)
> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
> Source)
> gateway-worker | at org.json.simple.parser.JSONParser.parse(Unknown
> Source)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.KeyTemplateRetriever.retrieveKeyTemplateDat
> a(KeyTemplateRetriever.java:100)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
> bService(KeyTemplateRetriever.java:111)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
> gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
> gateway-worker | at java.util.TimerThread.run(Timer.java:505)
> gateway-worker | Exception in thread "Timer-6"
> java.lang.NullPointerException
> gateway-worker | at java.util.Arrays$ArrayList. it>(Arrays.java:2842)
> gateway-worker | at java.util.Arrays.asList(Arrays.java:2828)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWe
> bService(KeyTemplateRetriever.java:111)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
> gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
> gateway-worker | at java.util.TimerThread.run(Timer.java:505)
> gateway-worker | Exception in thread "Timer-5"
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
> Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
> gateway-worker | at com.google.gson.internal.bind.
> ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdap
> terFactory.java:221)
> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:861)
> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:826)
> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:775)
> gateway-worker | at com.google.gson.Gson.fromJson(Gson.java:747)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.BlockingConditionRetriever.retrieveBlockCon
> ditionsData(BlockingConditionRetriever.java:96)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.BlockingConditionRetriever.loadBlockingCond
> itionsFromWebService(BlockingConditionRetriever.java:105)
> gateway-worker | at org.wso2.carbon.apimgt.gateway
> .throttling.util.BlockingConditionRetriever.run(BlockingCond
> itionRetriever.java:51)
> gateway-worker | at java.util.TimerThread.mainLoop(Timer.java:555)
> gateway-worker | at java.util.TimerThread.run(Timer.java:505)
> gateway-worker | Caused by: java.lang.IllegalStateException: Expected
> BEGIN_OBJECT but was STRING at line 1 column 1 path $
> gateway-worker | at com.google.gson.stream.JsonRea
> der.beginObject(JsonReader.java:388)
> gateway-worker | at com.google.gson.internal.bind.
> ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdap
> terFactory.java:210)
> gateway-worker | ... 9 more
>
> thanks,
> --
> Supun Malinga
>



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