[jboss-user] [JBoss Web Services] New message: "Re: [beginner] Deploying a ear file under JBoss AS 5"

Sarko Zio do-not-reply at jboss.com
Sun Jan 10 04:01:28 EST 2010

User development,

A new message was posted in the thread "[beginner] Deploying a ear file under JBoss AS 5":


Author  : Sarko Zio
Profile : http://community.jboss.org/people/sarko86

Hi and thank you for your kind reply!
So, in the console the following error is displayed:

 *** DEPLOYMENTS IN ERROR: Name -> Error
 vfszip:/C:/Programmi/jBoss/server/default/deploy/example2.ear/ -> org.jboss.depl
 oyers.spi.DeploymentException: Error creating managed object for vfszip:/C:/Prog
 Deployment "vfszip:/C:/Programmi/jBoss/server/default/deploy/example2.ear/" is
 in error due to the following reason(s): org.xml.sax.SAXException: The content
 of element type "servlet-mapping" must match "(servlet-name,url-pattern)". @ vfs
 at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(Dep
Ok, I know default package is discouraged, but it was just a test. I don't really think this is the an error cause (but I may be wrong  )
No, I don't use Eclipse, at least for the first projects. I want to understand step-by-step how the whole thing works. The only strange thing I did was to modify the listening port from 8080 to 8070 (in order to avoid conflicts with Tomcat).
And, as I wrote, I developed it also in the manal way after JBoss started but nothing to do, always the same error. Well, all the configuration files are contained in the .ear I attached. Anyway, the class reads:
import java.io.*;
 import java.text.*;
 import java.util.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
 public void service(HttpServletRequest request, HttpServletResponse       response) throws  IOException, ServletException{
     PrintWriter out = response.getWriter();
     out.println("<title>Hello World Servlet!</title>");
     out.println("<p align=\"center\"><font size=\"5\" color=\"#000080\">Hello World!</font></p>");
     out.println("<p align=\"center\"><a href=\"javascript:history.back()\">Go to Home</a></p>");
>From the error message it seems there is an error in web.xml but I don't really understand this magic code. I have knowledge of servlets but I don't know the hidden mechanisms behind JBoss deployment so I wouldn't know where to modify the file.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
Hope this will make the problem clearer...
Thank you again!


To reply to this message visit the message page: http://community.jboss.org/message/519121#519121

More information about the jboss-user mailing list