Package org.springframework.dao

Examples of org.springframework.dao.DataRetrievalFailureException


        @Override
        public Void doInTransaction(TransactionStatus status) {
          assertTrue("Has thread connection", TransactionSynchronizationManager.hasResource(connectionFactory));
          CciTemplate ct = new CciTemplate(connectionFactory);
          ct.execute(interactionSpec, record, record);
          throw new DataRetrievalFailureException("error");
        }
      });
    }
    catch (Exception ex) {
    }
View Full Code Here


          if (populatedProperties != null) {
            populatedProperties.add(pd.getName());
          }
        }
        catch (NotWritablePropertyException ex) {
          throw new DataRetrievalFailureException(
              "Unable to map column " + column + " to property " + pd.getName(), ex);
        }
      }
    }
View Full Code Here

    }
    Iterator<Object> keyIter = this.keyList.get(0).values().iterator();
    if (keyIter.hasNext()) {
      Object key = keyIter.next();
      if (!(key instanceof Number)) {
        throw new DataRetrievalFailureException(
            "The generated key is not of a supported numeric type. " +
            "Unable to cast [" + (key != null ? key.getClass().getName() : null) +
            "] to [" + Number.class.getName() + "]");
      }
      return (Number) key;
    }
    else {
      throw new DataRetrievalFailureException("Unable to retrieve the generated key. " +
          "Check that the table has an identity column enabled.");
    }
  }
View Full Code Here

  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

          if (populatedProperties != null) {
            populatedProperties.add(pd.getName());
          }
        }
        catch (NotWritablePropertyException ex) {
          throw new DataRetrievalFailureException(
              "Unable to map column " + column + " to property " + pd.getName(), ex);
        }
      }
    }
View Full Code Here

    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

        Validate.notNull(portletDefinitionId, "portletDefinitionId can not be null");
        Validate.notEmpty(layoutNodeId, "layoutNodeId can not be null");
       
        final IPortletDefinition portletDefinition = this.portletDefinitionDao.getPortletDefinition(portletDefinitionId);
        if (portletDefinition == null) {
            throw new DataRetrievalFailureException("No IPortletDefinition exists for IPortletDefinitionId='" + portletDefinitionId + "'");
        }
       
        IPortletEntity portletEntity = new PortletEntityImpl(portletDefinition, layoutNodeId, userId);
       
        this.getEntityManager().persist(portletEntity);
View Full Code Here

        final IPortletDefinition portletDefinition;
        try {
            portletDefinition = this.portletDefinitionRegistry.getPortletDefinitionByFname(fName);
        }
        catch (Exception e) {
            throw new DataRetrievalFailureException("Failed to retrieve ChannelDefinition for fName='" + fName + "'", e);
        }

        //The channel definition for the fName MUST exist for this class to function
        if (portletDefinition == null) {
            throw new EmptyResultDataAccessException("No ChannelDefinition exists for fName='" + fName + "'", 1);
View Full Code Here

        final IPortletDefinition portletDefinition;
        try {
            portletDefinition = this.portletDefinitionDao.getPortletDefinitionByFname(fName);
        }
        catch (Exception e) {
            throw new DataRetrievalFailureException("Failed to retrieve ChannelDefinition for fName='" + fName + "'", e);
        }
       
        //The channel definition for the fName MUST exist for this class to function
        if (portletDefinition == null) {
            throw new EmptyResultDataAccessException("No ChannelDefinition exists for fName='" + fName + "'", 1);
View Full Code Here

        populator.setContinueOnError(true);
        DatabasePopulatorUtils.execute(populator, dataSource);
      }
      catch (MetaDataAccessException e) {
        // @PostConstruct is not supposed to throw checked exceptions
        throw new DataRetrievalFailureException("Could not retrieve ", e);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.dao.DataRetrievalFailureException

Copyright © 2018 www.massapicom. 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.