DevTest Portal throws a 401 error while retrieving projects
search cancel

DevTest Portal throws a 401 error while retrieving projects

book

Article ID: 242586

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

 When logging into DevTest Portal getting the below error in Portal UI.

Error while retrieving list of Projects. (500 No JSON Formated Retrofit Error <?xml version="1.0" encoding="UTF-8"?> <Error id="401" message="Authorization failed"> </Error> )

LOGS:

2022-05-02 14:04:59,583Z (10:04) [qtp1565473423-20357] ERROR StackTrace                     - Full Stack Trace:
retrofit.RetrofitError: 401 Unauthorized
 at retrofit.RetrofitError.httpError(RetrofitError.java:39)
 at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:382)
 at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
 at com.ca.sv.ui.service.ResHubAdapterService.getProjects(ResHubAdapterService.groovy:124)
 at com.itko.lisa.vse.DashboardStatsController.countRecordedServices(DashboardStatsController.groovy:54)
 at com.itko.lisa.vse.DashboardStatsController.index(DashboardStatsController.groovy:20)
 at org.grails.core.DefaultGrailsControllerClass$MethodHandleInvoker.invoke(DefaultGrailsControllerClass.java:223)
 at org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:188)
 at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
 at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
 at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
 at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
 at com.ca.devtest.http.XSSFilter.doFilter(XSSFilter.java:72)
 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
 at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
 at grails.plugin.springsecurity.web.filter.GrailsHttpPutFormContentFilter.doFilterInternal(GrailsHttpPutFormContentFilter.groovy:54)
 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)

Environment

Release : 10.6

Component : DevTest Coordinator

Cause

After verifying, that users have full access to the DEVTEST_HOME\Projects folder, users are still seeing the 401 error when logging into Portal.  Looking at the DEVTEST_HOME\Projects folder, we noticed the file structure is what is causing the problem. Someone manually created the DEVTEST_HOME\Project folders, which were nested, causing issues within Portal. It's not recommended to manually create the project folders. It's preferred that the projects are created within Portal, or that they are imported.

Resolution

To resolve, we moved the custom project files outside the DEVTEST_HOME\projects folder. Then, inside the DEVTEST_HOME\Projects folder, we created empty folders with the name <R#_Project_Name>, similar to the default Bank projects, and copied the specific project files for that version of the project into the new folder.