Project

General

Profile

Actions

Defect #826

closed

Identities with username *.com has problem with not acceptable exception

Added by Ondřej Kopr about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Rest
Target version:
Start date:
11/07/2017
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

After show identity with username something_gmail.com for example get error with:

{
  "timestamp" : "2017-11-07T09:25:10.759+0000",
  "status" : 406,
  "error" : "Not Acceptable",
  "exception" : "org.springframework.web.HttpMediaTypeNotAcceptableException",
  "message" : "Could not find acceptable representation",
  "path" : "/idm/api/v1/identities/something_gmail.com" 
}

BE error:

2017-11-07 10:46:52.194 ERROR 20054 --- [nio-8009-exec-4] e.b.i.c.exception.RestErrorAttributes    : Error not resolved - errorAttributes needs extension for error attrs [{timestamp=Tue Nov 07 10:46:52 CET 2017, status=406, error=Not Acceptable, exception=org.springframework.web.HttpMediaTypeNotAcceptableException, message=Could not find acceptable representation, path=/idm/api/v1/identities/something_gmail.com}]
2017-11-07 10:46:52.252 ERROR 20054 --- [io-8009-exec-10] e.b.i.c.e.ExceptionControllerAdvice      : [bf61c4e0-eee0-486e-83f7-5e7837a29de0] 

org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
    at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:192)
    at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:183)
    at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:81)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:126)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:832)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:743)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:895)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)

Actions #1

Updated by Radek Tomiška about 7 years ago

  • Status changed from New to Needs feedback
  • Assignee changed from Radek Tomiška to Ondřej Kopr
  • Target version set to Emerald (7.5.0)
  • % Done changed from 0 to 90

When using of Spring data rest repository controllers was removed from project, then configuration for support special character was unused, i didn't know that configuration was effective for @RepositoryRestController only, this is my fault. I've added new configuration, which is effective for standard Spring rest controllers too. I added integration test.

Could you pls do a review?

Branch: hotfix/7.5.3
Commit: https://github.com/bcvsolutions/CzechIdMng/commit/c5c1667f589e8fb706b6761561a6ad29ffe6383a

Actions #2

Updated by Ondřej Kopr about 7 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Ondřej Kopr to Radek Tomiška
  • % Done changed from 90 to 100

Thanks for fix problem with .com in endpoints, user detail works perfectly. Thank you.

Actions #3

Updated by Radek Tomiška about 7 years ago

  • Status changed from Resolved to Closed
Actions #4

Updated by Radek Tomiška over 5 years ago

  • Tracker changed from Task to Defect
  • Category changed from 20 to Rest
Actions

Also available in: Atom PDF