<div>Sherman,</div>It looks like a bug was introduced in the code which retrieves schemas from the Pool. In Pool.get() there is code which first loads the schema from a given URL, then computes its checksum. I've noticed that the new Util.readVirtualFile() method will sometimes return the content of the *previous* schema loaded. <div>
<br></div><div>In the current code there is actually an extra read of the catalog--see the bolded section below. It's leftover from the previous approach for loading the schema. This should probably be cleaned up, but it helped me find the issue. When I've traced through this code I've seen that the catalogStr returned by the old code (Util.readURL) is sometimes different from the schema returned by Util.readVirtualFile.<br>
<div><br></div><div>I'm going to try to come up with a clean reproducible test case tomorrow, but I thought I'd pass on what I've seen in case you see something obviously wrong.</div><div><br></div><div><div>
try {</div><div> if (catalogStr == null) {</div><div> <span style="font-weight:bold"> catalogStr = Util.readURL(catalogUrl);</span></div>
<div> // Use VFS to get the content</div><div><br></div><div> FileObject file = Util.readVirtualFile(catalogUrl);</div><div><br></div><div> StringBuilder buf = new StringBuilder(1000);</div>
<div> FileContent fileContent = file.getContent();</div><div> InputStream in = fileContent.getInputStream();</div><div> int n;</div><div> while ((n = in.read()) != -1) {</div>
<div> buf.append((char) n);</div><div> }</div><div> <span style="font-weight:bold"> catalogStr = buf.toString();</span></div>
<div> }</div><div> md5Bytes = encodeMD5(catalogStr);</div><div> } catch (Exception ex) {</div><div> // Note, can not throw an Exception from this method</div>
<div> // but just to show that all is not well in Mudville</div><div> // we print stack trace (for now - better to change</div><div> // method signature and throw).</div>
<div> ex.printStackTrace();</div><div> }</div><div><br></div><div>-Matt</div></div></div>