Thanks for looking into this Werner. Here's the output:
org.exolab.castor.xml.MarshalException: Element with name foo passed to
type companyEmployee in incorrect order; expected element with name
'office' or any other optional element declared prior to it.{File: [not
available]; line: 9; column: 10}
at
org.exolab.castor.xml.Unmarshaller.convertSAXExceptionToMarshalException(Unmarshaller.java:761)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:727)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:616)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:807)
at mo.tvbxml.domain.TvbXmlBase.unmarshal(TvbXmlBase.java:16)
at
mo.tvbxml.util.TvbXmlMessageFileProcessor.processMessage(TvbXmlMessageFileProcessor.java:26)
at
mo.tvbxml.domain.TvbXmlTestBase.processMessage(TvbXmlTestBase.java:30)
at
mo.tvbxml.domain.TvbXmlTestBase.testProcessSimpleMessage(TvbXmlTestBase.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: ValidationException: Element with name foo passed to type
companyEmployee in incorrect order; expected element with name 'office' or
any other optional element declared prior to it.
at
org.exolab.castor.xml.util.XMLClassDescriptorImpl.checkDescriptorForCorrectOrderWithinSequence(XMLClassDescriptorImpl.java:398)
at
org.exolab.castor.xml.MarshalFramework$InternalXMLClassDescriptor.checkDescriptorForCorrectOrderWithinSequence(MarshalFramework.java:771)
at
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1941)
at
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1418)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.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
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:715)
... 24 more
Caused by: ValidationException: Element with name foo passed to type
companyEmployee in incorrect order; expected element with name 'office' or
any other optional element declared prior to it.
at
org.exolab.castor.xml.util.XMLClassDescriptorImpl.checkDescriptorForCorrectOrderWithinSequence(XMLClassDescriptorImpl.java:398)
at
org.exolab.castor.xml.MarshalFramework$InternalXMLClassDescriptor.checkDescriptorForCorrectOrderWithinSequence(MarshalFramework.java:771)
at
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1941)
at
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1418)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.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
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:715)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:616)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:807)
at mo.tvbxml.domain.TvbXmlBase.unmarshal(TvbXmlBase.java:16)
at
mo.tvbxml.util.TvbXmlMessageFileProcessor.processMessage(TvbXmlMessageFileProcessor.java:26)
at
mo.tvbxml.domain.TvbXmlTestBase.processMessage(TvbXmlTestBase.java:30)
at
mo.tvbxml.domain.TvbXmlTestBase.testProcessSimpleMessage(TvbXmlTestBase.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)