4 Replies Latest reply on Dec 1, 2008 10:11 AM by Kevin Conner

    FaultMessageException when sending fault message to the faul

    Kent Damgaard Newbie

      I'm experiencing something strange when trying to use the faultTo field in the header of the message.

      The idea is that if processing fails along the line the message should be sent to a queue for a Faultservice.

      The failed message gets delivered ok to the queue, but in the log I get message. As seen in the quote below. This also identifies the error as being the xml validation that caused the original fault.

      I had a look at the source and I can see that faultTo ends up with a regular sendTo and this is then delivered asynchroneously as far as I can tell. But along the line the message is returned again and then checked for faults.

      So I think that what happens is that since my faulty message is sent to faultTo it ends up being checked after sending and identified as being in fault because of the original fault - which it really isn't because it has been delivered to the fault queue.

      Is this a bug or expected behaviour? To me it seems that the logged error would cause confusion by people monitoring the log, since the error message suggests that the message was not delivered to faultTo, which it actually was.

      I'm running on ESB server 4.4.

      14:52:43,149 ERROR [ActionProcessingPipeline] Failed to send fault to address EPR: PortReference < <wsa:Address logical:SAPLink#FaultService/> > for message header: [ To: EPR: PortReference < <wsa:Address logical:SAPLink#FaultService/> > From: InVMEpr [ PortReference < <wsa:Address invm://5341504c696e6b526f7574696e6753657276696365/false?false#10000/>, <wsa:ReferenceProperties jbossesb:passByValue : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/invm/> > ] ]
      org.jboss.soa.esb.listeners.message.MessageDeliverException: Unexpected FaultMessageException during message delivery.
      at org.jboss.soa.esb.client.ServiceInvoker.deliverAsync(ServiceInvoker.java:246)
      at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.messageTo(ActionProcessingPipeline.java:511)
      at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.faultTo(ActionProcessingPipeline.java:471)
      at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:352)
      at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.soa.esb.couriers.FaultMessageException: org.jboss.soa.esb.actions.ActionProcessingException: org.jboss.soa.esb.actions.ActionProcessingException: Schema validation fault
      at org.jboss.soa.esb.listeners.message.errors.Factory.createExceptionFromFault(Factory.java:49)
      at org.jboss.soa.esb.client.ServiceInvoker.post(ServiceInvoker.java:321)
      at org.jboss.soa.esb.client.ServiceInvoker.deliverAsync(ServiceInvoker.java:227)
      ... 7 more
      Caused by: org.jboss.soa.esb.actions.ActionProcessingException: org.jboss.soa.esb.actions.ActionProcessingException: Schema validation fault
      at org.jboss.soa.esb.listeners.message.BeanConfigActionProcessor.process(BeanConfigActionProcessor.java:78)
      at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
      ... 4 more
      Caused by: org.jboss.soa.esb.actions.ActionProcessingException: Schema validation fault
      at dk.cph.saplink.esb.SchemaValidator.performFileBasedValidation(SchemaValidator.java:141)
      at dk.cph.saplink.esb.SchemaValidator.process(SchemaValidator.java:63)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processMethods(ActionProcessorMethodInfo.java:102)
      at org.jboss.soa.esb.listeners.message.BeanConfigActionProcessor.process(BeanConfigActionProcessor.java:76)
      ... 5 more
      Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'hest'. One of '{"http://www.cph.dk/sap/bi/v1-0":operation}' is expected.
      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.handleStartElement(XMLSchemaValidator.java:1831)
      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 dk.cph.saplink.esb.SchemaValidator.performFileBasedValidation(SchemaValidator.java:135)
      ... 12 more