• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ActivitiClassLoadingException类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.activiti.engine.ActivitiClassLoadingException的典型用法代码示例。如果您正苦于以下问题:Java ActivitiClassLoadingException类的具体用法?Java ActivitiClassLoadingException怎么用?Java ActivitiClassLoadingException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ActivitiClassLoadingException类属于org.activiti.engine包,在下文中一共展示了ActivitiClassLoadingException类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: handleActivitiException

点赞 3

import org.activiti.engine.ActivitiClassLoadingException; //导入依赖的package包/类
/**
 * Handle Activiti exceptions. Note that this method properly handles a null response being passed in.
 *
 * @param exception the exception.
 * @param response the response.
 *
 * @return the error information.
 */
@ExceptionHandler(value = ActivitiException.class)
@ResponseBody
public ErrorInformation handleActivitiException(Exception exception, HttpServletResponse response)
{
    if ((ExceptionUtils.indexOfThrowable(exception, ActivitiClassLoadingException.class) != -1) ||
        (ExceptionUtils.indexOfType(exception, ELException.class) != -1))
    {
        // These exceptions are caused by invalid workflow configurations (i.e. user error) so they are considered a bad request.
        return getErrorInformationAndSetStatus(HttpStatus.BAD_REQUEST, exception, response);
    }
    else
    {
        // For all other exceptions, something is wrong that we weren't expecting so we'll return this as an internal server error and log the error.
        logError("An Activiti error occurred.", exception);
        return getErrorInformationAndSetStatus(HttpStatus.INTERNAL_SERVER_ERROR, exception, response);
    }
}
 

开发者ID:FINRAOS,
项目名称:herd,
代码行数:26,
代码来源:HerdErrorInformationExceptionHandler.java

示例2: testActivitiExceptionBadRequest

点赞 2

import org.activiti.engine.ActivitiClassLoadingException; //导入依赖的package包/类
@Test
public void testActivitiExceptionBadRequest() throws Exception
{
    // Test out both ActivitiClassLoadingException and ELException.
    validateErrorInformation(exceptionHandler
        .handleActivitiException(new ActivitiClassLoadingException(ActivitiClassLoadingException.class.getName(), new RuntimeException(MESSAGE)),
            new MockHttpServletResponse()), HttpStatus.BAD_REQUEST, false);
    validateErrorInformation(exceptionHandler.handleActivitiException(new ELException(MESSAGE), new MockHttpServletResponse()), HttpStatus.BAD_REQUEST);
}
 

开发者ID:FINRAOS,
项目名称:herd,
代码行数:10,
代码来源:HerdErrorInformationExceptionHandlerTest.java

示例3: testUnexistingClassDelegation

点赞 2

import org.activiti.engine.ActivitiClassLoadingException; //导入依赖的package包/类
@Deployment
public void testUnexistingClassDelegation() {
  try {
    runtimeService.startProcessInstanceByKey("unexistingClassDelegation");
    fail();
  } catch (ActivitiException e) {
    assertTrue(e.getMessage().contains("couldn't instantiate class org.activiti.BogusClass"));
    assertNotNull(e.getCause());
    assertTrue(e.getCause() instanceof ActivitiClassLoadingException);
  }
}
 

开发者ID:logicalhacking,
项目名称:SecureBPMN,
代码行数:12,
代码来源:JavaServiceTaskTest.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)