2
votes

I've currently switched from using WSO2 API manager version 1.9 from 1.8, all looks good, except I'm getting an exception when trying to populate the claims in the JWT token.

java.lang.IllegalStateException: The cache status is not STARTED
    at org.wso2.carbon.caching.impl.CacheImpl.checkStatusStarted(CacheImpl.java:287)
    at org.wso2.carbon.caching.impl.CacheImpl.get(CacheImpl.java:171)
    at org.wso2.carbon.apimgt.impl.token.DefaultClaimsRetriever.getClaims(DefaultClaimsRetriever.java:82)
    at org.wso2.carbon.apimgt.impl.token.JWTGenerator.populateCustomClaims(JWTGenerator.java:92)
    at org.wso2.carbon.apimgt.impl.token.AbstractJWTGenerator.buildBody(AbstractJWTGenerator.java:185)
    at org.wso2.carbon.apimgt.impl.token.AbstractJWTGenerator.generateToken(AbstractJWTGenerator.java:141)
    at org.wso2.carbon.apimgt.keymgt.handlers.AbstractKeyValidationHandler.generateConsumerToken(AbstractKeyValidationHandler.java:146)
    at org.wso2.carbon.apimgt.keymgt.service.APIKeyValidationService.validateKey(APIKeyValidationService.java:169)
    at org.wso2.carbon.apimgt.keymgt.service.thrift.APIKeyValidationServiceImpl.validateKey(APIKeyValidationServiceImpl.java:131)
    at org.wso2.carbon.apimgt.impl.generated.thrift.APIKeyValidationService$Processor$validateKey.getResult(APIKeyValidationService.java:278)
    at org.wso2.carbon.apimgt.impl.generated.thrift.APIKeyValidationService$Processor$validateKey.getResult(APIKeyValidationService.java:266)
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:176)
    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)

This seems to be similar to this bug https://wso2.org/jira/browse/APPM-958 on the APP manager, which doesn't seem to have been ported to the API manager.

Is there any workaround, or something I can configure?

Thanks

Edit: This bug on 1.5 of the API manager also looks similar. https://wso2.org/jira/browse/APIMANAGER-1504

1

1 Answers

2
votes

It is a bug [1] in API Manager 1.9.0 and already fixed for next version. If you are a customer of WSO2, you can get the patch for this issue from them.

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