You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A request to service for /ServiceProviderConfig returns a 500 error, throws a JavaException
Severe: MessageBodyWriter not found for media type=application/scim+json, type=class com.unboundid.scim2.common.GenericScimResource, genericType=class com.unboundid.scim2.common.GenericScimResource.
I found a similar problem #131 - and followed the resolution there and added jackson media dependency
Severe: MessageBodyWriter not found for media type=application/json, type=class com.unboundid.scim2.common.GenericScimResource, genericType=class com.unboundid.scim2.common.GenericScimResource.
To Reproduce
Created a new Web Application Maven project (in NetBeans 8.2)
Added ServiceProviderConfigEndpoint (based on TestServiceProviderConfigEndpoint.java in Server project.
package com.mycompany.scim;
import com.unboundid.scim2.common.types.AuthenticationScheme;
import com.unboundid.scim2.common.types.BulkConfig;
import com.unboundid.scim2.common.types.ChangePasswordConfig;
import com.unboundid.scim2.common.types.ETagConfig;
import com.unboundid.scim2.common.types.FilterConfig;
import com.unboundid.scim2.common.types.PatchConfig;
import com.unboundid.scim2.common.types.ServiceProviderConfigResource;
import com.unboundid.scim2.common.exceptions.ScimException;
import com.unboundid.scim2.common.types.SortConfig;
import static com.unboundid.scim2.common.utils.ApiConstants.MEDIA_TYPE_SCIM;
import com.unboundid.scim2.server.annotations.ResourceType;
import com.unboundid.scim2.server.resources.
AbstractServiceProviderConfigEndpoint;
import java.util.Collections;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
/**
* A test Service Provider Config endpoint implementation that just serves up
* a canned config.
*/
@ResourceType(
description = "SCIM 2.0 Service Provider Config",
name = "ServiceProviderConfig",
schema = ServiceProviderConfigResource.class,
discoverable = false)
@Path("/ServiceProviderConfig")
public class ServiceProviderConfigEndpoint
extends AbstractServiceProviderConfigEndpoint
{
/**
* {@inheritDoc}
*/
@Override
@Produces({MEDIA_TYPE_SCIM, MediaType.APPLICATION_JSON})
public ServiceProviderConfigResource getServiceProviderConfig()
throws ScimException
{
System.out.println("Received Get for /ServiceProviderConfig");
return create();
}
/**
* Create a test config resource.
*
* @return The created resource.
*/
public static ServiceProviderConfigResource create()
{
return new ServiceProviderConfigResource("https://doc",
new PatchConfig(true),
new BulkConfig(true, 100, 1000),
new FilterConfig(true, 200),
new ChangePasswordConfig(true),
new SortConfig(true),
new ETagConfig(false),
Collections.singletonList(
new AuthenticationScheme(
"Basic", "HTTP BASIC", null, null, "httpbasic", true)));
}
}
Describe the bug
A request to service for /ServiceProviderConfig returns a 500 error, throws a JavaException
I found a similar problem #131 - and followed the resolution there and added jackson media dependency
With this the exception changes to:
To Reproduce
Created a new Web Application Maven project (in NetBeans 8.2)
Added ServiceProviderConfigEndpoint (based on TestServiceProviderConfigEndpoint.java in Server project.
Deploy to Glassfish
Call http://localhost:8880/SCIMProvider/rest/ServiceProviderConfig
Expected behavior
Should return the generated json data (this from log message before exception) with a 200 response
Additional context
The text was updated successfully, but these errors were encountered: