cvc-complex-type.3.2.2:不允许属性'exceptionType'出现在元素'throwException'中

时间:2019-07-04 10:42:02

标签: apache-camel

我正试图在骆驼上抛出异常。我使用的版本是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语法应按文档使用,请帮助发现错误。

0 个答案:

没有答案
相关问题