Openfire Plugin: Null Pointer Exception when trying to get the instance of the plugin -
I'm developing a plugin for openfire. jsp, I am using and the setters to transfer the data to my problem is similar to the mention here:. I have a week out trying to figure I have the following code: And this is my directory structure:
& lt;% @ page import = " Orgkjivesoftvrekopenfirekcmppsserver, Dekmistrfaukopenfirekplginktamfntasian_ussersrviseplgin, Orgkjivesoftvrekutilkprmutils, Orgkjivesoftvrekopenfirekkantenrkplgin, Orgkjivesoftvre. Util. *, java.util. *; Java.util.HashMap, java.util.Map "errorPage =" error.jsp "%> & Lt;% @ taglib uri = "http://java.sun.com/jstl/core_rt" prefix = "c"%> & Lt;% @ taglib uri = "http://java.sun.com/jstl/fmt_rt" prefix = "FMT"%> & Lt;% boolean save = request.getParameter ("save")! = Null; String pNameSpace = ParamUtils.getParameter (request, "pNameSpace"); String pModule = ParamUtils.getParameter (request, "PMDUL"); String pCreateUser = ParamUtils.getParameter (request, "pCreateUser"); String pCreateUser_input = ParamUtils.getParameter (request, "pCreateUser_input"); String pCreateUser_output = ParamUtils.getParameter (request, "pCreateUser_output"); teamFantasian_UserServicePlugin plugin = (teamFantasian_UserServicePlugin) XMPPServer.getInstance () getPluginManager () getPlugin ( "teamFantasian_UserServicePlugin") .. Collections & lt; Plugin & gt; A = xmpassor.justinstance () GetPluginManager () GetPlugins (); Out.write (arrays.toString (a.toArray ()); If (plugin == faucet) {out.println ("Can not find search plugin .. !!"); Return; }
/ home / Manoj / Last / Openfire / src / plugins / teamFantasian_UserServicePlugin | - lib | | - asm-3.1.jar | | - Commons-Pool 2-2.0.jar | | - Fluent-hc-4.3.2.jar | | - httpclient-4.3.3.jar | | - httpcore-4.3.2.jar | | - Jackson-Core-ASL-1.9.2. | - Jackson-Jaxs-9 9.2z. | - Jackson-Mapper-ASL-1.9.2. | - Jackson-AxC-1.9.2. | - Jedes-2.4.2. | - Jersey-Bundle-1.18.jpg | | -Jersey-Servlet-1.18.jpg | | - jettison-1.1.jar | `- jsr311-api-1.1.1.jar | - logo_large.gif | - logo_small.gif | - plugin.xml | - readme.html` - src | - i18n | `- TeamFontasian_User SystemPlugin_I 18N. Properties | - Java | `- D | `- Masterfu. `- OpenFire | `- Plugin | | - TeamFontasian_UpperSupplugin.Java | `- UserServiceHelper.java` - Web | - picture | | - Error -16 x16.gif | `- Success -16 x16.gif` - Timfntasian_yuesrsewaplginkjesp 10 directories, 24 files
Do not use underscores for your plugin name. Rename the Team Fentasian user service plugin to your plugin.
And get an example with:
XMPPServer.getInstance (). GetPluginManager () GetPlugin ("teamfantasianuserserviceplugin");
The plugin name should be lowercase.
Comments
Post a Comment