title: Java error: Found interface ... but class was expected
body: <p>I am getting a strange runtime error from my code:</p>
  
  <pre><code>"Found interface [SomeInterface] but class was expected"
  </code></pre>
  
  <p>How can this happen? How can an interface get instantiated?</p>
  
  <p><strong>Update:</strong> (In response to some answers) I am compiling and running against the same set of libraries, but I <strong>am</strong> using <a href="http://code.google.com/p/google-guice/" rel="noreferrer">Guice</a> to inject a Provider for this particular Interface. </p>
  
  <p>The problem went away when I bound an implementation to the interface (seems like the @ImplementedBy annotation was not enough).</p>
  
  <p>I was more interested in the mechanics through which Guice managed to actually instantiate an interface.</p>