{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • General
    • Edge/API Management
    • Developer Portal
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Analytics
    • Events
    • 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 /
  • General /
avatar image
1
Question by Saransh Tiwari · Feb 07 at 07:46 AM · 17 Views cachemessage processorcache behaviorlookup

Look Up Caches NullPointerException exception when fetching entry

Hi Guys,

We are facing one issue where our Populate Cache Policies are working fine but Lookup Caches are not working properly after upgrading to apigee version 4.19.01

We did MP restart and also tried killing apigee process but the issue still persists. Can someone know what is the exact reason for these errors and how it can be resolved.

We are getting below error in MP Logs:

2019-02-06 15:42:41,198 org:XXX env:test api:oauth_nl rev:30 messageid:elba-3559-858-3 policy:Verify-Api-Key Apigee-Main-74 ERROR SERVICES.CACHE - DistributedCacheManagerImpl.getEntry() : DistributedCacheManagerImpl.getEntry() - exception when fetching entry api_products@@@XXXXX@@@nl-api-billing-product - ignoring it.... java.lang.NullPointerException: null at com.apigee.cache.CacheMemoryLimiter.get(CacheMemoryLimiter.java:167) at com.apigee.cache.CacheManagerImpl.updateMemoryLimiter(CacheManagerImpl.java:151) at com.apigee.cache.CacheManagerImpl.getEntryFromCache(CacheManagerImpl.java:274) at com.apigee.cache.CacheManagerImpl.getEntry(CacheManagerImpl.java:267) at com.apigee.cache.distributed.DistributedCacheManagerImpl.getEntry(DistributedCacheManagerImpl.java:305) at com.apigee.keymanagement.util.CacheUtil.getFromCache(CacheUtil.java:206) at com.apigee.keymanagement.dao.nosql.impl.BaseDaoImpl.fetchEntityFromDataStore(BaseDaoImpl.java:355) at com.apigee.keymanagement.dao.nosql.impl.BaseDaoImpl.getByKey(BaseDaoImpl.java:196) at com.apigee.keymanagement.dao.nosql.impl.BaseDaoImpl.getByKey(BaseDaoImpl.java:192) at com.apigee.keymanagement.dao.nosql.impl.ApiProductDaoImpl.getByName(ApiProductDaoImpl.java:167) at com.apigee.keymanagement.dao.nosql.impl.ApiProductDaoImpl.getByName(ApiProductDaoImpl.java:29) at com.apigee.keymanagement.persistence.adapters.LegacyRuntimeAdapter.getApiProductByName(LegacyRuntimeAdapter.java:673) at com.apigee.keymanagement.dao.nosql.util.ApiProductUtil.getApiProductByNameAndOrg(ApiProductUtil.java:40) at com.apigee.keymanagement.dao.nosql.util.ApiProductUtil.populateApiProductAttributes(ApiProductUtil.java:120) at com.apigee.keymanagement.util.ConsumerKeyUtil.getConsumerDetailsForApiKey(ConsumerKeyUtil.java:62) at com.apigee.oauth.v2.persistence.OAuth2RuntimeServiceImpl.getConsumerForApiKey(OAuth2RuntimeServiceImpl.java:134) at com.apigee.oauth.v2.connectors.LocalOAuthServiceConnector.getClientAttributesForApiKey(LocalOAuthServiceConnector.java:202) at com.apigee.oauth.v2.OAuthServiceImpl.getClientAttributesForApiKey(OAuthServiceImpl.java:544) at com.apigee.steps.oauth.v2.VerifyApiKeyStepExecution.validateKeyAndPopulateFlowVariables(VerifyApiKeyStepExecution.java:37) at com.apigee.steps.oauth.v2.VerifyApiKeyStepExecutionBase.execute(VerifyApiKeyStepExecutionBase.java:83) at com.apigee.messaging.runtime.steps.StepExecution.execute(StepExecution.java:156) at com.apigee.flow.execution.AbstractAsyncExecutionStrategy$AsyncExecutionTask.call(AbstractAsyncExecutionStrategy.java:74) at com.apigee.flow.execution.AbstractAsyncExecutionStrategy$AsyncExecutionTask.call(AbstractAsyncExecutionStrategy.java:45) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 2019-02-06 15:42:41,200 org:XXXX env:test api:oauth_nl rev:30 messageid:elba-3559-858-3 policy:Verify-Api-Key Apigee-Main-74 WARN SERVICES.CACHE - CacheManagerImpl.addEntry() : Exception when adding cache entry api_products@@@XXXX@@@nl-api-billing-product - ignoring it.... java.lang.NullPointerException: null 2019-02-06 15:42:41,200 org:XXXX env:test api:oauth_nl rev:30 messageid:elba-3559-858-3 policy:Verify-Api-Key Apigee-Main-74 ERROR SERVICES.CACHE - DistributedCacheManagerImpl.getEntry() : DistributedCacheManagerImpl.getEntry() - exception when fetching entry organizations@@@XXXX - ignoring it.... java.lang.NullPointerException: null at com.apigee.cache.CacheMemoryLimiter.get(CacheMemoryLimiter.java:167) at com.apigee.cache.CacheManagerImpl.updateMemoryLimiter(CacheManagerImpl.java:151) at com.apigee.cache.CacheManagerImpl.getEntryFromCache(CacheManagerImpl.java:274) at com.apigee.cache.CacheManagerImpl.getEntry(CacheManagerImpl.java:267) at com.apigee.cache.distributed.DistributedCacheManagerImpl.getEntry(DistributedCacheManagerImpl.java:305) at com.apigee.keymanagement.util.CacheUtil.getFromCache(CacheUtil.java:206) at com.apigee.keymanagement.dao.nosql.impl.BaseDaoImpl.fetchEntityFromDataStore(BaseDaoImpl.java:355) at com.apigee.keymanagement.dao.nosql.impl.BaseDaoImpl.getByKey(BaseDaoImpl.java:196) at com.apigee.keymanagement.dao.nosql.impl.BaseDaoImpl.getByKey(BaseDaoImpl.java:192) "system.log" 411947L, 40801531C

Comment
Add comment Show 3
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 Saransh Tiwari · Feb 07 at 07:47 AM 0
Link

@Dino @Dino-at-Google @Anil Sagar @ Google @Mike Dunker @Anil Sagar

avatar image Dino-at-Google ♦♦   · Feb 07 at 04:20 PM 0
Link

It seems to me, Apigee Edge shouldn't log NPEs. Finding an NPE in the log seems to indicate a bug. Let me look into it.

ref: b/124049692

avatar image Dino-at-Google ♦♦   · Feb 07 at 04:53 PM 0
Link

Hi Saransh

Can you give me some additional context around this log message? You mentioned LookupCache policy. But the stacktrace you provided corresponds to the VerifyApiKey policy, not LookupCache.

The behavior you're reporting here is that LookupCache is not behaving properly. Do you have a small api proxy that reproduces this behavior? A simple test case.

Also, we need to look into the VerifyApiKey problem - the one that leads to the NPE in the log.

Close

0 Answers

· Add your answer
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 5 attachments (including images) can be used with a maximum of 5.0 MB each and 25.0 MB total.

Follow this Question

Answers Answers and Comments

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

Getting a Apigee error when accessing cache resource 1 Answer

Apigee cache L1 and L2 written synchronously? 2 Answers

How to remove cache using Invalidate Cache policy based on the reference "request.uri"? 1 Answer

Cache update time 2 Answers

Apigee EhCache configuration 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
© 2019 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
  • General
  • Edge/API Management
  • Developer Portal
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Analytics
  • Events
  • 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
  • Members
  • Badges