Thursday 2 January 2020

SoapUI : Maven Integration Error AutoImportMethodFactory

I have had an upgrade of my OS from Windows 7 to Windows 10. This led me to reconfigure my maven integration settings.

While launching a few of the tests that used to work perfectly before with the same configuration, I saw some new errors

10:39:11,310 ERROR [SoapUI] An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:333)
        at com.eviware.soapui.plugins.LoaderBase.loadAutoFactories(LoaderBase.java:96)
        at com.eviware.soapui.plugins.LoaderBase.loadFactories(LoaderBase.java:64)
        at com.eviware.soapui.plugins.PluginLoader.loadPluginFactories(PluginLoader.java:129)
        at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:92)
        at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:42)
        at com.eviware.soapui.plugins.PluginManager.doInstallPlugin(PluginManager.java:136)
        at com.eviware.soapui.plugins.PluginManager.access$600(PluginManager.java:38)
        at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.computeSequentially(PluginManager.java:415)
        at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:372)

Although these errors did not impact my tests, they did impact how the console logs were looking and hence a fix was needed.

After some google around, the fix appears to be very easy.

https://community.smartbear.com/t5/SoapUI-Open-Source/AutoDiscoveryMethodFactory-ClassNotFoundException-when-executing/td-p/105397

If the SoapUI version is 5.2.1 (I use this and found the same problem), the problem ties to the default plugins installed under "C:\Users\<user name>\.soapuios\plugin".

For SoapUI 5.2.1, there are 4 default plugins installed under this directory:
  1. readyapi-swaggerhub-plugin-1.0.jar
  2. ready-mqtt-plugin-dist.jar
  3. ready-uxm-plugin-1.0.1-dist.jar
  4. soapui-swagger-plugin-2.2-dist.jar
Just rename the original folder 'plugins' to 'plugins_NOTinUse' (or something else), so that default plugins could be forced hidden during runtime. The problem then disappeared.

It works like a charm :)