Issue mentioned by Pavithra is reproducible when I use email address as user name even without the IS as KM.
On Thu, Jun 11, 2015 at 10:38 AM, Nuwan Dias <[email protected]> wrote: > Yes, its now used by the API store to generate a token for its apps. > > Thanks, > NuwanD. > > On Thu, Jun 11, 2015 at 10:30 AM, Nuwan Silva <[email protected]> wrote: > >> regarding the NPE issue while verifying with docs [1] we see that the >> grant type we missed was >> </SupportedGrantType> >> <SupportedGrantType> >> <GrantTypeName>application_token</GrantTypeName> >> >> <GrantTypeHandlerImplClass>org.wso2.carbon.apimgt.keymgt.handlers.ApplicationTokenGrantHandler</GrantTypeHandlerImplClass> >> >> <GrantTypeValidatorImplClass>org.wso2.carbon.apimgt.keymgt.handlers.ApplicationTokenGrantValidator</GrantTypeValidatorImplClass> >> </SupportedGrantType> >> >> can you confirm if this is actually a required grant type? >> >> [1] >> https://docs.wso2.com/display/CLUSTER420/Configuring+WSO2+Identity+Server+as+the+Key+Manager >> >> Regards, >> NuwanS. >> >> On Thu, Jun 11, 2015 at 10:22 AM, Pavithra Madurangi <[email protected]> >> wrote: >> >>> I think this is the same issue reported by Evanthika [1]. >>> >>> [1] https://wso2.org/jira/browse/APIMANAGER-3800 >>> >>> On Thu, Jun 11, 2015 at 9:46 AM, Nuwan Dias <[email protected]> wrote: >>> >>>> Will look into it. Please use another App for testing for the moment. >>>> >>>> Thanks, >>>> NuwanD. >>>> >>>> On Thu, Jun 11, 2015 at 9:42 AM, Nuwan Silva <[email protected]> wrote: >>>> >>>>> As mentioned the NPE issue was resolved by adding the missing >>>>> supported grant types to the identity.xml. but the above (Pavithra's) >>>>> issue >>>>> is reproducible now in the setup. >>>>> in short, Pavithra and I get the same error mentioned below; which >>>>> does not allow us to generate the application token. >>>>> >>>>> please find the logs attached. >>>>> [2015-06-11 09:35:59,109] ERROR - AMDefaultKeyManagerImpl Can not >>>>> create OAuth application : DefaultApplication_PRODUCTION >>>>> org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceAPIManagementException: >>>>> APIKeyMgtSubscriberServiceAPIManagementException >>>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native >>>>> Method) >>>>> at >>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) >>>>> at >>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) >>>>> at java.lang.reflect.Constructor.newInstance(Constructor.java:526) >>>>> at java.lang.Class.newInstance(Class.java:374) >>>>> >>>>> >>>>> [2015-06-11 09:35:59,099] ERROR >>>>> {org.wso2.carbon.identity.application.mgt.ApplicationManagementServiceImpl} >>>>> - Error occurred while creating the application, >>>>> admin_DefaultApplication_PRODUCTION >>>>> org.wso2.carbon.identity.application.common.IdentityApplicationManagementException: >>>>> Error while creating application >>>>> at >>>>> org.wso2.carbon.identity.application.mgt.ApplicationMgtUtil.createAppRole(ApplicationMgtUtil.java:145) >>>>> at >>>>> org.wso2.carbon.identity.application.mgt.ApplicationManagementServiceImpl.createApplication(ApplicationManagementServiceImpl.java:112) >>>>> at >>>>> org.wso2.carbon.apimgt.keymgt.service.APIKeyMgtSubscriberService.createOAuthApplication(APIKeyMgtSubscriberService.java:157) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>> >>>>> Regards, >>>>> NuwanS. >>>>> >>>>> On Thu, Jun 11, 2015 at 9:34 AM, Nuwan Silva <[email protected]> wrote: >>>>> >>>>>> Note that this only happens to the DefaultApplication in the store. >>>>>> We can generate the tokens without any issue when doing the same flow >>>>>> with >>>>>> a new application >>>>>> >>>>>> On Thu, Jun 11, 2015 at 9:32 AM, Nuwan Silva <[email protected]> wrote: >>>>>> >>>>>>> The NPE was resolved by adding the supported grant types. but, the >>>>>>> above mentioned work-flow issues is still visible. >>>>>>> >>>>>>> Regards, >>>>>>> NuwanS. >>>>>>> >>>>>>> On Thu, Jun 11, 2015 at 9:23 AM, Pavithra Madurangi < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Thu, Jun 11, 2015 at 9:14 AM, Amila De Silva <[email protected]> >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi Nuwan, >>>>>>>>> >>>>>>>>> This is due to having an outdated identity.xml in IS. Get the >>>>>>>>> supported grant types from identity.xml in API Manager and copy it to >>>>>>>>> the >>>>>>>>> identity.xml in IS. >>>>>>>>> >>>>>>>> >>>>>>>> Hi Amila, >>>>>>>> >>>>>>>> I guess this solution is for NPE ? >>>>>>>> >>>>>>>> I don't have an IS in my setup and I too get that workflow related >>>>>>>> error when generating token. >>>>>>>> >>>>>>>> Caused by: >>>>>>>> org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceAPIManagementException: >>>>>>>> APIKeyMgtSubscriberServiceAPIManagementException >>>>>>>> at >>>>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >>>>>>>> at >>>>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) >>>>>>>> at >>>>>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) >>>>>>>> at >>>>>>>> java.lang.reflect.Constructor.newInstance(Constructor.java:526) >>>>>>>> at java.lang.Class.newInstance(Class.java:379) >>>>>>>> at >>>>>>>> org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceStub.createOAuthApplication(APIKeyMgtSubscriberServiceStub.java:453) >>>>>>>> at >>>>>>>> org.wso2.carbon.apimgt.keymgt.client.SubscriberKeyMgtClient.createOAuthApplication(SubscriberKeyMgtClient.java:73) >>>>>>>> at >>>>>>>> org.wso2.carbon.apimgt.keymgt.AMDefaultKeyManagerImpl.createApplication(AMDefaultKeyManagerImpl.java:112) >>>>>>>> ... 70 more >>>>>>>> [2015-06-10 20:49:59,523] ERROR - >>>>>>>> ApplicationRegistrationSimpleWorkflowExecutor Error occured when >>>>>>>> updating >>>>>>>> the status of the Application creation process >>>>>>>> org.wso2.carbon.apimgt.api.APIManagementException: Error occurred >>>>>>>> while executing SubscriberKeyMgtClient. >>>>>>>> at >>>>>>>> org.wso2.carbon.apimgt.impl.utils.APIUtil.handleException(APIUtil.java:1117) >>>>>>>> at >>>>>>>> org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:181) >>>>>>>> at >>>>>>>> org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.generateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:116) >>>>>>>> at >>>>>>>> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete(ApplicationRegistrationSimpleWorkflowExecutor.java:81) >>>>>>>> at >>>>>>>> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.execute(ApplicationRegistrationSimpleWorkflowExecutor.java:58) >>>>>>>> at >>>>>>>> org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalForApplicationRegistration(APIConsumerImpl.java:2139) >>>>>>>> at >>>>>>>> org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.requestApprovalForApplicationRegistration(UserAwareAPIConsumer.java:34) >>>>>>>> at >>>>>>>> org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_getApplicationKey(APIStoreHostObject.java:751) >>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>>>> at >>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>>>> at >>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>>>> >>>>>>>> Regards, >>>>>>>> Pavithra >>>>>>>> >>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Thursday, June 11, 2015, Nuwan Silva <[email protected]> wrote: >>>>>>>>> >>>>>>>>>> Hi All, >>>>>>>>>> >>>>>>>>>> We have seen the following issue coming up when trying to >>>>>>>>>> generate the application token from a APIM setup with IS500 as the >>>>>>>>>> Key >>>>>>>>>> manager. this is reported under [1]. >>>>>>>>>> >>>>>>>>>> APIM: >>>>>>>>>> TID: [0] [AM] [2015-06-10 20:55:18,889] ERROR >>>>>>>>>> {org.wso2.carbon.apimgt.impl.utils.APIUtil} - Error occurred while >>>>>>>>>> executing SubscriberKeyMgtClient. >>>>>>>>>> {org.wso2.carbon.apimgt.impl.utils.APIUtil} >>>>>>>>>> java.lang.RuntimeException: Error occurred while calling token >>>>>>>>>> endpoint: HTTP error code : 400 >>>>>>>>>> at >>>>>>>>>> org.wso2.carbon.apimgt.keymgt.AMDefaultKeyManagerImpl.getNewApplicationAccessToken(AMDefaultKeyManagerImpl.java:305) >>>>>>>>>> at >>>>>>>>>> org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:168) >>>>>>>>>> at >>>>>>>>>> org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.generateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:116) >>>>>>>>>> at >>>>>>>>>> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete(ApplicationRegistrationSimpleWorkflowExecutor.java:81) >>>>>>>>>> at >>>>>>>>>> org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.execute(ApplicationRegistrationSimpleWorkflowExecutor.java:58) >>>>>>>>>> at >>>>>>>>>> org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalForApplicationRegistration(APIConsumerImpl.java:2139) >>>>>>>>>> at >>>>>>>>>> org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.requestApprovalForApplicationRegistration(UserAwareAPIConsumer.java:34) >>>>>>>>>> at >>>>>>>>>> org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_getApplicationKey(APIStoreHostObject.java:751) >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>>>>>>>> Method) >>>>>>>>>> at >>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>>>>>> at >>>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>>>>>> at >>>>>>>>>> org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) >>>>>>>>>> at >>>>>>>>>> org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> IS: >>>>>>>>>> java.lang.NullPointerException >>>>>>>>>> at java.util.Hashtable.put(Hashtable.java:514) >>>>>>>>>> at >>>>>>>>>> org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration.getSupportedGrantTypes(OAuthServerConfiguration.java:382) >>>>>>>>>> at >>>>>>>>>> org.wso2.carbon.identity.oauth.OAuthAdminService.getAllowedGrantTypes(OAuthAdminService.java:486) >>>>>>>>>> at >>>>>>>>>> org.wso2.carbon.apimgt.keymgt.service.APIKeyMgtSubscriberService.createOAuthApplication(APIKeyMgtSubscriberService.java:171) >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>>>>>>>> Method) >>>>>>>>>> at >>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>>>>>> at >>>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>>>>>> >>>>>>>>>> [1] https://wso2.org/jira/browse/APIMANAGER-3839 >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> NuwanS. >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> *Nuwan Silva* >>>>>>>>>> *Senior Software Engineer - QA* >>>>>>>>>> Mobile: +9477 980 4543 >>>>>>>>>> >>>>>>>>>> WSO2 Inc. >>>>>>>>>> lean . enterprise . middlewear. >>>>>>>>>> http://www.wso2.com >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> *Amila De Silva* >>>>>>>>> >>>>>>>>> WSO2 Inc. >>>>>>>>> mobile :(+94) 775119302 >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> *Pavithra Madurangi* >>>>>>>> Associate Technical Lead - QA. >>>>>>>> WSO2 Inc.: http://wso2.com/ >>>>>>>> Mobile: 0777207357 / 0112747089 >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> *Nuwan Silva* >>>>>>> *Senior Software Engineer - QA* >>>>>>> Mobile: +9477 980 4543 >>>>>>> >>>>>>> WSO2 Inc. >>>>>>> lean . enterprise . middlewear. >>>>>>> http://www.wso2.com >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> *Nuwan Silva* >>>>>> *Senior Software Engineer - QA* >>>>>> Mobile: +9477 980 4543 >>>>>> >>>>>> WSO2 Inc. >>>>>> lean . enterprise . middlewear. >>>>>> http://www.wso2.com >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> *Nuwan Silva* >>>>> *Senior Software Engineer - QA* >>>>> Mobile: +9477 980 4543 >>>>> >>>>> WSO2 Inc. >>>>> lean . enterprise . middlewear. >>>>> http://www.wso2.com >>>>> >>>> >>>> >>>> >>>> -- >>>> Nuwan Dias >>>> >>>> Technical Lead - WSO2, Inc. http://wso2.com >>>> email : [email protected] >>>> Phone : +94 777 775 729 >>>> >>> >>> >>> >>> -- >>> *Pavithra Madurangi* >>> Associate Technical Lead - QA. >>> WSO2 Inc.: http://wso2.com/ >>> Mobile: 0777207357 / 0112747089 >>> >> >> >> >> -- >> >> >> *Nuwan Silva* >> *Senior Software Engineer - QA* >> Mobile: +9477 980 4543 >> >> WSO2 Inc. >> lean . enterprise . middlewear. >> http://www.wso2.com >> > > > > -- > Nuwan Dias > > Technical Lead - WSO2, Inc. http://wso2.com > email : [email protected] > Phone : +94 777 775 729 > -- *Ushani Balasooriya* Senior Software Engineer - QA; WSO2 Inc; http://www.wso2.com/. Mobile; +94772636796
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
