title: AbstractMethodError On a Dynamic Loaded Jar
body: <blockquote>
    <p>I am loading a plug-in dynamically. Both the plug-in and the software
    have been created by us.</p>
    
    <p>I have an Interface lets call it Foo. There is also FooImpl that just
    implements that method But FooImpl is in the jar loaded dynamically <code>
    public interface Foo {
        void write(..someArgument..) throws Exception; }</code></p>
    
    <p>I have also a PluginLoader class here is the method <pre><code> public
  Object loadPlugin(final String jarPath, final Class
  pluginInterface) {
      try
      {
          final URI uri = new File(jarPath).toURI();
          final URL url = uri.toURL();</p>
  
      final URLClassLoader ucl = new URLClassLoader(new URL[] { url });
      try
      {
           final Class&lt;?&gt; pluginClass = Class.forName("FooImpl", true, ucl);
  
           // Verify if plugin implements plugin interface.
           if (pluginClass.getInterfaces()[0].getName().equals(pluginInterface.getName()))
           {
            // Instantiate plugin.
            return pluginClass.newInstance();
  
           } }//[...] &lt;/code&gt;&lt;/pre&gt;
  </code></pre>
    
    <p>This part is actually working well i think so because after doing some
    sysout on the pluginClass  i notice:<br/> the .getMethods() = <br/>
    [public void FooImpl.write(..someArgumentType..) throws Exception, 
    public abstract void some.package.Foo.write(..someArgumentType..)
    throws Exception]</p>
    
    <p>the .getGenericInterfaces() = [interface some.package.Foo]</p>
    
    <p>But when i try to call the method write here is what i get<br/>
    java.lang.AbstractMethodError: FooImpl.write(..SomeArgumentType..;)V
    <br/> I dont know why there is a ";" and a "V"</p>
    
    <p>So basically i think that it try to call the interface method instead
    of the implemented one. So i'm wondering What is going on!</p>
    
    <p>As usual, Thank you for your time and help</p>
  </blockquote>