Custom user provider has presence problems

I am using the HybridAuth and HybridUser Providers to do custom authentication against a third-party API. If it succeeds, you are granted access, even if you don’t exist in the Openfire database. If it fails, then the Default Providers are used to authenticate you against the Openfire database. That much works.

Here’s the trickier part. I want to have a program listen on the other end of the chat, and that program should be accessible to all users automatically. I’ve tried creating a group and enabled contact list group sharing for all users. I’ve also tried the Subscription plugin, accepting all subscription requests.

However, the program that is supposed to be connected always appears as offline. In fact, in the client sessions list, it appears with a priority of 0, which I suspect is a bad thing.

In error.log, I see NPE’s and UnsupportedOperationExceptions from HybridUserProvider, so I’m pretty sure it’s something I just don’t understand about how to implement my own UserProvider. Is there some sample code or article that could provide some insight? I’m not sure why the errors come out of HybridUserProvider, rather than my own custom UserProvider, but I have to believe that it’s related to my failure to fully or properly implement the interface.

Any ideas?

Thank you,

Lee Grey

Here are snippets of the exceptions I’m seeing in error.log:

java.lang.UnsupportedOperationException
at org.jivesoftware.openfire.user.HybridUserProvider.getSearchFields(HybridUserPro vider.java:299)
at org.jivesoftware.openfire.user.UserManager.getSearchFields(UserManager.java:279 )

2009.09.10 20:00:22 [org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdate Handler.java:164)
] Internal server error. Triggered by packet:

java.lang.NullPointerException
at org.jivesoftware.openfire.user.UserNameManager.getUserName(UserNameManager.java :99)
at org.jivesoftware.openfire.user.UserNameManager.getUserName(UserNameManager.java :79)
at org.jivesoftware.openfire.roster.Roster.(Roster.java:169)
at org.jivesoftware.openfire.roster.RosterManager.getRoster(RosterManager.java:86)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.broadcastUpdate(Presenc eUpdateHandler.java:282)

2009.09.10 20:05:50 [org.jivesoftware.openfire.handler.IQRosterHandler.handleIQ(IQRosterHandler.jav a:128)
] Internal server error
java.lang.NullPointerException
at org.jivesoftware.openfire.user.UserNameManager.getUserName(UserNameManager.java :99)
at org.jivesoftware.openfire.user.UserNameManager.getUserName(UserNameManager.java :79)
at org.jivesoftware.openfire.roster.Roster.(Roster.java:169)
at org.jivesoftware.openfire.roster.RosterManager.getRoster(RosterManager.java:86)
at org.jivesoftware.openfire.user.User.getRoster(User.java:368)
at org.jivesoftware.openfire.handler.IQRosterHandler.manageRoster(IQRosterHandler. java:200)

Any smoking guns here?

Thanks!