This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 779164 - (SOA-1559) Schema Validation - Non-conforming messages are not properly handled
Schema Validation - Non-conforming messages are not properly handled
Status: CLOSED NEXTRELEASE
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
5.0.0 ER1
Unspecified Unspecified
high Severity high
: ---
: 5.0.0 GA,5.0.0 ER5
Assigned To: Kevin Conner
http://jira.jboss.org/jira/browse/SOA...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-27 05:26 EDT by Jiri Pechanec
Modified: 2009-12-14 03:28 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-12-14 03:28:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker SOA-1559 Major Closed Schema Validation - Non-conforming messages are not properly handled 2015-07-24 05:36:14 EDT

  None (edit)
Description Jiri Pechanec 2009-10-27 05:26:30 EDT
Date of First Response: 2009-10-27 05:34:20
project_key: SOA

I tried to send two kinds of messages two the validation action
1) Malformed XML - it works correctly
The log contains 10:13:39,213 ERROR [STDERR] [Fatal Error] :20:3: The element type "item" must be terminated by the matching end-tag "</item>", an exception is thrown and propagated as fault to the caller when synchornnous invocation is in place
2) In case of well-formed XML but non-conforming to schema an exception is thrown and the fault is not generated
09:09:04,997 ERROR [SchemaValidationAction] SAXExcption while trying to validate against schema '/schemas/valid-ns.xsd'
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'p:orderperson'. One of '{orderperson}' 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 org.jboss.soa.esb.actions.validation.SchemaValidationAction.validate(SchemaValidationAction.java:117)
	at org.jboss.soa.esb.actions.validation.SchemaValidationAction.process(SchemaValidationAction.java:107)
	at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:634)
	at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:586)
	at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:420)
	at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:545)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
09:09:05,018 ERROR [ActionProcessingPipeline] Failed to send fault to address JMSEpr [ PortReference < <wsa:Address jms:jnp://127.0.0.1:1099#queue/quickstart_message_validation_esbns_reply/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1099/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:destination-name : queue/quickstart_message_validation_esbns_reply/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='27644272-0ca0-40fd-9465-5e1ed0b194f7'/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] for message header: [ To: JMSEpr [ PortReference < <wsa:Address jms:jnp://127.0.0.1:1099#queue/quickstart_message_validation_esbns_reply/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1099/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:destination-name : queue/quickstart_message_validation_esbns_reply/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='27644272-0ca0-40fd-9465-5e1ed0b194f7'/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] From: JMSEpr [ PortReference < <wsa:Address jms:jnp://127.0.0.1:1099#queue/quickstart_message_validation_esbns/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1099/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:destination-name : queue/quickstart_message_validation_esbns/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] RelatesTo: 386d71a6-a767-4de1-8e17-e43d0da95be0 ]
org.jboss.soa.esb.couriers.CourierMarshalUnmarshalException: Failed to serialize ESB Message.
	at org.jboss.internal.soa.esb.couriers.JmsCourier.internalDeliver(JmsCourier.java:225)
	at org.jboss.internal.soa.esb.couriers.JmsCourier.deliver(JmsCourier.java:182)
	at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.deliver(TwoWayCourierImpl.java:189)
	at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.messageTo(ActionProcessingPipeline.java:861)
	at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.faultTo(ActionProcessingPipeline.java:811)
	at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:666)
	at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:586)
	at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:420)
	at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:545)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Util.serialize caught XMLStreamException:
	at org.jboss.soa.esb.util.Util.serialize(Util.java:198)
	at org.jboss.internal.soa.esb.couriers.JmsCourier.internalDeliver(JmsCourier.java:219)
	... 11 more
Caused by: javax.xml.stream.XMLStreamException
	at org.jboss.internal.soa.esb.message.format.xml.marshal.MarshalUnmarshalManager.marshal(MarshalUnmarshalManager.java:149)
	at org.jboss.internal.soa.esb.message.format.xml.BodyImpl.writeChildContent(BodyImpl.java:146)
	at org.jboss.internal.soa.esb.util.stax.ElementContent.writeContent(ElementContent.java:41)
	at org.jboss.internal.soa.esb.util.stax.StreamHelper.writeElement(StreamHelper.java:125)
	at org.jboss.internal.soa.esb.message.format.xml.MessageImpl.writeChildContent(MessageImpl.java:236)
	at org.jboss.internal.soa.esb.util.stax.ElementContent.writeContent(ElementContent.java:41)
	at org.jboss.soa.esb.util.Util.serialize(Util.java:188)
	... 12 more

The behaviour should be same in both cases
Comment 1 Kevin Conner 2009-10-27 05:34:20 EDT
Can you raise a JBESB issue for this?  I'll get this fixed before 4.7 goes out.
Comment 2 Jiri Pechanec 2009-10-27 07:16:04 EDT
Link: Added: This issue depends JBESB-2916
Comment 3 Boris Belovic 2009-11-30 03:17:07 EST
Link: Added: This issue related SOA-1653
Comment 4 Kevin Conner 2009-12-01 10:04:00 EST
Link: Removed: This issue related SOA-1653 
Comment 5 Jiri Pechanec 2009-12-14 03:28:35 EST
Verified in ER5

Note You need to log in before you can comment on or make changes to this bug.