title: xml validation with StAX: Unrecognized property 'javax.xml.stream.isInterning'
body: <p>I'm trying to get xml validation working with StAXin our jboss webapp.  I've read <a href="https://stackoverflow.com/questions/5793087/stax-xml-validation">this post</a> and followed the example.  I then saw the following exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Source parameter of type      
  javax.xml.transform.stax.StAXSource' is not accepted by this validator.
  at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
  </code></pre>
  
  <p>As per <a href="https://stackoverflow.com/questions/20493359/staxsource-not-accepted-by-validator-in-jboss-eap-6-1">this post</a>, the problem here was that jboss 5.0.1 has an old version of xerces.  So I upgraded it to 2.11.0 by replacing the existing xercesImpl.jar under <code>jboss-5.0.1.GA/lib/endorsed/</code> .  Then jboss wouldn't start, because of the following error:</p>
  
  <pre><code>NoClassDefFoundError: org/w3c/dom/ElementTraversal
  </code></pre>
  
  <p>As per <a href="https://stackoverflow.com/questions/17515333/noclassdeffounderror-org-w3c-dom-elementtraversal">this post</a>, in newer versions of xerces the classes have been split out to a separate jar file: xml-apis.jar .  I took the latest version of that file (1.4.01, dated December 2009) from <a href="http://xerces.apache.org/mirrors.cgi#binary" rel="nofollow noreferrer">the xerces homepage</a> and added it to <code>jboss-5.0.1.GA//lib/endorsed/</code> - and now jboss starts ok.</p>
  
  <p>So far so good.</p>
  
  <p>But now I am seeing the following error when I attempt to call the <code>javax.xml.validation.Validator.validate()</code> method:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Unrecognized property 'javax.xml.stream.isInterning'
  </code></pre>
  
  <p>There seems to be no existing problem on SO which refers to that property.  Surely I can't be the only person trying to do xml validation with StAX on jboss 5 ?!</p>
  
  <p>Or am I doing something obviously wrong?</p>
  
  <p>Code snippet:</p>
  
  <pre><code> Validator validator = requestSchema.newValidator();  
   StAXSource source = new StAXSource(xmlsr);  //an XMLStreamReader
   validator.validate(source); 
  </code></pre>