apache-camel - cvc-complex-type.3.2.2:属性“exceptionType”不允许出现在元素“throwException”中
问题描述
我试图在骆驼上抛出异常。我的版本是 2.2.170.redhat-000013。当我在 Spring DSL 中使用以下代码时
<throwException id="_throwException1" exceptionType="org.mycompany.MyException" message="Test Exception"/>
给
Multiple annotations found at this line:
- cvc-complex-type.4: Attribute 'ref' must appear on element 'throwException'.
- cvc-complex-type.3.2.2: Attribute 'exceptionType' is not allowed to appear in element
'throwException'.
- cvc-complex-type.3.2.2: Attribute 'message' is not allowed to appear in element
'throwException'.
我项目中的架构位置如下
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd" >
throwException 语法应该按照文档工作,请帮助找出错误。
解决方案
推荐阅读
- asynchronous - CollectionView 不连贯的滚动
- css - 在移动设备上折叠 flexbox 列
- amazon-s3 - 创建/导入 tsv 后,它在 athena 中返回零结果
- javascript - React-Native:Modal中的Flatlist无法滚动
- php - php error_get_last() 在 E_USER_DEPRECATED 的情况下停止脚本
- java - 在 java 中使用 Xerces DOMParser 进行嵌套 xml 解析
- mysql - 设置产品特定价格时如何添加含税价值价格
- r - if else 语句和 if_else 的不同行为
- r - igraph R的合着网络边缘列表
- python - Python异步无法工作