powered by Jive Software

NullPointerException in InterceptorManager

I have setup some per-user PacketInterceptors.

When an internal Component sends a packet to another server, a NullPointerException is thrown by InterceptorManager on line 248.

This applies to wildfire 3.2.4 and openfire 3.3.1

I have the exact same problem. Have you found any solution to this?

Could you both post the full stack trace of the exception?

Thanks,

Alex

Here it is:

2007.06.14 18:33:35 org.jivesoftware.openfire.session.ComponentSession.createSession(ComponentSessio n.java:194) An error occured while creating a ComponentSession

org.xmpp.component.ComponentException: java.lang.NullPointerException

at org.jivesoftware.openfire.component.InternalComponentManager.addComponent(Inter nalComponentManager.java:144)

at org.jivesoftware.openfire.session.ComponentSession.createSession(ComponentSessi on.java:187)

at org.jivesoftware.openfire.net.ComponentSocketReader.createSession(ComponentSock etReader.java:116)

at org.jivesoftware.openfire.net.SocketReader.createSession(SocketReader.java:391)

at org.jivesoftware.openfire.net.BlockingReadingMode.run(BlockingReadingMode.java: 53)

at org.jivesoftware.openfire.net.SocketReader.run(SocketReader.java:120)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NullPointerException

at org.jivesoftware.openfire.interceptor.InterceptorManager.invokeInterceptors(Int erceptorManager.java:248)

at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:84)

at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67)

at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:59)

at org.jivesoftware.openfire.component.InternalComponentManager.sendPacket(Interna lComponentManager.java:186)

at org.jivesoftware.openfire.component.InternalComponentManager.checkDiscoSupport( InternalComponentManager.java:411)

at org.jivesoftware.openfire.component.InternalComponentManager.addComponent(Inter nalComponentManager.java:131)

… 6 more

Have you been able to look into this problem? Is there anything I can try?

I have a plugin that was working OK with wildfire 3.1 but shows this error all the time with openfire. Besides, when the user packet interceptor is enabled these errors do not allow the msn gateway to connect.

Best regards

Jorge

I’'m still having this problem in openfire 3.3.2

Can anyone file a bug report about this issue?

Well, as it seems than noboby besides me has this problem I fixed it myself. Here is the patch in case someone is interested.

— openfire_src.orig/src/java/org/jivesoftware/openfire/interceptor/InterceptorMan ager.java 2007-06-22 16:25:24.000000000 -0300

+++ openfire_src/src/java/org/jivesoftware/openfire/interceptor/InterceptorManager. java 2007-07-13 12:35:20.000000000 -0300

@@ -245,7 +245,12 @@

// Do nothing

return;

}

  •    String username = session.getAddress().getNode();
    
  •   String username = null;
    
  •   if (session != null && session.getAddress() != null) {
    
  •           username = session.getAddress().getNode();
    
  •   }
    

if (username != null && server.isLocal(session.getAddress())) {

Collection userInterceptors = usersInterceptors.get(username);

if (userInterceptors != null && !userInterceptors.isEmpty()) {

@@ -269,4 +274,4 @@

}

}

}

-}

\ No hay ningún carácter de nueva línea al final del fichero

+}