title: cordova.exec error Class not found
body: <p>I'm attempting to write a plugin for phonegap that will access native Java that I have written.  The only problem is that when I call cordova.exec, the failure callback message is "Class not found".  I'm assuming this means that it can't find the java file, but I don't know why. </p>
  
  <p>Here is my code.
  Javascript:</p>
  
  <pre><code>var SerialHelper = {
          getName: function(){
              return "this is the name"
          },
      getSerial: function(success, failure) {
           cordova.exec(
             success, // success callback function
             failure, // error callback function
             'com.isabellaproducts.serialhelper.SerialHelper',
             'getFableSerial',
             []
          );
      }
  }
  module.exports = SerialHelper;
  </code></pre>
  
  <p>Java:</p>
  
  <pre><code>package com.isabellaproducs.serialhelper;
  
  import org.apache.cordova.CallbackContext;
  import org.apache.cordova.CordovaPlugin;
  import org.json.JSONObject;
  import org.json.JSONArray;
  import org.json.JSONException;
  import org.apache.cordova.*;
  
  
  public class SerialHelper extends CordovaPlugin
  {
  
      @Override
      public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
  
          if ("getFableSerial".equals(action)) {
              String serial = "15345344132354";
              callbackContext.success(serial);
              //callbackContext.sendPluginResult(new PluginResult(Status.OK, serial));
              return true;
          }
          else{
              callbackContext.error("method not found");
              return false;
          }
      }
  }
  </code></pre>
  
  <p>plugin.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
             id="com.isabellaproducts.serialhelper"
        version="1.0"&gt;
      &lt;name&gt;SerialHelper&lt;/name&gt;
      &lt;description&gt;Serial Helper gets the Fable gives serial number access&lt;/description&gt;
      &lt;license&gt;MIT&lt;/license&gt;
      &lt;keywords&gt;serial, helper, fable&lt;/keywords&gt;
  
  
      &lt;js-module src="www/serial_helper.js" name="SerialHelper"&gt;
          &lt;clobbers target="com.isabellaproducts.serialhelper" /&gt;
      &lt;/js-module&gt;
  
      &lt;!-- android --&gt;
      &lt;platform name="android"&gt;
          &lt;source-file src="src/android/com/isabellaproducts/serialhelper/SerialHelper.java" target-dir="src/com/isabellaproducts/serialhelper" /&gt; 
  
          &lt;config-file target="res/xml/config.xml" parent="/*"&gt;
              &lt;feature name="SerialHelper"&gt;
                  &lt;param name="android-package" value="com.isabellaproducts.serialhelper.SerialHelper"/&gt;
              &lt;/feature&gt;
          &lt;/config-file&gt;
  
       &lt;/platform&gt;          
  &lt;/plugin&gt;
  </code></pre>
  
  <p>In logcat, I get this error:</p>
  
  <pre><code>D/PluginManager(12316): exec() call to unknown plugin: SerialHelper
  </code></pre>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Thanks.</p>