Codota Logo
PropertyNotFoundException
Code IndexAdd Codota to your IDE (free)

How to use
PropertyNotFoundException
in
org.springframework.binding.expression

Best Java code snippets using org.springframework.binding.expression.PropertyNotFoundException (Showing top 20 results out of 315)

  • Common ways to obtain PropertyNotFoundException
private void myMethod () {
PropertyNotFoundException p =
  • Codota IconObject object;String property;Throwable cause;new PropertyNotFoundException(object.getClass(), property, cause)
  • Codota IconObject object;ELExpression eLExpression;Throwable cause;new PropertyNotFoundException(object.getClass(), eLExpression.getExpressionString(), cause)
  • Smart code suggestions by Codota
}
origin: org.springframework.webflow/spring-binding

public Class<?> getValueType(Object context) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    return beanWrapper.getPropertyType(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An BeansException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: spring-projects/spring-webflow

public Class<?> getValueType(Object context) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    return beanWrapper.getPropertyType(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An BeansException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/org.springframework.binding

public Object getValue(Object context) throws EvaluationException {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    return beanWrapper.getPropertyValue(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred getting the value for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/org.springframework.binding

public Class getValueType(Object context) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    return beanWrapper.getPropertyType(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An BeansException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/org.springframework.binding

public Class getValueType(Object context) {
  try {
    // OGNL has no native way to get this information
    return new BeanWrapperImpl(context).getPropertyType(expressionString);
  } catch (InvalidPropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An BeansException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: spring-projects/spring-webflow

public Object getValue(Object context) throws EvaluationException {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths);
    beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit);
    return beanWrapper.getPropertyValue(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred getting the value for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: spring-projects/spring-webflow

public Class<?> getValueType(Object context) {
  ELContext ctx = elContextFactory.getELContext(context);
  try {
    return valueExpression.getType(ctx);
  } catch (javax.el.PropertyNotFoundException e) {
    throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e);
  } catch (ELException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An ELException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/spring-binding

public Object getValue(Object context) throws EvaluationException {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths);
    beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit);
    return beanWrapper.getPropertyValue(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred getting the value for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/org.springframework.binding

public Class getValueType(Object context) {
  ELContext ctx = elContextFactory.getELContext(context);
  try {
    return valueExpression.getType(ctx);
  } catch (javax.el.PropertyNotFoundException e) {
    throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e);
  } catch (ELException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An ELException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/spring-binding

public Class<?> getValueType(Object context) {
  ELContext ctx = elContextFactory.getELContext(context);
  try {
    return valueExpression.getType(ctx);
  } catch (javax.el.PropertyNotFoundException e) {
    throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e);
  } catch (ELException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An ELException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/org.springframework.binding

public void setValue(Object context, Object value) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    Set converters = conversionService.getConversionExecutors(String.class);
    for (Iterator it = converters.iterator(); it.hasNext();) {
      ConversionExecutor converter = (ConversionExecutor) it.next();
      beanWrapper.registerCustomEditor(converter.getTargetClass(), new PropertyEditorConverter(converter));
    }
    beanWrapper.setPropertyValue(expression, value);
  } catch (NotWritablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (TypeMismatchException e) {
    throw new ValueCoercionException(context.getClass(), expression, value, e.getRequiredType(), e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred setting the value of expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "] to [" + value + "]", e);
  }
}
origin: org.springframework.webflow/spring-binding

public void setValue(Object context, Object value) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths);
    beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit);
    beanWrapper.setConversionService(conversionService.getDelegateConversionService());
    beanWrapper.setPropertyValue(expression, value);
  } catch (NotWritablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (TypeMismatchException e) {
    throw new ValueCoercionException(context.getClass(), expression, value, e.getRequiredType(), e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred setting the value of expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "] to [" + value + "]", e);
  }
}
origin: spring-projects/spring-webflow

public void setValue(Object context, Object value) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths);
    beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit);
    beanWrapper.setConversionService(conversionService.getDelegateConversionService());
    beanWrapper.setPropertyValue(expression, value);
  } catch (NotWritablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (TypeMismatchException e) {
    throw new ValueCoercionException(context.getClass(), expression, value, e.getRequiredType(), e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred setting the value of expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "] to [" + value + "]", e);
  }
}
origin: org.springframework.webflow/spring-binding

public Object getValue(Object context) throws EvaluationException {
  ELContext ctx = elContextFactory.getELContext(context);
  try {
    Object result = valueExpression.getValue(ctx);
    if (result == null && !ctx.isPropertyResolved()) {
      if (getExpressionString().equals("null")) {
        // special case for handling reserved null keyword
        return null;
      } else {
        throw new EvaluationException(context.getClass(), getExpressionString(), "The expression '"
            + getExpressionString() + "' did not resolve... is the base variable '" + getBaseVariable()
            + "' spelled correctly?");
      }
    }
    return result;
  } catch (javax.el.PropertyNotFoundException e) {
    throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e);
  } catch (ELException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An ELException occurred getting the value for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/spring-binding

@SuppressWarnings("deprecation")
public Class<?> getValueType(Object rootObject) throws EvaluationException {
  try {
    EvaluationContext context = contextFactory.createContext(rootObject);
    if (context instanceof StandardEvaluationContext) {
      extendEvaluationContext((StandardEvaluationContext) context);
    }
    return expression.getValueType(context);
  } catch (SpelEvaluationException e) {
    if (e.getMessageCode().equals(SpelMessage.PROPERTY_OR_FIELD_NOT_READABLE)) {
      throw new PropertyNotFoundException(rootObject.getClass(), getExpressionString(), e);
    }
    throw new EvaluationException(rootObject.getClass(), getExpressionString(),
        "An ELException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + rootObject.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/org.springframework.binding

public Object getValue(Object context) throws EvaluationException {
  ELContext ctx = elContextFactory.getELContext(context);
  try {
    Object result = valueExpression.getValue(ctx);
    if (result == null && !ctx.isPropertyResolved()) {
      if (getExpressionString().equals("null")) {
        // special case for handling reserved null keyword
        return null;
      } else {
        throw new EvaluationException(context.getClass(), getExpressionString(), "The expression '"
            + getExpressionString() + "' did not resolve... is the base variable ''"
            + getBaseVariable() + "' spelled correctly?");
      }
    }
    return result;
  } catch (javax.el.PropertyNotFoundException e) {
    throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e);
  } catch (ELException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An ELException occurred getting the value for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: spring-projects/spring-webflow

public Object getValue(Object context) throws EvaluationException {
  ELContext ctx = elContextFactory.getELContext(context);
  try {
    Object result = valueExpression.getValue(ctx);
    if (result == null && !ctx.isPropertyResolved()) {
      if (getExpressionString().equals("null")) {
        // special case for handling reserved null keyword
        return null;
      } else {
        throw new EvaluationException(context.getClass(), getExpressionString(), "The expression '"
            + getExpressionString() + "' did not resolve... is the base variable '" + getBaseVariable()
            + "' spelled correctly?");
      }
    }
    return result;
  } catch (javax.el.PropertyNotFoundException e) {
    throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e);
  } catch (ELException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An ELException occurred getting the value for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/spring-binding

@SuppressWarnings("deprecation")
public Object getValue(Object rootObject) throws EvaluationException {
  try {
    EvaluationContext context = contextFactory.createContext(rootObject);
    if (context instanceof StandardEvaluationContext) {
      extendEvaluationContext((StandardEvaluationContext) context);
    }
    return expression.getValue(context, expectedType);
  } catch (SpelEvaluationException e) {
    if (e.getMessageCode().equals(SpelMessage.PROPERTY_OR_FIELD_NOT_READABLE)) {
      throw new PropertyNotFoundException(rootObject.getClass(), getExpressionString(), e);
    }
    if (e.getMessageCode().equals(SpelMessage.TYPE_CONVERSION_ERROR)) {
      throw new ValueCoercionException(rootObject.getClass(), getExpressionString(), null, expectedType, e);
    }
    throw new EvaluationException(rootObject.getClass(), expression.getExpressionString(),
        "An ELException occurred getting the value for expression '" + getExpressionString()
            + "' on context [" + rootObject.getClass() + "]", e);
  }
}
origin: spring-projects/spring-webflow

@SuppressWarnings("deprecation")
public Class<?> getValueType(Object rootObject) throws EvaluationException {
  try {
    EvaluationContext context = contextFactory.createContext(rootObject);
    if (context instanceof StandardEvaluationContext) {
      extendEvaluationContext((StandardEvaluationContext) context);
    }
    return expression.getValueType(context);
  } catch (SpelEvaluationException e) {
    if (e.getMessageCode().equals(SpelMessage.PROPERTY_OR_FIELD_NOT_READABLE)) {
      throw new PropertyNotFoundException(rootObject.getClass(), getExpressionString(), e);
    }
    throw new EvaluationException(rootObject.getClass(), getExpressionString(),
        "An ELException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + rootObject.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/spring-binding

public void setValue(Object context, Object value) throws EvaluationException {
  ELContext ctx = elContextFactory.getELContext(context);
  try {
    valueExpression.setValue(ctx, value);
    if (!ctx.isPropertyResolved()) {
      throw new EvaluationException(context.getClass(), getExpressionString(), "The expression '"
          + getExpressionString() + "' did not resolve... is the base variable ''" + getBaseVariable()
          + "' spelled correctly?");
    }
  } catch (javax.el.PropertyNotFoundException e) {
    throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e);
  } catch (ELException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An ELException occurred setting the value of expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "] to [" + value + "]", e);
  }
}
org.springframework.binding.expressionPropertyNotFoundException

Javadoc

An evaluation exception indicating a expression that references a property failed to evaluate because the property could not be found.

Most used methods

  • <init>
    Creates a new property not found exception

Popular in Java

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • Collectors (java.util.stream)
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now