title: HotSwapAgent plugin - plugin class not found
body: <p>I have been developing custom plugin for HotSwapAgent, but encountered weird issue with classloader missing plugin class.</p>
  
  <p>This is the exception thrown by </p>
  
  <pre><code>####&lt;Feb 9, 2015 12:45:54 AM PST&gt; &lt;Notice&gt; &lt;Stdout&gt; &lt;testbox.mycompany&gt; &lt;AdminServer&gt; &lt;Thread-87&gt; &lt;&lt;WLS Kernel&gt;&gt; &lt;&gt; &lt;&gt; &lt;1423471554463&gt; &lt;BEA-000000&gt; &lt;HOTSWAP AGENT: 0:45:54.463 ERROR (org.hotswap.agent.config.PluginRegistry) - Error in plugin initial processing for plugin package 'mycompany.infrastructure.hotswap.agent'
  java.lang.ClassNotFoundException: mycompany.infrastructure.hotswap.agent.HotSwapMyCompanyPlugin
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:270)
      at org.hotswap.agent.config.PluginRegistry.scanPlugins(PluginRegistry.java:89)
      at org.hotswap.agent.config.PluginConfiguration.initPluginPackage(PluginConfiguration.java:120)
      at org.hotswap.agent.config.PluginConfiguration.init(PluginConfiguration.java:109)
      at org.hotswap.agent.config.PluginConfiguration.&lt;init&gt;(PluginConfiguration.java:97)
      at org.hotswap.agent.config.PluginManager.initClassLoader(PluginManager.java:154)
      at org.hotswap.agent.util.HotswapTransformer$1.executeCommand(HotswapTransformer.java:163)
      at org.hotswap.agent.command.impl.CommandExecutor.run(CommandExecutor.java:25)&gt;
  </code></pre>
  
  <p>This is my hotswap-agent.properties file</p>
  
  <pre><code>pluginPackages=mycompany.infrastructure.hotswap.agent
  autoHotswap=false
  LOGGER=info
  </code></pre>
  
  <p>It seems that hotswap-agent.jar agent is properly loaded, fetches hotswap-agent.properties, but fails to load the plugin class. </p>
  
  <p>I am suspecting that there is a problem with classloader hierarchy, because agent tries to load plugin class managed from WLS classloader. I am not sure what to do with that. Any ideas?</p>
  
  <p>I am using WLS appserver.</p>