{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
2
Question by AMAR DEVEGOWDA · Aug 21, 2015 at 09:35 AM · 1.3k Views edgequotakvmap keyvaluemap

Quota Policy - Throws NullPointerException

I have a simple quota policy in my proxy which throws the NullPointerException as shown below:

{ "fault": { "faultstring": "NullPointerException", "detail": { "errorcode": "Internal Server Error" } } } 

This error is thrown only when I have a KeyValueMapOperations policy before the Quota policy. If I remove the KVMAP then the problem goes away.

The KVMAP policy contents are as follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="KeyValueMapOperations" mapIdentifier="mykvmap">
    <Scope>environment</Scope>
    <Get assignTo="ratelimit" index="1">
        <Key>
            <Parameter>ratelimit</Parameter>
        </Key>
    </Get>
    <Get assignTo="log_level" index="1">
        <Key>
            <Parameter>log_level</Parameter>
        </Key>
    </Get>
</KeyValueMapOperations>

Can you please let me know why this issue occurs only when I have this KVMAP ?

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

2 Answers

  • Sort: 
avatar image
2
Best Answer

Answer by krupa · Aug 21, 2015 at 09:45 AM

The KVM policy has a key named “ratelimit” which is also used internally by the rate limit code to retrieve rate limit policy details.

This results in a namespace conflict between the two and we see a NPE.

This is applicable to an AssignMessage policy as well.

<AssignVariable>

<Name>ratelimit</Name>

<Ref/>

</AssignVariable>

Changing the key name would help.

Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AMAR DEVEGOWDA ♦ · Aug 21, 2015 at 09:57 AM 0
Link

@krupa

Thanks for your response.

I changed the "ratelimit" to "rate_limit" and the problem disappeared.

avatar image
1

Answer by jonesfloyd · Aug 25, 2015 at 11:40 PM

Thanks for the post and the answer. I've updated the KVM policy and AssignMessage policy (AssignVariable name) docs to say that "ratelimit" is a reserved word.

Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AMAR DEVEGOWDA ♦ · Aug 26, 2015 at 01:50 AM 0
Link

@Floyd Jones

Many Thanks for updating the docs with this information.

Follow this Question

Answers Answers and Comments

30 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to modify and construct json payload request in Javascript policy ? 2 Answers

Unreliable KVM return values 1 Answer

How does the Edge quota policy work when no identifer is specified? 4 Answers

Test Environment 1 Answer

How to Print the Distance Returned by Google API on Browser ? 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges