Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetGroup throws com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException while fetching group. #146

Closed
ghost opened this issue Jun 20, 2020 · 5 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jun 20, 2020

Describe the bug
When we are trying to fetch Group who has some members associated with it. It throws exception.

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "type" (class com.unboundid.scim2.common.types.Member), not marked as ignorable (3 known properties: "value", "display", "$ref"])
at [Source: (org.glassfish.jersey.message.internal.EntityInputStream); line: 1, column: 311] (through reference chain: com.unboundid.scim2.common.types.GroupResource["members"]->java.util.ArrayList[0]->com.unboundid.scim2.common.types.Member["type"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61) ~[jackson-databind-2.10.4.jar:2.10.4]
at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:843) ~[jackson-databind-2.10.4.jar:2.10.4]
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1206) ~[jackson-databind-2.10.4.jar:2.10.4]

To Reproduce

  1. Create group.
  2. add Rmember to Group.
  3. getch the same Group again
    Expected behavior
    It should give Group details.

Additional context
Add any other context about the problem here. For example:

  • Java version: [e.g. Java 8]
  • SCIM 2 SDK version: [e.g. 2.3.4 release]
@lachee10
Copy link

Hi,

It seems your server is returning a 'type' field in it's response. The SCIM 2 SDK doesn't know anything about a 'type' field for the Member in the GroupResouce object. Adding a member seems to not require this 'type' field. But when you fetch the Group you get something back.

Here are a few questions that might help to solve this:
What server / service are you working with? Who is the vendor? (Every vendor / product seems to interpret the standard a bit differently)
What does the 'Schema' of your server product say about the attributes of the 'Group' -> 'Member' object? (Maybe you need to develop your own 'Group' resource class and include the 'type' attribute in your own implementation).

When I wrote a client application I checked the 'Schema' of the target server and that 'Schema' claimed to (additionally) provide a 'type' field for the 'Member' object. And there were a bunch of other issues with the provided 'Schema', which I had to workaround.

@ersagarnikam
Copy link

Hi,
If I develop my onw Group. Could you please let me know How i can use my Own created Group to ScimService for all group related operation?
Thanks,
Sagar

@lachee10
Copy link

I'm not sure how your client code looks like. Therefore any advise is a bit hard.

My guess is you need to replace the usage of the 'GroupResource' with your own developed 'Group'.

Have a look at https://github.com/pingidentity/scim2/wiki/Working-with-SCIM-resources#converting-between-basescimresources-and-genericscimresources

@ToeBee
Copy link

ToeBee commented Nov 17, 2021

We are running into this problem when talking to Litmos. There is a type field in the list of group members that causes Jackson to error out.

We have gotten around it by applying the code snippet in #81 in a wrapper we have around this library.

@kqarryzada kqarryzada self-assigned this Jul 17, 2023
@kqarryzada
Copy link
Collaborator

This issue should be resolved with #199, which adds the type field to the Member class. It is currently planned to be released in version 2.4.0 of the UnboundID SCIM 2 SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants