Quantcast
Channel: SCN : Discussion List - SAP HANA Cloud Platform Developer Center
Viewing all articles
Browse latest Browse all 3131

java.lang.ClassCastException: com.sap.security.um.provider.neo.local.UserProviderImpl cannot be cast to com.sap.security.um.user.UserProvider

$
0
0

In attempting to read the user attributes  as per:

 

SAP HANA Cloud Platform

 

I get a cast exception. it seems that the local UserProvider is not compatible with the general definition (is not a subclass)

 

 

  private String determineUserAttribute(HttpServletRequest request, String userName, String attributeName) {  String attributeValue = "";  try {  InitialContext ctx = new InitialContext();  Object userProvider;  userProvider = ctx.lookup("java:comp/env/user/Provider");  UserProvider usrProv = (UserProvider) userProvider;  attributeValue = usrProv.getUser(request.getRemoteUser()).getAttribute("firstname");  } catch (UnsupportedUserAttributeException e) {  logger.error("UnsupportedUserException", e);  } catch (PersistenceException e) {  logger.error("PersistenceException", e);  } catch (NamingException e) {  logger.error("NamingException", e);  }  return attributeValue;  }

any suggestions on how to proceed or what I might be missing?

 

Using com.sap.security.um.user.UserManagementAccessor I always get a "User Management is not initialized" exception

 

Is there a requirement to use the Java EE Web runtime?

 

Thanks,

 

Chris


Viewing all articles
Browse latest Browse all 3131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>