cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FEDIZ-194) NPE when restarting Fediz OIDC after using dynamic registration
Date Fri, 10 Mar 2017 13:24:04 GMT

     [ https://issues.apache.org/jira/browse/FEDIZ-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Beryozkin resolved FEDIZ-194.
------------------------------------
       Resolution: Fixed
         Assignee: Sergey Beryozkin
    Fix Version/s: 1.3.2

Thanks for the patch

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

Mime
View raw message