Examples of MethodNotFoundException


Examples of org.apache.camel.component.bean.MethodNotFoundException

        try {
            assertExpression("${in.body.getLines[0]?.getRating}", "");
            fail("Should have thrown exception");
        } catch (RuntimeBeanExpressionException e) {
            MethodNotFoundException cause = assertIsInstanceOf(MethodNotFoundException.class, e.getCause().getCause());
            assertEquals("getRating", cause.getMethodName());
        }
    }
View Full Code Here

Examples of org.apache.camel.component.bean.MethodNotFoundException

        try {
            assertExpression("${in.body.lines[0]?.rating}", "");
            fail("Should have thrown exception");
        } catch (RuntimeBeanExpressionException e) {
            MethodNotFoundException cause = assertIsInstanceOf(MethodNotFoundException.class, e.getCause().getCause());
            assertEquals("rating", cause.getMethodName());
        }
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.javax.el.MethodNotFoundException

    paramValues = params.eval(bindings, context);

    context.setPropertyResolved(false);
    Object result = context.getELResolver().invoke(context, base, name, paramTypes, paramValues);
    if (!context.isPropertyResolved()) {
      throw new MethodNotFoundException(LocalMessages.get("error.property.method.notfound", name, base.getClass()));
    }
//    if (returnType != null && !returnType.isInstance(result)) { // should we check returnType for method invocations?
//      throw new MethodNotFoundException(LocalMessages.get("error.property.method.notfound", name, base.getClass()));
//    }
    return result;
View Full Code Here

Examples of org.camunda.bpm.engine.impl.javax.el.MethodNotFoundException

  protected Method findMethod(String name, Class<?> clazz, Class<?> returnType, Class<?>[] paramTypes) {
    Method method = null;
    try {
      method = clazz.getMethod(name, paramTypes);
    } catch (NoSuchMethodException e) {
      throw new MethodNotFoundException(LocalMessages.get("error.property.method.notfound", name, clazz));
    }
    if (returnType != null && !returnType.isAssignableFrom(method.getReturnType())) {
      throw new MethodNotFoundException(LocalMessages.get("error.property.method.notfound", name, clazz));
    }
    return method;
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.javax.el.MethodNotFoundException

  }

  protected Method getMethod(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes) {
    Object value = eval(bindings, context);
    if (value == null) {
      throw new MethodNotFoundException(LocalMessages.get("error.identifier.method.notfound", name));
    }
    if (value instanceof Method) {
      Method method = (Method)value;
      if (returnType != null && !returnType.isAssignableFrom(method.getReturnType())) {
        throw new MethodNotFoundException(LocalMessages.get("error.identifier.method.notfound", name));
      }
      if (!Arrays.equals(method.getParameterTypes(), paramTypes)) {
        throw new MethodNotFoundException(LocalMessages.get("error.identifier.method.notfound", name));
      }
      return method;
    }
    throw new MethodNotFoundException(LocalMessages.get("error.identifier.method.notamethod", name, value.getClass()));
  }
View Full Code Here

Examples of org.fcrepo.server.errors.MethodNotFoundException

        for (MethodDef element : methods) {
            if (element.methodName.equalsIgnoreCase(methodName)) {
                return element.methodParms;
            }
        }
        throw new MethodNotFoundException("[getParms] The service deployment object, "
                + m_obj.getPid()
                + ", does not have a service method named '"
                + methodName);
    }
View Full Code Here

Examples of org.powermock.reflect.exceptions.MethodNotFoundException

      }
      thisType = thisType.getSuperclass();
    }

    if (foundMethods.isEmpty()) {
      throw new MethodNotFoundException("No method was found with argument types: [ "
          + getArgumentsAsString((Object[]) parameterTypes) + " ] in class "
          + getUnmockedType(type).getName());
    } else {
      throwExceptionWhenMultipleMethodMatchesFound("method name", foundMethods.toArray(new Method[foundMethods
          .size()]));
View Full Code Here

Examples of org.red5.server.service.MethodNotFoundException

    }
   
    if (serviceProvider == null) {
      // Client doesn't support calling methods on him
      call.setStatus(Call.STATUS_METHOD_NOT_FOUND);
      call.setException(new MethodNotFoundException(
          call.getServiceMethodName()));
    } else {
      serviceInvoker.invoke(call, serviceProvider);
    }
   
View Full Code Here

Examples of rocket.generator.rebind.method.MethodNotFoundException

    }
    return method;
  }

  protected void throwMethodNotFoundException(final String methodName, final List<Type> parameterTypes) {
    throw new MethodNotFoundException("Unable to find a method called \"" + methodName + "\" within " + this.getName()
        + " with parameters " + parameterTypes + " upon " + this.getName());
  }
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.