title: Where does Corda load attachment files from during verification?
body: <p>When collecting signatures on a newly proposed transaction Corda threw an <code>OverlappingAttachmentsException</code> because of a namespace conflict. The error message appears to be correct because there are two attachments which contain the same namespace for the contract in the <code>node_attachments</code> table. </p>
  
  <pre><code>net.corda.core.contracts.TransactionVerificationException$OverlappingAttachmentsException:
  Multiple attachments define a file at com/foo/company/&lt;state&gt;/api/v2/orderdetails.class., transaction: 1C1985615C0B53F228B22B2C4F05CE039CC6C577A87E3B2FC9AA2CB00ED5FC43
          at net.corda.core.serialization.internal.AttachmentsClassLoader.checkAttachments(AttachmentsClassLoader.kt:272) ~[corda-core-4.3.jar:?]
          at net.corda.core.serialization.internal.AttachmentsClassLoader.&lt;init&gt;(AttachmentsClassLoader.kt:132) ~[corda-core-4.3.jar:?]
          at net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder$withAttachmentsClassloaderContext$serializationContext$1.apply(AttachmentsClassLoader.kt:325) ~[corda-core-4.3.jar:?]
          at net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder$withAttachmentsClassloaderContext$serializationContext$1.apply(AttachmentsClassLoader.kt:298) ~[corda-core-4.3.jar:?]
          at java.util.HashMap.computeIfAbsent(HashMap.java:1127) ~[?:1.8.0_212]
          at java.util.Collections$SynchronizedMap.computeIfAbsent(Collections.java:2672) ~[?:1.8.0_212]
          at net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder.withAttachmentsClassloaderContext(AttachmentsClassLoader.kt:323) ~[corda-core-4.3.jar:?]
          at net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder.withAttachmentsClassloaderContext$default(AttachmentsClassLoader.kt:319) ~[corda-core-4.3.jar:?]
          at net.corda.core.transactions.LedgerTransaction.internalPrepareVerify$core(LedgerTransaction.kt:146) ~[corda-core-4.3.jar:?]
          at net.corda.core.transactions.LedgerTransaction.verify(LedgerTransaction.kt:136) ~[corda-core-4.3.jar:?]
          at net.corda.core.flows.CollectSignaturesFlow.call(CollectSignaturesFlow.kt:103) ~[corda-core-4.3.jar:?]
          at net.corda.core.flows.CollectSignaturesFlow.call(CollectSignaturesFlow.kt:67) ~[corda-core-4.3.jar:?]
  </code></pre>
  
  <p>Where does Corda load attachment files from during verification? I was under the impression Corda would only load contracts for validation from cordapps deployed to the node's <code>cordapps</code> folder directly and not attempt to use contracts saved in the <code>node_attachments</code> table.</p>
  
  <p>If Corda does load contracts from the node vault then does it follow that the anytime a new contract cordapp is deployed that it should have a unique package namespace?</p>
  
  <p>For reference this error occurred during testing of a cordapp upgrade to Corda 4.3.</p>