Why am I getting a 404 error when I try to get a lookup type using an API call?

Problem

API calls to RDM (Reltio Data Management) lookup values containing special characters like "+" generate an Error 404.

For example, if the record 2+2 exists in the lookup type, and you retrieve it using the following API call:

GET https://rdm.reltio.com/rdm/lookups/{tenant Id}/{lookupType}/2+2

Then the + sign is ignored and the code throws an Error 404.

Analysis

mceclip0.png

Error details:

{
"errorCode": 404,
"errorMessage": "Lookup code [tenantId/LookUpCode/2 2] not found",
"innerErrorData": {
"exception": "com.reltio.rdm.model.dao.DAOException:Lookup code [tenantId/LookUpCode/2 2] not found",
"stack": [
"com.reltio.rdm.service.DataService.get at DataService.java, line 55",
"com.reltio.rdm.service.DataService.get at DataService.java, line 49",
"com.reltio.rdm.rest.controller.DataController.get at DataController.java, line 214",
"com.reltio.rdm.rest.controller.DataController$$FastClassBySpringCGLIB$$8fac8d51.invoke at <generated>, line -1",
"org.springframework.cglib.proxy.MethodProxy.invoke at MethodProxy.java, line 204",
"org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint at CglibAopProxy.java, line 717",
"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed at ReflectiveMethodInvocation.java, line 157",
"org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke at MethodSecurityInterceptor.java, line 68",
"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed at ReflectiveMethodInvocation.java, line 179",
"org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept at CglibAopProxy.java, line 653",
"com.reltio.rdm.rest.controller.DataController$$EnhancerBySpringCGLIB$$38f07313_2.get at <generated>, line -1",
"sun.reflect.NativeMethodAccessorImpl.invoke0 at NativeMethodAccessorImpl.java, line -2",
"sun.reflect.NativeMethodAccessorImpl.invoke at NativeMethodAccessorImpl.java, line 62",
"sun.reflect.DelegatingMethodAccessorImpl.invoke at DelegatingMethodAccessorImpl.java, line 43",
"java.lang.reflect.Method.invoke at Method.java, line 498",
"org.springframework.web.method.support.InvocableHandlerMethod.doInvoke at InvocableHandlerMethod.java, line 221",
"org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest at InvocableHandlerMethod.java, line 137",
"org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle at ServletInvocableHandlerMethod.java, line 110",
"org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod at RequestMappingHandlerAdapter.java, line 806",
"org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal at RequestMappingHandlerAdapter.java, line 729",
"org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle at AbstractHandlerMethodAdapter.java, line 85",
"org.springframework.web.servlet.DispatcherServlet.doDispatch at DispatcherServlet.java, line 959",
"org.springframework.web.servlet.DispatcherServlet.doService at DispatcherServlet.java, line 893",
"org.springframework.web.servlet.FrameworkServlet.processRequest at FrameworkServlet.java, line 970",
"org.springframework.web.servlet.FrameworkServlet.doGet at FrameworkServlet.java, line 861",
"javax.servlet.http.HttpServlet.service at HttpServlet.java, line 687",
"org.springframework.web.servlet.FrameworkServlet.service at FrameworkServlet.java, line 846",
"javax.servlet.http.HttpServlet.service at HttpServlet.java, line 790",
"org.eclipse.jetty.servlet.ServletHolder.handle at ServletHolder.java, line 848",
"org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1772",
"com.googlecode.objectify.ObjectifyFilter.doFilter at ObjectifyFilter.java, line 48",
"org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1759",
"org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 316",
"org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke at FilterSecurityInterceptor.java, line 126",
"org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter at FilterSecurityInterceptor.java, line 90",
"org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330",
"org.springframework.security.web.access.ExceptionTranslationFilter.doFilter at ExceptionTranslationFilter.java, line 114",
"org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330",
"org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter at AnonymousAuthenticationFilter.java, line 111",
"org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330",
"org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter at SecurityContextHolderAwareRequestFilter.java, line 169",
"org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330",
"org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter at OAuth2AuthenticationProcessingFilter.java, line 176",
"org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330",
"org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal at HeaderWriterFilter.java, line 64",
"org.springframework.web.filter.OncePerRequestFilter.doFilter at OncePerRequestFilter.java, line 107",
"org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330",
"org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal at WebAsyncManagerIntegrationFilter.java, line 53",
"org.springframework.web.filter.OncePerRequestFilter.doFilter at OncePerRequestFilter.java, line 107",
"org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330",
"org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter at SecurityContextPersistenceFilter.java, line 91",
"org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330",
"org.springframework.security.web.FilterChainProxy.doFilterInternal at FilterChainProxy.java, line 213",
"org.springframework.security.web.FilterChainProxy.doFilter at FilterChainProxy.java, line 176",
"org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate at DelegatingFilterProxy.java, line 346",
"org.springframework.web.filter.DelegatingFilterProxy.doFilter at DelegatingFilterProxy.java, line 262",
"org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1759",
"com.google.apphosting.utils.servlet.JdbcMySqlConnectionCleanupFilter.doFilter at JdbcMySqlConnectionCleanupFilter.java, line 60",
"org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1759",
"org.eclipse.jetty.servlet.ServletHandler.doHandle at ServletHandler.java, line 582",
"org.eclipse.jetty.server.handler.ScopedHandler.handle at ScopedHandler.java, line 143",
"org.eclipse.jetty.security.SecurityHandler.handle at SecurityHandler.java, line 524",
"org.eclipse.jetty.server.session.SessionHandler.doHandle at SessionHandler.java, line 226",
"org.eclipse.jetty.server.handler.ScopedHandler.handle at ScopedHandler.java, line 143",
"org.eclipse.jetty.server.handler.HandlerWrapper.handle at HandlerWrapper.java, line 134",
"com.google.apphosting.runtime.jetty9.ParseBlobUploadHandler.handle at ParseBlobUploadHandler.java, line 119",
"org.eclipse.jetty.server.handler.ContextHandler.doHandle at ContextHandler.java, line 1182",
"com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.doHandle at AppEngineWebAppContext.java, line 183",
"org.eclipse.jetty.servlet.ServletHandler.doScope at ServletHandler.java, line 512",
"org.eclipse.jetty.server.session.SessionHandler.doScope at SessionHandler.java, line 185",
"org.eclipse.jetty.server.handler.ContextHandler.doScope at ContextHandler.java, line 1112",
"org.eclipse.jetty.server.handler.ScopedHandler.handle at ScopedHandler.java, line 141",
"com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.handle at AppVersionHandlerMap.java, line 293",
"org.eclipse.jetty.server.handler.HandlerWrapper.handle at HandlerWrapper.java, line 134",
"org.eclipse.jetty.server.Server.handle at Server.java, line 539",
"org.eclipse.jetty.server.HttpChannel.handle at HttpChannel.java, line 333",
"com.google.apphosting.runtime.jetty9.RpcConnection.handle at RpcConnection.java, line 213",
"com.google.apphosting.runtime.jetty9.RpcConnector.serviceRequest at RpcConnector.java, line 81",
"com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest at JettyServletEngineAdapter.java, line 123",
"com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest at JavaRuntime.java, line 687",
"com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest at JavaRuntime.java, line 650",
"com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run at JavaRuntime.java, line 620",
"com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run at JavaRuntime.java, line 812",
"com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run at ThreadGroupPool.java, line 269",
"java.lang.Thread.run at Thread.java, line 748"
]
}
}

Solution

  • To avoid Error 404, double encode the special character value (in this example, the +).. To double encode the special character, use the following API:

GET https://rdm.reltio.com/rdm/lookups/{tenantId}/{{LookupCode}}/2%252B2

 

mceclip1.png

 

  • Please use forms on the following website to encode the value:

https://www.urlencoder.org/ 

mceclip0.png

mceclip1.png

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.