You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org> on 2017/04/25 10:02:04 UTC
[jira] [Closed] (FEDIZ-194) NPE when restarting Fediz OIDC after
using dynamic registration
[ https://issues.apache.org/jira/browse/FEDIZ-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Colm O hEigeartaigh closed FEDIZ-194.
-------------------------------------
> NPE when restarting Fediz OIDC after using dynamic registration
> ---------------------------------------------------------------
>
> Key: FEDIZ-194
> URL: https://issues.apache.org/jira/browse/FEDIZ-194
> Project: CXF-Fediz
> Issue Type: Bug
> Reporter: gonzalad
> Assignee: Sergey Beryozkin
> Priority: Trivial
> Fix For: 1.3.2
>
>
> I'm using dynamic registration and I have a NPE on oidc module restart.
> The scenario is this one :
> 1. I register dynamically a oidc client
> POST to http://localhost:9080/oidc/services/register
> 2. I then restart the oidc module (I could restart all tomcat, it should be the same).
> I have the following error on restart :
> {code}
> idp_1 | Caused by: java.lang.NullPointerException
> idp_1 | at org.apache.cxf.fediz.service.oidc.clients.ClientRegistrationService.init(ClientRegistrationService.java:418)
> idp_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> idp_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> idp_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> idp_1 | at java.lang.reflect.Method.invoke(Method.java:498)
> idp_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1719)
> idp_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1656)
> idp_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1585)
> idp_1 | ... 59 more
> {code}
> This is because when we create a Client dynamically, client.getResourceOwnerSubject() is null.
> We than have a NPE in c.getResourceOwnerSubject().getLogin();
> See https://github.com/apache/cxf-fediz/blob/master/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java#L425
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)