4 Replies Latest reply on Sep 11, 2008 12:41 PM by Mike Trzcianowski

    Smooks condition error

    Mike Trzcianowski Newbie

      I'm setting up a condition following the huge-split-route quickstart example. my config looks like this:

       <resource-config selector="csv-record">
       <resource>org.milyn.routing.db.SQLExecutor</resource>
       <condition>
       <!--
       tagExistsRS[0].found < 1
       -->
       </condition>
       <param name="executeBefore">false</param>
       <param name="datasource">myDS</param>
       <param name="statement">INSERT INTO ... </param>
       </resource-config>
      


      But I get the following error. What am I missing? Is the example code old? Is there a bug?

      
      Caused by: org.xml.sax.SAXParseException: cvc-complex-type.4: Attribute 'evaluator' must appear on element 'condition'.
       at com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXParseException(Util.java:109)
       at com.sun.org.apache.xerces.internal.jaxp.validation.ErrorHandlerAdaptor.error(ErrorHandlerAdaptor.java:104)
       at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
       at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
       at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:429)
       at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3185)
       at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.addDefaultAttributes(XMLSchemaValidator.java:2910)
       at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2098)
       at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
       at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:335)
       at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
       at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.process(ValidatorImpl.java:192)
       at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:159)
       at javax.xml.validation.Validator.validate(Validator.java:82)
       at org.milyn.xml.XmlUtil.parseStream(XmlUtil.java:305)
       at org.milyn.cdr.XMLConfigDigester.digestConfig(XMLConfigDigester.java:84)
       at org.milyn.cdr.XMLConfigDigester.digestConfig(XMLConfigDigester.java:68)
       at org.milyn.cdr.SmooksResourceConfigurationStore.registerResources(SmooksResourceConfigurationStore.java:212)
       at org.milyn.Smooks.addConfigurations(Smooks.java:182)
       at org.milyn.Smooks.addConfigurations(Smooks.java:155)
       at org.milyn.Smooks.<init>(Smooks.java:112)
       at org.jboss.soa.esb.actions.smooks.SmooksAction.<init>(SmooksAction.java:115)
       ... 57 more