powered by Jive Software

Plugin not found Exception, when using getPluginManager().getPlugin("aa")

Hello,

I’m developing a plugin in Openfire, but when i create a setting page and try to get the plugin instance, to transfer data to the plugin, i always get a Null Pointer Expection. I have been trying to fix this from a week.Please help.

teamFantasian_UserServicePlugin plugin = (teamFantasian_UserServicePlugin) XMPPServer.getInstance().getPluginManager().getPlugin(“teamFantasian_UserServic ePlugin”);

if(plugin == null) {

out.println(“Cant find plugin …!!”);

return;

}

My directory structure:

/home/manoj/final/Openfire/src/plugins/teamFantasian_UserServicePlugin

|-- lib

| |-- asm-3.1.jar

| |-- commons-pool2-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.jar

| |-- jackson-jaxrs-1.9.2.jar

| |-- jackson-mapper-asl-1.9.2.jar

| |-- jackson-xc-1.9.2.jar

| |-- jedis-2.4.2.jar

| |-- jersey-bundle-1.18.jar

| |-- jersey-servlet-1.18.jar

| |-- jettison-1.1.jar

| `-- jsr311-api-1.1.1.jar

|-- logo_large.gif

|-- logo_small.gif

|-- plugin.xml

|-- readme.html

`-- src

|-- i18n

| `-- teamFantasian_UserServicePlugin_i18n.properties

|-- java

| `-- de

| `-- meisterfuu

| `-- openfire

| `-- plugin

| |-- teamFantasian_UserServicePlugin.java

| `-- UserServiceHelper.java

`-- web

|-- images

| |-- error-16x16.gif

| `-- success-16x16.gif

`-- teamFantasian_UserServicePlugin.jsp

10 directories, 24 files

It is similar to this issue:

Found the answer, always the name of the plugin should be lowercase and without special characters.

**Source : Openfire Plugin: Null Pointer Exception when trying to get the instance of the plugin - Stack Overflow **