Examples of DataRetrievalFailureException


Examples of org.springframework.dao.DataRetrievalFailureException

                try {
                    userData = umgr.getUserByAttribute(
                        UserAttribute.Attributes.OPENID_URL.toString(),
                        userName);
                } catch (WebloggerException ex) {
                    throw new DataRetrievalFailureException("ERROR in user lookup", ex);
                }
                String name;
                String password;
                GrantedAuthority[] authorities;
               
                // We are not throwing UsernameNotFound exception in case of
                // openid authentication in order to recieve user SREG attributes
                // from the authentication filter and save them               
                if (userData == null) {
                     authorities = new GrantedAuthority[1];
                     GrantedAuthority g = new GrantedAuthorityImpl("openidLogin");
                     authorities[0] = g;
                     name = "openid";
                     password = "openid";
                } else {
                     authorities =  getAuthorities(userData, umgr);
                     name = userData.getUserName();
                     password = userData.getPassword();
                }
                UserDetails usr = new org.springframework.security.userdetails.User(name, password, true, authorities);
                return  usr;
               
            } else {
                try {
                    userData = umgr.getUserByUserName(userName);
                } catch (WebloggerException ex) {
                    throw new DataRetrievalFailureException("ERROR in user lookup", ex);
                }
                if (userData == null) {
                    throw new UsernameNotFoundException("ERROR no user: " + userName);
                }
                GrantedAuthority[] authorities =  getAuthorities(userData, umgr);       
View Full Code Here

Examples of org.springframework.dao.DataRetrievalFailureException

            Weblogger roller = WebloggerFactory.getWeblogger();
            UserManager umgr = roller.getUserManager();
            user = umgr.getUserByUserName(username, Boolean.TRUE);
            roles = umgr.getRoles(user);
        } catch (WebloggerException ex) {
            throw new DataRetrievalFailureException("ERROR in user lookup", ex);
        }

        if (user == null) {
            throw new UsernameNotFoundException("ERROR user: " + username + " not found while granting authorities");
        }
View Full Code Here

Examples of org.springframework.dao.DataRetrievalFailureException

    Element element = null;

    try {
      element = cache.get(url);
    } catch (CacheException e) {
      throw new DataRetrievalFailureException("Cache failure: "
          + e.getMessage());
    }

    if (element != null) {
      return (ResourceDetails) element.getValue();
View Full Code Here

Examples of org.springframework.dao.DataRetrievalFailureException

        PPolicyDecoder decoder = new NetscapeDecoder();

        try {
            decoder.decode();
        } catch (IOException e) {
            throw new DataRetrievalFailureException("Failed to parse control value", e);
        }
    }
View Full Code Here

Examples of org.springframework.dao.DataRetrievalFailureException

                            return new BERInteger(stream, bytesRead);
                        }
                    }
                }

                throw new DataRetrievalFailureException("Unexpected tag " + tag);
            }
View Full Code Here

Examples of org.springframework.dao.DataRetrievalFailureException

            }

            return element == null ? null : (CasAuthenticationToken) element.getValue();

        } catch (CacheException cacheException) {
            throw new DataRetrievalFailureException("Cache failure: " + cacheException.getMessage());
        }
    }
View Full Code Here

Examples of org.springframework.dao.DataRetrievalFailureException

        Element element = null;

        try {
            element = cache.get(username);
        } catch (CacheException cacheException) {
            throw new DataRetrievalFailureException("Cache failure: " + cacheException.getMessage());
        }

        if (logger.isDebugEnabled()) {
            logger.debug("Cache hit: " + (element != null) + "; username: " + username);
        }
View Full Code Here

Examples of org.springframework.dao.DataRetrievalFailureException

            if (this.file.lastModified() > this.lastModified) {
                try {
                    load(this.file);
                } catch (IOException e) {
                    throw new DataRetrievalFailureException(
                        "Error refreshing user file", e);
                }
                return true;
            }
            return false;
View Full Code Here

Examples of org.springframework.dao.DataRetrievalFailureException

  protected final Record createInputRecord(RecordFactory recordFactory, Object inObject) {
    try {
      return new CommAreaRecord(objectToBytes(inObject));
    }
    catch (IOException ex) {
      throw new DataRetrievalFailureException("I/O exception during bytes conversion", ex);
    }
  }
View Full Code Here

Examples of org.springframework.dao.DataRetrievalFailureException

    CommAreaRecord commAreaRecord = (CommAreaRecord) record;
    try {
      return bytesToObject(commAreaRecord.toByteArray());
    }
    catch (IOException ex) {
      throw new DataRetrievalFailureException("I/O exception during bytes conversion", ex);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.