Search code examples
osgilotus-dominoequinoxdomino-designer-eclipse

Deploying OSGi Servlet to Domino (IBM presentation) - 404 error


I´m trying to deploy an OSGi container in Domino using PDE tool with Equinox. I´m following the instruction in this IBM slideshow: http://www.slideshare.net/fiorep/domino-osgi-development?next_slideshow=1

However (as per slide #52) when I browse to http://localhost/simpledemo (after clicking Debug from Debug Configuration), I get a "404 file not found" error.

"simpledemo" is the alias mapped in the puligin.xml file (slide 44). The servlet name is however SimpleServlet.

Any ideas what is going on?? Any help is much appreciated.

My environment: Windows 2012 Server (on VM),Eclipse 3.6.2, Equinox, PDE tool and Domino Server 6.01 server.

reference: Deploying OSGi Servlet to Domino

SimpleServlet.Java

 package com.ibm.ls2012;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.ServletException;
import java.io.IOException;
import java.io.PrintWriter;

public class SimpleServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

public SimpleServlet() {

}

@Override

protected void doGet(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {
   final PrintWriter pw = resp.getWriter();

   resp.setContentType("text/html");
   pw.println("<HTML");
   pw.println("<HEAD><TITLE>SHOW112 - Simple Servlet Demo</TITLE></HEAD>");
   pw.println("<BODY>");
   pw.println("<BR>");
   pw.println("hello world. feeling cold yet?");
}}

Solution

  • First thing I would check is that the plugin is correctly loaded. From the server console type: tell http osgi ss {yourpluginname}. Make sure the plugin is loaded and has an active state. If state is installed, then you have a missing constraint issue, to diagnose, type tell http osgi diag {pluginid}. Note: you can get the pluginid from the first ss command.

    If state is resolved, then you need to start it manually using the following command: tell http osgi start {pluginid}. Note: being in a resolved state is not expected, the Domino Server should automatically start all plugins.