dev@glassfish.java.net

Re: Failure encountered while deploying enterprise application.

From: Hong Zhang <hong.hz.zhang_at_oracle.com>
Date: Fri, 11 Mar 2011 06:16:17 -0800 (PST)

Please see my answer to the user alias (copy/pasted below)

=============================================
This error message tells you your web.xml does not conform to the
corresponding dtd (glassfish does the deployment descriptor validation
as the spec required).

Looking at your web.xml, I noticed the first servlet element does not
conform to the dtd, based on the dtd:

<!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
(servlet-class|jsp-file), init-param*, load-on-startup?,
security-role-ref*)>

the <load-on-startup> element needs to appear after the <init-param>
element, but in your servlet "WebtogoWorkSpaceRedirect", the
<load-on-startup> element appears before the <init-param> element.
Please fix the ordering and try again.

You may get similar error messages for other elements, just fix them
similarly so your web.xml conform to the dtd.



On 3/11/2011 4:35 AM, Yi Yang wrote:
> Dear Experts,
>
> I am currently working on certifying Oracle Mobile Server on Glassfish
> 3.1.
>
> I encountered the following error while trying to manually deploying
> an enterprise application (directory not an archive):
>
> Error Message:
> ----------------
> Exception while deploying the app [mobileserver] Deployment Descriptor
> parsing failure : The content of element type "servlet" must match
> "(icon?,servlet-name,display-name?,description?,(servlet-class Invalid
> Deployment Descriptors in Deployment descriptor file WEB-INF/web.xml
> in archive [webtogo]. Line 16 Column 13 -- The content of element type
> "servlet" must match
> "(icon?,servlet-name,display-name?,description?,(servlet-class
> ========= No upload needed.
> origPath=c:\glassfish3\glassfish\mobile_oc4j\j2ee\mobileserver\applications\mobileserver,
> filePath=c:\glassfish3\glassfish\mobile_oc4j\j2ee\mobileserver\applications\mobileserver
>
> ----------------
>
> However, this application has been certified on Weblogic server.
>
> I'd appreciate it greatly if you could kindly offer me some help!
>
>
> Thanks very much!
>
> Best regards,
>
> Jerry Yang
> Oracle BDB Group