Java - how to get dependencies to ignore each other?
<p>We are developing a fairly large project and have many dependencies.  Recently, we ran into an issue with a conflict between two of them, agileAPI.jar and axis.jar.  Both are 3rd party libraries.</p>

<p>The code in question depends directly on agileAPI.jar.  If I build it with just that in the build path, everything that depends on it works correctly.  </p>

<p>As soon as I add axis.jar to the build path (just adding it, not writing code that depends on it), everything goes wrong.  Some of the code that depended on the first library is now throwing exceptions from the 2nd library.  It is as if the first library is picking and choosing methods to call from the 2nd library, instead of whereever it was calling them from prior.</p>

<p>I have code in the project that needs axis.jar directly, so I can't just remove it from the build path.  I need to find a way to have these two exist in the same build path, but ignore each other.</p>

<p>It should be noted that both libraries coexisted prior to a recent upgrade with agile.  I have been working with Oracle's support team to try and resolve this.  After two weeks, though, I am looking for other sources of help.</p>

<p>Our environment is Windows and Eclipse, although in testing this, it also occurs when running java from a command line.  Our JDK is 1.5.0_22.</p>

<p>Any help would be appreciated.</p>

<p>Thank you,</p>

<p>David</p>

<p>EDIT:</p>

<p>As requested, here are the stack traces that we see.  The first stack trace is printed in the code beyond my control:</p>

<pre><code>java.lang.NoSuchMethodError: org.apache.axis.description.OperationDesc.setStyle(Lorg/apache/axis/constants/Style;)V
  at com.agile.webfs.components.fileserver.client.FileServerSoapBindingStub._initOperationDesc1(FileServerSoapBindingStub.java:37)
  at com.agile.webfs.components.fileserver.client.FileServerSoapBindingStub.&lt;clinit&gt;(FileServerSoapBindingStub.java:20)
  at com.agile.webfs.components.fileserver.client.FileServerWSServiceLocator.getFileServer(FileServerWSServiceLocator.java:43)
  at com.agile.webfs.client.IFSLocator.getRemoteFileServer(IFSLocator.java:128)
  at com.agile.webfs.client.IFSLocator.getConnection(IFSLocator.java:101)
  at com.agile.api.pc.EJBLookup.createFileSession(EJBLookup.java:444)
  at com.agile.api.pc.EJBLookup.getFileSession(EJBLookup.java:432)
  at com.agile.api.pc.attachment.IFSOutputStream.getFileSession(IFSOutputStream.java:133)
  at com.agile.api.pc.attachment.IFSOutputStream.copyFrom(IFSOutputStream.java:87)
  at com.agile.api.pc.attachment.IFSOutputStream.copyFrom(IFSOutputStream.java:115)
  at com.agile.api.pc.TableAttachment.uploadFile(TableAttachment.java:886)
  at com.agile.api.pc.TableAttachment$AddFiles2Action.doSdkAction(TableAttachment.java:724)
  at com.agile.api.common.SDKAction.run(SDKAction.java:23)
  at com.agile.api.common.OracleAuthenticator.doAs(OracleAuthenticator.java:131)
  at com.agile.api.common.Security.doAs(Security.java:54)
  at com.agile.api.common.Security.doAs(Security.java:109)
  at com.agile.api.pc.TableAttachment.addFiles2(TableAttachment.java:483)
  at com.agile.api.pc.TableAttachment.createNewBlob2(TableAttachment.java:459)
  at com.agile.api.pc.TableAttachment.doCreateServerRowWithParam(TableAttachment.java:363)
  at com.agile.api.pc.Table.createTableRow(Table.java:238)
  at com.agile.api.pc.TableAttachment.createTableRow(TableAttachment.java:169)
  at com.agile.api.pc.Table.createRow(Table.java:202)
  at com.[snip].updateAttachments(VaultImportService.java:3068)
  at com.[snip].processIncorporatedFile(VaultImportService.java:926)
  at com.[snip].processPdxFile(VaultImportService.java:532)
  at com.[snip].processPdxRequest(VaultImportService.java:388)
  at com.[snip].&lt;init&gt;(VaultImportService.java:299)
  at com.[snip].main(VaultImportService.java:3660)
</code></pre>

<p>After the exception bubbles up and we catch it, the stacktrace that we print looks like:</p>

<pre><code> at com.agile.api.pc.Session.createError(Session.java:1772)
 at com.agile.api.pc.EJBLookup.createFileSession(EJBLookup.java:454)
 at com.agile.api.pc.EJBLookup.getFileSession(EJBLookup.java:432)
 at com.agile.api.pc.attachment.IFSOutputStream.getFileSession(IFSOutputStream.java:133)
 at com.agile.api.pc.attachment.IFSOutputStream.copyFrom(IFSOutputStream.java:87)
 at com.agile.api.pc.attachment.IFSOutputStream.copyFrom(IFSOutputStream.java:115)
 at com.agile.api.pc.TableAttachment.uploadFile(TableAttachment.java:886)
 at com.agile.api.pc.TableAttachment$AddFiles2Action.doSdkAction(TableAttachment.java:724)
 at com.agile.api.common.SDKAction.run(SDKAction.java:23)
 at com.agile.api.common.OracleAuthenticator.doAs(OracleAuthenticator.java:131)
 at com.agile.api.common.Security.doAs(Security.java:54)
 at com.agile.api.common.Security.doAs(Security.java:109)
 at com.agile.api.pc.TableAttachment.addFiles2(TableAttachment.java:483)
 at com.agile.api.pc.TableAttachment.createNewBlob2(TableAttachment.java:459)
 at com.agile.api.pc.TableAttachment.doCreateServerRowWithParam(TableAttachment.java:363)
 at com.agile.api.pc.Table.createTableRow(Table.java:238)
 at com.agile.api.pc.TableAttachment.createTableRow(TableAttachment.java:169)
 at com.agile.api.pc.Table.createRow(Table.java:202)
 at com.[snip].updateAttachments(VaultImportService.java:3068)
 at com.[snip].processIncorporatedFile(VaultImportService.java:926)
 at com.[snip].processPdxFile(VaultImportService.java:532)
 at com.[snip].processPdxRequest(VaultImportService.java:388)
 at com.[snip].&lt;init&gt;(VaultImportService.java:299)
 at com.[snip].main(VaultImportService.java:3660)
</code></pre>

<p>In both cases, the line "at com.agile.api.pc.Table.createRow(Table.java:202)" is the agileAPI call that I am making.  I have removed our package structure, as it identifies the company that I work for.  They value privacy and security.</p>
