title: Using Java 7 CommonDataSource with Scala
body: <p>There seems to be a problem compiling Scala code that uses older (Java 6) JDBC DataSource drivers with the Java 7 JVM and Scala.</p>
  
  <p>In Java 7, Oracle added a new method, <code>Logger getParentLogger()</code>, to the <code>CommonDataSource</code> interface. Older classes built with Java 6 that implement <code>CommonDataSource</code> are not going to implement this method (e.g. <code>PGConnectionPoolDataSource</code> and <code>SQLServerDataSource</code>). When the code is compiled with the Scala compiler, it complains that the concrete class does not implement the abstract method <code>getParentLogger</code>.</p>
  
  <p>I do not know if this happens with the Java compiler, but I suspect not, as it should have been caught by unit testing.</p>
  
  <p>I am sure that this problem will occur with any interface that adds new method declarations.</p>
  
  <p>Is there any work-around for Scala for this problem? Is the only solution to revert to JDK 6? I do not have source code for the SQL Server driver, so I can't fix the problem myself (I know that open-source doesn't have this issue, but I am forced to use that driver for other reasons).</p>