Dmitry Lysnichenko created AMBARI-25200:
-------------------------------------------
Summary: Ambari returns stack trace in HTML doc when an error
occurs retrieving details for a user resource that does not exist
Key: AMBARI-25200
URL: https://issues.apache.org/jira/browse/AMBARI-25200
Project: Ambari
Issue Type: Bug
Reporter: Dmitry Lysnichenko
Assignee: Dmitry Lysnichenko
Ambari returns stack trace in HTML doc when an error occurs retrieving details
for a user resource that does not exist. The acting user must be an Ambari
Administrator:
{noformat}
curl -u admin:admin -X GET
http://localhost:8080/api/v1/users/doesnotexist/authorizations?fields=*
{noformat}
{noformat}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 500 Server Error</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /api/v1/users/anyotheruser/authorizations. Reason:
<pre> Server Error</pre></p><h3>Caused
by:</h3><pre>com.google.common.cache.CacheLoader$InvalidCacheLoadException:
CacheLoader returned null for key anyotheruser.
at
com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2350)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2320)
at
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
at
com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
at
com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830)
at
org.apache.ambari.server.controller.internal.UserPrivilegeResourceProvider.getResources(UserPrivilegeResourceProvider.java:282)
...
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)