powered by Jive Software

Problems with adding internal component

Hello everyone,

I’m trying to write a plugin which registers a new internal component. I’m using the exact same lines like in the broadcast plugin to register the component, but sometimes I get the following error:

2009.07.24 14:13:19 [org.jivesoftware.openfire.component.InternalComponentManager$2.error(InternalC omponentManager.java:354)]
org.xmpp.component.ComponentException: java.lang.ArrayIndexOutOfBoundsException
at org.jivesoftware.openfire.component.InternalComponentManager.addComponent(Inter nalComponentManager.java:163)
at de.akuz.openfire.plugin.muccer.Muccer.initializePlugin(Muccer.java:86)
at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java :448)
at org.jivesoftware.openfire.container.PluginManager.access$300(PluginManager.java :47)
at org.jivesoftware.openfire.container.PluginManager$PluginMonitor.run(PluginManag er.java:1032)
at org.jivesoftware.openfire.container.PluginManager.installPlugin(PluginManager.j ava:160)
at org.jivesoftware.openfire.admin.plugin_002dadmin_jsp._jspService(plugin_002dadm in_jsp.java:168)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1093)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)
at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:66)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)
at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:42)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)
at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:70)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)
at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:146)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollect ion.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843 )
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.lang.ArrayIndexOutOfBoundsException

I hope anyone can point me to my fault so I can correct it.

Thank in advance.

Hi eulenspiegel,

Is it correct that in line 86 of your Muccer.java there is something like

componentManager.addComponent(serviceName, this);

I’m not quite sure, but I think the interesting part are the next lines after:

Caused by: java.lang.ArrayIndexOutOfBoundsException

So maybe having a look on this can help.

Hey eulenspiegel,

@Guenther is right. You need to post the lines after the Caused by: java.lang.ArrayIndexOutOfBoundsException since that is where we can see what went wrong.

– Gato

Yeah, that was sort of my Problem that error log stopped printing the stack trace after that line. But i think i found the problem. it was a type in a loop and because of that i tried to access an element in an arraylist which didn’t existed. Is it possible to tell the error.log to print everything instead of printing “38 more lines” or so at a certain point?