title: Either possible? 1) Connection to Oracle 8i w/ ojdbc5 or ojdbc6 2) Multiple ojdbc jars
body: <p>I'm building an application which is collating data from multiple data sources.  Of these data sources, we have multiple instances of Oracle running.</p>
  
  <p>I find that the only way I can connect to my Oracle 8i instance is by using the <em>ojdbc14.jar</em> and the following: </p>
  
  <pre><code>String driver = "oracle.jdbc.OracleDriver";
  String url = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=$HOST)(PORT=$PORT)))(CONNECT_DATA=(SID=$SID)))"
  Class.forName(driver);
  Connection c = DriverManager.getConnection(url, $USER, $PASSWORD);
  c.close();
  </code></pre>
  
  <p>When I try to update to <em>ojdbc5.jar</em> or <em>ojdbc6.jar</em>, using the same code, I get an ArrayIndexOutofBoundsException.  Ditto if I use just the URL "jdbc:oracle:thin:$user/$password@$host:$port:$sid", which does work against the more recent Oracle instances I'm connecting to.</p>
  
  <p>I'd rather not get locked into having to use the older <em>ojdbc14.jar</em> (especially as I'm using Java 6) as I might have to support higher Oracle databases quite soon in the future.</p>
  
  <p>So, I'm hoping one of two scenarios is possible:</p>
  
  <p>1) There's a connection string I'm simply overlooking which can use to connect to Oracle 8i w/ more recent OJDBC jars.</p>
  
  <p>2) I can have multiple OJDBC jars on my classpath so that I can use <em>ojdbc14.jar</em> on an exception basis and <em>ojdbc6.jar</em> everywhere else.  The trick here, of course, is figuring out how to specify which jar the connection needs to use the "oracle.jdbc.OracleDriver" class from.</p>
  
  <p>Any thoughts?</p>