Jira Crowd integration with Uncaught Exception

Michael Vorschütz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 9, 2018

Hi, 

we have an implementation of a custom crowd directory in Version 2.8.0. Our Jira 7.10.0 is linked with this crowd installation.

We updated now the implementation of the custom directory and the crowd server to version 3.2.0. We linked now our Jira to this server. The basic connection works. When we used the test function we got as a result an error: Uncaught exception thrown by REST service: null

In the crowd logfile I could see a complete stacktrace:

2018-07-09 19:41:17,625 http-nio-8095-exec-7 ERROR [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
java.lang.NullPointerException
 at java.util.ArrayList.<init>(ArrayList.java:178)
 at com.atlassian.crowd.plugin.rest.util.EntityTranslator.toMultiValuedAttributeEntityList(EntityTranslator.java:303)
 at com.atlassian.crowd.plugin.rest.util.EntityTranslator.toUserEntity(EntityTranslator.java:89)
 at com.atlassian.crowd.plugin.rest.util.UserEntityUtil.expandUser(UserEntityUtil.java:62)
 at com.atlassian.crowd.plugin.rest.service.controller.UsersController.findUserByName(UsersController.java:74)
 at com.atlassian.crowd.plugin.rest.service.resource.usermanagement.UsersResource.getUserEntity(UsersResource.java:105)
 at com.atlassian.crowd.plugin.rest.service.resource.usermanagement.UsersResource.getUser(UsersResource.java:91)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192)
 […]

 

It seems that this has nothing to do with our custom implementation. The link configuration is exactly like the other connection to the older crowd server.

I couldn 't found any further information to this error.

Does anybody has information for me how I could fix this error?

 

Best regards

Michael

1 answer

1 accepted

0 votes
Answer accepted
Michael Vorschütz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2018

With some help from the Atlassian support we were able to identify the problem.

 

Our old implementation had an User Object, which implements the "UserWithAttributes" interface. This interface extends also the interface "User".

So for the compiler it is absolute correct, if we deliver our user implementation for every user Request. It is no problem as long as we are on the Crowd server.

When we use the Crowd server with Jira the connection is a REST request. This request cannot handle null values. And the UserWithAttribute implementation had some null values inside.

After I changed every request without attributes to the simple implementation based on the "User" interface, everything was fine.

 

The difficult point here was, that the stacktrace didn't gave any information about this and the old implementation of the Crowd server was able to handle this problem.

Suggest an answer

Log in or Sign up to answer