powered by Jive Software

What shoud I do to start a development with jive messenger?

Is there any jar files(like jive_messenger.jar) that I shoud put into my project’‘s classpath? I have tried to use the jar command to make a jar file which include all the classes that showed in the jive javadoc,and put it into my project’'s classpath,then I wrote a programm just had one line like this:

XMPPServer server = XMPPServer.getInstance(); but when I execut it I got these exceptions:

[LinkageError while defining class: org.jivesoftware.messenger.XMPPServer

Could not be defined due to: org/jivesoftware/messenger/XMPPServer (Unsupported major.minor version 49.0)

This is often caused by having a class defined at multiple

locations within the classloader hierarchy. Other potential causes

include compiling against an older or newer version of the class

that has an incompatible method signature.

Dumping the current context classloader hierarchy:

==> indicates defining classloader


Thanks in advance, and I’'m sorry for my poor english.

Hi zey,

That “Unsupported major.minor version” exception you’‘re getting means that the class you’‘re trying to execute (in this case the ones inside the messenger.jar) were compilied with a version of Java that is greater than the version you are trying to run your program with. Since Messenger requires 1.5 I would guess that you’'re probably trying to run it with version prior to that, maybe 1.4.x?

Hope that helps,


Hi,ryang ,thank you very much for your reply,it’'s completely correct,but now, could you tell me where is the entry point for developing? In my own project, how can I obtain the XMPPServer, then I can get some managers(such as SessinonManager,UserManager etc).For an actual example, Now, I want to use sessionManager.sendServerMessage(org.xmpp.packet.JID address, String subject, String body) to send a message to the special user.I know there is a same function in the jive_messenger web admin plugin, but how can I do this in my own project? Hope for your help, Thanks in advance!

Hi zey,

Good to hear that we took care of that exception you were seeing. Are you in the process of developing a plugin?

To obtain an instance of the XMPPServer, SessionManager, and/or UserManager all you need to do is:

XMPPServer server = XMPPServer.getInstance();
SessionManager sessionManager = server.getSessionManager();
UserManager userManager = server.getUserManager();


SessionManager sessionManager = XMPPServer.getInstance().getSessionManager();
UserManager userManager = XMPPServer.getInstance().getUserManager();

And then like you said, to send a message you can use the SessionManager.sendServerMessage() method.

Hope that helps,



Thanks for the reply,although I have got them in the javadoc.But now, I wanner understand is it the only way to obtain an instance of theXMPPServer by developing a plugin? Could I got it outside(means in my owe project) by specify some parameters?

Hi zey,

But now, I wanner understand is it the

only way to obtain an instance of theXMPPServer by

developing a plugin? Could I got it outside(means in

my owe project) by specify some parameters?

Going the plugin route is certainly the easiest way to obtain an instance. What I would suggest doing is what Matt suggested url=http://www.jivesoftware.org/forums/thread.jspa?forumID=40&threadID=14422&mes sageID=97052&#97052here[/url], which is to create a plugin that does whatever it is that you want to do and then provide that functionality as a web service.

Hope that helps,


Hi, Ryan,

Now, I’'m trying to create a plugin, and I put the .java file into the myplugin/src/java/ directory, the .jsp file into the myplugin/src/web/, then use ant plugins to build it.In the target direcotry,the myplugin.jar has only the.class file, but according to the plugin guide:JSP files must be compiled and put into the classpath of the plugin. A web.xml file containing the compiled JSP servlet entries must be put into the web/ directory of the plugin. Note: the Jive Messenger build script can assist with compiling JSPs and creating the web.xml.Could you tell me what should I do to compile jsps and create the web.xml? And where should I to put them is correct, mypulgin/web/ directory?

Thanks in advance!

A myplugin-jspc.jar file should have been created in the lib directory that contains your compiled JSP files. The correct dir is myplugin/src/web.



Also, the web.xml file will have been automatically generated and placed in the web directory of myplugin.jar

Hope that helps,