element type "web-app" must match

1,018 views
Skip to first unread message

QCS Info

unread,
Mar 15, 2011, 12:36:07 AM3/15/11
to Google Web Toolkit
Noobie here. I want to run the StockWatcher example. I have ran in
development mode. After a successful GWT 2.2.0 build in Eclipse
Helios 3.6.1, while attempting to deploy the Stockwatcher.war built
from the unchanged Stockwatcher example(except for the deprecated //
Display timestamp fix in line 175 of StockWatcher.java) to glassfish3
(GlassFish Server Open Source Edition 3.1 (build 43)), I got the
following exception. I'd like to pointed towards the tutorial section
that explains how this works, and what I'm doing wrong. Thanks for
your insight.
Q

Error occurred during deployment: Exception while deploying the app
[StockWatcher] : org.xml.sax.SAXParseException: The content of element
type "web-app" must match "(icon?,display-
name?,description?,distributable?,context-param*,filter*,filter-
mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-
mapping*,welcome-file-list?,error-page*,taglib*,resource-env-
ref*,resource-ref*,security-constraint*,login-config?,security-
role*,env-entry*,ejb-ref*,ejb-local-ref*)".. Please see server.log for
more details.

The web.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<!-- Default page to serve -->
<welcome-file-list>
<welcome-file>StockWatcher.html</welcome-file>
</welcome-file-list>

<!-- Servlets -->
<servlet>
<servlet-name>greetServlet</servlet-name>
<servlet-
class>com.google.gwt.sample.stockwatcher.server.GreetingServiceImpl</
servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>greetServlet</servlet-name>
<url-pattern>/stockwatcher/greet</url-pattern>
</servlet-mapping>

</web-app>

Server log is:
[#|2011-03-07T21:55:48.674-0700|SEVERE|glassfish3.1|
javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|
_ThreadID=64;_ThreadName=Thread-1;|Exception while deploying the app
[StockWatcher] :
org.xml.sax.SAXParseException: The content of element type "web-app"
must match "(icon?,display-name?,description?,distributable?,context-
param*,filter*,filter-mapping*,listener*,servlet*,servlet-
mapping*,session-config?,mime-mapping*,welcome-file-list?,error-
page*,taglib*,resource-env-ref*,resource-ref*,security-
constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-
ref*)".
at
com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:
315)
at
<snip>
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at
com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:
309)
... 74 more
|#]

Juan Pablo Gardella

unread,
Mar 15, 2011, 10:53:44 AM3/15/11
to google-we...@googlegroups.com
Change "http://java.sun.com/dtd/web-app_2_3.dtd" for 2.5

Juan

2011/3/15 QCS Info <in...@quinlancomputing.com>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Reply all
Reply to author
Forward
0 new messages