Connecting to open im through jsp


I have the following code in JSP webpage where i m trying to run that jsp from jetspeed.

<%@ page import = “org.jivesoftware.smack.packet.*” %>

<%@ page import = “org.jivesoftware.smack.packet.IQ” %>

<%@ page import = “org.jivesoftware.smack.RosterEntry” %>

<%@ page import = “org.jivesoftware.smack.XMPPConnection” %>

<% String server = “”;

XMPPConnection con = new XMPPConnection(server);


I m getting the following error.

Error encountered processing a template: /portlets/html/TutorialStockQuote8.jsporg.apache.jasper.JasperException: org/xmlpull/v1/XmlPullParserException at org.apache.jasper.servlet.JspServletWrapper.service( at org.apache.jasper.servlet.JspServlet.serviceJspFile( at org.apache.jasper.servlet.JspServlet.service( at javax.servlet.http.HttpServlet.service( at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.jav a:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher. java:575) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.ja va:498) at at at org.apache.jetspeed.portal.portlets.viewprocessor.JSPViewProcessor.processView( at org.apache.jetspeed.portal.portlets.GenericMVCPortlet.buildContent(GenericMVCPo at org.apache.jetspeed.portal.portlets.GenericMVCPortlet…

Could any of you please help me solve this.


Dear Pramod

Please check this line

Error encountered processing a template: /portlets/html/TutorialStockQuote8.jsporg.apache.jasper.JasperException:

Looks like some other issue not actually related with Smack.

I would request you to try a simple JSP fist to isolate issues on your jetspeed installation and configuration.

Hope this help and please post your progress.


hi pramod

i’‘m using a simple program to connect to jabber server but i’'m getting the following error.

i’'m trying to execute this simple program

import org.jivesoftware.smack.*;

public class connector {

public static void main(String[] args) {

try {

XMPPConnection connection = new XMPPConnection(“”, 5222);



} catch (Exception e) {





but I get the following error

Exception in thread “main” java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPul


at org.jivesoftware.smack.XMPPConnection.init(

at org.jivesoftware.smack.XMPPConnection.(

at connector.main(

wat do I have to do to remove this error ?



Please look at your thread at

Please respond to the query that Matt has made and avoid posting the same question everywhere as it confuses people following the same. You could start a new topic and stick to the same.