Xml jbossfuse中的部署错误

Xml jbossfuse中的部署错误,xml,apache-camel,jbossfuse,Xml,Apache Camel,Jbossfuse,出于测试目的,我有一个blueprint.xml,如下所示。这个蓝图包含一个只处理在同一个路由中抛出的异常的路由,我将一个bean声明为抛出java.lang.IllegalArgumentException <?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:cm="http://aries.apache.o

出于测试目的,我有一个blueprint.xml,如下所示。这个蓝图包含一个只处理在同一个路由中抛出的异常的路由,我将一个bean声明为抛出
java.lang.IllegalArgumentException

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
    xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
    xmlns:cxf-core="http://cxf.apache.org/blueprint/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="              http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd              http://camel.apache.org/schema/blueprint/cxf http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd              http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">

  <camelContext xmlns="http://camel.apache.org/schema/blueprint" trace="false">


     <propertyPlaceholder id="properties" location="classpath:myService.properties"/>

    <!-- setup endpoint -->
    <!-- <endpoint id="dead" uri="mock:dead"/> -->
       <endpoint id="dead" uri="mock:dead"></endpoint>

    <!-- setup a common redelivery policy, using property placeholders -->
    <redeliveryPolicyProfile id="myRedelivery" redeliveryDelay="{{delay}}" maximumRedeliveries="{{max}}"/>


      <bean id="damn" class="java.lang.IllegalArgumentException">
        <constructor-arg index="0" value="Damn"/>
    </bean>


    <route id="exceptionroute">
       <from uri="direct-vm:csl-mpgs-payment-1.0-fromamq1"/> 
       <onException redeliveryPolicyRef="myRedelivery">
            <!-- refer to common redelivery policy -->
            <exception>java.lang.Exception</exception>
            <!-- but we can override the profile and log retry attempts at WARN level -->
            <redeliveryPolicy logRetryAttempted="true" retryAttemptedLogLevel="WARN"/>
            <to ref="dead"/>
        </onException>
         <throwException ref="damn"/> 
         <to uri="direct-vm:csl-mpgs-payment-1.0-fromam"/>
    </route>
  </camelContext>

</blueprint>
如何解决这个问题?

作为OSGi蓝图bean定义,
应该在
之外,例如将其移动到
之前作为OSGi蓝图bean定义,
应该在
之外,例如将其移动到
之前

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bean'. One of '{"http://camel.apache.org/schema/blueprint":redeliveryPolicyProfile, "http://camel.apache.org/schema/blueprint":onException, "http://camel.apache.org/schema/blueprint":onCompletion, "http://camel.apache.org/schema/blueprint":intercept, "http://camel.apache.org/schema/blueprint":interceptFrom, "http://camel.apache.org/schema/blueprint":interceptSendToEndpoint, "http://camel.apache.org/schema/blueprint":restConfiguration, "http://camel.apache.org/schema/blueprint":rest, "http://camel.apache.org/schema/blueprint":route}' is expected.
  at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)[:]
  at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)[:]
  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[:]
  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[:]
  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[:]
  at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)[:]
  at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)[:]
  at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)[:]
  at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)[:]
  at org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown Source)[:]
  at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)[:]
  at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)[:]
  at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)[:]
  at javax.xml.validation.Validator.validate(Unknown Source)
  at org.apache.aries.blueprint.parser.Parser.validate(Parser.java:314)