Plugin classpath (ClassNotFoundException)


i’‘ve started working on a plugin to connect WildFire to our CSCW server. We have a Java-API, so i created an AuthProvider, UserProvider, GroupProvider and AuthorizationProvider that uses that API to handle those tasks through our server software. I actually got the basics working, but the hardest part were ClassNotFoundExceptions that were reported in error.log and that indicated that my providers weren’'t found.

I called my plugin opensteam and the .jar created by WildFire is opensteam.jar.

The strange thing is: i do not get the ClassNotFoundExceptions if I copy my plugin-opensteam.jar from plugins/opensteam/lib to lib/ in wildfire after starting WildFire once (it then creates the opensteam directory from my plugin’‘s opensteam.jar). I’'m currently starting WildFire by calling “bin/wildfire start”. My plugin.xml contains the line:

… (the auth, group and authorization providers accordingly…)

So the class paths should be correct i think. I just don’‘t understand why it works if i copy the plugin-opensteam.jar from the unpacked plugin directory to the lib/ folder of wildfire. I thought that WildFire would handle the .jar files from the plugins itself. What’'s even weirder is the fact that WildFire seems to find my plugin in the org.jivesoftware.wildfire.plugin package (it writes debug output on initialization, and i can see that in the log files), but not the providers in the org.jivesoftware.wildfire.plugin.opensteam package…

Is there something i am doing wrong? Do i have to specify something else, e.g. in plugin.xml?

Another question: I just used the org.jivesoftware.wildfire.plugin package because i thought that my problems might originate from using a “wrong” package name or something. Is it possible to use arbitrary package names for the plugin, or does the plugin itself have to be in org.jivesoftware.wildfire.plugin?

By the way, the thing that took the most time was figuring out the workaround of copying the plugin-opensteam.jar to the wildfire/lib/ folder. The development of the plugin (the providers, etc.) was amazingly easy because of the superb documentation! I guess coding the rest of the functionality for the plugin will be quite enjoyable, i was nearly stunned to already be able to login on my WildFire server’'s admin page with the admin account of our server and see all the users and groups.

I’‘d just like to solve that classpath problem, because it’'s a bit of a hassle to start up WildFire once to make it extract the plugin stuff, then copy the plugin jar and restart…

Best regards,


Plugins are not loaded until after the server has started, loading Auth and User Providers before plugins are loaded. To provide the functionality you desire in a plugin is not possible under the current architecture. I would recommend breaking out this functionality from the rest of your plugin and dropping it in the lib directory as you have already discovered.



Ah, i see. I wasn’‘t aware of the sequence in which libraries and plugins were loaded, but it makes sense, of course, since most plugins probably rely on the providers to work. I’'ll put the providers in a library and my message-handling stuff in a plugin.

Thanks for the quick answer!


Hi guys! I have same problem. How to put ONLY providers into lib directory?