This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I implemented a new Webservice using Maven and Eclipse. That worked, as long as I deployed the war-file directly. But when I try to deploy the webservice(the war-file) as a module of an ear-project, I get the following exception
weblogic.application.ModuleException: [HTTP:101216]Servlet: "xx.MyServiceImpl" failed to preload on startup in Web application: "/xx-ws/myservice".
javax.servlet.ServletException: Servlet class: xx.MyServiceImpl' does not implement javax.servlet.Servlet
In the pom.xml of the EAR-Project I added the webservice project as a dependency and as a Module:
You are correct. The webservice should not need any servlet code, however it looks like it's expecting a servlet. I would check how your are deploying this and verify that you are doing it correctly.
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Joined: Jan 24, 2011
I did that. The strange thing is, that there are existing projects which work. On the base of the maven settings they are the same. So my guess is that the problem is something that is done in the background by maven or eclipse. I mean, I annotated the Class that implements the webservice as usual (@WebService (name = "...").
In my opinion that should do it!
So my guess is that the problem is something that is done in the background by maven or eclipse.
Can you check in the deployed .ear (presuming the ear containing web service is deployed but throwing exception), if application.xml contains a reference to your .war application? You can troubleshoot better by directly inspecting deployed .ear and by tweaking it manually instead of completely relying on IDE and script.
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Jax-WS Webservice leads to ServletException