title: cvc-complex-type.2.4.a: invalid content was found starting with element 'ProcessDesc'. One of ProcessName expected
body: <p>I am validating my jaxb object through Validator class. Below is the code I am using to validate jaxb object. But While validating it I am getting this error.</p>
  <pre><code>jc = JAXBContext.newInstance(obj.getClass());
  source = new JAXBSource(jc, obj);
  Schema schema = schemaInjector.getSchema();
  Validator validator = schema.newValidator();
  validator.validate(source);
  </code></pre>
  <p><strong>ERROR(SAXParseException): cvc-complex-type.2.4.a: invalid content was found starting with element 'ProcessDesc'. One of ProcessName expected</strong></p>
  <p>I don't understand what I have done wrong in my xsd which is causing this error. The element defined in my xsd file is below for which I am getting an error.</p>
  <pre><code>&lt;xs:schema xmlns:cc=&quot;http://www.ms.com/cm.xsd&quot; xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; targetNamespace=&quot;http://www.ms.com/cm.xsd&quot; elementFormDefault=&quot;qualified&quot; attributeFormDefault=&quot;unqualified&quot;&gt;
    &lt;xs:complexType name=&quot;Process&quot;&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name=&quot;ProcessId&quot; type=&quot;xs:int&quot; /&gt;
        &lt;xs:element name=&quot;ProcessName&quot; type=&quot;xs:string&quot; /&gt;
        &lt;xs:element name=&quot;ProcessDesc&quot; type=&quot;xs:string&quot; minOccurs=&quot;0&quot; /&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  </code></pre>
  <p>Please help me to solve this. Thank You.</p>