Hello Guys,
I ‘m creating a test tool where each piece of test code will be an OSGI bundle (like an Eclipse plug-in). So, to create the user interface for this tool, I’m trying to use ITMill inside an Equinox (OSGI) bundle. I followed the below tutorial to execute, with success, a simple Servlet inside a bundle:
http://www.eclipse.org/equinox-portal/tutorials/server-side/
However, I can’t execute the ITMill Servlet inside a bundle running with Jetty. I’m catching a null pointer, please see the below logs.
Do you know anyone that tried to execute ITMill as an OSGI bundle? If you have curiosity, my code is available to download (eclipse project):
http://www.prestesmachado.com.br/exemplos/SoaTestWeb.zip
I’d like to work with and contribute to solve this issue, I believe that it’s really cool to execute ITMill as a OSGI bundle.
Thank you
Rodrigo
My logs:
osgi> 01/10/2008 00:35:47 org.mortbay.http.HttpServer doStart
INFO: Version Jetty/5.1.x
01/10/2008 00:35:47 org.mortbay.util.Container start
INFO: Started org.eclipse.equinox.http.jetty.internal.Servlet25Handler@1addb59
01/10/2008 00:35:47 org.mortbay.util.Container start
INFO: Started HttpContext
[/,/]
01/10/2008 00:35:47 org.mortbay.http.SocketListener start
INFO: Started SocketListener on 0.0.0.0:8080
01/10/2008 00:35:47 org.mortbay.util.Container start
INFO: Started org.mortbay.http.HttpServer@16c9867
java.lang.NullPointerException
at com.itmill.toolkit.terminal.gwt.server.WebApplicationContext.equals(WebApplicationContext.java:127)
at org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:835)
at org.eclipse.equinox.http.servlet.internal.HttpSessionAdaptor.setAttribute(HttpSessionAdaptor.java:96)
at com.itmill.toolkit.terminal.gwt.server.WebApplicationContext.getApplicationContext(WebApplicationContext.java:109)
at com.itmill.toolkit.terminal.gwt.server.ApplicationServlet.service(ApplicationServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:269)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:677)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
01/10/2008 00:36:08 org.mortbay.jetty.servlet.ServletHandler handle
WARNING: EXCEPTION
javax.servlet.ServletException
at com.itmill.toolkit.terminal.gwt.server.ApplicationServlet.service(ApplicationServlet.java:545)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:269)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:677)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
01/10/2008 00:36:08 org.mortbay.jetty.servlet.ServletHandler handle
SEVERE: /soatest:
java.lang.NullPointerException
at com.itmill.toolkit.terminal.gwt.server.WebApplicationContext.equals(WebApplicationContext.java:127)
at org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:835)
at org.eclipse.equinox.http.servlet.internal.HttpSessionAdaptor.setAttribute(HttpSessionAdaptor.java:96)
at com.itmill.toolkit.terminal.gwt.server.WebApplicationContext.getApplicationContext(WebApplicationContext.java:109)
at com.itmill.toolkit.terminal.gwt.server.ApplicationServlet.service(ApplicationServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:269)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:677)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)