I am trying to deploy an OSGi bundle on a Domino server. The bundle contains a servlet and static web resources. The resources and the servlet are registered using the org.eclipse.equinox.http.registry.resources and org.eclipse.equinox.http.registry.servlets extension points. The bundle is copied to the applications/eclipse/... folder below domino/data.
When I enter the alias to the static resources I get the requested page. This page in turn makes a request to the servlet but gets a 500 return code. The server console shows HTTP Web Server: Command Not Handled Exception
In the error log there is a message java.lang.ClassCastException: mypackage.Simp开发者_开发知识库leServlet incompatible with javax.servlet.Servlet
The SimpleServlet is simply a class which implements javax.servlet.Servlet.
Can anyone say why this might be happening? What can I do to get more information?
This looks like you have multiple copies of the Servlet API hanging around. You need to find out if there are multiple bundles exporting the javax.servlet
package, and make sure that both the HTTP server bundle (which is part of Domino, presumably) and your own bundle import it from the same place.
精彩评论